Index: /openal-0.0.8/AUTHORS
===================================================================
--- /openal-0.0.8/AUTHORS	(revision 17)
+++ /openal-0.0.8/AUTHORS	(revision 17)
@@ -0,0 +1,20 @@
+In alphabetical order:
+
+Adam D. Moss <adam@steambird.com>
+Bernd Kreimeier <bk@oddworld.com>
+Christopher Purnell <cjp@lost.org.uk>
+Dirk Ehlke <dehlke@mip.informatik.uni-kiel.de>
+Elias Naur <elias@oddlabs.com>
+Erik Greenwald <erik@smluc.org>
+Erik Hofman <erik@ehofman.com>
+Garin Hiebert <garinh@cheesetoast.net>
+Guillaume Borios <gborios@free.fr>
+Jason Daly <jdaly@ist.ucf.edu>
+John E. Stone <j.stone@acm.org>
+Joseph I. Valenzuela <valenzuela@treyarch.com>
+Michael Vance <michael@linuxgames.com>
+Prakash Punnoor <prakash@punnoor.de>
+Ryan C. Gordon <ryan@epicgames.com>
+Sven Panne <sven.panne@aedion.de>
+Yotam Gingold <ygingold@cs.brown.edu>
+Zoltan Ponekker <pontscho@kac.poliod.hu>
Index: /openal-0.0.8/CMakeLists.txt
===================================================================
--- /openal-0.0.8/CMakeLists.txt	(revision 17)
+++ /openal-0.0.8/CMakeLists.txt	(revision 17)
@@ -0,0 +1,703 @@
+# cmake project file by Prakash Punnoor
+CMAKE_MINIMUM_REQUIRED(VERSION 2.0)
+
+SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/admin/CMakeModules")
+PROJECT(OpenAL C)
+SET(PACKAGE "openal")
+SET(PACKAGE_TARNAME "openal")
+SET(PACKAGE_NAME "openal")
+SET(PACKAGE_MAJOR_VERSION "0")
+SET(PACKAGE_MINOR_VERSION "0")
+SET(PACKAGE_BUILD_VERSION "8")
+SET(PACKAGE_VERSION "${PACKAGE_MAJOR_VERSION}.${PACKAGE_MINOR_VERSION}.${PACKAGE_BUILD_VERSION}")
+
+SET(PACKAGE_STRING "openal")
+SET(PACKAGE_BUGREPORT "openal-devel@opensource.creative.com")
+SET(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
+
+FIND_PACKAGE(ConfigHelper)
+
+MACRO(MACRO_TEST ARG VAR)
+CHECK_C_SOURCE_COMPILES(
+"#ifndef ${ARG}
+#error ${ARG} macro not defined
+#endif
+int main(){}
+" ${VAR})
+ENDMACRO(MACRO_TEST ARG VAR)
+
+
+ADD_DEFINE("PACKAGE_VERSION \"${PACKAGE_VERSION}\"")
+
+# We need ISO C99 features (e.g. snprintf) and POSIX IEEE Std 1003.1b-1993
+# features (e.g. struct timespec, used in <alsa/asoundlib.h>)
+ADD_DEFINITIONS(-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=199309)
+
+ADD_DEFINE("SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P}")
+
+INCLUDE(${CMAKE_ROOT}/Modules/CheckCSourceCompiles.cmake)
+INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
+INCLUDE(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
+INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
+
+INCLUDE_DIRECTORIES(${OpenAL_SOURCE_DIR}/common/include)
+INCLUDE_DIRECTORIES(${OpenAL_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${OpenAL_SOURCE_DIR}/src)
+INCLUDE_DIRECTORIES(${OpenAL_SOURCE_DIR}/src/arch)
+
+
+SET(AL_OBJS              src/al_bpool.c
+                         src/al_buffer.c
+                         src/al_config.c
+                         src/al_debug.c
+                         src/al_distance.c
+                         src/al_error.c
+                         src/al_ext.c
+                         src/al_filter.c
+                         src/al_listen.c
+                         src/al_main.c
+                         src/al_mixer.c
+                         src/al_mixfunc.c
+                         src/al_mixmanager.c
+                         src/al_mspool.c
+                         src/al_mutexlib.c
+                         src/al_queue.c
+                         src/al_rctree.c
+                         src/al_rcvar.c
+                         src/al_source.c
+                         src/al_spool.c
+                         src/al_state.c
+                         src/al_threadlib.c
+                         src/al_vector.c
+                         src/al_matrix.c
+                         src/mixaudio16.c
+                         src/backends/alc_backend.c)
+
+SET(ALC_OBJS             src/alc/alc_context.c
+                         src/alc/alc_speaker.c
+                         src/alc/alc_error.c
+                         src/alc/alc_device.c)
+
+SET(AC_OBJS              src/audioconvert/ac_misc.c
+                         src/audioconvert/ac_freq.c
+                         src/audioconvert/ac_bits.c
+                         src/audioconvert/ac_channels.c
+                         src/audioconvert/ac_helper.c
+                         src/audioconvert/ac_adpcm.c
+                         src/audioconvert/ac_endian.c)
+
+SET(EXT_OBJS             src/extensions/al_ext_loki.c
+                         src/extensions/al_ext_capture.c)
+
+SET(MP3_OBJS             src/extensions/al_ext_mp3.c)
+SET(VORBIS_OBJS          src/extensions/al_ext_vorbis.c)
+
+SET(BSD_OBJS             src/backends/alc_backend_bsd.c)
+SET(DARWIN_OBJS          src/backends/alc_backend_darwin.c)
+SET(DMEDIA_OBJS          src/backends/alc_backend_irix.c)
+SET(LINUX_OBJS           src/backends/alc_backend_linux.c)
+SET(MORPHOS_OBJS         src/backends/alc_backend_morphos.c)
+SET(SOLARIS_OBJS         src/backends/alc_backend_solaris.c)
+SET(WINDOWS_OBJS         src/backends/alc_backend_windows.c)
+SET(ALSA_OBJS            src/backends/alc_backend_alsa.c)
+SET(ARTS_OBJS            src/backends/alc_backend_arts.c)
+SET(ESD_OBJS             src/backends/alc_backend_esd.c)
+SET(NULL_OBJS            src/backends/alc_backend_null.c)
+SET(SDL_OBJS             src/backends/alc_backend_sdl.c)
+SET(WAVEOUT_OBJS         src/backends/alc_backend_wave.c)
+
+SET(x86_OBJS             src/arch/i386/x86_floatmul.c
+                         src/arch/i386/x86_cpu_caps_prk.c)
+SET(x86_MMX_OBJS         src/arch/i386/mixaudio16_mmx_prk.c)
+SET(x86_NASM_OBJS        src/arch/i386/x86_cpu_caps_detect_prk.nasm)
+SET(x86_MMX_NASM_OBJS    src/arch/i386/memcpy_mmx_prk.nasm)
+
+SET(PORTABLE_OBJS        src/arch/portable/floatmul.c
+                         src/arch/portable/cpu_caps.c)
+
+
+SET(ADD_CFLAGS "")
+SET(ADD_LIBS "")
+SET(ADD_LDFLAGS "")
+SET(ADD_WFLAGS "")
+
+IF(CMAKE_UNAME)
+  EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_MACHINE)
+ELSE(CMAKE_UNAME)
+  MESSAGE("Could not detect machine type")
+ENDIF(CMAKE_UNAME)
+
+IF(CMAKE_SYSTEM MATCHES CYGWIN OR CMAKE_SYSTEM MATCHES MINGW)
+  SET(CMAKE_SYSTEM Windows)
+  IF(CMAKE_SYSTEM MATCHES CYGWIN)
+    SET(CYGWIN ON)
+  ELSE(CMAKE_SYSTEM MATCHES CYGWIN)
+    SET(MINGW ON)
+  ENDIF(CMAKE_SYSTEM MATCHES CYGWIN)
+ENDIF(CMAKE_SYSTEM MATCHES CYGWIN OR CMAKE_SYSTEM MATCHES MINGW)
+
+
+TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
+
+IF(CMAKE_WORDS_BIGENDIAN)
+  ADD_DEFINE(WORDS_BIGENDIAN)
+ENDIF(CMAKE_WORDS_BIGENDIAN)
+
+
+OPTION(BUILD_STATIC "build static library too" ON)
+OPTION(BUILD_TESTS  "build the test-suite"     OFF)
+OPTION(PROFILE      "enable profile"           OFF)
+OPTION(OPTIMIZATION "enable optimization"      ON)
+OPTION(DEBUG        "enable debug"             OFF)
+OPTION(WARNINGS     "enable warnings"          ON)
+
+# sound backends
+IF(CMAKE_SYSTEM MATCHES "Linux")
+  OPTION(ALSA        "alsa back-end"         ON)
+  OPTION(ALSA_DLOPEN "alsa dynamic loading"  ON)
+ENDIF(CMAKE_SYSTEM MATCHES "Linux")
+
+#IF(WIN32)
+#  OPTION(DSOUND      "directsound back-end"  OFF)
+#ENDIF(WIN32)
+
+OPTION(NATIVE      "native/oss back-end"  ON)
+OPTION(ARTS        "arts back-end"        ON)
+OPTION(ARTS_DLOPEN "arts dynamic loading" ON)
+OPTION(DMEDIA      "DMedia/Irix back-end" ON)
+OPTION(ESD         "esd back-end"         ON)
+OPTION(ESD_DLOPEN  "esd dynamic loading"  ON)
+OPTION(SDL         "sdl back-end"         ON)
+OPTION(SDL_DLOPEN  "sdl dynamic loading"  ON)
+OPTION(WAVEOUT     "wave out back-end"    ON)
+OPTION(NULLOUT     "null out back-end"    ON)
+
+# additional codecs
+OPTION(VORBIS         "vorbis support"          ON)
+OPTION(VORBIS_DLOPEN  "vorbis dynamic loading"  ON)
+OPTION(MP3            "mp3 support"             ON)
+OPTION(MP3_DLOPEN     "mp3 dynamic loading"     ON)
+
+IF(DEBUG)
+  ADD_DEFINE(DEBUG)
+  IF(WARNINGS)
+    OPTION(MORE_WARNINGS "enable more warnings"         OFF)
+    OPTION(USE_WERROR    "enable fail on all warning"   OFF)
+  ENDIF(WARNINGS)
+
+  OPTION(EFENCE          "enable efence support"        OFF)
+  OPTION(DEBUG_MAXIMUS   "enable all debugging"         OFF)
+  OPTION(DEBUG_STUB      "enable stub debugging"        OFF)
+  OPTION(DEBUG_LOOP      "enable looping debugging"     OFF)
+  OPTION(DEBUG_CONVERT   "enable convertion debugging"  OFF)
+  OPTION(DEBUG_CONFIG    "enable config file debugging" OFF)
+  OPTION(DEBUG_LOCK      "enable lock debugging"        OFF)
+  OPTION(DEBUG_EXT       "enable extension debugging"   OFF)
+  OPTION(DEBUG_BUFFER    "enable buffer debugging"      OFF)
+  OPTION(DEBUG_SOURCE    "enable source debugging"      OFF)
+  OPTION(DEBUG_MIXER     "enable mixer debugging"       OFF)
+  OPTION(DEBUG_STREAMING "enable streaming debugging"   OFF)
+  OPTION(DEBUG_MATH      "enable math debugging"        OFF)
+  OPTION(DEBUG_MEM       "enable mem debugging"         OFF)
+  OPTION(DEBUG_CONTEXT   "enable context debugging"     OFF)
+  OPTION(DEBUG_QUEUE     "enable queue debugging"       OFF)
+  OPTION(DEBUG_FILTER    "enable filter debugging"      OFF)
+
+  IF(EFENCE)
+    FIND_LIBRARY(EFENCE_LIB NAMES efence PATHS /usr/lib /usr/local/lib)
+    IF(EFENCE_LIB MATCHES "NOTFOUND")
+      MESSAGE("Electric Fence not installed - disabled.")
+      SET(EFENCE OFF CACHE BOOL "" FORCE)
+    ELSE(EFENCE_LIB MATCHES "NOTFOUND")
+
+      SET(ADD_LIBS ${ADD_LIBS} ${EFENCE_LIB})
+    ENDIF(EFENCE_LIB MATCHES "NOTFOUND")
+  ENDIF(EFENCE)
+
+  MACRO(CHECK_DEBUG DEBUG_OPTION)
+  IF(${DEBUG_OPTION})
+    ADD_DEFINE(${DEBUG_OPTION})
+  ENDIF(${DEBUG_OPTION})
+  ENDMACRO(CHECK_DEBUG)
+
+  CHECK_DEBUG(DEBUG_MAXIMUS)
+  CHECK_DEBUG(DEBUG_STUB)
+  CHECK_DEBUG(DEBUG_LOOP)
+  CHECK_DEBUG(DEBUG_CONVERT)
+  CHECK_DEBUG(DEBUG_CONFIG)
+  CHECK_DEBUG(DEBUG_LOCK)
+  CHECK_DEBUG(DEBUG_EXT)
+  CHECK_DEBUG(DEBUG_BUFFER)
+  CHECK_DEBUG(DEBUG_SOURC)
+  CHECK_DEBUG(DEBUG_MIXER)
+  CHECK_DEBUG(DEBUG_STREAMING)
+  CHECK_DEBUG(DEBUG_MATH)
+  CHECK_DEBUG(DEBUG_MEM)
+  CHECK_DEBUG(DEBUG_CONTEXT)
+  CHECK_DEBUG(DEBUG_QUEUE)
+  CHECK_DEBUG(DEBUG_FILTER)
+ELSE(DEBUG)
+
+  ADD_DEFINITIONS(-DNDEBUG)
+ENDIF(DEBUG)
+
+
+# library stuff
+CHECK_LIBRARY_EXISTS("m" "sin" "" HAVE_LIB_M)
+IF(HAVE_LIB_M)
+  SET(ADD_LIBS ${ADD_LIBS} m)
+ELSE(HAVE_LIB_M)
+
+  IF(NOT CMAKE_SYSTEM MATCHES "Darwin")
+    MESSAGE(FATAL_ERROR "libm not found.")
+  ENDIF(NOT CMAKE_SYSTEM MATCHES "Darwin")
+ENDIF(HAVE_LIB_M)
+
+
+CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DL)
+IF(HAVE_DL)
+  CHECK_LIBRARY_EXISTS("dl" "dlopen" "" HAVE_LIB_DL)
+  IF(HAVE_LIB_DL)
+    SET(ADD_LIBS ${ADD_LIBS} dl)
+  ENDIF(HAVE_LIB_DL)
+ELSE(HAVE_DL)
+
+  ADD_DEFINE(NODLOPEN)
+  MESSAGE("Dynamic loading of libraries is not available.")
+ENDIF(HAVE_DL)
+
+
+# Special OS objs for target systems
+IF(NATIVE)
+IF(CMAKE_SYSTEM MATCHES "Linux")
+  ADD_DEFINE(USE_BACKEND_NATIVE_IRIX)
+  SET(OS_OBJS ${LINUX_OBJS})
+ELSE(CMAKE_SYSTEM MATCHES "Linux")
+
+IF(CMAKE_SYSTEM MATCHES "BSD")
+  ADD_DEFINE(USE_BACKEND_NATIVE_BSD)
+  SET(OS_OBJS ${BSD_OBJS})
+ELSE(CMAKE_SYSTEM MATCHES "BSD")
+
+IF(CMAKE_SYSTEM MATCHES "SunOS")
+  ADD_DEFINE(USE_BACKEND_NATIVE_SOLARIS)
+  SET(OS_OBJS ${SOLARIS_OBJS})
+ELSE(CMAKE_SYSTEM MATCHES "SunOS")
+
+IF(CMAKE_SYSTEM MATCHES "Windows")
+  ADD_DEFINE(USE_BACKEND_NATIVE_WINDOWS)
+  SET(OS_OBJS ${WINDOWS_OBJS})
+  # need winmm library for waveOutOpen etc.
+  SET(ADD_LIBS ${ADD_LIBS} winmm)
+ELSE(CMAKE_SYSTEM MATCHES "Windows")
+
+IF(CMAKE_SYSTEM MATCHES "Darwin")
+  ADD_DEFINE(USE_BACKEND_NATIVE_DARWIN)
+  SET(OS_OBJS ${DARWIN_OBJS})
+  #FIXME
+  SET(ADD_LDFLAGS "${ADD_LDFLAGS} -I/System/Library/Frameworks/CoreAudio.framework/Headers/ -framework CoreAudio")
+ELSE(CMAKE_SYSTEM MATCHES "Darwin")
+
+IF(CMAKE_SYSTEM MATCHES "morphos")
+  ADD_DEFINE(USE_BACKEND_NATIVE_MORPHOS)
+  SET(OS_OBJS ${MORPHOS_OBJS})
+ELSE(CMAKE_SYSTEM MATCHES "morphos")
+
+  MESSAGE("unknown System")
+  SET(OS_OBJS ${LINUX_OBJS})
+ENDIF(CMAKE_SYSTEM MATCHES "morphos")
+ENDIF(CMAKE_SYSTEM MATCHES "Darwin")
+ENDIF(CMAKE_SYSTEM MATCHES "Windows")
+ENDIF(CMAKE_SYSTEM MATCHES "SunOS")
+ENDIF(CMAKE_SYSTEM MATCHES "BSD")
+ENDIF(CMAKE_SYSTEM MATCHES "Linux")
+ENDIF(NATIVE)
+
+# threads handling
+IF(CMAKE_SYSTEM MATCHES "morphos")
+  CHECK_INCLUDE_FILE(dlfcn.h MOSTHREAD_AVAILABLE)
+ENDIF(CMAKE_SYSTEM MATCHES "morphos")
+
+IF(MOSTHREAD_AVAILABLE)
+  ADD_DEFINE(USE_MORPHOSTHREADING)
+ELSE(MOSTHREAD_AVAILABLE)
+
+  FIND_PACKAGE(Threads)
+  IF(CMAKE_USE_WIN32_THREADS_INIT)
+    ADD_DEFINE(USE_WINDOWSTHREADING)
+  ELSE(CMAKE_USE_WIN32_THREADS_INIT)
+
+  IF(CMAKE_USE_PTHREADS_INIT)
+    ADD_DEFINE(USE_POSIXTHREADING)
+    SET(ADD_LIBS ${ADD_LIBS} ${CMAKE_THREAD_LIBS_INIT})
+  ELSE(CMAKE_USE_PTHREADS_INIT)
+
+    ADD_DEFINE(NO_THREADING)
+  ENDIF(CMAKE_USE_PTHREADS_INIT)
+  ENDIF(CMAKE_USE_WIN32_THREADS_INIT)
+ENDIF(MOSTHREAD_AVAILABLE)
+
+# sound backends
+FIND_PACKAGE(PkgConfig)
+
+MACRO(CHECK_BACKEND BACKEND_OPTION BACKEND_NAME BACKEND_LIB BACKEND_HEADER BACKEND_TEST_FUNC)
+IF(${BACKEND_OPTION} AND NOT ${BACKEND_OPTION}_FOUND MATCHES "1${${BACKEND_OPTION}_DLOPEN}")
+  IF(CMAKE_PKGCONFIG_EXECUTABLE AND NOT ${BACKEND_NAME} MATCHES "^$")
+    PKGCONFIG(${BACKEND_NAME}
+              BACKEND_HAVE
+              BACKEND_INCLUDE_DIRS
+              BACKEND_DEFINES
+              BACKEND_LINK_DIRS
+              BACKEND_LIBS)
+
+    SET(${BACKEND_OPTION}_HAVE          ${BACKEND_HAVE}          CACHE INTERNAL "")
+    SET(${BACKEND_OPTION}_INCLUDE_DIRS "${BACKEND_INCLUDE_DIRS}" CACHE INTERNAL "")
+    SET(${BACKEND_OPTION}_DEFINES      "${BACKEND_DEFINES}"      CACHE INTERNAL "")
+    SET(${BACKEND_OPTION}_LINK_DIRS    "${BACKEND_LINK_DIRS}"    CACHE INTERNAL "")
+    SET(${BACKEND_OPTION}_LIBS         "${BACKEND_LIBS}"         CACHE INTERNAL "")
+
+    #MESSAGE("have ${${BACKEND_OPTION}_HAVE} inc ${${BACKEND_OPTION}_INCLUDE_DIRS} def ${${BACKEND_OPTION}_DEFINES} linkdirs ${${BACKEND_OPTION}_LINK_DIRS} libs ${${BACKEND_OPTION}_LIBS}")
+  ENDIF(CMAKE_PKGCONFIG_EXECUTABLE AND NOT ${BACKEND_NAME} MATCHES "^$")
+
+  SET(SOURCE
+"#include <${BACKEND_HEADER}>
+int main(){return 0;}
+")
+  # CHECK_INCLUDE_FILE() doesn't handle include dir, so check by hand
+  FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/src.c" "${SOURCE}")
+
+  TRY_COMPILE(HAVE_BACKEND_HEADER
+              ${CMAKE_BINARY_DIR}
+              ${CMAKE_BINARY_DIR}/CMakeTmp/src.c
+              CMAKE_FLAGS
+              "-DINCLUDE_DIRECTORIES:STRING=${${BACKEND_OPTION}_INCLUDE_DIRS}"
+              "-DCOMPILE_DEFINITIONS:STRING=${${BACKEND_OPTION}_DEFINES}"
+              OUTPUT_VARIABLE OUTPUT)
+
+   WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeOutput.log
+              "Performing manual C SOURCE FILE Test HAVE_BACKEND_HEADER for ${BACKEND_OPTION} with the following output:\n"
+              "${OUTPUT}\n"
+              "Source file was:\n${SOURCE}\n" APPEND)
+
+  IF(HAVE_BACKEND_HEADER)
+    IF(HAVE_DL AND ${BACKEND_OPTION}_DLOPEN)
+      SET(${BACKEND_OPTION}_FOUND "1${${BACKEND_OPTION}_DLOPEN}" CACHE INTERNAL "")
+    ELSE(HAVE_DL AND ${BACKEND_OPTION}_DLOPEN)
+
+      IF(${BACKEND_OPTION}_LIBS MATCHES "^$")
+        FIND_LIBRARY(${BACKEND_OPTION}_LIBS NAMES ${BACKEND_LIB} PATHS /usr/lib /usr/local/lib)
+      ENDIF(${BACKEND_OPTION}_LIBS MATCHES "^$")
+
+      IF(${BACKEND_OPTION}_LIBS MATCHES "NOTFOUND")
+        MESSAGE(STATUS "${BACKEND_OPTION} library ${BACKEND_LIB} not found.")
+      ELSE(${BACKEND_OPTION}_LIBS MATCHES "NOTFOUND")
+
+        # check whether back-end is link-able
+        SET(SOURCE
+"int main(){${BACKEND_TEST_FUNC}();return 0;}
+")
+        FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/src.c" "${SOURCE}")
+
+        TRY_COMPILE(BACKEND_LINKS
+          ${CMAKE_BINARY_DIR}
+          ${CMAKE_BINARY_DIR}/CMakeTmp/src.c
+          CMAKE_FLAGS
+          "-DINCLUDE_DIRECTORIES:STRING=${${BACKEND_OPTION}_INCLUDE_DIRS}"
+          "-DLINK_DIRECTORIES:STRING=${${BACKEND_OPTION}_LINK_DIRS}"
+          "-DLINK_LIBRARIES:STRING=${${BACKEND_OPTION}_LIBS}"
+          "-DCOMPILE_DEFINITIONS:STRING=${${BACKEND_OPTION}_DEFINES}"
+          OUTPUT_VARIABLE OUTPUT)
+
+        WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeOutput.log
+                   "Performing manual C SOURCE FILE Test BACKEND_LINKS for ${BACKEND_OPTION} with the following output:\n"
+                   "${OUTPUT}\n"
+                   "Source file was:\n${SOURCE}\n" APPEND)
+
+        IF(BACKEND_LINKS)
+          SET(${BACKEND_OPTION}_FOUND "1${${BACKEND_OPTION}_DLOPEN}" CACHE INTERNAL "")
+        ELSE(BACKEND_LINKS)
+
+          MESSAGE(STATUS "${BACKEND_OPTION} doesn't link.")
+        ENDIF(BACKEND_LINKS)
+      ENDIF(${BACKEND_OPTION}_LIBS MATCHES "NOTFOUND")
+    ENDIF(HAVE_DL AND ${BACKEND_OPTION}_DLOPEN)
+  ELSE(HAVE_BACKEND_HEADER)
+
+    MESSAGE(STATUS "${BACKEND_OPTION} header ${BACKEND_HEADER} not found.")
+  ENDIF(HAVE_BACKEND_HEADER)
+ENDIF(${BACKEND_OPTION} AND NOT ${BACKEND_OPTION}_FOUND MATCHES "1${${BACKEND_OPTION}_DLOPEN}")
+
+IF(${BACKEND_OPTION} AND ${BACKEND_OPTION}_FOUND MATCHES "1${${BACKEND_OPTION}_DLOPEN}")
+  SET(OS_OBJS ${OS_OBJS} ${${BACKEND_OPTION}_OBJS})
+  # kinda hack, but won't hurt
+  ADD_DEFINE(USE_BACKEND_${BACKEND_OPTION})
+  ADD_DEFINE(ENABLE_EXTENSION_AL_EXT_${BACKEND_OPTION})
+  INCLUDE_DIRECTORIES(${${BACKEND_OPTION}_INCLUDE_DIRS})
+
+  ADD_DEFINITIONS(${${BACKEND_OPTION}_DEFINES})
+
+  IF(HAVE_DL AND ${BACKEND_OPTION}_DLOPEN)
+    ADD_DEFINE(OPENAL_DLOPEN_${BACKEND_OPTION})
+    MESSAGE(STATUS "${BACKEND_OPTION} support - dynamic")
+  ELSE(HAVE_DL AND ${BACKEND_OPTION}_DLOPEN)
+
+    SET(ADD_LIBS ${ADD_LIBS} ${${BACKEND_OPTION}_LIBS})
+    LINK_DIRECTORIES(${${BACKEND_OPTION}_LINK_DIRS})
+    MESSAGE(STATUS "${BACKEND_OPTION} support - static")
+  ENDIF(HAVE_DL AND ${BACKEND_OPTION}_DLOPEN)
+ELSE(${BACKEND_OPTION} AND ${BACKEND_OPTION}_FOUND MATCHES "1${${BACKEND_OPTION}_DLOPEN}")
+
+  MESSAGE(STATUS "${BACKEND_OPTION} support - disabled")
+  SET(${BACKEND_OPTION} OFF CACHE BOOL "" FORCE)
+ENDIF(${BACKEND_OPTION} AND ${BACKEND_OPTION}_FOUND MATCHES "1${${BACKEND_OPTION}_DLOPEN}")
+ENDMACRO(CHECK_BACKEND)
+
+#             OPT    PKG-NAME   LIB        HEADER              TEST-FUNCTION
+CHECK_BACKEND(ALSA   alsa       asound     alsa/asoundlib.h    snd_pcm_info_sizeof)
+CHECK_BACKEND(ARTS   artsc      artsc      artsc.h             arts_free)
+CHECK_BACKEND(DMEDIA ""         audio      dmedia/audio.h      alGetResourceByName)
+CHECK_BACKEND(ESD    esd        esd        esd.h               esd_audio_open)
+CHECK_BACKEND(SDL    sdl        sdl        SDL.h               SDL_LockAudio)
+#IF(WIN32)
+#  CHECK_BACKEND(DSOUND ""       dsound     dsound.h     ???)
+#ENDIF(WIN32)
+
+CHECK_BACKEND(MP3    smpeg      smpeg      smpeg.h             SMPEG_play)
+CHECK_BACKEND(VORBIS vorbisfile vorbisfile vorbis/vorbisfile.h ov_clear)
+
+IF(WAVEOUT)
+  SET(OS_OBJS ${OS_OBJS} ${WAVEOUT_OBJS})
+  ADD_DEFINE(USE_BACKEND_WAVEOUT)
+ENDIF(WAVEOUT)
+
+IF(NULLOUT)
+  SET(OS_OBJS ${OS_OBJS} ${NULL_OBJS})
+  ADD_DEFINE(USE_BACKEND_NULL)
+ENDIF(NULLOUT)
+
+
+# Special objs for architectures
+IF(CMAKE_SYSTEM_MACHINE MATCHES "i.86" OR CMAKE_SYSTEM_MACHINE MATCHES "x86_64")
+  INCLUDE_DIRECTORIES(${OpenAL_SOURCE_DIR}/src/arch/i386)
+  SET(ARCH_OBJS ${x86_OBJS})
+
+  MACRO_TEST(__MMX__ HAVE_MMX)
+  IF(HAVE_MMX)
+    SET(ARCH_OBJS ${ARCH_OBJS} ${x86_MMX_OBJS})
+  
+
+  IF(CMAKE_SYSTEM_MACHINE MATCHES "i.86")
+    # nasm stuff
+    FIND_PROGRAM(HAVE_NASM NAMES nasm)
+
+    IF(NOT HAVE_NASM MATCHES "NOTFOUND")
+      PROJECT(OpenAL ASM)
+      MESSAGE(STATUS "Using NASM")
+      ADD_DEFINE(HAVE_CPU_CAPS_DETECTION)
+      SET(ARCH_OBJS ${ARCH_OBJS} ${x86_NASM_OBJS})
+
+      IF(HAVE_MMX)
+        SET(ARCH_OBJS ${ARCH_OBJS} ${x86_MMX_NASM_OBJS})
+        ADD_DEFINE(HAVE_MMX_MEMCPY)
+      ENDIF(HAVE_MMX)
+    ELSE(NOT HAVE_NASM MATCHES "NOTFOUND")
+
+      IF(HAVE_MMX)
+        MESSAGE("Warning: MMX capability found, but NASM not found. Without NASM no SIMD detection (MMX enabled by default) and no MMX memcopy is built.")
+      ENDIF(HAVE_MMX)
+    ENDIF(NOT HAVE_NASM MATCHES "NOTFOUND")
+  ENDIF(CMAKE_SYSTEM_MACHINE MATCHES "i.86")
+
+  IF(CMAKE_SYSTEM_MACHINE MATCHES "i686" OR CMAKE_SYSTEM_MACHINE MATCHES "x86_64")
+    OPTION(OPTIM_GENERIC "enable full generic mixing despite MMX optimized routines" OFF)
+  ELSE(CMAKE_SYSTEM_MACHINE MATCHES "i686" OR CMAKE_SYSTEM_MACHINE MATCHES "x86_64")
+
+    OPTION(OPTIM_GENERIC "enable full generic mixing" ON)
+  ENDIF(CMAKE_SYSTEM_MACHINE MATCHES "i686" OR CMAKE_SYSTEM_MACHINE MATCHES "x86_64")
+
+  IF(NOT OPTIM_GENERIC)
+    ADD_DEFINE(USE_LIGHT_GEN_MIXING)
+  ENDIF(NOT OPTIM_GENERIC)
+  ENDIF(HAVE_MMX)
+ELSE(CMAKE_SYSTEM_MACHINE MATCHES "i.86" OR CMAKE_SYSTEM_MACHINE MATCHES "x86_64")
+
+  SET(ARCH_OBJS ${PORTABLE_OBJS})
+ENDIF(CMAKE_SYSTEM_MACHINE MATCHES "i.86" OR CMAKE_SYSTEM_MACHINE MATCHES "x86_64")
+
+
+# compiler specific settings
+FIND_PACKAGE(CompilerAttribute)
+FIND_PACKAGE(CompilerVisibility)
+FIND_PACKAGE(CompilerFlagsSet)
+
+ADD_DEFINE(AL_SUPPORT_BYTE_LOKI_SOURCE_ATTR_)
+ADD_DEFINITIONS(-DAL_BUILD_LIBRARY)
+
+
+GENERATE_CONFIG_H()
+
+SET(CMAKE_C_FLAGS "${ADD_WFLAGS} ${ADD_CFLAGS} ${CMAKE_C_FLAGS}")
+SET(CMAKE_CXX_FLAGS "${ADD_CFLAGS} ${CMAKE_CXX_FLAGS}")
+SET(CMAKE_SHARED_LINKER_FLAGS "${ADD_LDFLAGS} ${CMAKE_SHARED_LINKER_FLAGS}")
+SET(CMAKE_MODULE_LINKER_FLAGS "${ADD_LDFLAGS} ${CMAKE_MODULE_LINKER_FLAGS}")
+
+SET(OPENAL_OBJS ${AL_OBJS}
+                ${OS_OBJS}
+                ${ARCH_OBJS}
+                ${ALC_OBJS}
+                ${AC_OBJS}
+                ${EXT_OBJS})
+
+IF(BUILD_STATIC)
+  # we can't create a static library with the same name
+  # as the shared one, so we copy it over after creation
+  ADD_LIBRARY(openal-static STATIC ${OPENAL_OBJS})
+  #SET_TARGET_PROPERTIES(openal-static PROPERTIES OUTPUT_NAME openal)
+  SET_TARGET_PROPERTIES(openal-static PROPERTIES LINKER_LANGUAGE C)
+  TARGET_LINK_LIBRARIES(openal-static ${ADD_LIBS})
+  ADD_CUSTOM_COMMAND(
+    TARGET openal-static
+    POST_BUILD
+    COMMAND ${CMAKE_COMMAND}
+    ARGS -E copy
+      ${CMAKE_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}openal-static${CMAKE_STATIC_LIBRARY_SUFFIX}
+      ${CMAKE_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}openal${CMAKE_STATIC_LIBRARY_SUFFIX})
+  INSTALL_FILES(/lib FILES ${CMAKE_STATIC_LIBRARY_PREFIX}openal${CMAKE_STATIC_LIBRARY_SUFFIX})
+ENDIF(BUILD_STATIC)
+
+ADD_LIBRARY(openal SHARED ${OPENAL_OBJS})
+SET_TARGET_PROPERTIES(openal PROPERTIES LINKER_LANGUAGE C)
+SET_TARGET_PROPERTIES(openal PROPERTIES VERSION ${PACKAGE_VERSION} SOVERSION ${PACKAGE_MAJOR_VERSION})
+TARGET_LINK_LIBRARIES(openal ${ADD_LIBS})
+INSTALL_TARGETS(/lib openal)
+INSTALL_FILES(/include/AL FILES common/include/AL/al.h
+                                common/include/AL/alc.h
+                                include/AL/alext.h)
+
+# build test-suite
+IF(BUILD_TESTS)
+  # need CXX for testcpp only
+  PROJECT(OpenAL CXX)
+  FIND_LIBRARY(ALUT_LIB NAMES alut PATHS /usr/lib /usr/local/lib)
+  IF(ALUT_LIB MATCHES "NOTFOUND")
+    MESSAGE("alut not installed, cannot build tests")
+  ELSE(ALUT_LIB MATCHES "NOTFOUND")
+
+    ADD_LIBRARY(testlib test/testlib.c)
+    TARGET_LINK_LIBRARIES(testlib ${ADD_LIBS} openal ${ALUT_LIB})
+
+    SET(TESTS rotatesound
+              reverb
+              da
+              multi
+              multinothread
+              alut
+              time
+              multialut
+              alinitexit
+              single
+              nothread
+              pitch
+              pitch2
+              pitch3
+              pitch4
+              doppler
+              sourcestop
+              ext
+              stream
+              callback
+              orient
+              relative
+              channel
+              channel2
+              pause
+              pitchnothread
+              pitchnothread2
+              gain
+              loop
+              listener
+              listener2
+              listener3
+              listener4
+              bufferuniq
+              sourceuniq
+              gendelbuffer_error
+              gendelsource_error
+              multichannel
+              mp3
+              mp32
+              vorbis
+              gainlinear
+              multimp3
+              queue
+              queue2
+              queue3
+              capture
+              capture2
+              leak
+              multicontext
+              strings
+              attributes)
+
+    FOREACH(TEST ${TESTS})
+      SET(TEST_SRC test/test${TEST}.c)
+      # gets added at the beginning thus having no effect
+      SET_SOURCE_FILES_PROPERTIES(${TEST_SRC} PROPERTIES COMPILE_FLAGS "-Wno-unused")
+      ADD_EXECUTABLE(test${TEST} ${TEST_SRC})
+      TARGET_LINK_LIBRARIES(test${TEST} testlib openal ${ALUT_LIB})
+    ENDFOREACH(TEST)
+
+    SET_SOURCE_FILES_PROPERTIES(test/testcpp.cc PROPERTIES COMPILE_FLAGS "-Wno-unused")
+    ADD_EXECUTABLE(testcpp test/testcpp.cc)
+    TARGET_LINK_LIBRARIES(testcpp testlib openal ${ALUT_LIB})
+
+    # copy over testdata, so test-suite can be used in binary dir
+    SET(TESTDATA boom.mp3
+                 boom.ogg
+                 boom.wav
+                 fire2.wav
+                 multiboom.wav
+                 multisample.wav
+                 sample.wav)
+
+    FOREACH(TESTDATUM ${TESTDATA})
+      CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/test/${TESTDATUM} ${CMAKE_BINARY_DIR}/${TESTDATUM} COPYONLY)
+    ENDFOREACH(TESTDATUM)
+  ENDIF(ALUT_LIB MATCHES "NOTFOUND")
+ENDIF(BUILD_TESTS)
+
+
+# needed for openal.pc.in and openal-config.in
+SET(prefix ${CMAKE_INSTALL_PREFIX})
+SET(exec_prefix "\${prefix}")
+SET(libdir "\${exec_prefix}/lib")
+SET(bindir "\${exec_prefix}/bin")
+SET(includedir "\${prefix}/include")
+SET(requirements "")
+SET(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT})
+
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/admin/pkgconfig/openal.pc.in ${CMAKE_BINARY_DIR}/admin/pkgconfig/openal.pc @ONLY)
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/admin/pkgconfig/openal-config.in ${CMAKE_BINARY_DIR}/admin/pkgconfig/openal-config @ONLY)
+INSTALL_PROGRAMS(/bin FILES admin/pkgconfig/openal-config)
+INSTALL_FILES(/lib/pkgconfig FILES admin/pkgconfig/openal.pc)
+
+
+# info file
+IF(UNIX)
+  FIND_PROGRAM(MAKEINFO_PRG NAMES makeinfo)
+  IF(NOT MAKEINFO_PRG MATCHES "NOTFOUND")
+    IF(NOT EXISTS ${CMAKE_BINARY_DIR}/doc)
+      MAKE_DIRECTORY(${CMAKE_BINARY_DIR}/doc)
+    ENDIF(NOT EXISTS ${CMAKE_BINARY_DIR}/doc)
+
+    ADD_CUSTOM_COMMAND(
+      OUTPUT    ${CMAKE_BINARY_DIR}/doc/openal.info
+      DEPENDS   ${CMAKE_SOURCE_DIR}/doc/openal.texi
+      COMMAND   cd ${CMAKE_BINARY_DIR}/doc && ${MAKEINFO_PRG}
+      ARGS      ${CMAKE_SOURCE_DIR}/doc/openal.texi)
+
+    ADD_CUSTOM_TARGET(InfoFile ALL echo DEPENDS ${CMAKE_BINARY_DIR}/doc/openal.info)
+    INSTALL_FILES(/share/info FILES doc/openal.info)
+  ENDIF(NOT MAKEINFO_PRG MATCHES "NOTFOUND")
+ENDIF(UNIX)
+
Index: /openal-0.0.8/COPYING
===================================================================
--- /openal-0.0.8/COPYING	(revision 17)
+++ /openal-0.0.8/COPYING	(revision 17)
@@ -0,0 +1,492 @@
+ 
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+                    675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+
+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+
+     Appendix: How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public
+    License along with this library; if not, write to the Free
+    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
Index: /openal-0.0.8/ChangeLog
===================================================================
--- /openal-0.0.8/ChangeLog	(revision 17)
+++ /openal-0.0.8/ChangeLog	(revision 17)
@@ -0,0 +1,4231 @@
+2006-02-05  Prakash Punnoor <prakash@punnoor.de>
+
+	* admin/pkgconfig/openal.pc.in: also include pthread related flags -
+	the lib flags shouldn't be needed though and the acx_pthread.m4 macro
+	should be fixed though, so that openal itself gets linked to pthread;
+	reverting last this patch, as acx_pthread hopefully got a work-around
+	for Linux
+	
+	* admin/pkgconfig/openal-config.in: commenting out pthread related flags,
+	as openal should be built that way that apps linking to openal shouldn't
+	know anything about it (unless in static case)
+	
+	* admin/autotools/m4/acx_pthread.m4: check for pthread first on Linux
+	thus making openal actually link to pthread; this probably needs more
+	fixing
+
+2006-02-04  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: handle dl as configure.ac
+
+2006-02-04  Sven Panne  <sven.panne@aedion.de>
+
+	* configure.ac: Fixes for Cygwin. Look for dlfcn.h and an option -ldl to
+	decide whether dynamic loading of libraries is possible, as Cygwin
+	doesn't need and doesn't support -ldl. Fixed test for native Windows
+	backend. Fixed CR/LF vs. LF issue in configure.
+
+2006-02-03  Sven Panne  <sven.panne@aedion.de>
+
+	* CMakeLists.txt, configure.ac src/al_source.c: Renamed LINUX_AL to
+	AL_SUPPORT_BYTE_LOKI_SOURCE_ATTR_, which is a bit clearer.
+
+	* src/al_source.c, src/al_types.h, test/testloop.c: Removed the
+	AL_STREAMING source attribute. It was non-standard, undocumented and
+	didn't do anything.
+
+	* configure.ac: Use AC_DEFINE instead of specifying preprocessor defines
+	by hand.
+
+2006-01-31  Prakash Punnoor <prakash@punnoor.de>
+
+	* admin/pkgconfig/Makefile.am: use more portable way of defining
+	pkgconfdir (by Andreas Bierfert)
+	
+	* common/include/AL/al.h, common/include/AL/alc.h, CMakeLists.txt,
+	configure.ac: use visibility attribute only when building OpenAL lib
+	
+2006-01-23  Sven Panne  <sven.panne@aedion.de>
+
+	* src/alc/alc_context.c (_alcSetContext, _alcInitContext): Initialize
+	speaker positions when the number of speakers is known, not earlier...
+
+	* src/alc/alc_context.c (_alcSetContext): Fixed debug message.
+
+	* src/al_rcvar.c (rc_lookup): Don't complain a second time,
+	_alGlobalBinding already did it.
+
+2006-01-20  Sven Panne  <sven.panne@aedion.de>
+
+	* src/al_ext.c: Fixed braino in alGetEnumValue.
+
+2006-01-20  Prakash Punnoor <prakash@punnoor.de>
+
+	* admin/CMakeModules/FindCompilerVisibility.cmake: fix result always set
+	to true and include debugging output; minor indenting
+	
+	* admin/CMakeModules/FindPkgConfig.cmake: filter out ENTER lines
+	
+	* CMakeLists.txt: better defines handling and more debugging output;
+	re-check back-end if its DLOPEN state changed; factor out code
+	
+	* admin/CMakeModules/FindConfigHelper.cmake: added
+	
+	* admin/CMakeModules/FindCompilerFlagsSet.cmake: added
+
+2006-01-18 Erik Hofman <erik@ehofman.com>
+
+	* src/backends/alc_backend_irix.c: Rename a few instances of
+	dmediadevice to dmedia instead. IRIX is working again.
+
+2006-01-17  Erik Hofman <erik@ehofman.com>
+
+	* src/al_buffer.c, src/al_buffer.h, src/al_main.c,
+	src/audioconvert/ac_misc.c, src/audioconvert/audioconvert.h,
+	src/extensions/al_ext_capture.c: Finish what someone else started,
+	convert void* to const void* to get it compiling for IRIX' MIPSpro
+	compiler, add the usleep functio n for IRIX.
+
+	* src/backends/alc_backend.h: Fix a typo: alcBackendOpenDMedia instead
+	of alcBackendOpenDMedia_
+
+2006-01-17  Prakash Punnoor <prakash@punnoor.de>
+
+	* test/testrotatesound.c: added
+	
+	* test/testvorbis.c: don't loop
+	
+	* src/extensions/al_ext_vorbis.c: fix vorbis not flushing samples and
+	bug in seek routine
+	
+	* CMakeLists.txt: work around CMake bug for visibility test and add
+	testrotatesound to tests; add DMedia detection; remove stray ENDIF and
+	deactivate DirectSound support (as it doesn't exist); factor out some
+	detection routines
+	
+	* src/backends/alc_backend.c, src/backends/alc_backend.h,
+	src/backends/alc_backend_irix.c, configure.ac: make an independent
+	"dmedia" back-end of IRIX native
+	
+	* configure.ac, src/extensions/al_ext_mp3.c: Use OPENAL_DLOPEN_MP3
+	instead of OPENAL_DLOPEN_SMPEG. This more macro friendly (currently in
+	CMake project, only)
+	
+	* admin/CMakeModules/FindCompilerAttribute.cmake,
+	admin/CMakeModules/FindCompilerVisibility.cmake: added
+	
+2006-01-17  Sven Panne  <sven.panne@aedion.de>
+
+	* src/alc/alc_context.c: Make sure that the speakers are moved to their
+	initial position at context creation time. The whole logic of state
+	initialization and update is currently a bit arcane and should be
+	improved.
+
+	* src/extensions/al_ext_mp3.c: Synched dlopen #ifdef with configure.ac.
+
+2006-01-14  Prakash Punnoor <prakash@punnoor.de>
+
+	* test/testda.c, test/testdoppler.c, test/testgain.c, test/testlib.c,
+	test/testlib.h, test/testlistener.c, test/testlistener2.c,
+	test/testlistener3.c, test/testlistener4.c, test/testloop.c,
+	test/testmp32.c, test/testmulti.c, test/testmultinothread.c,
+	test/testnothread.c, test/testpause.c, test/testpitch.c,
+	test/testpitchnothread.c, test/testpitchnothread2.c, test/testqueue.c,
+	test/testqueue2.c, test/testqueue3.c, test/testrelative.c,
+	test/testreverb.c, test/testsingle.c, test/testsourcestop.c,
+	test/testtime.c: use current alut wave loader instead of obsolete one,
+	and as we use alut anyway, use its init/exit, as well
+	
+	* CMakeLists.txt: forgot testmulitnothread; add -fomit-frame-pointer
+	only when doing optimization
+	
+2006-01-13  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/arch/Makefile.am, src/arch/.cvsignore: added
+
+	* configure.ac, src/Makefile.am: kludge for nasm vs. automake-1.8
+	
+	* README: cmake related corrections
+
+2006-01-12  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/extensions/al_ext_vorbis.c, src/backends/alc_backend_alsa.c,
+	src/backends/alc_backend_arts.c, src/backends/alc_backend_esd.c,
+	src/backends/alc_backend_sdl.c: #if -> #ifdef
+	
+	* CMakeLists.txt: improve defines handling
+	
+	* src/Makefile.am: Fix (I hope) for SUBDIRS problem (with older
+	automake?).
+
+2006-01-11  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/al_siteconfig.h: #if -> #ifdef
+	
+	* CMakeLists.txt: test for __attribute__(...)
+
+2006-01-11  Sven Panne  <sven.panne@aedion.de>
+
+	* admin/autotools/.indent.pro, src/alc/alc_device.c,
+	src/backends/alc_backend.c, src/backends/alc_backend.h,
+	src/backends/alc_backend_alsa.c: More steps towards a sane backend API.
+
+	* configure.ac, src/al_buffer.c, src/al_config.c, src/al_debug.c,
+	src/al_debug.h, src/al_error.c, src/al_ext.c, src/al_filter.c,
+	src/al_main.h, src/al_mixer.c, src/al_mspool.c, src/al_rcvar.c,
+	src/al_siteconfig.h, src/al_source.c, src/al_threadlib.c,
+	src/al_threadlib.h, src/alc/alc_context.c, src/alc/alc_error.c,
+	src/audioconvert/ac_misc.c, src/backends/alc_backend_alsa.c,
+	src/backends/alc_backend_darwin.c, src/backends/alc_backend_linux.c,
+	src/backends/alc_backend_wave.c, src/extensions/al_ext_mp3.c: Fixed tons
+	of warnings. Fixed a bug in _alGetGlobalScalar on the way.
+
+	* admin/autotools/m4/alut_c__attribute.m4: Added.
+
+	* configure.ac: Added flags to dynamically load SDL, Vorbis and MP3 libs
+	(enabled by default). Fixed a cut-n-paste typo in the handling of
+	--enable-more-warnings.
+
+2006-01-10  Sven Panne  <sven.panne@aedion.de>
+
+	* configure.ac: Only use -finline-functions, -ffast-math and
+	-fomit-frame-pointer for optimized build. Test the availability of these
+	options with ALUT_CHECK_FLAG. Note that -O2 is used by default for GCC.
+
+	* CMakeLists.txt, config-osx.h, configure.ac: Removed EMPTY_LOCKS
+	remainders.
+
+	* configure.ac: Synched --enable-more-warnings handling with ALUT. Use
+	ALUT_CHECK_FLAG for symbol visibility support detection.
+
+	* admin/autotools/m4/alut_check_flag.m4,
+	admin/autotools/m4/alut_eval_stderr.m4: Added.
+
+	* src/arch/i386/x86_cpu_caps_prk.c, src/arch/i386/x86_cpu_caps_prk.h:
+	Don't use old-style function definitions.
+
+	* common/include/AL/al.h, common/include/AL/alc.h: Warning police.
+
+	* src/al_ext.c, src/alc/alc_context.c: Warning police. GCC is not
+	cunning enough to see the relation between the return value and the
+	pointer argument, so make things obvious even for a compiler.
+
+2006-01-10  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: fix missing defines for extensions; disable vorbis
+	dlopen; add pkg-config defines to compiler command line; sync
+	optimization flags to configure.ac; remove adding of -march option;
+	forcefully disable symbol visibility for ICC due to linker trouble;
+	disable NASM and SIMD specific stuff if no MMX is found, as we don't use
+	other SIMD instructions; enable dlopening vorbis, SDL and smpeg
+	
+	* src/extensions/al_ext_vorbis.c: enable dlopening (ripped from arts
+	backend; testvorbis seems to indicate working code...)
+	
+	* src/backends/alc_backend_sdl.c: enable dlopening
+	
+	* src/extensions/al_ext_mp3.c: enable dlopening
+	
+	* configure.ac: disable NASM and SIMD specific stuff if no MMX is found
+	for the time-being
+
+2006-01-09  Sven Panne  <sven.panne@aedion.de>
+
+	* include/AL/alext.h, src/al_buffer.c, src/extensions/al_ext_loki.h,
+	src/extensions/al_ext_mp3.h: Make some LOKI extensions visible again.
+
+	* configure.ac: Fixed symbol visibility support detection. Note that GCC
+	3.3.x and GCC 3.4.x support '__attribute__((visibility(...)))', but not
+	'-fvisibility=...'. Furthermore, don't bother testing for that if we are
+	not even using GCC. Put the HAVE_GCC_VISIBILITY #define into config.h,
+	we always have to #include that before the AL headers in our code,
+	anyway.
+
+2006-01-07  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: Cache back-ends detection results; use macro for debug
+	options checking. Remove word "back-end" from output.
+	
+	* configure.ac: Added gcc symbol visibility support detection.
+
+2006-01-06  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: Sync CFLAGS to configure.ac, but keeping -O2, as *no*
+	optimization level makes no sense...
+	
+	* README: update CMake featurelist
+
+2006-01-05  Sven Panne  <sven.panne@aedion.de>
+
+	* src/alc/alc_context.c, src/alc/alc_device.c,
+	src/backends/alc_backend.c, src/backends/alc_backend.h,
+	src/backends/alc_backend_alsa.c, src/backends/alc_backend_arts.c,
+	src/backends/alc_backend_bsd.c, src/backends/alc_backend_darwin.c,
+	src/backends/alc_backend_esd.c, src/backends/alc_backend_irix.c,
+	src/backends/alc_backend_linux.c, src/backends/alc_backend_morphos.c,
+	src/backends/alc_backend_null.c, src/backends/alc_backend_sdl.c,
+	src/backends/alc_backend_solaris.c, src/backends/alc_backend_wave.c,
+	src/backends/alc_backend_windows.c, src/extensions/al_ext_loki.c:
+	Started to use our own coding guidelines.
+
+	* admin/autotools/.indent.pro: Use TAB-free GNU style. The previous
+	8-column tabbed indentation was eating far too much space when long
+	symbol names are used. Let's slowly move towards this style when
+	reworking files, the rest of the world seems to live quite well with it.
+
+	* README: Added coding guidelines. Reformatted a bit.
+
+2006-01-05  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: enable optimization by default
+
+2006-01-04  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: Sync to configure.ac regarding back-ends and fix
+	missing compilation of objects in dlopen case.
+
+2006-01-04  Sven Panne  <sven.panne@aedion.de>
+
+	* src/backends/alc_backend.h: Fixed comment.
+
+	* src/Makefile.am, src/al_mixer.c, src/alc/alc_context.c,
+	src/alc/alc_device.c, src/extensions/al_ext_capture.c,
+	src/extensions/al_ext_loki.c: Previously the "arch" subdirectory
+	contained highly unrelated things, now all backends are cleanly
+	separated into a "backends" subdirectory.
+
+	* src/backends/alc_backend.c, src/backends/alc_backend.h,
+	src/backends/alc_backend_alsa.c, src/backends/alc_backend_arts.c,
+	src/backends/alc_backend_bsd.c, src/backends/alc_backend_darwin.c,
+	src/backends/alc_backend_esd.c, src/backends/alc_backend_irix.c,
+	src/backends/alc_backend_linux.c, src/backends/alc_backend_morphos.c,
+	src/backends/alc_backend_null.c, src/backends/alc_backend_sdl.c,
+	src/backends/alc_backend_solaris.c, src/backends/alc_backend_wave.c,
+	src/backends/alc_backend_windows.c: Added.
+
+	* src/arch/alsa/alsa.c, src/arch/arts/arts.c, src/arch/bsd/bsd_dsp.c,
+	src/arch/darwin/darwin_native.c, src/arch/esd/esd.c,
+	src/arch/interface/interface_sound.c,
+	src/arch/interface/interface_sound.h, src/arch/irix/iris.c,
+	src/arch/linux/lin_dsp.c, src/arch/morphos/morphos_native.c,
+	src/arch/null/null.c, src/arch/sdl/sdl.c,
+	src/arch/solaris/solaris_native.c, src/arch/waveout/waveout.c,
+	src/arch/windows/windows_native.c: Removed.
+	
+	* src/alc/alc_context.c, src/alc/alc_device.c, src/alc/alc_device.h,
+	src/arch/alsa/alsa.c, src/arch/arts/arts.c, src/arch/bsd/bsd_dsp.c,
+	src/arch/darwin/darwin_native.c, src/arch/esd/esd.c,
+	src/arch/interface/interface_sound.c,
+	src/arch/interface/interface_sound.h, src/arch/irix/iris.c,
+	src/arch/linux/lin_dsp.c, src/arch/morphos/morphos_native.c,
+	src/arch/null/null.c, src/arch/sdl/sdl.c,
+	src/arch/solaris/solaris_native.c, src/arch/waveout/waveout.c,
+	src/arch/windows/windows_native.c: Simplified the setting of backend
+	attributes. Note that some code parts currently look a bit silly or
+	overly complicated, but this is only a temporary side-effect of all this
+	refactoring. In the long run, each backend "object" should now all its
+	functions, its mode, etc., but we are not fully there yet.
+
+	* src/alc/alc_device.c, src/arch/alsa/alsa.c, src/arch/arts/arts.c,
+	src/arch/bsd/bsd_dsp.c, src/arch/darwin/darwin_native.c,
+	src/arch/esd/esd.c, src/arch/interface/interface_sound.c,
+	src/arch/interface/interface_sound.h, src/arch/irix/iris.c,
+	src/arch/linux/lin_dsp.c, src/arch/morphos/morphos_native.c,
+	src/arch/null/null.c, src/arch/sdl/sdl.c,
+	src/arch/solaris/solaris_native.c, src/arch/waveout/waveout.c,
+	src/arch/windows/windows_native.c: There is only one function to open a
+	backend now instead of two, centralizing the backend selection logic a
+	bit. I still have a bad feeling about hardware_type being a global
+	variable, but it will hopefully vanish soon, anyway.
+
+	* src/al_types.h, src/alc/alc_context.c, src/extensions/al_ext_vorbis.c:
+	Warning police.
+
+	* configure.ac: Removed -Wconversion. As mentioned on several mailing
+	lists, it is only intended to port prototype-free pre-ANSI C to ANSI C
+	and causes a lot of warnings for perfectly good code.
+
+2006-01-03  Sven Panne  <sven.panne@aedion.de>
+
+	* Makefile.am, src/arch/alsa/alsa.c, src/arch/arts/arts.c,
+	src/arch/bsd/bsd_dsp.c, src/arch/darwin/darwin_native.c,
+	src/arch/esd/esd.c, src/arch/interface/interface_sound.c,
+	src/arch/interface/interface_sound.h, src/arch/irix/iris.c,
+	src/arch/linux/lin_dsp.c, src/arch/morphos/morphos_native.c,
+	src/arch/null/null.c, src/arch/sdl/sdl.c,
+	src/arch/solaris/solaris_native.c, src/arch/waveout/waveout.c,
+	src/arch/windows/windows_native.c, src/Makefile.am: Even more backend
+	refactoring to make all kinds of backends similar, enabling further
+	refactoring into something more OO-like.
+
+	* src/arch/morphos/morphos_dispatcher.c,
+	src/arch/morphos/morphos_dispatcher.h: Removed, the contents live in
+	src/arch/morphos/morphos_native.c now. Simple rule: One backend, one
+	file.
+
+	* PLATFORM: Removed, all the information is in
+	src/arch/interface/interface_sound.h already.
+
+	* README: Added some backend info.
+
+	* src/arch/darwin/Changes.rtf, src/arch/darwin/changes.txt,
+	src/arch/darwin/CVS_Update.txt, src/arch/darwin/FAQ,
+	src/arch/darwin/Tests_Results.rtf, src/arch/darwin/TODO,
+	src/arch/irix/README, src/arch/solaris/README: Removed, all the info is
+	in the toplevel README now.
+
+	* src/arch/alsa/alsa.h, src/arch/arts/arts.h, src/arch/esd/esd.h,
+	src/arch/interface/platform.h, src/arch/null/null.h, src/arch/sdl/sdl.h,
+	src/arch/waveout/waveout.h: Removed, all the backend prototypes are in
+	src/arch/interface/interface_sound.h now.
+	
+	* src/al_main.c, src/al_main.h, src/alc/alc_context.c,
+	src/alc/alc_device.c, src/arch/interface/interface_sound.c,
+	src/arch/interface/interface_sound.h, src/extensions/al_ext_loki.c: More
+	backend refactoring.
+
+	* configure.ac: Fixed typo in currently unused #define.
+
+2006-01-02  Sven Panne  <sven.panne@aedion.de>
+
+	* src/arch/alsa/alsa.c, src/arch/arts/arts.c, src/arch/bsd/bsd_dsp.c,
+	src/arch/darwin/darwin_native.c, src/arch/esd/esd.c,
+	src/arch/interface/interface_sound.c,
+	src/arch/interface/interface_sound.h, src/arch/irix/iris.c,
+	src/arch/linux/lin_dsp.c, src/arch/morphos/morphos_native.c,
+	src/arch/null/null.c, src/arch/sdl/sdl.c, src/arch/sdl/sdl.h,
+	src/arch/solaris/solaris_native.c, src/arch/waveout/waveout.c,
+	src/arch/windows/windows_native.c: Started to refactor backends. The
+	first step was to make _alBlitBuffer a normal function, not a function
+	pointer. The reason for the latter was the SDL backend, which has been
+	modified accordingly.
+
+2006-01-02  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/al_vector.c, src/al_vector.h: move some micro-functions into
+	header as static __inline
+
+2006-01-01  Prakash Punnoor <prakash@punnoor.de>
+
+	* admin/CMakeModules/FindPkgConfig.cmake: added
+	
+	* CMakeLists.txt: most of back-ends autodetection like configure.ac
+	does is in - but w/o huge copy&paste ;-), fix for Windows backend typo,
+	quick hack to make native back-end selectable - needs some detection
+	
+2005-12-28  Sven Panne  <sven.panne@aedion.de>
+
+	* src/arch/alsa/alsa.c, src/arch/i386/x86_cpu_caps_prk.c: _alDebug
+	already adds newlines.
+
+2005-12-27  Sven Panne  <sven.panne@aedion.de>
+
+	* src/arch/alsa/alsa.c: Always use "_near" variants of
+	snd_pcm_hw_params_set_period_size and snd_pcm_hw_params_set_rate, this
+	should fix problems for some soundcards (thanks to Shawn Kirst for
+	pointing this out). Removed some unused variables. Fixed two warnings.
+
+2005-12-23  Prakash Punnoor <prakash@punnoor.de>
+
+	* arch/i386/Makefile.am: added; kludge for autotools vs. nasm
+	
+	* configure.ac, src/Makefile.am: finally nasm compilation (based on
+	LAME's way); quite a kludge, but autotools suck hard, better ways
+	welcome...
+
+2005-12-22  Sven Panne  <sven.panne@aedion.de>
+
+	* CMakeLists.txt, Makefile.am, admin/RPM/openal.spec, config-osx.h,
+	configure.ac, src/Makefile.am, src/al_buffer.c, src/al_main.c,
+	src/extensions/al_ext_mp3.c, src/extensions/al_ext_mp3.h,
+	src/extensions/al_ext_vorbis.c, src/extensions/al_ext_vorbis.h:
+	Autodetect Vorbis and MP3 extenstions.
+
+2005-12-21  Prakash Punnoor <prakash@punnoor.de>
+
+	* arch/i386/x86_floatmul.c: added; renamed i386 floatmul
+	
+	* CMakeLists.txt: renamed i386 floatmul
+	
+	* configure.ac, src/Makefile.am: MMX support back in; NASM compilation
+	rule missing, so beware that cpu caps detection is missing; deactivate
+	NASM for the meanwhile
+	
+	* arch/i386/floatmul.c, arch/i386/mix16.nasm: removed
+	
+2005-12-21  Sven Panne  <sven.panne@aedion.de>
+
+	* Makefile.am, configure.ac, src/Makefile.am, src/arch/bsd/bsd_dsp.c,
+	src/arch/darwin/darwin_native.c, src/arch/interface/platform.h,
+	src/arch/irix/iris.c, src/arch/linux/lin_dsp.c,
+	src/arch/morphos/morphos_dispatcher.c,
+	src/arch/morphos/morphos_native.c, src/arch/solaris/solaris_native.c,
+	src/arch/windows/windows_native.c: Unified all the headers for native
+	backends. Backend auto-detection should be complete now (modulo some
+	testing, of course).
+
+	* src/arch/bsd/bsd_dsp.h, src/arch/darwin/darwin_native.h,
+	src/arch/irix/iris.h, src/arch/linux/lin_dsp.h,
+	src/arch/morphos/morphos_native.h, src/arch/solaris/solaris_native.h
+	src/arch/windows/windows_native.h: Removed.
+
+	* CMakeLists.txt, config-osx.h, configure.ac, src/Makefile.am,
+	src/al_main.h, src/al_mixer.c, src/al_siteconfig.h,
+	src/arch/interface/platform.h, src/audioconvert/ac_misc.c: Improved
+	backend detection even more. Removed obscure BROKEN_LIBIO stuff, if
+	there is really still some need for this (which I doubt), we should do
+	it differently.
+
+2005-12-20  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/al_main.c, src/al_main.h, src/alc/alc_speaker.c: move matrix stuff
+	into separate object; deactivate _alRotatePointAboutAxis, as it is not
+	used and wasn't specified in the header anyway
+	
+	* src/al_matrix.c, src/al_matrix.h: added
+	
+	* CMakeLists.txt, src/Makefile.am: compile al_matrix.c
+
+2005-12-20  Sven Panne  <sven.panne@aedion.de>
+
+	* configure.ac, src/Makefile.am: Improved backend detection. Still not
+	perfect and far too much cut-n-paste, but better than before.
+
+2005-12-19  Prakash Punnoor <prakash@punnoor.de>
+
+	* test/testlib.c, test/testlib.h: Add _RotatePointAboutAxis()
+	
+	* test/testlistener3.c, test/testlistener4.c:
+	Use _RotatePointAboutAxis() instead of OpenAL internal one to
+	prevent linking error if symbol visibility is used
+
+2005-12-17  Prakash Punnoor <prakash@punnoor.de>
+
+	* admin/CMakeModules/CMakeASMInformation.cmake: don't use C flags
+	
+	* CMakeLists.txt, common/include/AL/alc.h, common/include/AL/al.h:
+	gcc visibility support
+	
+	* src/arch/i386/x86_cpu_caps_detect_prk.nasm,
+	src/arch/i386/memcpy_mmx_prk.nasm: prevent executable stack
+
+2005-12-15  Sven Panne  <sven.panne@aedion.de>
+
+	* include/AL/Makefile.am: Removed.
+
+2005-12-15  Prakash Punnoor <prakash@punnoor.de>
+
+	* README: CMake cache clearing typos
+
+2005-12-12  Prakash Punnoor <prakash@punnoor.de>
+
+	* README: CMake cache clearing
+
+2005-12-11  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: don't check for time.h anymore;
+	correctly check for Linux for ALSA
+
+2005-12-10  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: set some vars for openal-config.in;
+	enable ALSA option only for Linux, DSOUND only for Win32
+	
+	* README: some typos
+
+2005-12-10  Sven Panne  <sven.panne@aedion.de>
+
+	* src/al_buffer.c: Fixed buffer attribute getters (thanks to Shawn
+	Kirst for  pointing this out).  Renamed MAX_LISTENER_NUM_VALUES to
+	the more sensible MAX_BUFFER_NUM_VALUES.
+
+2005-12-08  Sven Panne  <sven.panne@aedion.de>
+
+	* admin/pkgconfig/openal-config.in: Overhauled quite a bit. The order of
+	commandline options does not matter anymore. Added more standard GNU
+	prefixes. Added --static option (currently a no-op).
+
+2005-12-04  Sven Panne  <sven.panne@aedion.de>
+
+	* configure.ac, src/Makefile.am: Do ALSA detection and conditional
+	inclusion the autotools way, minimizing tests and giving nice feedback
+	to the user.
+
+2005-12-03  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: C99 stuff, better alsa detection, threading
+	clean-up; forgot to define HAVE_MMX_MEMCPY; fix library linking;
+	only link openal and alut to testcase
+
+2005-12-02  Sven Panne  <sven.panne@aedion.de>
+
+	* admin/RPM/openal.spec: ALSA support is now autodetected.
+
+	* src/Makefile.am: Fixed include path.
+
+2005-12-01  Sven Panne  <sven.panne@aedion.de>
+
+	* configure.ac, src/arch/alsa/alsa.c: Cleaned up ALSA detection.
+
+	* configure.ac: Moved debugging-related options together. Renamed
+	--enable-stub-notify to --enable-debug-stub, the former seems to be a
+	cut-n-paste error. Added explanations for debugging-related #defines.
+
+	* CMakeLists.txt, config-osx.h, configure.ac, src/al_main.c,
+	src/al_mutexlib.c, src/al_mutexlib.h, src/al_threadlib.c,
+	src/al_threadlib.h: Cleaned up threading detection.
+
+	* admin/autotools/m4/acx_pthread.m4: Added.
+
+	* configure.ac: Renamed --enable-gcc-warnings to
+	--enable-more-warnings. Actually test for libefence when --enable-efence
+	has been given.
+
+2005-11-30  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/arch/i386/floatmul.c, src/arch/i386/mixaudio16_mmx_prk.c
+	src/arch/i386/memcpy_mmx_prk.nasm: fix warnings
+
+	* CMakeLists.txt: gcc should compile in C99 mode; remove capture option;
+	warnings handling similar to configure.ac (enable DEBUG to have options
+	MORE_WARNINGS and WERROR)
+
+2005-11-30  Sven Panne  <sven.panne@aedion.de>
+
+	* CMakeLists.txt, config-osx.h, configure.ac, src/al_main.c,
+	src/arch/linux/lin_dsp.c: Always include capture support, as required by
+	OpenAL 1.1.
+
+	* Makefile.am, configure.ac: Cleaned up handling of warning-related
+	configure options so we have three now: --enable-warnings (default
+	"yes"), --enable-gcc-warnings (default "no"), and --enable-werror
+	(default "no").
+
+	* admin/autotools/m4/alut_check_cflags_wall.m4: Added.
+
+2005-11-29  Sven Panne  <sven.panne@aedion.de>
+
+	* admin/RPM/openal.spec: Synched with new directory structure.
+
+	* CMakeLists.txt, Makefile.am, configure.ac, common/Makefile.am:
+	Slightly rearranged the common subdirectory.
+
+	* common/include/.cvsignore, common/include/Makefile.am: Added.
+
+	* Makefile.am, configure.ac, include/Makefile.am, src/Makefile.am: We
+	"mount" the common headers via a CVS alias module "portable" now.
+
+	* common/.cvsignore, common/Makefile.am: Added.
+
+	* Makefile.am, src/Makefile.am: Added missing files for
+	distribution. Still far from perfect, but better.
+
+2005-11-29  Prakash Punnoor <prakash@punnoor.de>
+	
+	* CMakeLists.txt: Sven missed two lines on clean-up; sync warning-
+	flags to configure.ac; al headers now in common
+
+2005-11-29  Sven Panne  <sven.panne@aedion.de>
+
+	* CMakeLists.txt, Makefile.am, admin/.cvsignore, admin/Makefile.am,
+	configure.ac: Cleaned up admin directory structure.
+
+	* admin/RPM/openal.spec, admin/RPM/openal.xpm,
+	admin/autotools/.cvsignore, admin/autotools/.indent.pro,
+	admin/pkgconfig/.cvsignore, admin/pkgconfig/Makefile.am,
+	admin/pkgconfig/openal-config.in, admin/pkgconfig/openal.pc.in: Added.
+
+	* admin/.indent.pro, admin/openal-config.in, admin/openal.pc.in,
+	admin/openal.spec admin/openal.xpm: Removed.
+
+2005-11-28  Sven Panne  <sven.panne@aedion.de>
+
+	* src/Makefile.am: Temporarily added portable floating point
+	multiplication code to the library.
+
+	* admin/openal.spec: Updated build dependencies.
+
+	* configure.ac, src/Makefile.am: Don't disturb user variables like
+	CFLAGS. Cleaned up some old stuff.
+
+	* src/Makefile.am: Added path to local <AL/alext.h>.
+
+2005-11-26  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: make ASM and CXX detection optional
+	
+	* src/arch/darwin/darwin_native.c: NULL isn't float nor int; Darwin
+	target should now compile using CMake
+
+2005-11-25  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: minor clean-up
+
+	* README: typos...
+
+2005-11-24  Sven Panne  <sven.panne@aedion.de>
+
+	* configure.ac, src/al_buffer.c, src/al_config.c, src/al_ext.c,
+	src/al_ext.h, src/al_listen.c, src/al_main.c, src/al_main.h,
+	src/al_rctree.h, src/al_rcvar.c, src/al_rcvar.h, src/al_source.c,
+	src/al_types.h, src/mixaudio16.c, src/alc/alc_context.c,
+	src/alc/alc_device.c, src/arch/alsa/alsa.c, src/arch/linux/lin_dsp.c,
+	src/arch/sdl/sdl.c, src/extensions/al_ext_capture.c,
+	src/extensions/al_ext_mp3.c, src/extensions/al_ext_needed.h,
+	test/testext.c: Added more GCC warnings and tried to fix some of
+	them. The general problem with the code is "primitive obsession".
+
+2005-11-23  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt: remove fpic and rdynamic magic - let CMake handle it;
+	made CMake build system feature complete
+
+	* README: updated due to feature-completeness
+
+2005-11-21  Sven Panne  <sven.panne@aedion.de>
+
+	* configure.ac: Removed some remnants of the old build system, i.e.
+	requirements, DO_MINOR_LIBS, SHARED_LIBRARY_EXT, SHOULD_USE_FPIC and
+	SHOULD_USE_RDYNAMIC. Furthermore, some Irix stuff which has been
+	commented out for some time now has been nuked.
+
+	* .cvsignore, Makefile.am, admin/.cvsignore, configure.ac,
+	include/Makefile.am, src/.cvsignore, src/Makefile.am, src/al_cpu_caps.h:
+	More steps towards automake support. Things build and install at least
+	on Linux now when all backends are enabled (without MMX).
+
+	* admin/Makefile.am, include/AL/.cvsignore, include/AL/Makefile.am:
+	Added.
+
+	* .cvsignore, autogen.sh, src/.cvsignore: Synched with recent
+	changes regarding the move to automake.
+
+	* COPYING, Makefile.am, NEWS, README, include/.cvsignore,
+	include/Makefile.am, src/Makefile.am: Added.
+
+	* INSTALL, Makefile.in, config.guess, config.sub, install-sh,
+	src/Makefile.in: Removed.
+
+	* configure.ac: Define NDEBUG unless debugging is enabled.
+
+	* src/mixaudio16.c: Fixed a "comparison between signed and
+	unsigned" warning in an assertion.
+
+	* .cvsignore, CMakeLists.txt, Makefile.in, configure.ac: Updated to
+	follow toplevel directory cleanup.
+
+	* admin/.cvsignore, admin/.indent.pro, admin/openal-config.in,
+	admin/openal.pc.in: Added.
+
+	* .indent.pro, openal-config.in, openal.pc.in: Removed.
+
+2005-11-21  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/mixaudio16.c: fix NDEBUG related stuff
+
+	* CMakeLists.txt: add debug stuff; make options names shorter;
+	added test-suite
+
+	* INSTALL.cmake: update status; more ccmake info;
+	merged to INSTALL; removed
+
+	* INSTALL: merged INSTALL.cmake
+
+	* CMakeModules/CMakeASMCompiler.cmake.in,
+	CMakeModules/CMakeASMInformation.cmake,
+	CMakeModules/CMakeDetermineASMCompiler.cmake: moved
+
+	* admin/CMakeModules/CMakeASMCompiler.cmake.in,
+	admin/CMakeModules/CMakeASMInformation.cmake,
+	admin/CMakeModules/CMakeDetermineASMCompiler.cmake: added
+
+	* README: added test-suite
+
+2005-11-20  Prakash Punnoor <prakash@punnoor.de>
+
+	* CMakeLists.txt, CMakeModules/CMakeASMCompiler.cmake.in,
+	CMakeModules/CMakeASMInformation.cmake,
+	CMakeModules/CMakeDetermineASMCompiler.cmake, INSTALL.cmake: preliminary
+	CMake support
+
+
+2005-11-19  Prakash Punnoor <prakash@punnoor.de>
+
+	* configure.ac: Put back AC_PROG_CXX, as it is needed for testcase
+	
+	* src/al_siteconfig.h, src/Makefile.in, test/Makefile.in: don't include
+	via "../config.h"; add .. to includes
+
+2005-11-18  Sven Panne  <sven.panne@aedion.de>
+
+	* src/al_buffer.c, src/al_ext.c: Cleaned up buffer state handling.
+
+	* src/al_bpool.h, src/al_buffer.h, src/al_debug.h, src/al_error.h,
+	src/al_ext.h, src/al_filter.h, src/al_listen.h, src/al_main.h,
+	src/al_mixer.h, src/al_mixfunc.h, src/al_mixmanager.h, src/al_mspool.h,
+	src/al_queue.h, src/al_rctree.h, src/al_rcvar.h, src/al_source.h,
+	src/al_spool.h, src/al_threadlib.h, src/al_vector.h, src/mixaudio16.h,
+	src/alc/alc_context.h, src/alc/alc_device.h, src/alc/alc_error.h,
+	src/alc/alc_speaker.h: Started to remove the repetition of function
+	prototypes in comments. Previously we had each and every signature in 4
+	different places, which is a maintenance nightmare.
+
+	* src/al_config.c, src/al_config.h, al_listen.c: Removed the rather
+	obscure feature of being able to initialise some listener attributes via
+	configuration file variables ("listener-position", "listener-velocity",
+	"listener-orientation").
+
+2005-11-17  Sven Panne  <sven.panne@aedion.de>
+
+	* src/al_ext.c, src/al_filter.c, src/al_listen.c, src/al_listen.h:
+	Cleaned up listener state handling.
+
+	* src/al_bpool.c, src/al_buffer.c, src/al_filter.c, src/al_listen.c,
+	src/al_main.c, src/al_main.h, src/al_mixer.c, src/al_source.c,
+	src/al_types.h, src/alc/alc_context.c, src/alc/alc_speaker.c,
+	src/arch/alsa/alsa.c, src/arch/arts/arts.c, src/arch/bsd/bsd_dsp.c,
+	src/arch/esd/esd.c, src/arch/irix/iris.c, src/arch/linux/lin_dsp.c,
+	src/arch/sdl/sdl.c, src/arch/solaris/solaris_native.c,
+	src/arch/waveout/waveout.c, src/arch/windows/windows_native.c,
+	src/extensions/al_ext_capture.c, src/extensions/al_ext_loki.c,
+	src/extensions/al_ext_mp3.c, src/extensions/al_ext_vorbis.c: To make a
+	mapping of the spec to the implementation easier, useless naming
+	creativity has been replaced by a simple naming convention. If the spec
+	describes an attribute AL_FOO_BAR, the corresponding struct has a field
+	foo_bar. Furthermore, the fields are ordered in the same way as they are
+	described in the spec.
+
+2005-11-16  Sven Panne  <sven.panne@aedion.de>
+
+	* src/al_distance.c, src/al_filter.c, src/al_types.h: Centralized
+	multiplication with source gain. Made the distance models follow the
+	spec more closely (at least I hope so :-).
+
+2005-11-15  Sven Panne  <sven.panne@aedion.de>
+
+	* src/al_distance.c: Implemented missing distance models and
+	(hopefully) fixed the existing ones. This will probably need more
+	thoughts and thorough testing...
+
+	* src/Makefile.in, src/al_distance.c, src/al_distance.h, src/al_state.c,
+	src/alc/alc_context.c: Moved doppler and distance model setters to where
+	they belong. Removed some arbitraty restrictions (MIN_DOPPLER,
+	MAX_DOPPLER, MIN_DOPPLER_VELOCITY, MAX_DOPPLER_VELOCITY), they were not
+	spec conformant. If things go wrong now, something else has to be fixed! 
+	The default distance model is now AL_INVERSE_DISTANCE_CLAMPED (not
+	AL_INVERSE_DISTANCE), as required by the spec. All distance models are
+	accepted now, although not all have been actually implemented
+	yet. Started to refactor setters a bit ("Set internal state in generic
+	frontend and notify backend about the change.").
+
+	* src/al_doppler.c: Removed.
+
+2005-11-14  Sven Panne  <sven.panne@aedion.de>
+
+	* src/Makefile.in, src/al_error.c, src/al_error.h, src/al_ext.c,
+	src/al_ext.h, src/al_state.c, src/al_types.h, src/alc/alc_context.c,
+	src/alc/alc_error.c: First steps towards cleaning up and refactoring the
+	per-context state management.
+
+	* src/al_able.c: Removed.
+
+	* src/al_ext.h, src/alc/alc_context.c: Cleaned up
+	_alGetExtensionProcAddress mess a tiny bit.
+
+2005-11-11  Sven Panne  <sven.panne@aedion.de>
+
+	* src/al_able.c: Set an AL_INVALID_OPERATION when there is no current
+	context to ease debugging.
+
+	* src/al_able.c, src/al_distance.c, src/al_state.c: What to do exactly
+	regarding error handling when there is no current context is a little
+	bit of a dark corner in the spec. But under every interpretation of the
+	spec, setting an ALC error is completely wrong. Now we call the internal
+	error setter with AL_INVALID_OPERATION, even when there is no current
+	context to record the error. This makes debugging easier and the error
+	could e.g. be reported to the user in some other way if desired.
+
+	* src/al_state.c: Do not use al_state.h anymore. Made the internal
+	getters static.
+
+	* src/al_state.h: Removed.
+
+	* src/al_ext.c, src/alc/alc_context.c: Overhauled alcGetProcessAddress
+	and alGetProcAddress.
+
+	* src/al_ext.c, src/alc/alc_context.c: Overhauled alcGetEnumValue and
+	alGetEnumValue.
+
+	* doc/openal.texi: Added a tiny note about AL_BYTE_LOKI.
+
+2005-11-10  Sven Panne  <sven.panne@aedion.de>
+
+	* doc/openal.texi, src/al_ext.c, src/alc/alc_context.c,
+	test/testcallback.c, test/testchannel.c, test/testchannel2.c,
+	test/testmulticontext.c, test/testmulticontext2.c, test/testpitch.c,
+	test/testpitch2.c, test/testpitch3.c, test/testpitch4.c,
+	linux/test/teststartstop.c: Do not use AL_INVALID and ALC_INVALID, they
+	are not in the 1.1 spec.
+
+	* include/AL/alext.h, src/al_ext.c, src/al_filter.c, src/al_listen.c,
+	src/al_source.c, test/testchannel.c, test/testgain.c,
+	test/testgainlinear.c, test/testmultinothread.c, test/testpitch.c,
+	test/testpitch2.c, test/testpitch3.c, test/testpitch4.c,
+	test/testpitchnothread.c, test/testpitchnothread2.c, test/testqueue.c,
+	test/testqueue2.c, test/testqueue3.c, test/testtime.c: The non-standard
+	AL_GAIN_LINEAR_LOKI token seems to behave exactly as the standard
+	AL_GAIN, at least in the current code base. Therefore the former has
+	been deprecated in the extension header and is not used internally
+	anymore. Nevertheless, for legacy reasons it is still recognized in
+	getters and setters.
+
+2005-11-09  Sven Panne  <sven.panne@aedion.de>
+
+	* src/al_buffer.c, src/al_ext.c, src/al_source.c: Removed
+	AL_ILLEGAL_* tokens from implementation.
+
+	* src/al_ext.c, src/al_ext.h: Removed AL_ENV_* tokens, they were
+	unused and without any functionality.
+
+2005-11-07  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/arch/irix/iris.c: fix missing alext.h include
+
+2005-11-06  Prakash Punnoor <prakash@punnoor.de>
+
+	* configure.ac, config-osx.h, src/al_siteconfig.h: cleaning-up:
+	removed unused/obsolete stuff
+
+2005-11-03  Sven Panne  <sven.panne@aedion.de>
+
+	* src/alc/alc_context.c: Minor aesthetical changes in alcGetIntegerv.
+
+2005-11-02  Sven Panne  <sven.panne@aedion.de>
+
+	* src/alc/alc_context.c, src/alc/alc_device.h: Fixed error handling for
+	alcGetIntegerv, previously a device was needed even for querying
+	ALC_MAJOR_VERSION and ALC_MINOR_VERSION, which was wrong.
+
+2005-10-27  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/arch/alsa/alsa.c: merge Dino Puller's patch for being 
+	able to use alsa with dmix
+
+	* configure.ac: make CFLAGS overrideable by user
+
+2005-10-27  Sven Panne  <sven.panne@aedion.de>
+
+	* admin/openal.spec: Synched with latest Makefile changes.
+
+2005-10-25  Prakash Punnoor <prakash@punnoor.de>
+
+	* configure.ac: x86_64 related fix
+
+2005-10-24  Prakash Punnoor <prakash@punnoor.de>
+
+	* Makefile.in: (gentoo patch) install at correct dirs
+
+2005-10-22  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/arch/i386/floatmul.c, src/arch/i386/x86_simd_support_prk.h:
+	fix MMX floatmul for 1.0f > sa >= 0.5f
+
+2005-10-11  Prakash Punnoor <prakash@punnoor.de>
+
+	* configure.ac, src/al_mixer.h: only allow stripped down generic
+	mixing if MMX is present
+
+2005-10-06  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/arch/i386/floatmul.c: added MMX routine
+
+	* src/arch/i386/x86_simd_support_prk.h,
+	src/arch/i386/mixaudio16_mmx_prk.c:  moved common SIMD support code
+	into above header file
+
+2005-10-01  Prakash Punnoor <prakash@punnoor.de>
+
+	* INSTALL: added instructions for using x86 SIMD
+
+	* configure.ac: checks for MMX now
+
+2005-09-30  Prakash Punnoor <prakash@punnoor.de>
+
+	* configure.ac, src/Makefile.in, src/al_mixer.h, src/al_mixfunc.c,
+	src/mixaudio16.c, src/mixaudio16.h, src/arch/i386/memcpy_mmx_prk.nasm,
+	src/arch/i386/mixaudio16_mmx_prk.c, src/arch/i386/mixaudio16_mmx_prk.h:
+	add MMX audio mixing
+
+	* x86_cpu_caps_prk.c: fix OPENAL_DISABLE_SIMD handling and SIMD
+	should only be enabled at runtime detection, if SIMD was enabled
+	at compile time
+
+2005-09-30  Sven Panne  <sven.panne@aedion.de>
+
+	* admin/openal.spec: Synched with CREDITS/AUTHORS changes.
+
+	* AUTHORS: Added. This is the standard (autotools) name for such a
+	file. Added a few more people to the list and sorted it
+	alphabetically.
+
+	* CREDITS: Removed.
+
+2005-09-29  Prakash Punnoor <prakash@punnoor.de>
+
+	* configure.ac: fix up compilation on x86(_64) which I broke...
+
+2005-09-29  Elias Naur <elias@oddlabs.com>
+
+	* linux/src/al_filter.c: Added comment about the previous value
+	of _AL_CUTTOFF_ATTENUATION and why it is now 0.
+
+2005-09-28  Sven Panne  <sven.panne@aedion.de>
+
+	* configure.ac: Cleaned up quotations. The whole file is still a
+	bit of a mess, though...
+
+2005-09-27  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/al_mixfunc.c, src/al_mixfunc.h, src/al_mixmanager.c:
+	minor clean-ups and adding indirection for mixing n streams
+	function
+
+	* configure.ac, src/Makefile.in,
+	src/arch/i386/x86_cpu_caps_detect_prk.nasm,
+	src/arch/i386/x86_cpu_caps_prk.c,
+	src/arch/i386/x86_cpu_caps_prk.h,
+	src/arch/portable/cpu_caps.c,
+	src/al_cpu_caps.h, alc/alc_context.c: added x86 cpu caps
+	detection/framework to safely use SIMD code in OpenAL
+
+2005-09-27  Elias Naur <elias@oddlabs.com>
+
+	* linux/src/al_filter.c: Disabled
+	_AL_CUTTOFF_ATTENUATION to avoid problems with
+	too little distance attenuation. For now, I kept
+	the #define in case any problems show up.
+	
+2005-09-26  Elias Naur <elias@oddlabs.com>
+
+	* linux/src/al_source.c: Don't set source new_readindex
+	and new_soundpos on underflow to avoid a race condition.
+	
+2005-09-26  Elias Naur <elias@oddlabs.com>
+
+	* linux/src/al_queue.c: Made alSourceQueueBuffers and
+	alSourceUnqueueBuffers take alLockMixBuf to avoid
+	a race condition with the mixer thread. Their behaviour now
+	matches alSourceStop and alSourcePlay that can also manipulate
+	playing sources.
+
+2005-09-25  Prakash Punnoor <prakash@punnoor.de>
+
+	* configure.ac, src/Makefile.in: renamed i386_OBJS to x86_OBJS,
+	added it to x86_64; added AC_OBJS to CLEAN_FILES in latter file
+
+2005-09-24  Prakash Punnoor <prakash@punnoor.de>
+
+	* src/arch/i386/floatmul.c: fix up and drop unneeded saturation;
+	use 5 bits more precision for gain
+
+	* configure.ac: reactivate fixed i386 floatmul
+
+	* src/mixaudio16.c, src/mixaudio16.c: clean-up, remove old MMX
+	support and mixing of dst into itself
+
+	* src/al_buffer.h, src/al_buffer.c: void* should be ALvoid* at
+	some places
+
+2005-09-23  Sven Panne  <sven.panne@aedion.de>
+
+	* admin/openal.spec: Added an up-to-date .spec file, based on the
+	one used for SuSE 9.3.
+
+	* openal.spec: Removed.
+
+	* admin/openal.xpm: Added a scaled-down version of the OpenAL logo
+	from http://www.openal.org/. This will be used as the icon in the
+	.spec file.
+
+	* CREDITS: Added myself.
+
+2005-09-21  Sven Panne  <sven.panne@aedion.de>
+
+	* src/alc/alc_context.c: Synchronized names of device structs to
+	reduce #ifdefs in OpenAL headers.
+
+	* src/al_types.h, src/alc/alc_context.c: Synchronized names of
+	device structs to reduce #ifdefs in OpenAL headers.
+
+2005-09-18  Sven Panne  <sven.panne@aedion.de>
+
+	* src/arch/interface/interface_sound.c: Silenced warnings about
+	stubbed pause/resume functionality. It is not clear if there is
+	really something missing, but it was quite annoying.
+
+	* src/al_mixer.c: When the (asynchronous) current context was set
+	to NULL, the mixer thread was still in its busy wait(!) loop.
+	Consequently other threads might wait forever to get the mixer
+	lock and alcMakeContextCurrent might hang. We wait for 1us now in
+	each mixer iteration to give other threads a chance to acquire the
+	mixer lock. All the multithreading logic seems to be overly
+	complicated, so it is not clear if this is really the correct way
+	to fix this issue, but at least it seems to work on Linux now.
+
+	* configure.ac: Use AL_BUILD_LIBRARY instead of _OPENAL32LIB.
+
+2005-09-02  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/Makefile.in: alctypes.h and altypes.h are dead, Jim...
+
+2005-09-01  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/Makefile.in, linux/include/AL/alext.h
+	linux/src/Makefile.in, linux/src/al_source.c,
+	linux/src/extensions/al_ext_loki.h, linux/test/Makefile.in:
+	Removed ALUT implementation from linux subtree. Note that
+	currently the linux/test directory doesn't build without fiddling
+	around with compiler/linker flags. But this doesn't really matter,
+	as all tests and examples will reside below the "one and only"
+	alut directory in the future, anyway.
+
+	* linux/src/alut/alut_imaadpcm.c, linux/src/alut/alut_main.c,
+	linux/src/alut/alut_msadpcm.c, linux/src/alut/alut_rawadpcm.c,
+	linux/src/alut/alut_wav.c: Removed.
+
+2005-08-22  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/Makefile.in, linux/include/AL/alext.h: Merged alexttypes.h
+	into alext.h, cleaning up things a little bit and adding a few
+	ALAPIENTRY.
+
+	* linux/include/AL/alexttypes.h: Removed.
+
+2005-08-21  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/config-osx.h, linux/configure.ac, linux/INSTALL,
+	linux/Makefile.in, linux/src/al_able.c, linux/src/al_buffer.c,
+	linux/src/alc/alc_context.c, linux/src/alc/alc_context.h,
+	linux/src/alc/alc_device.c, linux/src/alc/alc_device.h,
+	linux/src/alc/alc_error.c, linux/src/alc/alc_error.h,
+	linux/src/alc/alc_speaker.c, linux/src/alc/alc_speaker.h,
+	linux/src/al_doppler.c, linux/src/al_filter.c,
+	linux/src/al_filter.h, linux/src/al_listen.c, linux/src/al_main.c,
+	linux/src/al_mixer.c, linux/src/al_siteconfig.h,
+	linux/src/al_source.c, linux/src/alut/alut_imaadpcm.c,
+	linux/src/alut/alut_msadpcm.c, linux/src/alut/alut_rawadpcm.c,
+	linux/src/alut/alut_wav.c, linux/src/arch/alsa/alsa.c,
+	linux/src/arch/linux/lin_dsp.c,
+	linux/src/arch/solaris/solaris_native.c,
+	linux/src/arch/waveout/waveout.c,
+	linux/src/extensions/al_ext_capture.c,
+	linux/src/extensions/al_ext_loki.c, linux/src/Makefile.in,
+	linux/test/testcallback.c, linux/test/testcapture.c,
+	linux/test/testchannel2.c, linux/test/testchannel.c,
+	linux/test/testda.c, linux/test/testdoppler.c,
+	linux/test/testgain.c, linux/test/testleak2.c,
+	linux/test/testleak.c, linux/test/testlistener2.c,
+	linux/test/testlistener3.c, linux/test/testlistener4.c,
+	linux/test/testlistener.c, linux/test/testloop.c,
+	linux/test/testmp32.c, linux/test/testmp3.c,
+	linux/test/testmultialut.c, linux/test/testmulti.c,
+	linux/test/testmulticontext2.c, linux/test/testmulticontext.c,
+	linux/test/testmultimp3.c, linux/test/testmultinothread.c,
+	linux/test/testnothread.c, linux/test/testpause.c,
+	linux/test/testpitch2.c, linux/test/testpitch3.c,
+	linux/test/testpitch4.c, linux/test/testpitch.c,
+	linux/test/testpitchnothread2.c, linux/test/testpitchnothread.c,
+	linux/test/testqueue2.c, linux/test/testqueue3.c,
+	linux/test/testqueue.c, linux/test/testrelative.c,
+	linux/test/testreverb.c, linux/test/testsingle.c,
+	linux/test/testsourcestop.c, linux/test/teststartstop.c,
+	linux/test/teststream.c, linux/test/testtime.c,
+	linux/test/testvorbis.c: This is a rather large commit including
+	various separate things, but committing separately was not
+	possible due to a CVS server failure yesterday. The most notable
+	changes are:
+
+	linux/audioconvert is now a subdirectory below linux/src. What is
+	still missing is a separate subdirectory for AL stuff and perhaps
+	one for utilities.
+
+	Nuked jlib, in times of ElectricFence, dmalloc and valgrind there
+	is really no place for home-grown memory debugging.
+
+	Removed some dead code.
+
+	Cleaned up #includes, probably much more to come. The previous
+	situation was such a mess, where everybody #included almost
+	everything else.
+
+	* linux/src/audioconvert/ac_adpcm.c,
+	linux/src/audioconvert/ac_adpcm.h,
+	linux/src/audioconvert/ac_bits.c,
+	linux/src/audioconvert/ac_channels.c,
+	linux/src/audioconvert/ac_endian.c,
+	linux/src/audioconvert/ac_endian.h,
+	linux/src/audioconvert/ac_freq.c,
+	linux/src/audioconvert/ac_helper.c,
+	linux/src/audioconvert/ac_misc.c,
+	linux/src/audioconvert/ac_wave.h,
+	linux/src/audioconvert/audioconvert.h: Added.
+
+	* linux/audioconvert/ac_adpcm.c, linux/audioconvert/ac_adpcm.h,
+	linux/audioconvert/ac_bits.c, linux/audioconvert/ac_channels.c,
+	linux/audioconvert/ac_endian.c, linux/audioconvert/ac_endian.h,
+	linux/audioconvert/ac_format.c, linux/audioconvert/ac_freq.c,
+	linux/audioconvert/ac_helper.c, linux/audioconvert/ac_misc.c,
+	linux/audioconvert/ac_wave.h, linux/audioconvert/audioconvert.h,
+	linux/audioconvert/.cvsignore, linux/audioconvert/Makefile.in,
+	linux/audioconvert/test_ac.c, linux/include/jlib.h,
+	linux/jlib/.cvsignore, linux/jlib/globals.c, linux/jlib/hash.c,
+	linux/jlib/libjlib.h, linux/jlib/Makefile.in, linux/src/al_able.h,
+	linux/src/al_attenuation.h, linux/src/al_doppler.h,
+	linux/src/al_propagation.c, linux/src/al_propagation.h: Removed.
+
+2005-08-20  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/src/al_ext.c, linux/src/al_main.c,
+	linux/src/alc/alc_context.c, linux/test/Makefile.in: Merged Ryan
+	C. Gordon's basic support for capture.
+
+	* linux/test/testcapture2.c: Added.
+
+2005-08-19  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/configure.ac, linux/src/al_bpool.c, linux/src/al_buffer.c,
+	linux/src/al_config.c, linux/src/al_debug.c,
+	linux/src/al_distance.c, linux/src/al_doppler.c,
+	linux/src/al_error.c, linux/src/al_ext.c, linux/src/al_ext.h,
+	linux/src/al_filter.c, linux/src/al_listen.c, linux/src/al_main.c,
+	linux/src/al_main.h, linux/src/al_mixer.c, linux/src/al_mixfunc.c,
+	linux/src/al_propagation.c, linux/src/al_queue.c,
+	linux/src/al_rcvar.c, linux/src/al_source.c, linux/src/al_spool.c,
+	linux/src/al_state.c, linux/src/al_vector.c,
+	linux/src/mixaudio16.c, linux/src/alc/alc_context.c,
+	linux/src/alc/alc_context.h, linux/src/alc/alc_device.c,
+	linux/src/alc/alc_error.c, linux/src/alc/alc_error.h,
+	linux/src/alc/alc_speaker.c, linux/src/alut/alut_imaadpcm.c,
+	linux/src/alut/alut_main.c, linux/src/alut/alut_msadpcm.c,
+	linux/src/alut/alut_wav.c, linux/src/arch/alsa/alsa.c,
+	linux/src/arch/arts/arts.c, linux/src/arch/bsd/bsd_dsp.c,
+	linux/src/arch/bsd/bsd_dsp.h,
+	linux/src/arch/darwin/darwin_native.h, linux/src/arch/esd/esd.c,
+	linux/src/arch/i386/floatmul.c,
+	linux/src/arch/interface/interface_sound.c,
+	linux/src/arch/irix/iris.c, linux/src/arch/irix/iris.h,
+	linux/src/arch/linux/lin_dsp.c, linux/src/arch/linux/lin_dsp.h,
+	linux/src/arch/morphos/morphos_dispatcher.c,
+	linux/src/arch/morphos/morphos_native.h,
+	linux/src/arch/null/null.c, linux/src/arch/portable/floatmul.c,
+	linux/src/arch/sdl/sdl.c, linux/src/arch/solaris/solaris_native.h,
+	linux/src/arch/waveout/waveout.c,
+	linux/src/arch/windows/windows_native.c,
+	linux/src/arch/windows/windows_native.h,
+	linux/src/extensions/al_ext_capture.c,
+	linux/src/extensions/al_ext_loki.c,
+	linux/src/extensions/al_ext_mp3.c,
+	linux/src/extensions/al_ext_vorbis.c: More fixes for Cygwin/MinGW
+	compilation plus some #include cleanups. The "linux" subtree
+	compiles now under Linux, MinGW/MSYS and Cygwin (with and without
+	"-mno-cygwin").
+
+	* linux/src/al_source.c, linux/src/al_threadlib.c,
+	linux/src/alc/alc_context.c,
+	linux/src/arch/windows/windows_native.c: Small fixes for
+	Cygwin/MinGW compilation.
+
+2005-08-18  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/src/al_mutexlib.h: Added missing "extern"s.
+
+	* linux/configure.ac, linux/src/Makefile.in,
+	linux/src/al_buffer.c, linux/src/al_main.c, linux/src/al_mixer.c:
+	Use new thread library.
+
+	* linux/src/al_threadlib.c, linux/src/al_threadlib.h: Added. This
+	is a much cleaner and simpler merged version of the separate
+	thread implementations.
+
+	* linux/src/threads/Makefile.in,
+	linux/src/threads/morphosthreads.c,
+	linux/src/threads/morphosthreads.h,
+	linux/src/threads/posixthreads.c,
+	linux/src/threads/posixthreads.h, linux/src/threads/threadlib.h,
+	linux/src/threads/windowsthreads.c,
+	linux/src/threads/windowsthreads.h: Removed.
+
+2005-08-17  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/src/al_main.c, linux/src/al_mixer.c,
+	linux/src/threads/morphosthreads.c,
+	linux/src/threads/morphosthreads.h,
+	linux/src/threads/posixthreads.c,
+	linux/src/threads/posixthreads.h, linux/src/threads/threadlib.h,
+	linux/src/threads/windowsthreads.c,
+	linux/src/threads/windowsthreads.h: Simplified thread lib.
+
+	* linux/src/al_buffer.c, linux/src/al_ext.c, linux/src/al_mixer.c,
+	linux/src/al_mutexlib.c, linux/src/al_mutexlib.h,
+	linux/src/al_source.c, linux/src/al_spool.c,
+	linux/src/alc/alc_context.c,
+	linux/src/arch/windows/windows_native.c: Use an "_al" prefix for
+	all globally visible symbols, which are internal to OpenAL.
+
+	* linux/audioconvert/ac_adpcm.c, linux/audioconvert/ac_adpcm.h,
+	linux/audioconvert/ac_bits.c, linux/audioconvert/ac_channels.c,
+	linux/audioconvert/ac_endian.c, linux/audioconvert/ac_endian.h,
+	linux/audioconvert/ac_format.c, linux/audioconvert/ac_freq.c,
+	linux/audioconvert/ac_helper.c, linux/audioconvert/ac_misc.c,
+	linux/audioconvert/ac_wave.h, linux/audioconvert/audioconvert.h,
+	linux/audioconvert/test_ac.c, linux/include/AL/alext.h,
+	linux/src/al_able.c, linux/src/al_able.h, linux/src/al_config.c,
+	linux/src/al_config.h, linux/src/al_distance.h,
+	linux/src/al_doppler.h, linux/src/al_error.h, linux/src/al_ext.c,
+	linux/src/al_filter.h, linux/src/al_main.c, linux/src/al_main.h,
+	linux/src/al_mixer.h, linux/src/al_mspool.h,
+	linux/src/al_propagation.h, linux/src/al_rcvar.c,
+	linux/src/al_rcvar.h, linux/src/al_state.h, linux/src/al_types.h,
+	linux/src/al_vector.c, linux/src/mixaudio16.c,
+	linux/src/mixaudio16.h, linux/src/alc/alc_context.h,
+	linux/src/alc/alc_device.c, linux/src/alc/alc_device.h,
+	linux/src/alc/alc_error.h, linux/src/alc/alc_speaker.c,
+	linux/src/alc/alc_speaker.h, linux/src/arch/alsa/alsa.h,
+	linux/src/arch/arts/arts.c, linux/src/arch/arts/arts.h,
+	linux/src/arch/bsd/bsd_dsp.c,
+	linux/src/arch/darwin/darwin_native.h, linux/src/arch/esd/esd.c,
+	linux/src/arch/esd/esd.h, linux/src/arch/i386/floatmul.c,
+	linux/src/arch/interface/interface_sound.c,
+	linux/src/arch/interface/interface_sound.h,
+	linux/src/arch/irix/iris.c, linux/src/arch/linux/lin_dsp.c,
+	linux/src/arch/null/null.c, linux/src/arch/null/null.h,
+	linux/src/arch/portable/floatmul.c, linux/src/arch/sdl/sdl.c,
+	linux/src/arch/sdl/sdl.h, linux/src/arch/solaris/solaris_native.c,
+	linux/src/arch/waveout/waveout.c,
+	linux/src/arch/waveout/waveout.h,
+	linux/src/arch/windows/windows_native.c,
+	linux/src/extensions/al_ext_mp3.h,
+	linux/src/extensions/al_ext_vorbis.h, linux/test/testorient.c:
+	Always #include the <AL/al.h>, <AL/alc.h> and <AL/alext.h>, not
+	the footypes.h ones and not via "...".
+
+2005-08-12  Sven Panne  <sven.panne@aedion.de>
+
+	* include/AL/alut.h, linux/src/alut/alut_wav.c,
+	linux/test/testalut.c, linux/test/testattributes.c,
+	linux/test/testcallback.c, linux/test/testcapture.c,
+	linux/test/testchannel.c, linux/test/testchannel2.c,
+	linux/test/testda.c, linux/test/testdevice.c,
+	linux/test/testdoppler.c, linux/test/testext.c,
+	linux/test/testgain.c, linux/test/testgainlinear.c,
+	linux/test/testgendelbuffer_error.c,
+	linux/test/testgendelsource_error.c, linux/test/testleak.c,
+	linux/test/testleak2.c, linux/test/testlib.c,
+	linux/test/testlistener.c, linux/test/testlistener2.c,
+	linux/test/testlistener3.c, linux/test/testlistener4.c,
+	linux/test/testloop.c, linux/test/testmp3.c,
+	linux/test/testmp32.c, linux/test/testmulti.c,
+	linux/test/testmultialut.c, linux/test/testmultichannel.c,
+	linux/test/testmulticontext.c, linux/test/testmulticontext2.c,
+	linux/test/testmultimp3.c, linux/test/testmultinothread.c,
+	linux/test/testnothread.c, linux/test/testorient.c,
+	linux/test/testpause.c, linux/test/testpitch.c,
+	linux/test/testpitch2.c, linux/test/testpitch3.c,
+	linux/test/testpitch4.c, linux/test/testpitchnothread.c,
+	linux/test/testpitchnothread2.c, linux/test/testqueue.c,
+	linux/test/testqueue2.c, linux/test/testqueue3.c,
+	linux/test/testrelative.c, linux/test/testreverb.c,
+	linux/test/testsingle.c, linux/test/testsourcestop.c,
+	linux/test/testsourceuniq.c, linux/test/teststartstop.c,
+	linux/test/teststream.c, linux/test/teststrings.c,
+	linux/test/testtime.c, linux/test/testvorbis.c: Const-corrected
+	alutLoadWAVFile and alutLoadWAVMemory. Cleaned up examples a bit
+	more while I was there (return values, naming consistency).
+	
+2005-08-12  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/test/Makefile.in, linux/test/testalinitexit.c,
+	linux/test/testalut.c, linux/test/testattributes.c,
+	linux/test/testbufferuniq.c, linux/test/testcallback.c,
+	linux/test/testcapture.c, linux/test/testchannel.c,
+	linux/test/testchannel2.c, linux/test/testda.c,
+	linux/test/testdoppler.c, linux/test/testgain.c,
+	linux/test/testleak.c, linux/test/testleak2.c,
+	linux/test/testlib.c, linux/test/testlib.h,
+	linux/test/testlistener.c, linux/test/testlistener2.c,
+	linux/test/testlistener3.c, linux/test/testlistener4.c,
+	linux/test/testloop.c, linux/test/testmp3.c,
+	linux/test/testmp32.c, linux/test/testmulti.c,
+	linux/test/testmultialut.c, linux/test/testmultichannel.c,
+	linux/test/testmulticontext.c, linux/test/testmulticontext2.c,
+	linux/test/testmultimp3.c, linux/test/testmultinothread.c,
+	linux/test/testnothread.c, linux/test/testorient.c,
+	linux/test/testpitch.c, linux/test/testpitch2.c,
+	linux/test/testpitch3.c, linux/test/testpitch4.c,
+	linux/test/testqueue.c, linux/test/testqueue2.c,
+	linux/test/testqueue3.c, linux/test/testrelative.c,
+	linux/test/testreverb.c, linux/test/testsingle.c,
+	linux/test/testsourcestop.c, linux/test/testsourceuniq.c,
+	linux/test/teststartstop.c, linux/test/teststream.c,
+	linux/test/testtime.c, linux/test/testvorbis.c: Cleanup, much more
+	to come...
+	
+	* linux/.indent.pro: Added.
+
+	* linux/test/.indent.pro: Removed.
+
+	* linux/src/Makefile.in, linux/src/al_buffer.c,
+	linux/src/al_ext.c, linux/src/al_mixer.c, linux/src/al_types.h,
+	linux/src/alc/alc_context.c,
+	linux/src/arch/windows/windows_native.c,
+	linux/src/extensions/al_ext_capture.c: Use new mutex lib.
+
+	* linux/src/al_mutexlib.c, linux/src/al_mutexlib.h: Added. This is
+	a much cleaner and simpler merged version of the separate mutex
+	implementations.
+
+	* linux/src/mutex/Makefile.in, linux/src/mutex/morphosmutex.c,
+	linux/src/mutex/morphosmutex.h, linux/src/mutex/mutexlib.h,
+	linux/src/mutex/posixmutex.c, linux/src/mutex/posixmutex.h,
+	linux/src/mutex/windowsmutex.c, linux/src/mutex/windowsmutex.h:
+	Removed.
+
+2005-08-11  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/include/AL/alext.h, linux/include/AL/alexttypes.h: Made
+	#defines for protection against multiple inclusion more
+	consistent. Removed unused LAL_OPENAL #define. Added typedefs for
+	reverb extensions.
+
+	* linux/Makefile.in: Fixed "permission" target (shell scripts
+	should stay executable).
+
+2005-08-10  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/test/Makefile.in, linux/test/testalinitexit.c,
+	linux/test/testalut.c, linux/test/testattributes.c,
+	linux/test/testbufferuniq.c, linux/test/testcallback.c,
+	linux/test/testcapture.c, linux/test/testchannel.c,
+	linux/test/testchannel2.c, linux/test/testda.c,
+	linux/test/testdevice.c, linux/test/testdoppler.c,
+	linux/test/testext.c, linux/test/testgain.c,
+	linux/test/testgainlinear.c, linux/test/testgendelbuffer_error.c,
+	linux/test/testgendelsource_error.c, linux/test/testleak.c,
+	linux/test/testleak2.c, linux/test/testlib.c,
+	linux/test/testlib.h, linux/test/testlistener.c,
+	linux/test/testlistener2.c, linux/test/testlistener3.c,
+	linux/test/testlistener4.c, linux/test/testloop.c,
+	linux/test/testmp3.c, linux/test/testmp32.c,
+	linux/test/testmulti.c, linux/test/testmultialut.c,
+	linux/test/testmultichannel.c, linux/test/testmulticontext.c,
+	linux/test/testmulticontext2.c, linux/test/testmultimp3.c,
+	linux/test/testmultinothread.c, linux/test/testnothread.c,
+	linux/test/testorient.c, linux/test/testpause.c,
+	linux/test/testpitch.c, linux/test/testpitch2.c,
+	linux/test/testpitch3.c, linux/test/testpitch4.c,
+	linux/test/testpitchnothread.c, linux/test/testpitchnothread2.c,
+	linux/test/testqueue.c, linux/test/testqueue2.c,
+	linux/test/testqueue3.c, linux/test/testrelative.c,
+	linux/test/testreverb.c, linux/test/testsingle.c,
+	linux/test/testsourcestop.c, linux/test/testsourceuniq.c,
+	linux/test/teststartstop.c, linux/test/teststream.c,
+	linux/test/teststrings.c, linux/test/testtime.c,
+	linux/test/testvorbis.c: Added a new make target "indent" to
+	indent all C/C++ files automatically and formatted all tests
+	accordingly.
+
+	* linux/test/.indent.pro: Added.
+
+	* linux/Makefile.in: After a fresh checkout of the openal
+	repository and after subsequent updates, most of the files are
+	read-only, which doesn't really make sense. As a workaround, the
+	top-level Makefile has a new "permissions" target to fix the local
+	permissions.
+
+2005-08-08  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/config-osx.h, linux/configure.ac: Removed unused
+	--enable--fft option.
+
+	* linux/src/al_complex.c, linux/src/al_complex.h: Removed, it was
+	dead code.
+
+	* linux/test/testattributes.c, linux/test/testchannel.c,
+	linux/test/testda.c, linux/test/testdevice.c,
+	linux/test/testext.c, linux/test/testgain.c,
+	linux/test/testgainlinear.c, linux/test/testgendelbuffer_error.c,
+	linux/test/testgendelsource_error.c, linux/test/testlistener.c,
+	linux/test/testlistener3.c, linux/test/testlistener4.c,
+	linux/test/testmp3.c, linux/test/testmp32.c,
+	linux/test/testmulti.c, linux/test/testmultialut.c,
+	linux/test/testmultimp3.c, linux/test/testmultinothread.c,
+	linux/test/testnothread.c, linux/test/testorient.c,
+	linux/test/testpause.c, linux/test/testpitch.c,
+	linux/test/testpitch2.c, linux/test/testpitch3.c,
+	linux/test/testpitch4.c, linux/test/testpitchnothread.c,
+	linux/test/testpitchnothread2.c, linux/test/testqueue.c,
+	linux/test/testqueue2.c, linux/test/testqueue3.c,
+	linux/test/testrelative.c, linux/test/testsingle.c,
+	linux/test/testtime.c, linux/test/testvorbis.c: Removed useless
+	fixup_function_pointers calls and testlib.h #includes.
+
+	* linux/test/Makefile.in, linux/test/testalinitexit.c,
+	linux/test/testalut.c, linux/test/testattributes.c,
+	linux/test/testcallback.c, linux/test/testcapture.c,
+	linux/test/testchannel.c, linux/test/testchannel2.c,
+	linux/test/testdevice.c, linux/test/testext.c,
+	linux/test/testgendelbuffer_error.c,
+	linux/test/testgendelsource_error.c, linux/test/testleak.c,
+	linux/test/testleak2.c, linux/test/testlib.c,
+	linux/test/testlistener.c, linux/test/testlistener2.c,
+	linux/test/testlistener3.c, linux/test/testlistener4.c,
+	linux/test/testloop.c, linux/test/testmp3.c,
+	linux/test/testmp32.c, linux/test/testmulti.c,
+	linux/test/testmultialut.c, linux/test/testmultichannel.c,
+	linux/test/testmulticontext.c, linux/test/testmulticontext2.c,
+	linux/test/testmultimp3.c, linux/test/testpitch.c,
+	linux/test/testpitch2.c, linux/test/testpitch3.c,
+	linux/test/testpitch4.c, linux/test/testpitchnothread.c,
+	linux/test/testpitchnothread2.c, linux/test/testqueue.c,
+	linux/test/testqueue2.c, linux/test/testqueue3.c,
+	linux/test/teststartstop.c, linux/test/teststream.c,
+	linux/test/teststrings.c, linux/test/testtime.c,
+	linux/test/testvorbis.c: Warning police.
+
+	* linux/test/testmath.c: Removed, it was an outdated white-box
+	test which didn't belong here.
+
+	* linux/src/alut/alut_wav.c, linux/test/testda.c,
+	linux/test/testdoppler.c, linux/test/testgain.c,
+	linux/test/testlistener.c, linux/test/testlistener2.c,
+	linux/test/testlistener3.c, linux/test/testlistener4.c,
+	linux/test/testloop.c, linux/test/testmp32.c,
+	linux/test/testmulti.c, linux/test/testmultichannel.c,
+	linux/test/testmultinothread.c, linux/test/testnothread.c,
+	linux/test/testpause.c, linux/test/testpitch.c,
+	linux/test/testpitchnothread.c, linux/test/testpitchnothread2.c,
+	linux/test/testqueue.c, linux/test/testqueue2.c,
+	linux/test/testqueue3.c, linux/test/testrelative.c,
+	linux/test/testreverb.c, linux/test/testsingle.c,
+	linux/test/testsourcestop.c, linux/test/testtime.c: Removed
+	alutLoadWAV, it was undocumented and only available on Linux.
+
+2005-08-05  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/src/al_buffer.c, linux/src/alut/alut_imaadpcm.c,
+	linux/src/alut/alut_msadpcm.c, linux/src/alut/alut_rawadpcm.c,
+	linux/src/extensions/al_ext_vorbis.c, linux/test/testalut.c,
+	linux/test/testcapture.c, linux/test/testchannel.c,
+	linux/test/testchannel2.c, linux/test/testgain.c,
+	linux/test/testgainlinear.c, linux/test/testmultialut.c,
+	linux/test/testmulticontext.c, linux/test/testmulticontext2.c,
+	linux/test/testmultinothread.c, linux/test/testpitch.c,
+	linux/test/testpitch2.c, linux/test/testpitch3.c,
+	linux/test/testpitch4.c, linux/test/testpitchnothread.c,
+	linux/test/testpitchnothread2.c, linux/test/testqueue.c,
+	linux/test/testqueue2.c, linux/test/testqueue3.c,
+	linux/test/teststartstop.c, linux/test/testtime.c: Cleaned up
+	#includes a bit.
+	
+	* linux/src/al_doppler.c, linux/src/alc/alc_context.c: Added a few
+	UNUSED() to avoid currently useless warnings.
+
+	* linux/src/al_queue.c, linux/test/testqueue.c,
+	linux/test/testqueue2.c, linux/test/testqueue3.c: Removed obsolete
+	and undocumented alQueuei API entry. Its functionality is subsumed
+	by alSourcei and alSourceQueueBuffers.
+
+	* linux/src/al_ext_iasig.c: Removed. It was a stub for
+	undocumented functionality only, anyway.
+
+	* src/Makefile.in: al_ext_iasig.c has gone...
+
+2005-07-18  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/doc/openal.texi, linux/src/al_state.c,
+	linux/src/al_state.h: Nuked alHint(), it is not in the 1.1 spec.
+
+2005-07-03  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/Makefile.in: aluttypes.h is dead, Jim...
+
+2005-04-17  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/src/alut/alut_main.c: Don't set an ALC error
+	condition. Close the device in alutExit. Don't use a global
+	variable for the context, use the current context instead, just
+	like the other ALUT implementations.
+
+2005-04-16  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/doc/openal.texi: Updated documentation a bit.
+
+	* include/AL/alc.h, linux/src/alc/alc_context.c: The Linux
+	implementation of alcProcessContext and alcDestroyContext follow
+	the spec now and return void. Again, this breaks compatibility.
+
+	* include/AL/alc.h: Removed useless #ifdef.
+
+	* include/AL/alc.h, linux/doc/openal.texi,
+	linux/src/alc/alc_context.c: The Linux implementation of
+	alcMakeContextCurrent follows the spec now and returns an
+	ALCboolean, where ALC_TRUE (value 1) means "OK". Formerly it
+	returned an ALCenum, where ALC_NO_ERROR (value 0) meant "OK", so
+	this change breaks compatibility, but I can't see a way around
+	it. It is a total miracle why a value is returned at all, because
+	alcMakeContextCurrent sets an ALC error condition in case of a
+	failure, anyway, so the right way would be using alcGetError.
+
+	* linux/pb.tar.gz: Removed. It seems to be an ancient leftover for
+	MacOS X.
+
+2005-04-11  Sven Panne  <sven.panne@aedion.de>
+
+	* demos/altest/common/altest.cpp, include/AL/altypes.h,
+	linux/doc/openal.texi, linux/src/al_able.c, linux/src/al_buffer.c,
+	linux/src/al_distance.c, linux/src/al_error.c, linux/src/al_ext.c,
+	linux/src/al_ext_iasig.c, linux/src/al_filter.c,
+	linux/src/al_listen.c, linux/src/al_mixer.c, linux/src/al_queue.c,
+	linux/src/al_source.c, linux/src/al_state.c,
+	linux/src/extensions/al_ext_loki.c: Use the official error tokens
+	internally. Deprecated AL_INVALID. Added a preprocessor token
+	AL_PURE_API which can be #defined to 1 to exclude non-1.1 stuff
+	(more to come).
+
+	* include/AL/altypes.h: Re-arranged AL error tokens a bit,
+	synchronizing the documentation with the OpenAL 1.1
+	spec. Explicitly stated that AL_ILLEGAL_ENUM and
+	AL_ILLEGAL_COMMAND are deprecated tokens from ancient times.
+
+2005-03-31  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/configure.ac: Define _OPENAL32LIB for Cygwin/MinGW builds.
+
+	* linx/src/al_ext.c, linx/src/al_ext_iasig.c,
+	linx/src/al_source.c: Added a few "#ifdef LINUX_AL" to synch the
+	code with the headers.
+
+	* linux/configure.ac: Initial MinGW support.
+
+	* linux/configure.ac: Add a compatibility hack for older autoconf
+	versions, so we require version >2.50 only now.
+
+	* include/AL/altypes.h, linux/src/al_ext.c: AL_DISTANCE_SCALE is
+	dead, Jim...
+
+	* include/AL/altypes.h: Removed useless #ifdef for ALvoid.
+
+	* include/AL/al.h, include/AL/alut.h, linux/doc/openal.texi,
+	linux/include/AL/alext.h, linux/include/AL/alexttypes.h,
+	linux/src/al_vector.c, linux/src/al_vector.h,
+	linux/src/alut/alut_wav.c, linux/src/extensions/al_ext_capture.c,
+	linux/test/testlib.c, linux/test/testlib.h: Follow the OpenGL
+	spirit in using ALvoid only in the context of opaque/unspecified
+	pointers.
+
+	* linux/src/arch/darwin/CVS_Update.txt,
+	linux/src/arch/darwin/Tests_Results.rtf: Added.
+
+	* "linux/src/arch/darwin/CVS Update.txt",
+	"linux/src/arch/darwin/Tests Results.rtf": Removed. Filenames with
+	whitespace are more trouble with shell scripting than they are
+	worth.
+
+2005-03-25  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/test/teststrings.c: Fixed context/device handling to make
+	valgrind's memory leak checker happy plus a few cosmetic changes.
+
+	* linux/configure.ac, linux/src/al_config.c, linux/src/al_debug.c,
+	linux/src/al_ext.c, linux/src/al_main.c, linux/src/al_rcvar.c,
+	linux/src/arch/alsa/alsa.c, linux/src/arch/arts/arts.c,
+	linux/src/arch/esd/esd.c, linux/src/arch/linux/lin_dsp.c,
+	linux/src/arch/solaris/solaris_native.c,
+	linux/src/arch/waveout/waveout.c,
+	linux/src/arch/windows/windows_native.c,
+	linux/src/extensions/al_ext_capture.c: Never use
+	strcpy/strcyt/sprintf, use their safe relatives
+	strncpy/strncat/snprintf instead.
+
+	* linux/src/configure.ac: <alsa/asoundlib.h> needs <time.h> when
+	ISO C99 is enabled.
+
+	* linux/src/al_config.c: As mentioned in the docs, try system wide
+	config file in /etc if no user-specific one is found.
+
+2005-03-23  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/Makefile.in, linux/config-osx.h, linux/configure.ac,
+	linux/openal-config.in, linux/openal.pc.in,
+	linux/audioconvert/Makefile.in, linux/src/Makefile.in,
+	linux/src/al_state.c: Centralize and simplify versionitis;
+	everything is derived from the PACKAGE_VERSION defined via AC_INIT
+	now.
+
+	* linux/src/Makefile.in: Avoid useless relinking.
+
+	* linux/audioconvert/Makefile.in: The test audioconvert test
+	program is now called "test_ac". Using plain "test" could have
+	been very surprising depending on your shell/PATH/..., because it
+	is a very common shell builtin.
+
+	* linux/audioconvert/test.c: Removed.
+
+	* linux/audioconvert/test_ac.c: Added.
+
+	* linux/Makefile.in, linux/audioconvert/Makefile.in,
+	linux/doc/Makefile.in, linux/jlib/Makefile.in
+	linux/src/Makefile.in, linux/test/Makefile.in: Unified *clean
+	targets a bit and added a new target "repo-clean" which brings
+	back everything to the "fresh from repository" state. Alas, there
+	is no standard GNU target for this.
+
+	Note that there is still a lot of cut-n-paste going on here, but
+	this will improve when we switch to automake/libtool (which I
+	intend to do).
+
+2005-03-20  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/Makefile.in, linux/audioconvert/Makefile.in,
+	linux/configure.ac, linux/jlib/Makefile.in, linux/src/Makefile.in,
+	linux/test/Makefile.in: Explicitly handling MAKE is evil because
+	it prevents the correct passing of commandline arguments to
+	sub-makes. Small cleanup.
+
+	* linux/configure.ac: Modernized a bit, requiring autoconf 2.58
+	now. Fixed alsa-dlopen, arts-dlopen and esd-dlopen flags. Removed
+	random "spell checking" of arguments. Removed --with-gcc flag,
+	setting CC is the "autoconf way" of doing that.
+
+	* linux/acconfig.h, linux/acinclude.m4, linux/aclocal.m4: Removed.
+
+2005-03-18  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/audioconvert/ac_misc.c: Removed type punning, newer gcc
+	don't like it. Made ReadChunk a bit nicer on the way.
+
+	* linux/acinclude.m4, linux/aclocal.m4, linux/configure.ac,
+	linux/src/Makefile.in: Removed MMX stuff, it is not working
+	currently, the time of MMX detection is wrong, and even leads to
+	compile-time errors.
+
+	* linux/Makefile.in, linux/PLATFORM, linux/configure.ac,
+	linux/configure.in: Renamed configure.in to configure.ac, the
+	former is a misnomer, see the autoconf documentation.
+
+2005-03-15  Sven Panne  <sven.panne@aedion.de>
+
+	* linux/Makefile.in: Make relative versioning links to dynamic
+	libraries instead of absolute ones. Among other things, it makes
+	it possible to have relocatable packages, which is very nice for
+	non-root users.
+
+	* include/AL/alext.h, linux/src/al_main.c, linux/src/al_main.h,
+	linux/src/alc/alc_context.c, linux/src/alc/alc_context.h,
+	linux/src/extensions/al_ext_vorbis.c: Fixed the const-correctness
+	of _alIsZeroVector, _alcSetContext and alutLoadVorbis_LOKI. Note
+	that Ogg Vorbis' headers are not const-correct, so we still get a
+	warning, this time for the 3rd parameter of ov_open_callbacks,
+	which is a const pointer in reality.
+
+	Corrected the first argument of _alcSetContext (ALCint vs. int).
+
+	Removed a few incorrect UNUSED().
+
+	* linux/src/al_source.c: Fixed a signed/unsigned comparison
+	warning.
+
+	* linux/src/al_source.c, linux/src/arch/alsa/alsa.c,
+	linux/src/arch/arts/arts.c, linux/src/arch/esd/esd.c:
+	Removed/#if'd a few unused variables.
+
+	* linux/src/arch/alsa/alsa.c: Synchronized the type of
+	psnd_pcm_hw_params_get_period_size with the corresponding ALSA 1.x
+	prototype.
+
+	ALSA versioning is still handled incorrectly when
+	OPENAL_DLOPEN_ALSA is defined: Consider the case when e.g. the
+	library was compiled against a 1.x ALSA (i.e. SND_LIB_MAJOR != 0),
+	but at runtime dlvsym() finds a ALSA_0.9.0rc4 version of a given
+	function. The function is then still called like it has a 1.x
+	signature, leading to incorrect parameter passing.
+
+	The right way to handle this versionitis would be to remember
+	which version was found and use the corresponding interface
+	later. If only an unversioned symbol could be found, assuming the
+	1.x signature is probably the right thing nowadays.
+
+	* linux/src/extensions/al_ext_mp3.c,
+	linux/src/extensions/al_ext_vorbis.c: Added missing #includes to
+	get the prototypes for memset, memcpy, and alGetProcAddress.
+
+2005-01-28  Adam D. Moss  <adam@steambird.com>
+
+	* linux/configure.in, linux/openal.spec: Bump version to 0.0.8
+
+2005-01-28  Adam D. Moss  <adam@steambird.com>
+
+	* generate/install openal-config and openal.pc(pkgconfig) files
+        for OpenAL (Patches by D. Hageman <dhageman@dracken.com>)
+
+2004-11-28  Adam D. Moss  <adam@steambird.com>
+
+	* src/arch/alsa/alsa.c: commit a fixed version of patch by Dino
+        Puller <dino@e4a.it> to be more lenient with accepted buffer sizes
+        from the hardware.
+
+2004-09-10  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/mixaudio16.c: Issue an error if we've tried
+        to compile with the broken MMX support enabled and we're not
+        a genius.
+
+2004-06-30  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/al_doppler.c: Permit a DOPPLER_FACTOR of 0 as
+        per the spec.  Noticed by Jason Daly <jdaly@ist.ucf.edu>
+
+2004-06-30  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/al_filter.c: Doppler fixes based on a patch
+        from Jason Daly <jdaly@ist.ucf.edu> with an additional fix.
+
+2004-06-30  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/test/testdoppler.c: A more realistic and helpful
+        doppler test -- move the source towards, through, and away from
+        the listener, while accelerating constantly.
+
+2004-06-30  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/arch/alsa/alsa.c: Nonsensical partial revertion to
+        work around problem experienced by Prakash K. Cheemplavam.  My
+        respect for ALSA has slowly eroded close to the negative by now.
+
+2004-06-25  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/arch/alsa/alsa.c: Preferentially load symbol
+        versions which are known to be good, before falling back to generic
+        unversioned symbols.  This avoids picking up random crappy interface
+        versions in the dlsym roulette.
+
+2004-06-25  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/configure.in
+	* openal/linux/src/arch/arts/arts.c
+	* openal/linux/src/arch/esd/esd.c: From Marco Ziech <mmz@gmx.net>:
+        Add option to load arts and esd libraries at run-time.
+
+2004-06-25  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/arch/alsa/alsa.c
+	* openal/linux/src/alc/alc_context.c: If _alcDeviceSet() fails then
+        return straight after setting the error code, instead of proceeding
+        to call _alSetMixer().  This stops AL going into a tight loop if
+        a driver's set_write_???() fails.
+
+2004-06-25  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/arch/alsa/alsa.c: Fix from Marco Ziech <mmz@gmx.net>
+        for more correct dlsym error handling.
+
+2004-06-04  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/arch/alsa/alsa.c: Fixes from Marco Ziech
+        <mmz@gmx.net>: Fixes for ALSA backend - fix some bugs
+        in alsa_blitbuffer, including handling of EPIPE.  Also init ALSA
+        in non-blocking mode so that ALSA init can potentially properly fail
+        instead of hang if artsd or esd are running.
+
+2004-05-29  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/al_queue.c: Assert fix from
+        Erik Hofman <erik@ehofman.com>
+
+2004-05-23  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/arch/arts/arts.c: ARTS fix from
+        Andreas Beckermann <b_mann@gmx.de>
+
+2004-05-21  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/arch/irix/iris.c: Various IRIX backend
+	fixes from Erik Hofman.
+
+2004-05-18  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/arch/irix/iris.c: New IRIX backend from
+        Erik Hofman <erik@ehofman.com>, supports 4-channel audio and
+        more flexible config.
+
+2004-05-18  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/al_buffer.c: buf->queue_list.size is not the
+        same thing as buf->queue_list.items; don't use one when we mean
+        the other, or strangeness may occur.
+
+2004-05-18  Adam D. Moss  <adam@steambird.com>
+
+	* openal/linux/src/al_queue.c: Plug a memory leak... or at least
+        work around it.
+
+2004-02-02  Ryan C. Gordon  <ryan@epicgames.com>
+
+	* openal/linux/configure.in
+	* openal/linux/src/arch/alsa/alsa.c
+	Optionally use dlopen() on libasound instead of linking directly to it
+	in the ALSA driver. Enable this at configure time with:
+	   ./configure --enable-alsa --enable-alsa-dlopen
+
+2004-01-29  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* openal/include/AL/altypes.h
+	* openal/include/AL/alctypes.h
+	Type consolidation, minor number bump
+
+	* openal/linux/src/al_buffer.h
+	* openal/linux/src/al_buffer.c
+	AL_CURRENT/AL_QUEUED to AL_PROCESSED/AL_PENDING
+
+2004-01-07  Adam D. Moss  <adam@steambird.com>
+
+	* audioconvert/ac_freq.c: Fix another potential overenthusiasm
+	when frequency-upscaling a single 16-bit sample.	
+
+2003-12-26  Adam D. Moss  <adam@steambird.com>
+
+	* src/extensions/al_ext_loki.c: Use the correct sample size
+	in alBufferWriteData_LOKI() after the monoification.  Fixes the
+	problem of the buffer playing for much longer than it should.
+
+2003-12-23  Adam D. Moss  <adam@steambird.com>
+
+	* audioconvert/ac_freq.c: Fix some minor brainos in the
+	interpolated resample*2, and (more critically) don't do
+	extraneous bad things when cvt->len_cvt==0.
+
+2003-11-11  Adam D. Moss  <adam@steambird.com>
+
+	* src/al_debug.c: Fix an implicit declaration: the man
+	page on linux says that vsnprintf() is a GNU extension, so #define
+	_GNU_SOURCE
+
+2003-11-11  Adam D. Moss  <adam@steambird.com>
+
+	* src/arch/sdl/sdl.c: #include <string.h> to avoid implicit
+	declaration of memcpy()/memset()
+
+2003-11-11  Adam D. Moss  <adam@steambird.com>
+
+	* audioconvert/ac_freq.c
+	For the first sample in a chunk to be resampled*2, use dampened
+        extrapolation instead of interpolation to somewhat reduce 'clicking'.
+
+2003-11-03  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* Michel Danzer's big endian patch
+
+2003-10-23  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* audioconvert/ac_freq.c
+	Added Adam Moss's patch to improve fidelity of low-sampled sounds
+	in higher sampling-rate environments.
+
+2003-06-20  Erik Greenwald <erik@smluc.org>
+
+	* (many)
+	Removed trailing spaces and tabs.
+
+2003-05-15  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* src/arch/alsa/alsa.c:
+	Moves alsa/asoundlib.h inclusion below sys/time.h
+
+2003-05-07  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* src/al_filter.c:
+	Changed doppler to multiply existing pitch, if present.
+
+2003-04-01  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* misc
+	Joe Tennies's vector patches
+
+2003-03-23  Joseph I. Valenzuela  <jvalenzu@formosa.infinite-monkeys.org>
+
+	* src/al_source.c:
+	Sunil's updated patch
+
+2003-03-21  Joseph I. Valenzuela  <jvalenzu@formosa.infinite-monkeys.org>
+
+	* src/al_source.c
+	queueing pizzatch
+
+2003-01-13  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* al/aluttypes.h
+	* linux/include/al/alexttypes.h
+	Added AL_PROVIDES_ALUT and LAL_OPENAL defines.
+
+	* openal.spec
+	added file
+
+	* Changelog
+	Removed "formosa." from my email
+
+	* src/arch/morphos/morphos_dispatcher.c
+	* src/arch/morphos/morphos_dispatcher.h
+	* src/arch/morphos/morphos_native.c
+	* src/arch/morphos/morphos_native.h
+	* src/mutex/morphosmutex.c
+	* src/mutex/morphosmutex.h
+	* src/threads/morphosthreads.c
+	* src/threads/morphosthreads.h
+	Added Ruediger Hanke <tomjoad@muenster.de>'s MorphOS files.
+
+2003-01-06  Erik Greenwald <erik@smluc.org>
+
+	* src/arch/bsd/bsd_dsp.c
+	* src/arch/bsd/bsd_dsp.h
+	Fixes for FreeBSD 4.7 (-stable)
+
+2003-01-02  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* src/arch/linux/lin_dsp.c
+	Fix to try /dev/sound/dsp as well as /dev/dsp.  Thanks to
+	Sebastian Kapfer for that.
+
+	* test/.cvsignore
+	* test/testattributes.c
+	* test/Makefile.in
+	Added attribute testing
+
+	* src/al_types.h
+	Added space for flag saving, context/device association.
+
+	* src/alc/alc_context.c
+	* src/alc/alc_device.c
+	* src/alc/alc_device.h
+	Context attribute management
+
+	* src/al_source.c
+	Addition queue fixes.
+
+2002-12-30  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* openal/linux/src/al_mixer.c
+	* openal/linux/src/al_source.c
+	Fix assertions for queue mixing, not done yet.
+
+
+2002-12-17  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+	* src/al_queue.c
+	* src/al_mixer.c
+	* src/al_source.c
+	* src/al_source.h
+	Re-added Zoltan Ponekker's patch to fix queue looping.
+
+2002-12-04  Joseph I. Valenzuela  <jvalenzu@infinite-monkeys.org>
+
+	* src/al_filter.c
+	Added John Quigley's change to queue gain stuff.
+
+	* src/al_queue.c
+	* src/al_mixer.c
+	* src/al_source.c
+	* src/al_source.h
+	Added Zoltan Ponekker's patch to consolidate queue looping.
+
+2002-11-19  Joseph I. Valenzuela  <jvalenzu@formosa>
+
+	* openal/linux/src/al_source.c
+	* openal/include/AL/al.h
+	Added alGetSource3f for compatibility with win implementation.
+
+2002-09-19  Joseph I. Valenzuela  <jvalenzu@formosa>
+
+	* src/arch/alsa/alsa.c
+	Added Dirk's alsa changes
+
+	* CREDITS
+	Added Dirk Ehlke's name
+
+2002-09-17  Joseph I. Valenzuela  <jvalenzu@formosa>
+
+	* src/al_filter.c
+	Fixed stupidity where source's gain wasn't being applied
+	to non distance attentuated sources.
+
+2002-09-16  Christopher Purnell  <cjp@lost.org.uk>
+
+	* src/al_filter.c
+	* src/al_filter.h
+	* src/al_types.h
+	Added a panning filter.  This calculates the directional speaker gains
+	in a way that is independant of distance.
+
+	* src/alc/alc_speaker.c
+	* src/alc/alc_speaker.h
+	Speaker distace now has a value of 1 to simplify the math.
+
+2002-09-09  Ryan C. Gordon  <ryan@epicgames.com>
+
+	* src/alc/alc_context.c:
+	Moved call to _alcSpeakerInit() to prevent segfault from referencing
+	the context's write_device before it was initialized.
+
+2002-09-08  Ryan C. Gordon  <ryan@epicgames.com>
+
+	* src/arch/sdl/sdl.c:
+	Changed sdl_blitbuffer() to call SDL_Delay(1) instead of SDL_Delay(0)
+	while waiting for space in the ring buffer to become available.
+	SDL_Delay(0) is almost universally a no-op, so this was eating the CPU.
+
+2002-09-08  Christopher Purnell  <cjp@lost.org.uk>
+
+	* src/alc/alc_speaker.c
+	Changed _alcSpeakerMove() so that it creates a matrix itself from
+	the listener orientation and applies that to the speaker positions
+	instead of using _alRotatePointAboutAxis().  Also adjusted the
+	speaker positions for fourpoint.
+
+	* src/al_vector.c
+	* src/al_vector.h
+	Added a vector product function.
+
+2002-09-07  Joseph I. Valenzuela  <jvalenzu@formosa>
+
+	* src/al_filter.c:
+	Messed with pitch again.  Both removed and reintroduced lookup
+	table, but I think the result is more sound now.  Got a chance to
+	clean it up, may revisit soon to reduce memory fragmentation in
+	the tpitch lookup table.
+
+2002-09-05  Ryan C. Gordon  <ryan@epicgames.com>
+
+	* src/arch/sdl/sdl.c:
+	Patched to function, again.
+
+2002-09-05  Joseph I. Valenzuela  <jvalenzu@formosa>
+
+	* configure.in, al_debug.h, al_debug.c
+	added ALD_FILTER debug category
+
+	* al_filter.c
+	added non lookup table version of alf_tpitch for ryan
+
+	* foo
+	bar
+
+2002-07-18  Joseph I. Valenzuela  <jvalenzu@forbidden.loungenet.org>
+
+	* fix bug that incorrectly reported LAL_VERSION as 1
+ 	  instead of "0.0.6"
+
+2002-07-12  Joseph I. Valenzuela  <jvalenzu@formosa>
+
+	* /usr/local/cvs-repository/openal/linux/Makefile.in
+	* /usr/local/cvs-repository/openal/linux/aclocal.m4
+	* /usr/local/cvs-repository/openal/linux/autogen.sh
+	* /usr/local/cvs-repository/openal/linux/configure.in
+
+	Joseph Carter's patches to enable compilation with recent
+	versions of autoconf
+
+	* /usr/local/cvs-repository/openal/linux/audioconvert/ac_adpcm.c
+
+	Change variable names from index
+
+	* /usr/local/cvs-repository/openal/linux/include/AL/alext.h
+	* /usr/local/cvs-repository/openal/linux/include/AL/alexttypes.h
+
+	move typedefs to alexttypes.h
+
+	* /usr/local/cvs-repository/openal/linux/src/al_types.h
+	Added device specifier to device
+
+	* /usr/local/cvs-repository/openal/linux/src/al_buffer.c
+	* /usr/local/cvs-repository/openal/linux/src/al_buffer.h
+	* /usr/local/cvs-repository/openal/linux/src/extensions/al_ext_loki.c
+
+	change style of orig_buffer allocation to reduce memory.  Now
+	channels in buf->orig_buffer may be duplicated, so freeing
+	requires uniq'ing orig_buffer[0..._ALC_MAX_CHANNELS].
+
+	* /usr/local/cvs-repository/openal/linux/src/al_main.h
+
+	H to the Izzo
+
+	* /usr/local/cvs-repository/openal/linux/src/al_source.c
+
+	Change variable name from rindex
+
+	* /usr/local/cvs-repository/openal/linux/src/mixaudio16.c
+	Add a little sanity to MixAudio16_n
+
+	* /usr/local/cvs-repository/openal/linux/src/alc/alc_context.c
+	* /usr/local/cvs-repository/openal/linux/src/alc/alc_context.h
+	* /usr/local/cvs-repository/openal/linux/src/alc/alc_device.c
+	Added device specifier and attribute stubs
+
+	* /usr/local/cvs-repository/openal/linux/test/.cvsignore
+
+	V to the Izza
+
+	* /usr/local/cvs-repository/openal/linux/test/testlib.c
+	* /usr/local/cvs-repository/openal/linux/test/testlib.h
+
+	Added function pointer for alBufferWriteData_LOKI
+
+	* /usr/local/cvs-repository/openal/linux/test/testmultichannel.c
+
+	Changed testmultichannel to use alBufferWriteData_LOKI
+
+2002-05-06  Joseph I. Valenzuela  <jvalenzu@forbidden.loungenet.org>
+
+	* src/al_siteconfig.h
+	- doh!
+
+2002-05-06  Joseph I. Valenzuela  <jvalenzu@formosa>
+
+	* openal/linux/CREDITS
+	- vanity change
+
+	* openal/linux/configure.in
+	- moved dl check out of darwin
+
+	* openal/linux/audioconvert/ac_format.c
+	- don't remember
+
+	* openal/linux/src/Makefile.in
+	- changes to aid darwin compilation
+
+	* openal/linux/src/al_propagation.c
+	- remind me to remove this
+
+	* openal/linux/src/mutex/mutexlib.h
+	* openal/linux/src/al_ext.c
+	* openal/linux/src/al_main.c
+	* openal/linux/src/al_siteconfig.h
+
+	* openal/linux/test/Makefile.in
+	- changed tests to use static openal lib
+
+	* openal/linux/test/testlib.c
+	* openal/linux/test/testlib.h
+	- goofy problem with duplicate symbol declarations,
+	  how did I not catch this before
+
+
+2002-05-03  Joseph I. Valenzuela  <jvalenzu@formosa>
+
+	* Darwin updates
+
+2002-05-03  Joseph I. Valenzuela  <jvalenzu@forbidden.loungenet.org>
+
+	* /openal/linux/src/arch/alsa/alsa.h
+	* /openal/linux/src/arch/alsa/alsa.c
+	Updated alsa backend to match current trend in apis
+
+	* /openal/linux/src/configure.in
+	Updated alsa test
+
+2001-01-26  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+
+	* /openal/linux/audioconvert/ac_helper.c
+	* /openal/linux/src/al_config.c
+	* /openal/linux/src/al_error.c
+	* /openal/linux/src/al_mixer.c
+	* /openal/linux/src/al_mixfunc.c
+	* /openal/linux/src/al_mixmanager.c
+	* /openal/linux/src/al_queue.c
+	* /openal/linux/src/al_rctree.c
+	* /openal/linux/src/al_rcvar.c
+	* /openal/linux/src/al_rcvar.h
+	* /openal/linux/src/al_source.c
+	* /openal/linux/src/al_state.c
+	* /openal/linux/src/Attic/al_vector.c
+	* /openal/linux/src/mixaudio16.c
+	* /openal/linux/src/alc/alc_context.c
+	* /openal/linux/src/alc/alc_context.h
+	* /openal/linux/src/alc/Attic/alc_device.c
+	* /openal/linux/src/alc/alc_error.c
+	* /openal/linux/src/alc/alc_speaker.c
+	* /openal/linux/src/alut/alut_imaadpcm.c
+	* /openal/linux/src/extensions/al_ext_capture.h
+	* /openal/linux/src/extensions/al_ext_loki.h
+	* /openal/linux/src/extensions/al_ext_mp3.h
+	* /openal/linux/src/extensions/al_ext_needed.h
+	* /openal/linux/src/extensions/al_ext_vorbis.h
+	* /openal/linux/test/testtime.c
+
+	Comments, mostly, small changes in filter order to audioconvert
+
+
+2001-01-25  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/configure.in
+	Simplified vorbis test.
+
+	* /openal/linux/src/Makefile.in
+	Added al_mspool.c.
+
+	* /openal/linux/src/al_able.c
+	* /openal/linux/src/al_bpool.c
+	* /openal/linux/src/al_buffer.c
+	* /openal/linux/src/al_config.c
+	* /openal/linux/src/al_debug.c
+	* /openal/linux/src/al_distance.c
+	* /openal/linux/src/al_doppler.c
+	* /openal/linux/src/al_error.c
+	* /openal/linux/src/al_ext.c
+	* /openal/linux/src/al_filter.c
+	* /openal/linux/src/al_listen.c
+	* /openal/linux/src/al_main.c
+	* /openal/linux/src/al_main.h
+	* /openal/linux/src/al_mixer.c
+	* /openal/linux/src/alc/alc_context.h
+
+	More comments.
+
+	* /openal/linux/src/arch/darwin/Attic/TODO
+	* /openal/linux/src/arch/darwin/Attic/darwin_native.c
+
+	Darwin backend fixes.
+
+	* /openal/linux/src/arch/interface/interface_sound.c
+	* /openal/linux/src/arch/linux/lin_dsp.c
+
+	Futzing around, trying to sort out problem on commercial OSS.
+
+
+2001-01-24  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/src/Makefile.in
+	Added entry for al_vector.c
+
+	* /openal/linux/include/AL/alext.h
+	* /openal/linux/src/al_able.h
+	* /openal/linux/src/al_attenuation.h
+	* /openal/linux/src/al_buffer.h
+	* /openal/linux/src/al_config.h
+	* /openal/linux/src/al_debug.h
+	* /openal/linux/src/al_distance.h
+	* /openal/linux/src/al_doppler.h
+	* /openal/linux/src/al_error.h
+	* /openal/linux/src/al_able.c
+	* /openal/linux/src/al_buffer.c
+	* /openal/linux/src/al_config.c
+	* /openal/linux/src/al_debug.c
+	* /openal/linux/src/al_error.c
+	* /openal/linux/src/al_ext.c
+	* /openal/linux/src/al_ext.h
+	* /openal/linux/src/al_ext_iasig.c
+	* /openal/linux/src/al_filter.c
+	* /openal/linux/src/al_filter.h
+	* /openal/linux/src/al_listen.c
+	* /openal/linux/src/al_listen.h
+	* /openal/linux/src/al_main.c
+	* /openal/linux/src/al_main.h
+	* /openal/linux/src/al_mixer.c
+	* /openal/linux/src/al_mixer.h
+	* /openal/linux/src/al_mixfunc.h
+	* /openal/linux/src/al_mixmanager.h
+	* /openal/linux/src/al_queue.c
+	* /openal/linux/src/al_queue.h
+	* /openal/linux/src/al_rctree.h
+	* /openal/linux/src/al_rcvar.c
+	* /openal/linux/src/al_rcvar.h
+	* /openal/linux/src/al_source.c
+	* /openal/linux/src/al_source.h
+	* /openal/linux/src/al_spool.c
+	* /openal/linux/src/al_spool.h
+	* /openal/linux/src/al_state.c
+	* /openal/linux/src/al_state.h
+	* /openal/linux/src/al_types.h
+	* /openal/linux/src/mixaudio16.h
+	* /openal/linux/src/alc/alc_context.c
+	* /openal/linux/src/alc/alc_context.h
+	* /openal/linux/src/alc/alc_error.c
+	* /openal/linux/src/alc/alc_error.h
+	* /openal/linux/src/alc/alc_speaker.c
+	* /openal/linux/src/alc/alc_speaker.h
+	* /openal/linux/src/alut/alut_imaadpcm.c
+	* /openal/linux/src/alut/alut_msadpcm.c
+	* /openal/linux/src/alut/alut_wav.c
+	* /openal/linux/src/arch/alsa/alsa.c
+	* /openal/linux/src/arch/arts/arts.c
+	* /openal/linux/src/arch/bsd/bsd_dsp.c
+	* /openal/linux/src/arch/darwin/Attic/darwin_native.c
+	* /openal/linux/src/arch/emu10k1/emu10k1.c
+	* /openal/linux/src/arch/esd/esd.c
+	* /openal/linux/src/arch/interface/interface_sound.c
+	* /openal/linux/src/arch/interface/interface_sound.h
+	* /openal/linux/src/arch/interface/platform.h
+	* /openal/linux/src/arch/irix/iris.c
+	* /openal/linux/src/arch/linux/lin_dsp.c
+	* /openal/linux/src/arch/linux/lin_dsp.h
+	* /openal/linux/src/arch/null/null.c
+	* /openal/linux/src/arch/portable/floatmul.c
+	* /openal/linux/src/arch/sdl/sdl.c
+	* /openal/linux/src/arch/solaris/solaris_native.c
+	* /openal/linux/src/arch/waveout/waveout.c
+	* /openal/linux/src/arch/windows/windows_native.c
+	* /openal/linux/src/extensions/al_ext_loki.c
+	* /openal/linux/src/extensions/al_ext_mp3.c
+	* /openal/linux/src/mutex/posixmutex.h
+	* /openal/linux/src/mutex/windowsmutex.h
+	* /openal/linux/src/threads/posixthreads.h
+	* /openal/linux/src/threads/windowsthreads.h
+	* /openal/linux/test/testlistener3.c
+	* /openal/linux/test/testlistener4.c
+	* /openal/linux/test/testmp3.c
+	* /openal/linux/test/testtime.c
+	- More comments, smoothed out some namespace warts
+
+
+2001-01-22  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/src/arch/darwin
+	Added new directory for darwin backend.
+
+	* /openal/linux/src/arch/darwin/FAQ
+	* /openal/linux/src/arch/darwin/TODO
+	* /openal/linux/src/arch/darwin/changes.txt
+	* /openal/linux/src/arch/darwin/darwin_native.c
+	* /openal/linux/src/arch/darwin/darwin_native.h
+	New files for darwin backend.
+
+	* /openal/linux/CREDITS
+	Added Guillaume Borios to credits, for darwin backend.
+
+	* /openal/linux/acconfig.h
+	* /openal/linux/config.guess
+	* /openal/linux/config.sub
+	* /openal/linux/configure.in
+	* /openal/linux/audioconvert/ac_misc.c
+	* /openal/linux/src/Makefile.in
+	* /openal/linux/src/al_main.h
+	* /openal/linux/src/arch/interface/platform.h
+	* /openal/linux/src/threads/posixthreads.c
+	Changes for darwin backend
+
+
+	* /openal/linux/src/alc/alc_context.c
+	* /openal/linux/src/alc/alc_context.h
+	Clean up.
+
+	* /openal/linux/src/arch/linux/lin_dsp.c
+	Changed signature of channel funcs to match ALCenum.
+
+	* /openal/linux/acconfig.h
+	* /openal/linux/configure.in
+	* /openal/linux/include/AL/alexttypes.h
+	* /openal/linux/src/Makefile.in
+	* /openal/linux/src/al_buffer.h
+	* /openal/linux/src/al_ext.c
+	* /openal/linux/src/al_ext.h
+	* /openal/linux/src/al_filter.c
+	* /openal/linux/src/al_filter.h
+	* /openal/linux/src/al_listen.c
+	* /openal/linux/src/al_main.c
+	* /openal/linux/src/al_main.h
+	* /openal/linux/src/al_source.c
+	* /openal/linux/src/al_source.h
+	* /openal/linux/src/al_types.h
+	* /openal/linux/src/extensions/al_ext_capture.c
+	* /openal/linux/src/extensions/al_ext_loki.c
+	* /openal/linux/test/Makefile.in
+	* /openal/linux/test/testcallback.c
+	* /openal/linux/test/testcapture2.c
+	* /openal/linux/test/testchannel.c
+	* /openal/linux/test/testgain.c
+	* /openal/linux/test/testgainlinear.c
+	* /openal/linux/test/testloop.c
+	* /openal/linux/test/testmp3.c
+	* /openal/linux/test/testmp32.c
+	* /openal/linux/test/testmulti.c
+	* /openal/linux/test/testmultialut.c
+	* /openal/linux/test/testmulticontext.c
+	* /openal/linux/test/testmultimp3.c
+	* /openal/linux/test/testmultinothread.c
+	* /openal/linux/test/testpitch.c
+	* /openal/linux/test/testpitch2.c
+	* /openal/linux/test/testpitch3.c
+	* /openal/linux/test/testpitch4.c
+	* /openal/linux/test/testpitchnothread.c
+	* /openal/linux/test/testpitchnothread2.c
+	* /openal/linux/test/testqueue.c
+	* /openal/linux/test/testqueue2.c
+	* /openal/linux/test/testqueue3.c
+	* /openal/linux/test/teststartstop.c
+	* /openal/linux/test/teststrings.c
+	* /openal/linux/test/testtime.c
+	* /openal/linux/test/testvorbis.c
+
+	removed fft and complex type stuff.
+	changed AL_GAIN_LINEAR to AL_GAIN_LINEAR_LOKI and moved the define
+	to the extension header.
+
+
+
+2001-01-16  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+
+	* /openal/linux/src/alc/alc_context.c
+	Added alcIsExtensionPresent, alcGetProcessAddress, alcGetEnumValue
+	( simply wrappers for now )
+
+2001-01-03  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/src/al_filter.c
+	Refined linear interpolation a little.
+
+	* /openal/linux/src/al_types.h
+	Nothing much.
+
+	* /openal/linux/test/testpitch4.c
+	Increased buffersize
+
+	* /openal/linux/test/testpitchnothread.c
+	Nothing much
+
+2000-12-20  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/src/al_able.c
+	* /openal/linux/src/al_distance.c
+	* /openal/linux/src/al_doppler.c
+	* /openal/linux/src/al_ext_iasig.c
+	* /openal/linux/src/al_filter.c
+	* /openal/linux/src/al_mixer.c
+	* /openal/linux/src/al_mixfunc.c
+	* /openal/linux/src/al_mixmanager.c
+	* /openal/linux/src/al_queue.c
+	* /openal/linux/src/al_source.c
+	* /openal/linux/src/al_source.h
+	* /openal/linux/src/al_spool.c
+	* /openal/linux/src/al_state.c
+	* /openal/linux/src/al_types.h
+	* /openal/linux/src/mixaudio16.c
+	* /openal/linux/src/alut/alut_main.c
+	* /openal/linux/src/arch/interface/interface_sound.c
+	* /openal/linux/src/arch/linux/lin_dsp.c
+	* /openal/linux/src/arch/null/null.c
+	* /openal/linux/src/arch/waveout/waveout.c
+	* /openal/linux/test/testmulti.c
+
+	Sigh.  MMX doesn't work for now.  It may sometime later.  The
+	problem is accumulated errors.  Other small stuff, mostly
+	related to locking.
+
+
+2000-12-15  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/src/al_source.c
+	Fixed faulty _alGetSourceParam call when using boolean
+	params
+
+	* /openal/linux/test/testloop.c
+	Test for above
+
+2000-12-07  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/src/al_filter.c
+	* /openal/linux/src/al_rctree.c
+	* /openal/linux/src/al_rctree.h
+	* /openal/linux/src/al_rcvar.c
+	* /openal/linux/src/al_rcvar.h
+	Nothing much
+
+	* /openal/linux/src/alc/alc_context.c
+	fixed external sampling rate stuff
+
+	* /openal/linux/src/alc/Attic/alc_device.c
+	added sampling rate token
+
+	* /openal/linux/test/testpitchnothread.c
+	Nothing much
+
+	* /openal/linux/test/testtime.c
+	Testing frequency/sampling rate stuff
+
+	* /openal/linux/src/al_mixer.c
+
+
+2000-12-06  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/src/al_filter.c
+	Added pitch interpolation
+
+	* /openal/linux/src/arch/alsa/alsa.c
+	* /openal/linux/src/arch/alsa/alsa.h
+	Fixed so that it actually compiles
+
+	* /openal/linux/test/testalinitexit.c
+	* /openal/linux/test/testalut.c
+	* /openal/linux/test/testbufferuniq.c
+	* /openal/linux/test/testcallback.c
+	* /openal/linux/test/testcapture.c
+	* /openal/linux/test/testcapture2.c
+	* /openal/linux/test/testchannel.c
+	* /openal/linux/test/testchannel2.c
+	* /openal/linux/test/testda.c
+	* /openal/linux/test/Attic/testdevice.c
+	* /openal/linux/test/testdoppler.c
+	* /openal/linux/test/testext.c
+	* /openal/linux/test/testfft.c
+	* /openal/linux/test/testgain.c
+	* /openal/linux/test/testgainlinear.c
+	* /openal/linux/test/Attic/testgendelbuffer_error.c
+	* /openal/linux/test/Attic/testgendelsource_error.c
+	* /openal/linux/test/testleak.c
+	* /openal/linux/test/testlistener.c
+	* /openal/linux/test/testlistener2.c
+	* /openal/linux/test/testlistener3.c
+	* /openal/linux/test/testlistener4.c
+	* /openal/linux/test/testloop.c
+	* /openal/linux/test/testmp3.c
+	* /openal/linux/test/testmp32.c
+	* /openal/linux/test/testmulti.c
+	* /openal/linux/test/testmultialut.c
+	* /openal/linux/test/testmultichannel.c
+	* /openal/linux/test/testmulticontext.c
+	* /openal/linux/test/testmulticontext2.c
+	* /openal/linux/test/testmultimp3.c
+	* /openal/linux/test/testmultinothread.c
+	* /openal/linux/test/testnothread.c
+	* /openal/linux/test/testorient.c
+	* /openal/linux/test/testpause.c
+	* /openal/linux/test/testpitch.c
+	* /openal/linux/test/testpitch2.c
+	* /openal/linux/test/testpitch3.c
+	* /openal/linux/test/testpitch4.c
+	* /openal/linux/test/testpitchnothread.c
+	* /openal/linux/test/testpitchnothread2.c
+	* /openal/linux/test/testqueue.c
+	* /openal/linux/test/testqueue2.c
+	* /openal/linux/test/testqueue3.c
+	* /openal/linux/test/testrelative.c
+	* /openal/linux/test/testreverb.c
+	* /openal/linux/test/testsourcestop.c
+	* /openal/linux/test/testsourceuniq.c
+	* /openal/linux/test/teststartstop.c
+	* /openal/linux/test/teststream.c
+	* /openal/linux/test/testtime.c
+	* /openal/linux/test/testvorbis.c
+	Ugh
+
+
+2000-11-22  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+
+	* /openal/linux/src/al_filter.c
+	Fixed boolp in _alApplyFilter, relative sounds should be translated
+	properly.
+
+
+2000-11-21  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+
+	* /openal/linux/src/al_mixer.c
+	* /openal/linux/src/alc/alc_context.c
+	* /openal/linux/src/alc/alc_context.h
+	* /openal/linux/src/arch/linux/lin_dsp.c
+	* /openal/linux/src/extensions/al_ext_capture.c
+	* /openal/linux/test/testcapture.c
+	* /openal/linux/test/teststream.c
+	Capture stuff
+
+
+	* /openal/linux/src/al_ext.c
+	* /openal/linux/src/al_source.c
+	* /openal/linux/src/al_types.h
+	Put AL_STREAMING back in
+
+2000-11-20  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/demos/XLDEMO/linux/Makefile
+	* /openal/include/AL/altypes.h
+	* /openal/linux/include/AL/alkludgetypes.h
+	* /openal/linux/src/al_types.h
+	* /openal/linux/src/al_ext.c
+	* /openal/linux/src/al_filter.c
+	* /openal/linux/src/al_mixer.c
+	* /openal/linux/src/al_source.c
+	* /openal/linux/src/al_source.h
+	* /openal/linux/src/al_queue.c
+	* /openal/linux/test/testlib.h
+	More loop token sadness
+
+	* /openal/linux/src/al_main.c
+	* /openal/linux/src/al_main.h
+	Fixed bogus matrix mul code, changed rotate func
+
+	* /openal/linux/src/alc/alc_speaker.c
+	Touched up orientation code
+
+	* /openal/linux/test/testlistener2.c
+	* /openal/linux/test/testlistener3.c
+	* /openal/linux/test/testlistener4.c
+	Tested orientation code
+
+2000-11-15  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+
+	* /openal/linux/src/al_filter.c
+	Applied Jason's patch to fixup alf_tdoppler
+
+2000-11-14  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/src/al_buffer.c
+	* /openal/linux/src/al_mixer.c
+	* /openal/linux/src/al_source.c
+	* /openal/linux/src/al_types.h
+	Lousy callback fix and backed out progressive callback decoding
+
+2000-11-03  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/include/AL/alext.h
+	Vorbis stuff
+
+	* /openal/linux/include/AL/alexttypes.h
+	Vorbis stuff
+
+	* /openal/linux/src/al_buffer.c
+	Decoding callbacks only occur once, vorbis stuff
+
+	* /openal/linux/src/al_main.c
+	Not much
+
+	* /openal/linux/src/al_mixer.c
+	Fixed 0 alloc, clean up a little
+
+	* /openal/linux/src/al_source.c
+	Clean up a little, decoding callbacks only occur once.
+
+	* /openal/linux/src/al_source.h
+	clean up
+
+	* /openal/linux/src/al_types.h
+	Added param to buffer to indicate decoding position
+
+	* /openal/linux/src/alut/alut_msadpcm.c
+	Added mojo to force little endianness
+
+	* /openal/linux/src/extensions/al_ext_vorbis.c
+	* /openal/linux/src/extensions/al_ext_vorbis.h
+	Fixed my stupid bug
+
+	* /openal/linux/test/Makefile.in
+	* /openal/linux/test/testalut.c
+	* /openal/linux/test/testmath.c
+	* /openal/linux/test/testvorbis.c
+	Nothing important
+
+
+2000-10-30  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+ 	* /openal/linux/audioconvert/ac_misc.c
+	explicit endian conversion.
+
+	* /openal/linux/src/extensions/al_ext_mp3.c
+	Added workaround for smpeg with no audio thread
+
+	* /openal/linux/test/testmp3.c
+	Testing working
+
+2000-10-27  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/audioconvert/ac_endian.h
+	Fixes for big endian systems
+
+	* /openal/linux/audioconvert/ac_misc.c
+	Fixes for big endian systems
+
+	* /openal/linux/audioconvert/audioconvert.h
+	Changed audio defines to be endian native
+
+	* /openal/linux/src/al_buffer.c
+	More comments
+
+	* /openal/linux/src/arch/irix/iris.c
+	Fixes
+
+	* /openal/linux/src/threads/posixthreads.c
+	Added extern definition of pthread_atfork for irix folk.
+
+	* /openal/linux/audioconvert/ac_endian.c
+	Fixes for IRIX
+
+	* /openal/linux/include/AL/alexttypes.h
+	Added WAVE_EXT format tag
+
+	* /openal/linux/src/al_buffer.c
+	Added support for AL_FORMAT_WAVE_EXT in alBufferData
+
+	* /openal/linux/src/al_debug.c
+	Nothing much
+
+	* /openal/linux/src/al_listen.c
+	Slight cleanup
+
+	* /openal/linux/src/al_main.c
+	* /openal/linux/src/al_main.h
+	Changed _al_COMPRESSEDFORMAT to !_al_RAWFORMAT
+
+	* /openal/linux/src/al_mixer.c
+	* /openal/linux/src/al_mixmanager.c
+	* /openal/linux/src/al_rctree.c
+	Cleanup
+
+	* /openal/linux/src/alut/alut_main.c
+	Set error if context not creatable
+
+	* /openal/linux/src/arch/irix/iris.c
+	Fixes for IRIX
+
+	* /openal/linux/src/extensions/al_ext_vorbis.c
+	Nothing much
+
+
+2000-10-20  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/configure.in
+	* /openal/linux/src/al_ext.h
+	* /openal/linux/src/arch/interface/interface_sound.c
+	* /openal/linux/src/arch/linux/lin_dsp.c
+	* /openal/linux/src/mutex/posixmutex.c
+	* /openal/linux/test/testext.c
+	* /openal/linux/test/testlib.c
+	* /openal/linux/test/testlistener.c
+	* /openal/linux/test/testlistener2.c
+	* /openal/linux/test/testlistener3.c
+	* /openal/linux/test/testlistener4.c
+	* /openal/linux/test/testmulti.c
+	Changes to get openal to compile using rh7 gcc
+
+	* /openal/linux/src/al_main.c
+	Advertise capture, ADPCM and BYTE_LOKI extensions
+
+2000-10-19  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* /openal/linux/include/AL/alexttypes.h
+	Added ima format tokens.
+
+	* /openal/linux/src/al_buffer.c
+	Added support for ima format tokens
+	Fixed bug for AL_BITS in alGetBufferi
+
+	* /openal/linux/src/al_main.c
+	* /openal/linux/src/al_main.h
+	Added ima extension support in format converters
+
+
+	* openal/linux/acconfig.h
+	added WORDS_BIGENDIAN define
+
+	* openal/linux/configure.in
+	Added bigendian test
+
+	* openal/linux/audioconvert/ac_endian.h
+	Changed macros to use WORDS_BIGENDIAN define
+
+	* openal/linux/doc/openal.texi
+	Added section of special loki tokens
+
+	* openal/linux/src/al_buffer.c
+	* openal/linux/src/al_buffer.h
+	* openal/linux/src/al_ext.c
+	* openal/linux/src/al_ext.h
+	* openal/linux/src/al_filter.c
+	* openal/linux/src/al_main.c
+	* openal/linux/src/al_main.h
+	* openal/linux/src/al_mixer.c
+	* openal/linux/src/al_mixer.h
+	* openal/linux/src/al_mixfunc.c
+	* openal/linux/src/al_mixfunc.h
+	* openal/linux/src/al_mixmanager.c
+	* openal/linux/src/al_mixmanager.h
+	* openal/linux/src/al_source.c
+	* openal/linux/src/al_source.h
+	* openal/linux/src/al_spool.c
+	Added error reporting for init functions
+	Additional sanity checks on allocation
+	Multiple context support
+	Soundpos for callbacks
+
+	* openal/linux/src/alc/alc_context.c
+	* openal/linux/src/alc/alc_context.h
+	Multiple context support
+	Cleaned up context generation/destruction some
+
+	* openal/linux/src/arch/linux/lin_dsp.c
+	* openal/linux/src/extensions/al_ext_vorbis.c
+	Big endian sanity check
+
+	* openal/linux/test/Makefile.in
+	Added new test cases
+
+	* openal/linux/test/testalut.c
+	* openal/linux/test/testloop.c
+	* openal/linux/test/testpause3.c
+	Nothing big
+
+
+2000-10-16  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* openal/linux/src/arch/irix/iris.c
+	Added undefs for dmedia stuff
+
+	* openal/linux/src/al_buffer.c
+	Redid buffer ref counting stuff stuff
+
+	* openal/linux/src/al_ext.h
+	Redid macro stuff
+
+	* openal/linux/src/al_mixer.c
+	Redid streaming buffer stuff
+
+	* openal/linux/src/al_types.h
+	Cleaned up enum flags
+
+	* openal/linux/test/Makefile.in
+	* openal/linux/test/testcallback.c
+	* openal/linux/test/teststream.c
+	foo
+
+2000-10-14  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+	* openal/linux/src/al_filter.c
+	Removed unneeded variable buflen from _alApplyFilters
+
+	* openal/linux/src/al_mixer.c
+	Changed src->srcParams.soundpos -= samp->size to modulo
+	operation, to prevent problems with really really short sounds
+
+	* openal/linux/src/al_source.c
+	Spurious changes
+
+	* openal/linux/src/arch/sdl/sdl.c
+	Made al_siteconfig.h first include
+
+	* openal/linux/test/testalut.c
+	* openal/linux/test/testmp3.c
+	Nothing big
+
+
+2000-10-13  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames.com>
+
+	* linux/audioconvert/ac_channels.c
+	Make stereo->mono little less obnoxious
+
+	* linux/src/al_buffer.c
+	* linux/src/al_filter.c
+	* linux/src/al_main.c
+	* linux/src/al_main.h
+	Reduce realloc calls (hopefully)
+
+	* linux/src/al_types.h
+	Added weird struct
+
+	* linux/test/testmultichannel2.c
+	Removed looping flag
+
+
+2000-10-10  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* openal/linux/src/al_source.c
+	Nothing big
+
+	* openal/linux/src/arch/irix/iris.c
+	Workaround
+
+	* openal/linux/src/extensions/al_ext_loki.c
+	Tweaks to alBufferWriteAppendData to be more conservative
+	about memory.
+
+	* openal/linux/configure.in
+	tweaked vorbis stuff
+
+	* openal/linux/src/al_buffer.c
+	Nothing big.
+
+	* openal/linux/src/al_mixer.c
+	playcount fix for callbacks
+
+
+	* openal/linux/src/extensions/al_ext_mp3.c
+	* openal/linux/src/extensions/al_ext_vorbis.c
+	Looping stuff.
+
+	* openal/linux/test/.cvsignore
+	* openal/linux/test/Makefile.in
+	Added new test case.
+
+	* openal/linux/test/testmp3.c
+	* openal/linux/test/testvorbis.c
+	Tweakage to expose old bugs
+
+2000-10-06  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* openal/linux/acconfig.h
+	* openal/linux/configure.in
+	* openal/linux/src/Makefile.in
+	* openal/linux/src/al_config.c
+	* openal/linux/src/al_config.h
+	* openal/linux/src/al_mixer.c
+	* openal/linux/src/al_rcvar.c
+	* openal/linux/src/al_rcvar.h
+	* openal/linux/src/al_source.c
+	* openal/linux/src/arch/interface/interface_sound.c
+	* openal/linux/src/arch/interface/platform.h
+	* openal/linux/src/arch/linux/lin_dsp.c
+	* openal/linux/src/arch/linux/lin_dsp.h
+	* openal/linux/test/testconfig.c
+	Added emu10k1 stuff, updated config stuff, etc
+
+	* openal/linux/configure.in
+	Smartified vorbis detection hopefully
+
+	* openal/linux/src/al_listen.c
+	Sanity check
+
+	* openal/linux/src/al_mixer.c
+	Don't remember
+
+	* openal/linux/test/testsingle.c
+	* openal/linux/test/testtime.c
+	Nothing big
+
+
+2000-10-05  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	*  openal/linux/audioconvert/ac_adpcm.c
+	*  openal/linux/include/AL/alexttypes.h
+	*  openal/linux/src/al_able.c
+	*  openal/linux/src/al_filter.c
+	*  openal/linux/src/al_mixer.c
+	*  openal/linux/src/al_types.h
+	*  openal/linux/src/alc/alc_context.c
+	*  openal/linux/src/alc/alc_context.h
+	*  openal/linux/src/arch/alsa/alsa.h
+	*  openal/linux/src/arch/arts/arts.c
+	*  openal/linux/src/arch/arts/arts.h
+	*  openal/linux/src/arch/bsd/bsd_dsp.h
+	*  openal/linux/src/arch/esd/esd.c
+	*  openal/linux/src/arch/esd/esd.h
+	*  openal/linux/src/arch/interface/interface_sound.c
+	*  openal/linux/src/arch/interface/interface_sound.h
+	*  openal/linux/src/arch/interface/platform.h
+	*  openal/linux/src/arch/irix/iris.h
+	*  openal/linux/src/arch/linux/lin_dsp.c
+	*  openal/linux/src/arch/linux/lin_dsp.h
+	*  openal/linux/src/arch/null/null.c
+	*  openal/linux/src/arch/null/null.h
+	*  openal/linux/src/arch/sdl/sdl.c
+	*  openal/linux/src/arch/sdl/sdl.h
+	*  openal/linux/src/arch/solaris/solaris_native.h
+	*  openal/linux/src/arch/waveout/waveout.c
+	*  openal/linux/src/arch/waveout/waveout.h
+	*  openal/linux/src/arch/windows/windows_native.h
+	*  openal/linux/src/extensions/al_ext_capture.c
+	*  openal/linux/src/extensions/al_ext_loki.c
+	*  openal/linux/src/extensions/al_ext_mp3.c
+	*  openal/linux/test/.cvsignore
+	*  openal/linux/test/Makefile.in
+	ugh
+
+	More capture stuff
+
+
+2000-10-04  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* openal/linux/PLATFORM
+	Update PLATFORM to reflect new stuff
+
+	* openal/linux/src/al_mixer.c
+	Removed external_channels
+
+	* openal/linux/src/al_types.h
+	Changed definition of context
+
+	* openal/linux/src/alc/alc_context.h
+	* openal/linux/src/alc/alc_context.c
+	* openal/linux/src/alc/alc_speaker.c
+	Updated context to remove extraneous channel parameter, instead
+	deriving channels from the format.
+	Updates for capture stuff.
+
+	* openal/linux/src/arch/arts/arts.c
+	* openal/linux/src/arch/arts/arts.h
+	* openal/linux/src/arch/bsd/bsd_dsp.c
+	* openal/linux/src/arch/bsd/bsd_dsp.h
+	* openal/linux/src/arch/esd/esd.c
+	* openal/linux/src/arch/esd/esd.h
+	* openal/linux/src/arch/interface/interface_sound.c
+	* openal/linux/src/arch/interface/interface_sound.h
+	* openal/linux/src/arch/interface/platform.h
+	* openal/linux/src/arch/irix/iris.c
+	* openal/linux/src/arch/irix/iris.h
+	* openal/linux/src/arch/linux/lin_dsp.c
+	* openal/linux/src/arch/linux/lin_dsp.h
+	* openal/linux/src/arch/null/null.c
+	* openal/linux/src/arch/null/null.h
+	* openal/linux/src/arch/sdl/sdl.c
+	* openal/linux/src/arch/sdl/sdl.h
+	* openal/linux/src/arch/solaris/solaris_native.c
+	* openal/linux/src/arch/solaris/solaris_native.h
+	* openal/linux/src/arch/waveout/waveout.c
+	* openal/linux/src/arch/waveout/waveout.h
+	* openal/linux/src/arch/windows/windows_native.c
+	* openal/linux/src/arch/windows/windows_native.h
+	Updated backends to use set_read_foo and set_write_foo instead of
+	set_foo.
+	Updates for capture stuff.
+
+	* openal/linux/test/.cvsignore
+	Added testhash and teststream3
+
+
+	* openal/linux/Makefile.in
+	Don't remember
+
+	* openal/linux/acconfig.h
+	Added CAPTURE_SUPPORT define
+
+	* openal/linux/configure.in
+	Added --enable-capture option to enable audio capture
+
+	* openal/linux/audioconvert/Makefile.in
+	Don't remember
+
+	* openal/linux/audioconvert/ac_misc.c
+	Scaling volume so stereo->mono conversions suffer from
+	less overflow.
+
+	* openal/linux/include/AL/alext.h
+	Added PFN typedefs
+
+	* openal/linux/jlib/globals.c
+	* openal/linux/jlib/hash.c
+	* openal/linux/jlib/libjlib.h
+	Updated hash for fewer collisions when keys are memory
+	addresses, bug fixes.
+
+	* openal/linux/src/Makefile.in
+	Don't remember
+
+	* openal/linux/src/al_buffer.c
+	* openal/linux/src/al_source.c
+	* openal/linux/src/al_source.h
+	Moved Channelify/Monoify functions to public space.
+	Changed audio conversion channlification to move burden of
+	monoification to load time as opposed to run time.
+
+	* openal/linux/src/al_fft.c
+	FFT tweaks
+
+	* openal/linux/src/al_filter.c
+	Changed audio conversion channlification to move burden of
+	monoification to load time as opposed to run time.
+
+	* openal/linux/src/al_main.c
+	* openal/linux/src/al_main.h
+	Little work on helper functions.
+
+	* openal/linux/src/al_mixer.c
+	Changed audio conversion channlification to move burden of
+	monoification to load time as opposed to run time.
+
+	* openal/linux/src/al_siteconfig.h
+	Changed defines/includes to aid dmalloc/jlib
+
+	* openal/linux/src/al_types.h
+	Changed buffer definition
+
+	* openal/linux/src/mixaudio16.c
+	Playing around.
+
+	* openal/linux/src/alc/alc_context.c
+	* openal/linux/src/alut/alut_imaadpcm.c
+	* openal/linux/src/alut/alut_msadpcm.c
+
+	* openal/linux/src/arch/interface/interface_sound.c
+	* openal/linux/src/arch/linux/lin_dsp.c
+	Changed capture stuff a little
+
+	* openal/linux/src/extensions/al_ext_capture.c
+	* openal/linux/src/extensions/al_ext_capture.h
+	Updated extensions for new buffer structure.
+	Updates for capture stuff.
+
+	* openal/linux/src/extensions/al_ext_loki.c
+	* openal/linux/src/extensions/al_ext_loki.h
+	Updated extensions for new buffer structure.
+
+	* openal/linux/test/Makefile.in
+	Added testhash
+
+	* openal/linux/test/aluttime.c
+	* openal/linux/test/test.c
+	* openal/linux/test/testalc.c
+	* openal/linux/test/testalinitexit.c
+	* openal/linux/test/testalut.c
+	* openal/linux/test/testbuffergendestroy.c
+	* openal/linux/test/testbufferuniq.c
+	* openal/linux/test/testcallback.c
+	* openal/linux/test/testcapture.c
+	* openal/linux/test/testchannel.c
+	* openal/linux/test/testchannel2.c
+	* openal/linux/test/testconfig.c
+	* openal/linux/test/testda.c
+	* openal/linux/test/testdebug.c
+	* openal/linux/test/testdelbuffer.c
+	* openal/linux/test/testdelbuffer_error.c
+	* openal/linux/test/testdelsource_error.c
+	* openal/linux/test/testdoppler.c
+	* openal/linux/test/testdoppler2.c
+	* openal/linux/test/testext.c
+	* openal/linux/test/testfft.c
+	* openal/linux/test/testfloatmul.c
+	* openal/linux/test/testgain.c
+	* openal/linux/test/testgainlinear.c
+	* openal/linux/test/testgenbuffer_error.c
+	* openal/linux/test/testgensource_error.c
+	* openal/linux/test/testlib.c
+	* openal/linux/test/testlib.h
+	* openal/linux/test/testlistener.c
+	* openal/linux/test/testlistener2.c
+	* openal/linux/test/testlistener3.c
+	* openal/linux/test/testlistener4.c
+	* openal/linux/test/testloop.c
+	* openal/linux/test/testmath.c
+	* openal/linux/test/testmisc.c
+	* openal/linux/test/testmp3.c
+	* openal/linux/test/testmulti.c
+	* openal/linux/test/testmultialut.c
+	* openal/linux/test/testmultichannel.c
+	* openal/linux/test/testmultichannel2.c
+	* openal/linux/test/testmultimp3.c
+	* openal/linux/test/testmultinothread.c
+	* openal/linux/test/testnothread.c
+	* openal/linux/test/testorient.c
+	* openal/linux/test/testpause.c
+	* openal/linux/test/testpause2.c
+	* openal/linux/test/testpause3.c
+	* openal/linux/test/testpause4.c
+	* openal/linux/test/testpause5.c
+	* openal/linux/test/testpitch.c
+	* openal/linux/test/testpitch2.c
+	* openal/linux/test/testpitch3.c
+	* openal/linux/test/testpitch4.c
+	* openal/linux/test/testpitchhack.c
+	* openal/linux/test/testpitchnothread.c
+	* openal/linux/test/testpitchnothread2.c
+	* openal/linux/test/testplaycount.c
+	* openal/linux/test/testqueue.c
+	* openal/linux/test/testqueue2.c
+	* openal/linux/test/testqueue3.c
+	* openal/linux/test/testrelative.c
+	* openal/linux/test/testreverb.c
+	* openal/linux/test/testsingle.c
+	* openal/linux/test/testsource.c
+	* openal/linux/test/testsourcegendestroy.c
+	* openal/linux/test/testsourcestop.c
+	* openal/linux/test/testsourceuniq.c
+	* openal/linux/test/teststream.c
+	* openal/linux/test/teststream2.c
+	* openal/linux/test/teststrings.c
+	* openal/linux/test/testsync.c
+	* openal/linux/test/testtime.c
+	* openal/linux/test/testtypes.c
+	* openal/linux/test/testvorbis.c
+
+	Made al_siteconfig.h first include
+
+
+2000-09-26  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* openal/linux/audioconvert/ac_endian.c
+	* openal/linux/audioconvert/ac_misc.c
+	* openal/linux/include/AL/alkludge.h
+	* openal/linux/include/AL/alkludgetypes.h
+	* openal/linux/jlib/globals.c
+	* openal/linux/jlib/hash.c
+	* openal/linux/src/Makefile.in
+	* openal/linux/src/al_buffer.c
+	* openal/linux/src/al_config.c
+	* openal/linux/src/al_debug.h
+	* openal/linux/src/al_ext.c
+	* openal/linux/src/al_filter.c
+	* openal/linux/src/al_listen.c
+	* openal/linux/src/al_main.c
+	* openal/linux/src/al_main.h
+	* openal/linux/src/al_mixer.c
+	* openal/linux/src/al_mixer.h
+	* openal/linux/src/al_mixmanager.c
+	* openal/linux/src/al_queue.c
+	* openal/linux/src/al_queue.h
+	* openal/linux/src/al_rcvar.c
+	* openal/linux/src/al_source.c
+	* openal/linux/src/al_types.h
+	* openal/linux/src/alc/alc_context.c
+	* openal/linux/src/alut/alut_imaadpcm.c
+	* openal/linux/src/alut/alut_msadpcm.c
+	* openal/linux/src/alut/alut_rawadpcm.c
+	* openal/linux/src/alut/alut_wav.c
+	* openal/linux/src/arch/bsd/bsd_dsp.c
+	* openal/linux/src/arch/bsd/bsd_dsp.h
+	* openal/linux/src/arch/esd/esd.c
+	* openal/linux/src/arch/interface/interface_sound.c
+	* openal/linux/src/arch/interface/interface_sound.h
+	* openal/linux/src/arch/irix/iris.c
+	* openal/linux/src/arch/irix/iris.h
+	* openal/linux/src/arch/linux/lin_dsp.c
+	* openal/linux/src/arch/linux/lin_dsp.h
+	* openal/linux/src/arch/null/null.c
+	* openal/linux/src/arch/solaris/solaris_native.c
+	* openal/linux/src/arch/solaris/solaris_native.h
+	* openal/linux/src/arch/waveout/waveout.c
+	* openal/linux/src/arch/windows/windows_native.c
+	* openal/linux/src/arch/windows/windows_native.h
+	* openal/linux/src/extensions/al_ext_loki.c
+	* openal/linux/src/extensions/al_ext_loki.h
+	* openal/linux/src/extensions/al_ext_mp3.c
+	* openal/linux/src/extensions/al_ext_mp3.h
+	* openal/linux/src/extensions/al_ext_vorbis.h
+	* openal/linux/test/.cvsignore
+	* openal/linux/test/Makefile.in
+	* openal/linux/test/testcallback.c
+	* openal/linux/test/testlib.c
+	* openal/linux/test/testlib.h
+	* openal/linux/test/teststream.c
+	* openal/linux/test/teststream2.c
+
+	made AL_siteconfig.h first include in any file including string.h
+	(again!)
+
+	added capture extention and other stuff.
+
+2000-09-19  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* openal/linux/src/al_debug.c
+	Fixed incorrect order of inclusion of al_siteconfig.h
+
+	* openal/linux/src/al_filter.c
+	Added listener gain filter to apply listener gain to source
+	*after* min/max gain filter applied.
+
+	* openal/linux/src/al_filter.h
+	Added prototype for listener gain filter.
+
+	* openal/linux/src/al_mixer.c
+	Added and removed tlAtForkThread code
+	Debugging mania
+
+	* openal/linux/src/al_source.c
+	Fixed stupid callback/looping intersection bug.
+	Added sanity check so that playing sources can't have their buffers
+	changed out from under them.
+
+	* openal/linux/src/alut/alut_wav.c
+	Added/removed fprintfs
+
+	* openal/linux/src/threads/posixthreads.c
+	Added Posix_AtForkThread code
+
+	* openal/linux/src/threads/posixthreads.h
+	Added Posix_AtForkThread prototype
+
+	* openal/linux/src/threads/threadlib.h
+	Added tlAtForkThread macro
+
+	* openal/linux/src/al_buffer.c
+	Sanity checked to make sure buffer deletions with no current context
+	don't crash.
+
+	* openal/linux/src/al_error.c
+	Sanity checked to make sure error reporting with no current context
+	don't crash.
+
+	* openal/linux/src/alc/alc_context.c
+	Added sanity check so to context lock/unlock calls.
+
+2000-09-14  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* /openal/linux/CREDITS
+	Added John Stone to credits file for solaris backend
+
+	* /openal/linux/acconfig.h
+	* /openal/linux/configure.in
+	Nothing much.
+
+	* /openal/linux/audioconvert/ac_adpcm.c
+	* /openal/linux/audioconvert/ac_bits.c
+	* /openal/linux/audioconvert/ac_channels.c
+	* /openal/linux/audioconvert/ac_endian.c
+	* /openal/linux/audioconvert/ac_format.c
+	* /openal/linux/audioconvert/ac_freq.c
+	* /openal/linux/audioconvert/ac_helper.c
+	* /openal/linux/audioconvert/ac_misc.c
+	* /openal/linux/audioconvert/test.c
+	Altered audioconvert source files to no longer depend on
+	-include '../config.h', to aid compilation on non-gcc compilers.
+
+	* /openal/linux/include/AL/alkludge.h
+	Added backward compatibility defines for AL_SOURCE_ATTENUATION_MIN
+	and AL_SOURCE_ATTENUATION_MAX
+
+	* /openal/linux/jlib/Makefile.in
+	* /openal/linux/jlib/globals.c
+	* /openal/linux/jlib/hash.c
+	Altered jlib source files to no longer depend on
+	-include '../config.h', to aid compilation on non-gcc compilers.
+
+	* /openal/linux/src/Makefile.in
+	Added rules for new object files
+
+	* /openal/linux/src/arch/solaris/solaris_native.c
+	New solaris backend
+
+	* /openal/linux/src/al_able.c
+	* /openal/linux/src/al_buffer.c
+	* /openal/linux/src/al_buffer.h
+	* /openal/linux/src/al_complex.c
+	* /openal/linux/src/al_config.c
+	* /openal/linux/src/al_debug.c
+	* /openal/linux/src/al_debug.h
+	* /openal/linux/src/al_error.c
+	* /openal/linux/src/al_ext.c
+	* /openal/linux/src/al_ext_iasig.c
+	* /openal/linux/src/al_fft.c
+	* /openal/linux/src/al_filter.c
+	* /openal/linux/src/al_filter.h
+	* /openal/linux/src/al_listen.c
+	* /openal/linux/src/al_main.c
+	* /openal/linux/src/al_mixer.c
+	* /openal/linux/src/al_mixfunc.c
+	* /openal/linux/src/al_mixmanager.c
+	* /openal/linux/src/al_rctree.c
+	* /openal/linux/src/al_rcvar.c
+	* /openal/linux/src/al_source.c
+	* /openal/linux/src/al_source.h
+	* /openal/linux/src/al_state.c
+	* /openal/linux/src/al_types.h
+	* /openal/linux/src/mixaudio16.c
+	* /openal/linux/src/alc/alc_context.c
+	* /openal/linux/src/alc/alc_context.h
+	* /openal/linux/src/alc/alc_error.c
+	* /openal/linux/src/alc/alc_speaker.c
+	* /openal/linux/src/alut/alut_imaadpcm.c
+	* /openal/linux/src/alut/alut_main.c
+	* /openal/linux/src/alut/alut_msadpcm.c
+	* /openal/linux/src/alut/alut_rawadpcm.c
+	* /openal/linux/src/alut/alut_wav.c
+	* /openal/linux/src/arch/alsa/alsa.c
+	* /openal/linux/src/arch/arts/arts.c
+	* /openal/linux/src/arch/bsd/bsd_dsp.c
+	* /openal/linux/src/arch/esd/esd.c
+	* /openal/linux/src/arch/i386/floatmul.c
+	* /openal/linux/src/arch/interface/interface_sound.c
+	* /openal/linux/src/arch/irix/iris.c
+	* /openal/linux/src/arch/linux/lin_dsp.c
+	* /openal/linux/src/arch/null/null.c
+	* /openal/linux/src/arch/portable/floatmul.c
+	* /openal/linux/src/arch/sdl/sdl.c
+	* /openal/linux/src/arch/waveout/waveout.c
+	* /openal/linux/src/arch/windows/windows_native.c
+	* /openal/linux/src/extensions/al_ext_loki.c
+	* /openal/linux/src/extensions/al_ext_mp3.c
+	* /openal/linux/src/extensions/al_ext_vorbis.c
+	* /openal/linux/src/mutex/posixmutex.c
+	* /openal/linux/src/mutex/windowsmutex.c
+	* /openal/linux/src/threads/windowsthreads.c
+	Altered to no longer depend on-include '../config.h'.
+	Changed related to spec conformance.
+	Buffer queueing addition.
+	Multichannel stuff.
+	Removed old refcount stuff, using buffer queueing stuff
+	instead.
+
+	* /openal/linux/src/threads/posixthreads.c
+	Altered to no longer depend on-include '../config.h'.
+	Added pthread_exit in ExitThread.
+
+	* /openal/linux/test/.cvsignore
+	Added new test entries.
+
+	* /openal/linux/test/Makefile.in
+	Remove -include 'testlib.h'
+
+	* /openal/linux/test/aluttime.c
+	* /openal/linux/test/test.c
+	* /openal/linux/test/testalc.c
+	* /openal/linux/test/testalinitexit.c
+	* /openal/linux/test/testalut.c
+	* /openal/linux/test/testbuffergendestroy.c
+	* /openal/linux/test/testbufferuniq.c
+	* /openal/linux/test/testcallback.c
+	* /openal/linux/test/testchannel.c
+	* /openal/linux/test/testchannel2.c
+	* /openal/linux/test/testconfig.c
+	* /openal/linux/test/testda.c
+	* /openal/linux/test/testdebug.c
+	* /openal/linux/test/testdelbuffer.c
+	* /openal/linux/test/testdelbuffer_error.c
+	* /openal/linux/test/testdelsource_error.c
+	* /openal/linux/test/testdoppler.c
+	* /openal/linux/test/testdoppler2.c
+	* /openal/linux/test/testext.c
+	* /openal/linux/test/testfft.c
+	* /openal/linux/test/testfloatmul.c
+	* /openal/linux/test/testgain.c
+	* /openal/linux/test/testgainlinear.c
+	* /openal/linux/test/testgenbuffer_error.c
+	* /openal/linux/test/testgensource_error.c
+	* /openal/linux/test/testlib.c
+	* /openal/linux/test/testlib.h
+	* /openal/linux/test/testlistener.c
+	* /openal/linux/test/testlistener2.c
+	* /openal/linux/test/testlistener3.c
+	* /openal/linux/test/testlistener4.c
+	* /openal/linux/test/testloop.c
+	* /openal/linux/test/testmath.c
+	* /openal/linux/test/testmisc.c
+	* /openal/linux/test/testmp3.c
+	* /openal/linux/test/testmulti.c
+	* /openal/linux/test/testmultialut.c
+	* /openal/linux/test/testmultichannel.c
+	* /openal/linux/test/testmultichannel2.c
+	* /openal/linux/test/testmultimp3.c
+	* /openal/linux/test/testmultinothread.c
+	* /openal/linux/test/testnothread.c
+	* /openal/linux/test/testorient.c
+	* /openal/linux/test/testpause.c
+	* /openal/linux/test/testpause2.c
+	* /openal/linux/test/testpause3.c
+	* /openal/linux/test/testpause4.c
+	* /openal/linux/test/testpause5.c
+	* /openal/linux/test/testpitch.c
+	* /openal/linux/test/testpitch2.c
+	* /openal/linux/test/testpitch3.c
+	* /openal/linux/test/testpitch4.c
+	* /openal/linux/test/testpitchhack.c
+	* /openal/linux/test/testpitchnothread.c
+	* /openal/linux/test/testpitchnothread2.c
+	* /openal/linux/test/testrelative.c
+	* /openal/linux/test/testreverb.c
+	* /openal/linux/test/testsingle.c
+	* /openal/linux/test/testsource.c
+	* /openal/linux/test/testsourcegendestroy.c
+	* /openal/linux/test/testsourcestop.c
+	* /openal/linux/test/testsourceuniq.c
+	* /openal/linux/test/teststream.c
+	* /openal/linux/test/teststream2.c
+	* /openal/linux/test/testsync.c
+	* /openal/linux/test/testtime.c
+	* /openal/linux/test/testtypes.c
+	* /openal/linux/test/testvorbis.c
+	Altered test source files to no longer depend on
+	-include 'testlib.h', to aid compilation on non-gcc compilers.
+
+	* openal/linux/src/al_able.h
+	* openal/linux/src/al_distance.c
+	* openal/linux/src/al_doppler.c
+	* openal/linux/src/al_doppler.h
+	* openal/linux/src/al_propagation.c
+	* openal/linux/src/al_queue.c
+	* openal/linux/src/al_queue.h
+	* openal/linux/test/testqueue.c
+	* openal/linux/test/testqueue2.c
+	* openal/linux/test/testqueue3.c
+	Initial checkin.
+
+2000-09-11  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* src/al_buffer.h
+	Added comment.
+
+	* src/al_mixer.c
+	Added instantiation of mixer_iterate
+
+	* src/al_mixer.h
+	Added comment.
+	Removed instantiation of mixer_iterate.
+
+	* src/al_mixmanager.h
+	Added comment.
+
+	* test/testpitch3
+	Initial check in.
+
+	* test/testpitch4
+	Initial check in.
+
+	* test/Makefile.in
+	Added testpitch3 and testpitch4 rules.
+
+	* test/.cvsignore
+	Added testpitch3 and testpitch4 entries
+
+	* acconfig.h
+	Removed ALCONFIG.  Using the configure file is no longer optional.
+
+	* src/al_buffer.c
+	Implemented full or no deallocation for buffers.
+	Fixed potential memory leak in failed buffer generation.
+	Fixed memory leak associated with bid vs index confusion
+
+	* src/al_source.c
+	Implemented full or no deallocation for sources.
+	Fixed potential memory leak in failed source generation.
+	Fixed potential deadlock when alSourcePlayv called with n == 0.
+	Fixed memory leak associated with sid vs index confusion.
+	Fixed misc memory leaks.
+
+	* src/al_filter.c
+	Altered tpitch init stuff to use more steps, and to also allocate
+	offset table in one big chunk to reduce memory fragmentation.
+
+	* test/testbuffergendestroy.c
+	More verbose messages.
+
+	* src/al_main.c
+	Remove ifdef ALCONFIG stuff
+
+	* src/alut/alut_msadpcm.c
+	Tracked memory leak.
+
+2000-09-03  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* src/al_buffer.c (_alDestroyAllBuffers)
+	Fixed memory leak.
+
+2000-08-31  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* src/al_ext.c
+	Fix for segfault caused by plugins missing alExtFini
+
+	* src/al_mixmanager.c
+	Formatting change.
+
+	* doc/openal.texi
+	Added load-extension to primitives documentation, fixed
+	various spelling errors.
+
+	* src/arch/sdl/sdl.c (set_sdL)
+	format incorrectly set to have 2 channels
+
+	* src/threads/windowsthreads.h
+	Stupid type fixed.
+
+	* test/sample.wav
+	I'm going to have to read up to make sure the data files
+	are marked as binary.
+
+	* test/testlib.c
+	Stupid Sleep(param) fixed.
+
+2000-08-29  Joseph I. Valenzuela  <jvalenzu@forbidden.loungenet.org>
+	* Changelog
+	Noted changes
+
+	* src/al_config.c
+	Updated is_string to recognize whitespace in strings as
+	okay.
+
+	* src/al_ext.c
+	Small formatting change
+
+	* src/al_mixer.c
+	Nothing big
+
+	* src/al_rcvar.h
+	Small formatting change
+
+	* src/arch/alsa/alsa.c
+	Got it working.  Again.  Please don't change asoundlib ever.
+
+	* src/arch/alsa/alsa.h
+	Got it working.  Again.  Please don't change asoundlib ever.
+
+	* Makefile.in
+	Added rule to rerun autoconf if configure.in is newer than
+	configure.  Probably should do a sanity check for autoconf
+	in that case.
+
+	* src/al_able.c
+	Removed unneeded include <math.h>
+
+	* src/al_filter.c
+	Reordered includes to avoid M_PI collision on freebsd
+
+	* src/al_source.h
+	Weird error on freebsd averted by changed paramater type
+	name?  Weird.
+
+	* src/al_state.c
+	Reordered includes to avoid M_PI collision on freebsd
+
+	* test/testcallback.c
+	Reordered includes to avoid M_PI collision on freebsd
+
+	* test/testfft.c
+	Reordered includes to avoid M_PI collision on freebsd
+
+	* test/testmp3.c
+	Removed unneeded include <error.h>
+
+	* test/testmultimp3.c
+	Removed unneeded include <error.h>
+
+	* test/testpause3.c
+	Removed unneeded include <error.h>
+
+	* test/testpause4.c
+	Removed unneeded include <error.h>
+
+	* test/testvorbis.c
+	Removed unneeded include <error.h>
+
+2000-08-25  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* src/al_buffer.h
+	* src/al_buffer.c
+	Altered _alBufferCanonizeData to no longer require _alLockBuffer.
+	Updated alBufferAppendData to take advantage of this (less time
+	spent locked) but haven't altered alBufferData or alBufferDataSync
+	yet.
+
+	* src/extensions/al_ext_loki.c
+	Altered call to _alBufferCanonizeData.
+
+	* AL/altypes.h
+	Added AL_GAIN_LINEAR for linear gain scaling.
+
+	* src/al_ext.c
+	Added ename for AL_GAIN_LINEAR
+
+	* src/al_filter.c
+	Updating code to use AL_GAIN_LINEAR
+
+	* src/al_listen.c
+	Updated code to correctly interpret AL_GAIN as logarithmic and
+	use AL_GAIN_LINEAR to scale sounds linearly.
+
+	* src/al_main.c
+	Added _alLinearToDb and _alDbToLinear
+
+	* src/al_main.h
+	Prototypes for _alLinearToDb and _alDbToLinear
+
+	* src/al_source.c
+	Updated code to correctly interpret AL_GAIN as logarithmic and
+	use AL_GAIN_LINEAR to scale sounds linearly.
+
+	* test/.cvsignore
+	Added entry for testgainlinear and testmultimp3.c
+
+	* test/testgainlinear.c
+	New test program for testing gain and linear gain relationships
+
+	* test/testmultimp3.c
+	New test program for testing multi instances (one sid per bid, though)
+	of mp3 extension sounds
+
+	* test/Makefile.in
+	Added entry for testgainlinear
+
+	* test/testchannel.c
+	Updated to use AL_GAIN_LINEAR
+
+	* test/testgain.c
+	Updated to use AL_GAIN_LINEAR
+
+	* test/testmp3.c
+	Don't remember
+
+	* test/testmultinothread.c
+	Updated to use AL_GAIN_LINEAR
+
+	* test/testpitch.c
+	Updated to use AL_GAIN_LINEAR
+
+	* test/testpitch2.c
+	Updated to use AL_GAIN_LINEAR
+
+	* test/testpitchnothread.c
+	Updated to use AL_GAIN_LINEAR
+
+	* test/testpitchnothread2.c
+	Updated to use AL_GAIN_LINEAR
+
+	* test/testtime.c
+	Lowered buffersize to decrease latency
+
+	* test/teststream.c
+	Added multichannel call
+
+2000-08-24  Joseph I. Valenzuela  <tsaotsao@TOROFO>
+
+	* src/arch/windows/windows_native.c:
+	Updates in the windows backend
+
+	* src/threadlib/threadlib.h
+	Added ExitThread call to aid windows
+
+	* src/threadlib/posixthread.h
+	Added Posix_ExitThread stub and prototype
+
+	* src/threadlib/windowsthread.c
+	* src/threadlib/windowsthread.c
+	Added Windows_ExitThread
+
+	* src/al_mixer.c
+	Added call to tlExitThread
+
+	* src/include/AL/alkludgetypes.h
+	Changed sign of IMA decodestate member
+
+2000-08-22  Joseph I. Valenzuela  <tsaotsao@TOROFO>
+
+	* src/Makefile.in
+	remove erroneous extra line
+
+	* src/arch/interface/interface_sound.c
+	Added call to release_sdl
+
+	* src/arch/interface/platform.h
+	Nothing much
+
+	* src/arch/sdl/sdl.c
+	Removed select, used SDL_Delay instead
+
+	* many, many files
+	Working on the Windows backend/implementation.  Linux openal now
+	compiles and links under mingwin/cygwin on Windows, and even runs,
+	but the waveOut audio backend is non functional for now.  Might be
+	possible to get this working using the SDL backend, but it looks
+	like there are some problems associated with the mutexen as well.
+
+2000-08-21  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* al_mixer.c
+	Cleaned up delayed buffer deletions
+
+	* al_buffer.c
+	Cleaned up delayed buffer deletions
+
+	* al_types.h
+	Added flag, ALB_PENDING_DELETE, to simplify delayed buffer
+	deletions.
+
+2000-08-20  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* acconfig.h
+	Added define for VORBIS_SUPPORT
+
+	* configure.in
+	Added --enable flag for tentative vorbis support
+
+	* src/Makefile.in
+	Added compilations rules for vorbis stuff, cleaned up extension
+	dependencies some.
+
+	* src/al_main.c
+	Added code for vorbis extension
+
+	* src/al_mixer.c
+	removed spurious fprintf
+
+	* src/al_source.c
+	Fixed multichannel callbacks
+
+	* src/extensions/al_ext_mp3.c
+	Don't remember
+
+	* src/extensions/al_ext_vorbis.c
+	Initial extension for vorbis support
+
+	* src/extensions/al_ext_vorbis.h
+	Initial extension for vorbis support
+
+	* test/.cvsignore
+	Added entry for testvorbis
+
+	* test/Makefile.in
+	Added rule for testvorbis
+
+	* test/testmp3.c
+	Changed in the process of fixing multichannel callbacks
+
+	* test/testvorbis.c
+	Test program for vorbis stuff
+
+	* test/boom.mp3
+	New sample for testing mp3s
+
+	* test/boom.ogg
+	New sample for testing vorbis sounds
+
+	* test/multiboom.wav
+	New sample for testing multichannel PCM wavs
+
+	* test/multisample.wav
+	New sample for testing multichannel ADPCM wavs
+
+2000-08-18  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* src/al_mixer.c
+	Fixes for callback stuff
+
+	* src/al_source.c
+	Fixes for callback stuff
+
+	* src/extensions/al_ext_mp3.c
+	Make extension more sane.
+
+2000-08-18  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* src/al_mixer.c
+	Fixes for callback stuff
+
+	* src/al_source.c
+	Fixes for callback stuff
+
+	* src/extensions/al_ext_mp3.c
+	Make extension more sane.
+
+2000-08-09  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* INSTALL
+	Small note telling people to run ldconfig because of the
+	soname change.
+
+	* src/Makefile.in
+	Moved mp3 stuff into the regular library, and added soname to
+	the library.
+
+	* src/al_main.c
+	Nothing much.
+
+	* src/al_mixer.c
+	Multichannel changes.
+
+	* src/al_source.c
+	Multichannel fixes for callbacks and looping sounds.
+
+	* src/al_source.h
+	Multichannel fixes for callbacks and looping sounds.
+
+	* src/al_types.h
+	Not much.
+
+	* src/extensions/al_ext_mp3.c
+	Cleaned up interface to fit with new SMPEG_new_data
+
+	* src/extensions/al_ext_mp3.h
+	Cleaned up interface to fit with new SMPEG_new_data
+
+	* test/.cvsignore
+	Added testmp3 and testmultichannel2 to .cvsignore
+
+	* test/Makefile.in
+	Added entry for testmp3 and testmultichannel2
+
+	* test/testpause4.c
+	updated mp3 stuff.
+
+	* test/testmultichannel2.c
+	updated new test to test looping multichannel sounds.
+
+2000-08-07  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* src/al_main.c:
+	updated vector_angle_between to correctly handle sign (so that the
+	angle correctly differentiates between left/right).
+
+	added vector_quadrant to report which quadrant a vector falls in.
+
+	* src/al_main.h
+	added vector_quadrant prototype
+
+	* src/extensions/al_ext_loki.c
+	Don't remember
+
+ 	* src/extensions/al_ext_mp3.h
+	* src/extensions/al_ext_mp3.c
+	Added support for mp3 extension to be compiled in library.  When
+	the smpeg changes are commited, this will be folded into the
+	regular library for transparant mp3 support.
+
+	* test/test.c
+	* test/testalc.c
+	* test/testalut.c
+	* test/testcallback.c
+	* test/testchannel.c
+	* test/testchannel2.c
+	* test/testda.c
+	* test/testdelbuffer.c
+	* test/testdoppler.c
+	* test/testdoppler2.c
+	* test/testgain.c
+	* test/testlistener.c
+	* test/testlistener2.c
+	* test/testlistener3.c
+	* test/testlistener4.c
+	* test/testloop.c
+	* test/testmulti.c
+	* test/testmultialut.c
+	* test/testmultichannel.c
+	* test/testmultinothread.c
+	* test/testnothread.c
+	* test/testpause.c
+	* test/testpause2.c
+	* test/testpause3.c
+	* test/testpause4.c
+	* test/testpitch.c
+	* test/testpitch2.c
+	* test/testpitchhack.c
+	* test/testpitchnothread.c
+	* test/testpitchnothread2.c
+	* test/testrelative.c
+	* test/testreverb.c
+	* test/testsingle.c
+	* test/testsource.c
+	* test/testsourcestop.c
+	* test/testsync.c
+	* test/testtime.c
+
+	Added checks to make sure if the sound file that the test depends
+	on doesn't exist, the program exits sanely.  Also, added support
+	for passing the sound file as a command line argument to many test
+	programs.
+
+2000-08-06  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* doc/openal.texi
+	Added documentation for alBufferDataWithCallback_LOKI
+
+	* include/AL/alkludge.h
+	Removed prototype for alBufferDataWithCallback_LOKI
+
+	* src/al_buffer.c
+	moved alBufferDataWithCallback_LOKI
+
+	* src/al_buffer.h
+	moved alBufferDataWithCallback_LOKI
+
+	* src/extensions/al_ext_loki.h
+	added entry for alBufferDataWithCallback_LOKI
+
+	* src/extensions/al_ext_loki.c
+	added alBufferDataWithCallback_LOKI
+
+2000-08-04  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+	* src/al_main.c
+	Made a list, checked it twice.
+
+	* src/al_main.h
+	Found out who was naughty and who was nice.
+
+	* src/alc/alc_speaker.c
+	Added logic to handle an upside down listener.  This isn't well
+	tested and will need to be revised soon.
+
+	* test/.cvsignore
+	Added entries for multiple test cases.
+
+	* test/Makefile.in
+	Added rules for new test cases.
+
+	* test/testlib.c
+	Nothing big.
+
+	* test/testlistener3.c
+	New test for listener orientation stuff.
+
+	* test/testlistener4.c
+	New test for listener orientation stuff.
+
+2000-08-03  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* linux/src/al_buffer.c: Fixed really stupid bug in alBufferData
+	where buffer's format was set to the *passed* format instead of
+	the *converted* format.  This wasn't an issues before (I'm
+	guessing) either because no one used alBufferData without
+	alutLoadWAV(which previously converted data into canonical format)
+	or because of the new multichannel support.
+
+	* linux/src/al_filter.c: Fixed alt_tpitch so that multichannel
+	buffers get handled in a minimally proper way.  This still needs
+	to be tested for feature completeeness, but with a pitch of 1.0
+	this should work okay.
+
+	* linux/src/alut/alut_wav.c: Changed alutLoadWAV so that it no
+	longer automatically converts data to canonical format (to aid use
+	of multichannel buffers).
+
+	* linux/src/extensions/al_ext_loki.c: AL_BITS is not a valid
+	setter any more for alBufferi_LOKI.
+
+	* linux/test/.cvsignore: Added testmultichannel entry
+
+	* linux/test/Makefile.in: Added testmultichannel rule
+
+	* linux/test/testmultichannel: Program to aid in testing
+	multichannel buffers.
+
+2000-08-02  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* linux/src/al_mixer.c: Cleaned up tremendously ugly StreamingList
+	code a very little.  Sources with streaming buffers now work as
+	advertised.
+
+	* linux/src/al_ext_loki.c Touched up alBufferi a little.
+
+	* linux/test/.cvsignore: Added test programs and rawpcm.pcm
+
+	* audioconvert/ac_helper.c: Reordered conversion filters to 8-bit
+	samples get converte properly.
+
+	* linux/src/al_filter.c: Nothing much.
+
+	* linux/src/al_source.c: Fixed stupid bug in SplitSources where
+	callbacks were getting hosed prematurely.
+
+	Added SOURCE_STATE to GetSourceParams, to avoid misleading debug
+	message.
+
+	* linux/test/testalut.c: Adapted test to test files passed on
+	command line.
+
+2000-08-01  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* linux/src/al_types.h: change AL_buffer's freq argument to ALint
+
+	* linux/src/al_buffer.c: changed buffer initializer to set buffer
+	freq to canon_speed.
+
+	* lots of files: Changed AL_ACTIVE to AL_PLAYING, per Bernd's
+	request
+
+	* linux/src/al_source.c: Reordered includes, added math.h to aid
+	compilation on freebsd.
+
+	* linux/test/: Wrapped M_PI in ifdef for test progs, removed
+	include <error.h> for testcallback
+
+	* linux/doc/openal.texi: Added documentation for alBufferi_LOKI to
+	Loki extension section.  Added FAQ question on
+	alAttenuationScale_LOKI.
+
+	* linux/include/AL/alkludgetypes.h: Changed enumeration base a
+	little.
+
+	* linux/src/al_buffer.c: Added support for multichannel buffers
+
+	* linux/src/al_buffer.h: Small cleanup
+
+	* linux/src/al_ext.c: Change extension typedef to AL_extension
+
+	* linux/src/al_main.c: Change extension typedef to AL_extension
+
+	* linux/src/al_mixer.c: Added support for multichannel buffers
+
+	* linux/src/al_source.c: Removed unused orientation paramater,
+	added support for multichannel buffers.
+
+	* linux/src/al_types.h: Changed extension typedef to AL_extension
+	Corrected lame typedef that defined float6vparam to be a 3-element
+	type.
+
+	* linux/src/extensions/al_ext_loki.c: Added alBufferi_LOKI, to
+	allow multichannel buffers.
+
+	* linux/src/extensions/al_ext_loki.h: Added alBufferi_LOKI, to
+	allow multichannel buffers.
+
+	* linux/test/Makefile.in: Added case for new test program
+	teststream2
+
+	* linux/test/testcallback.c: Don't remember.
+
+	* linux/test/testlib.c: Added code to fixup_function_pointers to
+	load alBufferi_LOKI
+
+	* linux/test/testlib.h: Added symbol that resolves to
+	alBufferi_LOKI
+
+	* linux/test/testpause3.c: Don't remember.
+
+	* linux/test/teststream2.c: Added test case for multichannel
+	streaming sounds.
+
+2000-07-31  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* linux/src/alc/alc_context.c (alcGetCurrentContext): Added
+	alcGetCurrentContext, designed to return the context handle for
+	the current context.
+	(alcGetCurrentContext): small fix
+
+2000-07-29  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* linux/src/al_source.c: Fixed stupid bug in alSourcei, in which
+	the value, when passed with the AL_BUFFER param, was incorrectly
+	range checked as if it were a boolean, when the correct range
+	checking should have checked to see that it was a valid buffer id.
+
+2000-07-28  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* linux/doc/openal.texi: Added FAQ question on avoiding the select
+	for Vortex cards.
+
+	* linux/src/al_config.c: Fixed handling in token_str_to_token to
+	properly recognize booleans #t and #f.
+
+	* linux/src/arch/linux/lin_dsp.c: Added code to make the boolean
+	alrc var "native-use-select" work.  So if you set
+	native-use-select to #f, the linux native driver won't use select.
+
+	* linux/doc/openal.texi: Added FAQ section, and short description
+	on how to enable ESD.
+
+2000-07-27  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* linux/doc/openal.texi: Fleshed out information on non-integral
+	types, the al and alc subsections of the API section, and fixed up
+	some of the nodes to make more sense.
+
+	* linux/src/al_mixer.c: Important update to _alDestroyMixer, to
+	ensure that sources associated with callback buffers get their
+	source-destroy callback called when the source is either
+	implicitly or explicitly stopped.
+
+	* linux/src/al_main.c, src/al_main.h: changed slurp to _alSlurp
+
+	* include/AL/alkludge.h: Removed trailing undefs
+
+2000-07-24  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* linux/doc/openal.texi: Fleshed out sections on errors a little
+	bit.
+
+	* linux/src/arch/linux/lin_dsp.c: Added an ioctl call to request
+	the fragment size from the sound card in set_native, so that weird
+	bufsiz requests to set_native (ie, requests which are not powers
+	of two) that get implicitly set to some power of two are reported
+	to the calling function correctly.  A mismatch could potentially
+	cause timing problems.
+
+2000-07-21  Joseph I. Valenzuela  <tsaotsao@xanadu.lokigames-lan.com>
+
+	* (first entry): This, being the first ChangeLog entry, will seek
+	to address what has changed in the OpenAL source code with regard
+	to the recent code commit, which has brought the Loki
+	implementation closer to the proposed 1.0 specification.
+
+	Users of the library will notice that the definitions for
+	GenBuffers and GenSources no longer return the number of items
+	successfully allocated.  This change is in deference to the policy
+	of refusing to allocate anything less than the total request, and
+	failing on partial allocation.
+
+	Some functions have been removed from the implementation.  These
+	are:
+
+	GetErrorString -- duplicated functionality (use GetString)
+
+	Most _LOKI functions have been moved such that they require an
+	explicit GetProcAddress to resolve them.  The prototypes for these
+	functions are located in the documentation (openal.info).  Some
+	_LOKI functions have been removed.  A list of these are:
+
+	ClearError_LOKI      --  functionality duplicated in spec
+	SourceIsPlaying_LOKI --  functionality duplicated in spec
+
+	Some source parameters have been removed, for reasons of reducing
+	ambiguity and duplicated functionality.  These are:
+
+	AL_SOURCE_AMBIENT      --  duplicated functionality
+	AL_SOURCE_ABSOLUTE     --  converse of AL_SOURCE_RELATIVE
+
+	AL_SOURCE_LOOPING is the new name for AL_LOOPING.
+
+	This should be a complete catalog of all the changes introduced
+	which will effect compilation and linkage of programs with OpenAL.
+	This does not intend to describe the full implication of changes
+	brought about by the new specification.  Please refer to the
+	specification documentation for that.
+
+	To aid future clarity, updates to the list of missing functions
+	and changes brought about by the new implementation will be made
+	directly to this ChangeLog entry, with a date appended when
+	needed.  That way, there will be one centralized location for that
+	sort of information.
Index: /openal-0.0.8/INSTALL
===================================================================
--- /openal-0.0.8/INSTALL	(revision 17)
+++ /openal-0.0.8/INSTALL	(revision 17)
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PREFIX', the package will
+use PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
+
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
Index: /openal-0.0.8/Makefile.am
===================================================================
--- /openal-0.0.8/Makefile.am	(revision 17)
+++ /openal-0.0.8/Makefile.am	(revision 17)
@@ -0,0 +1,56 @@
+# Build, install and distribute the following subdirectories:
+SUBDIRS = admin src common include
+
+# We keep our local autoconf macros in a separate 'm4'subdirectory.
+ACLOCAL_AMFLAGS = -I admin/autotools/m4
+
+# The following files should be in our source distribution in addition to the
+# standard ones included by automake itself. A few remarks:
+#
+#  * As a temporary measure until the build system is fixed we mention a few
+#    files which don't really belong here.
+#
+#  * We do not mention the doc and test subdirectories, they are really too much
+#    out-of-date.
+EXTRA_DIST =							\
+	CMakeLists.txt						\
+	NOTES							\
+	admin/CMakeModules/CMakeASMCompiler.cmake.in		\
+	admin/CMakeModules/CMakeASMInformation.cmake		\
+	admin/CMakeModules/CMakeDetermineASMCompiler.cmake	\
+	admin/RPM/openal.spec					\
+	admin/RPM/openal.xpm					\
+	admin/autotools/.indent.pro				\
+	autogen.sh						\
+	common/specification/OpenAL1-1Spec.pdf			\
+	common/specification/OpenAL1-1Spec.sxw			\
+	config-osx.h
+
+# Automatically rebuild libtool if it becomes out-of-date.
+libtool: $(LIBTOOL_DEPS)
+	$(SHELL) ./config.status --recheck
+
+# The Creative repository has some broken permissions, let's fix this.
+permissions:
+	find . -type f \! -perm +222 \! -name "*.sh" -exec chmod +w {} \;
+
+# Automatically reformat all C headers and sources with indent according to
+# admin/autotools/.indent.pro, but be make-friendly and take some precautions to
+# leave those files untouched which wouldn't change. Do not reformat the public
+# AL extension header, it won't look the way we want it due to the 'extern "C" {
+# ... }' wrapper in it.
+indent:
+	@for i in `find . \( -name "*.c" -o -name "*.h" \) \! -name alut.h -print` ; do \
+	    cat $$i | ( cd admin/autotools ; indent ) > indent.tmp ; \
+	    if diff $$i indent.tmp > /dev/null 2>&1 ; then \
+		: ; \
+	    else \
+		echo Reformatted $$i ; \
+		$(RM) $$i ; \
+		mv indent.tmp $$i ; \
+	    fi ; \
+	done
+	@$(RM) indent.tmp
+
+# Targets which are no files
+.PHONY: permissions indent
Index: /openal-0.0.8/Makefile.in
===================================================================
--- /openal-0.0.8/Makefile.in	(revision 17)
+++ /openal-0.0.8/Makefile.in	(revision 17)
@@ -0,0 +1,740 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+	TODO admin/autotools/compile admin/autotools/config.guess \
+	admin/autotools/config.sub admin/autotools/depcomp \
+	admin/autotools/install-sh admin/autotools/ltmain.sh \
+	admin/autotools/missing
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/admin/autotools/m4/acx_pthread.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSC_CONFIG = @ARTSC_CONFIG@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLEEXTENSIONALEXTMP3_FALSE = @ENABLEEXTENSIONALEXTMP3_FALSE@
+ENABLEEXTENSIONALEXTMP3_TRUE = @ENABLEEXTENSIONALEXTMP3_TRUE@
+ENABLEEXTENSIONALEXTVORBIS_FALSE = @ENABLEEXTENSIONALEXTVORBIS_FALSE@
+ENABLEEXTENSIONALEXTVORBIS_TRUE = @ENABLEEXTENSIONALEXTVORBIS_TRUE@
+ESD_CONFIG = @ESD_CONFIG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEATURECFLAGS = @FEATURECFLAGS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+NASM = @NASM@
+NASM_FORMAT = @NASM_FORMAT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZATIONCFLAGS = @OPTIMIZATIONCFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PROFILINGLDFLAGS = @PROFILINGLDFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SDL_CONFIG = @SDL_CONFIG@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZEOF_VOID_P = @SIZEOF_VOID_P@
+SMPEG_CONFIG = @SMPEG_CONFIG@
+STRIP = @STRIP@
+USEBACKENDALSA_FALSE = @USEBACKENDALSA_FALSE@
+USEBACKENDALSA_TRUE = @USEBACKENDALSA_TRUE@
+USEBACKENDARTS_FALSE = @USEBACKENDARTS_FALSE@
+USEBACKENDARTS_TRUE = @USEBACKENDARTS_TRUE@
+USEBACKENDESD_FALSE = @USEBACKENDESD_FALSE@
+USEBACKENDESD_TRUE = @USEBACKENDESD_TRUE@
+USEBACKENDNATIVEBSD_FALSE = @USEBACKENDNATIVEBSD_FALSE@
+USEBACKENDNATIVEBSD_TRUE = @USEBACKENDNATIVEBSD_TRUE@
+USEBACKENDNATIVEDARWIN_FALSE = @USEBACKENDNATIVEDARWIN_FALSE@
+USEBACKENDNATIVEDARWIN_TRUE = @USEBACKENDNATIVEDARWIN_TRUE@
+USEBACKENDNATIVEIRIX_FALSE = @USEBACKENDNATIVEIRIX_FALSE@
+USEBACKENDNATIVEIRIX_TRUE = @USEBACKENDNATIVEIRIX_TRUE@
+USEBACKENDNATIVELINUX_FALSE = @USEBACKENDNATIVELINUX_FALSE@
+USEBACKENDNATIVELINUX_TRUE = @USEBACKENDNATIVELINUX_TRUE@
+USEBACKENDNATIVEMORPHOS_FALSE = @USEBACKENDNATIVEMORPHOS_FALSE@
+USEBACKENDNATIVEMORPHOS_TRUE = @USEBACKENDNATIVEMORPHOS_TRUE@
+USEBACKENDNATIVESOLARIS_FALSE = @USEBACKENDNATIVESOLARIS_FALSE@
+USEBACKENDNATIVESOLARIS_TRUE = @USEBACKENDNATIVESOLARIS_TRUE@
+USEBACKENDNATIVEWINDOWS_FALSE = @USEBACKENDNATIVEWINDOWS_FALSE@
+USEBACKENDNATIVEWINDOWS_TRUE = @USEBACKENDNATIVEWINDOWS_TRUE@
+USEBACKENDNULL_FALSE = @USEBACKENDNULL_FALSE@
+USEBACKENDNULL_TRUE = @USEBACKENDNULL_TRUE@
+USEBACKENDSDL_FALSE = @USEBACKENDSDL_FALSE@
+USEBACKENDSDL_TRUE = @USEBACKENDSDL_TRUE@
+USEBACKENDWAVEOUT_FALSE = @USEBACKENDWAVEOUT_FALSE@
+USEBACKENDWAVEOUT_TRUE = @USEBACKENDWAVEOUT_TRUE@
+VERSION = @VERSION@
+WARNINGCFLAGS = @WARNINGCFLAGS@
+X86ENABLED_FALSE = @X86ENABLED_FALSE@
+X86ENABLED_TRUE = @X86ENABLED_TRUE@
+X86MMXENABLED_FALSE = @X86MMXENABLED_FALSE@
+X86MMXENABLED_TRUE = @X86MMXENABLED_TRUE@
+X86NASMENABLED_FALSE = @X86NASMENABLED_FALSE@
+X86NASMENABLED_TRUE = @X86NASMENABLED_TRUE@
+X86NASMMMXENABLED_FALSE = @X86NASMMMXENABLED_FALSE@
+X86NASMMMXENABLED_TRUE = @X86NASMMMXENABLED_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+
+# Build, install and distribute the following subdirectories:
+SUBDIRS = admin src common include
+
+# We keep our local autoconf macros in a separate 'm4'subdirectory.
+ACLOCAL_AMFLAGS = -I admin/autotools/m4
+
+# The following files should be in our source distribution in addition to the
+# standard ones included by automake itself. A few remarks:
+#
+#  * As a temporary measure until the build system is fixed we mention a few
+#    files which don't really belong here.
+#
+#  * We do not mention the doc and test subdirectories, they are really too much
+#    out-of-date.
+EXTRA_DIST = \
+	CMakeLists.txt						\
+	NOTES							\
+	admin/CMakeModules/CMakeASMCompiler.cmake.in		\
+	admin/CMakeModules/CMakeASMInformation.cmake		\
+	admin/CMakeModules/CMakeDetermineASMCompiler.cmake	\
+	admin/RPM/openal.spec					\
+	admin/RPM/openal.xpm					\
+	admin/autotools/.indent.pro				\
+	autogen.sh						\
+	common/specification/OpenAL1-1Spec.pdf			\
+	common/specification/OpenAL1-1Spec.sxw			\
+	config-osx.h
+
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in:  $(am__configure_deps) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkdir_p) $(distdir)/admin/CMakeModules $(distdir)/admin/RPM $(distdir)/admin/autotools $(distdir)/admin/autotools/m4 $(distdir)/admin/pkgconfig $(distdir)/common/specification
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+	check-am clean clean-generic clean-libtool clean-recursive \
+	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+	dist-shar dist-tarZ dist-zip distcheck distclean \
+	distclean-generic distclean-hdr distclean-libtool \
+	distclean-recursive distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-generic \
+	mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am uninstall-info-am
+
+
+# Automatically rebuild libtool if it becomes out-of-date.
+libtool: $(LIBTOOL_DEPS)
+	$(SHELL) ./config.status --recheck
+
+# The Creative repository has some broken permissions, let's fix this.
+permissions:
+	find . -type f \! -perm +222 \! -name "*.sh" -exec chmod +w {} \;
+
+# Automatically reformat all C headers and sources with indent according to
+# admin/autotools/.indent.pro, but be make-friendly and take some precautions to
+# leave those files untouched which wouldn't change. Do not reformat the public
+# AL extension header, it won't look the way we want it due to the 'extern "C" {
+# ... }' wrapper in it.
+indent:
+	@for i in `find . \( -name "*.c" -o -name "*.h" \) \! -name alut.h -print` ; do \
+	    cat $$i | ( cd admin/autotools ; indent ) > indent.tmp ; \
+	    if diff $$i indent.tmp > /dev/null 2>&1 ; then \
+		: ; \
+	    else \
+		echo Reformatted $$i ; \
+		$(RM) $$i ; \
+		mv indent.tmp $$i ; \
+	    fi ; \
+	done
+	@$(RM) indent.tmp
+
+# Targets which are no files
+.PHONY: permissions indent
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /openal-0.0.8/NOTES
===================================================================
--- /openal-0.0.8/NOTES	(revision 17)
+++ /openal-0.0.8/NOTES	(revision 17)
@@ -0,0 +1,17 @@
+NOTES:
+	GENERAL:
+	A few functions are either missing or stubbed out.  If
+	you need a function implemented in a hurry, please email me.
+	99% of the stub/missing functions things need just a little
+	glue.
+
+	FILTERS:
+	Filter functionality is uneven at the moment.  Except for
+	alf_da, they suffer from deviations from their "specified"
+	behaviour.  The frequency based filters deviate the most
+	(if implemented at all).
+
+	API:
+	alkludge.h has been removed.  Remove references to it in your
+	code.  Many things have been moved to extensions, try including
+	alext.h.
Index: /openal-0.0.8/README
===================================================================
--- /openal-0.0.8/README	(revision 17)
+++ /openal-0.0.8/README	(revision 17)
@@ -0,0 +1,413 @@
+Contents
+========
+
+   * Building OpenAL with autotools
+   * Building OpenAL with CMake
+   * Notes about the Darwin backend
+      + FAQ for the Darwin backend
+      + Darwin backend mini-release-notes
+      + Darwin backend ToDos
+      + Darwin backend test results
+   * Notes about the IRIX backend
+   * Coding guidelines
+
+
+Building OpenAL with autotools
+==============================
+
+For impatient people the story is:
+
+   ./autogen.sh && ./configure && make install
+
+For more details, have a look at INSTALL or simply read on a bit.
+
+If this is your first time retrieving CVS, you will need to build the
+configure script and a few more configuration-related files. To achieve
+this, just run:
+
+   ./autogen.sh
+
+You might see quite a few warnings, but they are harmless and are caused
+by minor bugs outside OpenAL. If you don't want to see them anymore,
+contact your favourite distribution vendor. :-)
+
+After that initial step, configuration and compilation work like this:
+
+   ./configure && make
+
+This assumes that you want to install OpenAL into /usr/local. If you
+want something different, give configure a "--prefix=/wherever/you/want"
+option.
+
+If you are on x86(_64) if may be wise to send your CFLAGS along to
+configure, as dependening on them, SIMD code will be activated, i.e.:
+
+   CFLAGS="-march=athlon-xp" ./configure
+
+configure will detect that "-march=athlon-xp" activates MMX, SSE,
+3DNow!, SSE-MMX and 3DNow! extended. You can also explicitly enable a
+specific SIMD instruction set via CFLAGS, i.e. "-mmmx" activates MMX on
+the GCC compiler (see its manual). Currently OpenAL only features some
+MMX code though, so other SIMD instruction set are ignored.  On x86 (32
+bit) it is advised to have nasm installed. Then it is safe to activate
+all SIMD instruction sets at compile time, as at runtime the detection
+will only activate supported SIMD routines. (Above example shouldn't be
+used as such though, as it doesn't do any optimization, so send more
+flags and/or use the optimization configure option.)
+
+Possible configure options (use --help to determine the rest):
+
+   --enable-more-warnings  enable even more compiler warnings
+   --enable-werror         enable failure on all warnings
+   --enable-debug          enable debug code and assertions
+   ...
+
+Note that the "test" subdirectory has bitrotted, in the future you
+should be able to test the build via:
+
+   cd test && make
+   [run some tests]
+
+To install OpenAL, just issue:
+
+   make install
+
+If this is your first time installing openal, you'll need to run
+ldconfig on some *nices.
+
+
+Building OpenAL with CMake
+==========================
+
+The CMake build files are maintained by prakash@punnoor.de, so if you
+have troubles building OpenAL using CMake, please contact me and not the
+OpenAL developers, as the official build system is still the one using
+autotools. The CMake build files are currenty meant as an additional
+possibility to build OpenAL.
+
+The aim of using CMake is making portable development easier, as CMake
+containg generators for various build systems. On e.g. *nix Makefiles
+will be built, and on Windows MS VC++ project files, if you wish. You
+can get CMake at http://cmake.org/.
+
+Current status: The build system is feature complete, so it (should)
+build everything as the default one has done.
+
+(+,o,- indicates feature more/same/less then default OpenAL build
+system.)
+
+   o builds shared OpenAL lib
+   o builds static OpenAL lib; can be deactivated
+   o builds the test-suite, if specified
+   o all back-ends and vorbis/mp3 extensions should be handled by CMake
+   o out of tree builds are supported
+   o correct dependency tracking of source files
+   + prepared for adding support for non GNU compiler
+   (setting link libraries probably needs cleaning up)
+   + support for IDE project files generation
+   + less time overhead till compilation starts
+   + less hassle for user (GUI) and developer (one syntax)
+
+This document explains briefly how to build with CMake on Linux via an
+out-of-tree build:
+
+   - Change to the toplevel directory containing the OpenAL sources.
+   - Create a directory, e.g. "default", and change into it.
+   - Now run something like:
+
+        cmake .. -DCMAKE_INSTALL_PREFIX:STRING="/usr" -DCMAKE_C_FLAGS:STRING="-march=athlon-xp -O2"
+        make
+        make install
+
+     If you exported your CFLAGS, there is no need to specify them
+     explicitly, as CMake will pick them up.
+
+   - OpenAL should get installed as you got used to it.
+
+I really would like to get CMake building OpenAL on every supported
+platform. So please contact me if it doesn't build on yours. I'll try to
+fix this with your help.
+
+Some tips:
+
+   - You can use a console GUI named ccmake for configuring cmake. This
+     also comes in handy, to find out about available options. You can
+     also set options via command-line:
+
+        ccmake .. -DCMAKE_INSTALL_PREFIX:STRING="/usr" -DCMAKE_C_FLAGS:STRING="-march=athlon-xp -O2"
+
+     sets the two variables defined on command line and then starts the
+     GUI. Press 'c' the first time and every time you want to commit
+     changes in the config. Finally press 'g' to run the generator. Btw,
+     to set boolean vars from the command line, use -DVAR:BOOL=X, where
+     X is eg. ON or OFF.
+
+   - If you want more output at compile time, use
+
+        make VERBOSE=1
+
+   - If you want to install to a different directory (using same
+     prefix), use
+
+        make install DESTDIR=/foo/bar
+
+   - CMake doesn't has a distclean target by default, so you better
+     really do an out-of-tree build, then you can simply delete its
+     content when you want a distclean... Furthermore it is easier to
+     have different builds using different parameters via out-of-tree
+     builds.
+
+   - If you are interested in variables to set, take a look into
+     CMakeCache.txt after having run the configuring stage.
+
+   - If you update your source tree via cvs and want to rebuild an
+     previously built lib without cleaning, you better at least clear
+     the CMake cache (remove CMakeCache.txt) otherwise a modified CMake
+     project file could result to unwanted behaviour.
+
+
+Notes about the Darwin backend
+==============================
+
+FAQ for the Darwin backend
+--------------------------
+
+Q : How can I choose the sound card I want for rendering?
+A : You can't. The first found is the first used.
+
+Q : MP3 support doesn't work.
+A : To enable MP3 exentensions, SDL must be installed. Maybe it works, maybe
+not. I don't have nor time neither SDL to test.
+
+Q : The compiler complains about lack of libdl.
+A : libdl.dylib is required. You must install it before compiling.
+
+Q : Moving windows or using a big amount of CPU power makes result sound choppy.
+A : Increase the number of buffers in "darwin_native.c" and recompile.
+
+Q : There's really too much latency.
+A : Decrease the number of buffers in "darwin_native.c" and recompile.
+
+Q : There's really too much latency and result sound choppy.
+A : Change your CPU or write a better MOSX implementation than mine !
+
+Q : Why my question is not listed here?
+A : Because I can't guess ALL questions ! Ask me directly : gborios@free.fr
+
+
+Darwin backend mini-release-notes
+---------------------------------
+
+Version : Alpha 6
+Better bridge between CoreAudio and OpenAL :
+=> No choppy sound anymore.
+=> Minimum latency.
+=> CPU load greatly lowered.
+Should work better with different contexts modes (Sample rates, Mono/stereo,
+8/16bits), to be tested...
+
+Version : Alpha 5
+Support for MOSX 10.1
+Better sound buffer copying stuff.
+Corrected a bug that caused regular bus errors.
+
+Version : Alpha 3 & 4
+Test versions for Garin and me under MOSX Public Beta and 10.0
+
+Version : Alpha 2
+Modified buffering system to use n buffers => sounds less choppy when CPU gets
+suddenly loaded.
+Implemented :
+    * void  release_native(),
+    * void pause_nativedevice(),
+    * void resume_nativedevice().
+
+Version : Alpha 1
+First version to play sound !
+Implemented :
+    * void *grab_write_native(),
+    * ALboolean set_write_native(),
+    * void  native_blitbuffer().
+
+
+Darwin backend ToDos
+--------------------
+
+   * Implements what's not !
+
+   * Add a preference file to determine which is the default Audio
+     Controller (by now, it is the first found).
+
+   * Optimize for Altivec.
+
+   * Clean up everything.
+
+   * Try to make all test programs work.
+
+
+Darwin backend test results
+---------------------------
+
+This is the results of the test programs compiled with alpha 5 version
+of the MOSX Backend and the default branch of the OpenAL CVS. I didn't
+have time to check deeply each example, but I did it for some.
+
+OK : 31
+OK but... : 5
+Can't test : 6
+FAIL : 11
+
+testalinitexit	OK
+testalut	OK
+testbufferuniq	OK
+testcallback	Can't test (Don't have the test file : "adpcm.adp")
+testcapture	Can't test (void *grab_read_native() is not implemented under MOSX).
+testchannel	FAIL : Start OK but sound stops quickly (at the 15th iteration actually)
+testchannel2	Can't test (int set_nativechannel() & float get_nativechannel() are not implemented under MOSX).
+testda	OK
+testdevice	OK
+testdoppler	OK but can't hear any doppler effect...
+testext	OK
+testgain	OK
+testgainlinear	OK
+testgendelbuffer_error	OK
+testgendelsource_error	OK
+testleak	Can't test (Don't have the test file : "adpcm.adp")
+testleak2	Can't test (Don't have the test file : "adpcm.adp")
+testlistener	OK
+testlistener2	OK
+testlistener3	OK but can't hear angle modifications...
+testlistener4	OK but can't hear angle modifications...
+testloop	see problem #1 
+testmath	OK, at least I think.
+testmp3	FAIL : Could not GetProc alutLoadMP3_LOKI
+testmp32	FAIL : Could not GetProc alutLoadMP3_LOKI
+testmulti	OK
+testmultialut	OK
+testmultichannel	OK
+testmulticontext	OK
+testmulticontext2	OK
+testmultimp3	FAIL : Could not GetProc alutLoadMP3_LOKI
+testmultinothread	OK, but sounds very bad at the beginning (expected behaviour under MOSX)
+testnothread	OK
+testorient	OK
+testpause	OK
+testpitch	OK
+testpitch2	FAIL : No sound
+testpitch3	OK -> with problem #2 and modif #1
+testpitch4	FAIL : No sound
+testpitchnothread	OK
+testpitchnothread2	OK
+testqueue	FAIL ? Over appears before end of source
+testqueue2	FAIL ? Over appears before end of source
+testqueue3	FAIL ? Over appears before end of source
+testrelative	OK, but sound doesn't seem to move
+testreverb	OK, but must make 10^5 more micro_sleep to hear sound. Makes me think micro_sleep is broken.
+testsingle	OK -> with problem #2 and modif #1
+testsourcestop	OK
+testsourceuniq	OK
+teststartstop	OK
+teststream	Can't test (Don't have the test file : "rawpcm.pcm")
+teststrings	OK
+testtime	FAIL ? Over appears before end of source
+testvorbis	FAIL : Could not GetProc alutLoadVorbis_LOKI
+
+
+Problems :
+
+#1 : It seems something goes wrong with AL_LOOPING. in testloop : after
+alSourceStop() AL_LOOPING is set to false even before we explicitely set
+it. then we set it to false in the test app, and asking for the loop
+state is OK (returns false). then we call alSourcePlay() and ask again
+for the looping state : it has been now strangely reseted to true. The
+solution is to change the looping value whiel the source is still
+playing, but is this a normal behaviour? I guess no.
+
+#2 : when a mixer source is destroyed, the bid_queue.read_index of the
+attached source is set to the size of the bid_queue. So when
+reallocating a new mix source for the same source, the bid is invalid
+because bid queue read index is out of range (1buffer too far). See
+modif #1 for a solution.
+
+Modifications :
+
+#1 : al_mixer.c, line 719 : mixer modif when reallocating for a stopped
+source -> I guess this is the modif Joe made Monday.
+
+
+Notes about the IRIX backend
+============================
+
+Only Indy, Indogo2 and Onyx Audio/Serial Option (ASO) can natively
+handle 4 channel (surround sound) audio.
+
+Adding 4 channel audio support is possible by adding the following
+definition to your ~/.openalrc file:
+
+   (define speaker-num 4) 
+
+It is also possible to specify the default output port by adding the
+following definition:
+
+   (define native-out-device "Analog Out")
+
+When your system doesn't support four channel audio by default, but it
+does contain (at least) two different output ports you could enable four
+channel audio by defining two separate ports:
+
+   (define native-out-device "Analog Out")
+   (define native-rear-out-device "Analog Out 2")
+
+or alternatively by selecting two different interfaces:
+
+   (define native-out-device "A3.Speaker")
+   (define native-rear-out-device "A3.LineOut2")
+
+See "man 3dm alResources" for more information.
+
+
+Coding guidelines
+=================
+
+Coding guidelines are a very sensitive topic and can easily lead to
+almost religious discussions. Always remember that they are not invented
+to torment developers, but to ease collaboration by avoiding useless
+creativity. The following items are not a complete list, they are only a
+few things to bear in mind. Furthermore, note that most of the current
+code does not yet adhere to these rules, so at least try to follow these
+guidelines when writing new code.
+
+   * To avoid endless formatting discussions and guarantee consistency,
+     use GNU indent with the configuration file located at
+     admin/autotools/.indent.pro. There is even a make target "indent"
+     which does this automatically for the whole source tree.
+
+   * The code should be kept as warning-free as possible, but don't
+     simply silence the compiler by e.g. casting without thinking first.
+
+   * C has only very poor namespace support, so to avoid accidental
+     name clashes we need some naming conventions. Something to bear in
+     mind is that macros and symbols starting with an underscore are
+     reserved for the C compiler, so we should not use this. The
+     following is a list of conventions for the AL part only, the ALC
+     part should be handled accordingly:
+
+      + Quite obviously, globally visible functions from the OpenAL spec
+        have the form "alFooBar" and official macros have the form
+        "AL_FOO_BAR".
+
+      + Globally visible functions and variables not in the OpenAL spec
+        must have the form "alFooBar_" to keep the global namespace
+        clean.
+
+      + Internal types must have the form "AL_FooBar".
+
+      + Internal macros and enum values "AL_FOO_BAR_"
+
+      + C structs have their own namespaces, so we need no funny
+        prefixes or suffixes here and can simply use "fooBar".
+
+   * A header file named "foo/bar.h" should be protected against
+     multiple inclusion via an "AL_FOO_BAR_H_" macro.
+
+Please feel free to add some more items to the guidelines above...
Index: /openal-0.0.8/TODO
===================================================================
--- /openal-0.0.8/TODO	(revision 17)
+++ /openal-0.0.8/TODO	(revision 17)
@@ -0,0 +1,30 @@
+TODO:
+	Compliance:
+	  - > 1.0 listener and source gain
+
+	General:
+	  - check UNUSED (and eventually remove them)
+	  - clean up context create/destroy behaviour
+	  - make sure data format is consistent within openal
+	  - merge pool functions?
+	  - integrate memory reducing AL_buffer changed
+	  - comments, examples, documentation, testing
+
+	Filters:
+	  - fix/remove reverb
+
+	Backends:
+	  general:
+	    - implement missing functions
+	  windows native:
+	    - implement dsound backend
+
+	Testing:
+	  - callbacks with filters (alf_tpitch in particular)
+	  - locking
+	  - more in general
+
+	Extensions:
+	  - rewrite alBufferAppendFoo to use queueing
+	  - maybe remove GenStreaming?
+	  - maybe IASIG stuff
Index: /openal-0.0.8/aclocal.m4
===================================================================
--- /openal-0.0.8/aclocal.m4	(revision 17)
+++ /openal-0.0.8/aclocal.m4	(revision 17)
@@ -0,0 +1,6886 @@
+# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 47 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+       echo_test_string="`eval $cmd`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "[$]0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+     else
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    ;;
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    # 
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	    lt_cv_sys_max_cmd_len=$new_result &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_unknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# -------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s out/conftest.err; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  AC_LIBTOOL_LANG_CXX_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+	AC_LIBTOOL_LANG_RC_CONFIG
+	;;
+
+      *)
+	AC_MSG_ERROR([Unsupported tag name: $tagname])
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 dll's
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+#- set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case "$host_cpu" in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+      */dev/null* | *'Invalid file or object type'*)
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+        ;;
+      *)
+	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	*/dev/null*)
+	  lt_cv_path_NM="$tmp_nm -p"
+	  break
+	  ;;
+	*)
+	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	  continue # so that we can try to find one that supports BSD flags
+	  ;;
+	esac
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
+# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
+# DIRECTORY is not provided and an installed libltdl is not found, it is
+# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!).  If your package is not flat and you're not using automake,
+# define top_builddir and top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+# _LT_AC_PROG_CXXCPP
+# ---------------
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
+[
+AC_REQUIRE([AC_PROG_CXX])
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+fi
+])# _LT_AC_PROG_CXXCPP
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+
+#
+# Check for any special shared library compilation flags.
+#
+_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
+if test "$GCC" = no; then
+  case $host_os in
+  sco3.2v5*)
+    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
+    ;;
+  esac
+fi
+if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
+  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
+  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
+  else
+    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+  fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+# Report which librarie types wil actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_LD
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[[012]]|aix4.[[012]].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	else
+	  # We have old collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	fi
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	_LT_AC_SYS_LIBPATH_AIX
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	# -bexpall does not export symbols beginning with underscore (_)
+	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
+	# Exported symbols can be pulled into shared objects from archives
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	# This is similar to how AIX traditionally builds it's shared libraries.
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case "$host_os" in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      ghcx)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  freebsd[[12]]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd* | kfreebsd*-gnu | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC)
+      # FIXME: insert proper C++ library support
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    aCC)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      case "$host_cpu" in
+      hppa*64*)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+        ;;
+      ia64*)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        ;;
+      *)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case "$host_cpu" in
+    hppa*64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      aCC)
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case "$host_cpu" in
+	    ia64*|hppa*64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC)
+	# SGI C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	  else
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+	;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC)
+        # Portland Group C++ compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+        ;;
+      cxx)
+	# Compaq C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  openbsd*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+	;;
+      RCC)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sco*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    case $cc_basename in
+      CC)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      lcc)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC)
+	# Sun C++ 4.2, 5.x and Centerline C++
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    # The C++ compiler is used as linker so we must use $wl
+	    # flag to pass the commands to the underlying system
+	    # linker.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	esac
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx)
+	# Green Hills C++ Compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	fi
+	;;
+    esac
+    ;;
+  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  test "$enable_shared" = yes && enable_static=no
+  ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars.  Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
+
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
+
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
+
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=$lt_AS
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDGIRSTW]]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris* | sysv5*)
+  symcode='[[BDRT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case "$cc_basename" in
+           xlc*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | kfreebsd*-gnu | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    if test "$host_cpu" != ia64; then
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    case "$host_cpu" in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux*)
+	case $cc_basename in
+	  KCC)
+	    # KAI C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC)
+	    # Portland Group C++ compiler.
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  cxx)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC)
+	    # Rational C++ 2.4.1
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx)
+	    # Digital/Compaq C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      sco*)
+	case $cc_basename in
+	  CC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC)
+	    # Sun C++ 4.x
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc)
+	    # Lucid
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC)
+	    # NonStop-UX NCC 3.20
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      unixware*)
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case "$cc_basename" in
+         xlc*)
+         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      pgcc | pgf77 | pgf90)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    unicos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_AC_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      tmp_addflag=
+      case $CC,$host_cpu in
+      pgf77* | pgf90* )			# Portland Group f77 and f90 compilers
+        tmp_addflag=' -fpic' ;;
+      ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+        tmp_addflag=' -i_dynamic' ;;
+      efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+        tmp_addflag=' -i_dynamic -nofor_main' ;;
+      ifc* | ifort*)			# Intel Fortran compiler
+      	tmp_addflag=' -nofor_main' ;;
+      esac
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1)
+      fi
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+      runpath_var=LD_RUN_PATH
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  else
+  	  # We have old collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 _LT_AC_SYS_LIBPATH_AIX
+	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    bsdi[[45]]*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case "$host_os" in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    openbsd*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	   ;;
+	 *)
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    sco3.2v5*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
+      esac
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv5*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_MSG_RESULT([$SED])
+])
+
+# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+	 [AM_AUTOMAKE_VERSION([1.9.5])])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+	      		     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake.  There are at least two reasons why we must not
+# use `-m 0755':
+#   - it causes special bits like SGID to be ignored,
+#   - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out.  Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([admin/autotools/m4/acx_pthread.m4])
+m4_include([admin/autotools/m4/alut_c__attribute.m4])
+m4_include([admin/autotools/m4/alut_check_cflags_wall.m4])
+m4_include([admin/autotools/m4/alut_check_flag.m4])
+m4_include([admin/autotools/m4/alut_eval_stderr.m4])
Index: /openal-0.0.8/admin/CMakeModules/CMakeASMCompiler.cmake.in
===================================================================
--- /openal-0.0.8/admin/CMakeModules/CMakeASMCompiler.cmake.in	(revision 17)
+++ /openal-0.0.8/admin/CMakeModules/CMakeASMCompiler.cmake.in	(revision 17)
@@ -0,0 +1,13 @@
+SET(CMAKE_ASM_COMPILER "@CMAKE_ASM_COMPILER@")
+SET(CMAKE_ASM_COMPILER_LOADED 1)
+SET(CMAKE_ASM_COMPILER_ENV_VAR "ASM")
+
+SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS nasm;asm;nas)
+SET(CMAKE_ASM_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
+SET(CMAKE_ASM_LINKER_PREFERENCE None)
+IF(UNIX)
+SET(CMAKE_ASM_OUTPUT_EXTENSION .o)
+ELSE(UNIX)
+SET(CMAKE_ASM_OUTPUT_EXTENSION .obj)
+ENDIF(UNIX)
+
Index: /openal-0.0.8/admin/CMakeModules/CMakeASMInformation.cmake
===================================================================
--- /openal-0.0.8/admin/CMakeModules/CMakeASMInformation.cmake	(revision 17)
+++ /openal-0.0.8/admin/CMakeModules/CMakeASMInformation.cmake	(revision 17)
@@ -0,0 +1,7 @@
+IF(NOT CMAKE_ASM_COMPILE_OBJECT)
+  IF(UNIX)
+    SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf -o <OBJECT>   <SOURCE>")
+  ELSE(UNIX)
+    SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f win32 -DWIN32 -o <OBJECT>   <SOURCE>")
+  ENDIF(UNIX)
+ENDIF(NOT CMAKE_ASM_COMPILE_OBJECT)
Index: /openal-0.0.8/admin/CMakeModules/CMakeDetermineASMCompiler.cmake
===================================================================
--- /openal-0.0.8/admin/CMakeModules/CMakeDetermineASMCompiler.cmake	(revision 17)
+++ /openal-0.0.8/admin/CMakeModules/CMakeDetermineASMCompiler.cmake	(revision 17)
@@ -0,0 +1,11 @@
+IF(NOT CMAKE_ASM_COMPILER)
+  FIND_PROGRAM(CMAKE_ASM_COMPILER NAMES nasm )
+ENDIF(NOT CMAKE_ASM_COMPILER)
+MARK_AS_ADVANCED(CMAKE_ASM_COMPILER)
+
+
+# configure variables set in this file for fast reload later on
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/admin/CMakeModules/CMakeASMCompiler.cmake.in 
+               ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeASMCompiler.cmake IMMEDIATE)
+
+SET(CMAKE_ASM_COMPILER_ENV_VAR "ASM")
Index: /openal-0.0.8/admin/Makefile.am
===================================================================
--- /openal-0.0.8/admin/Makefile.am	(revision 17)
+++ /openal-0.0.8/admin/Makefile.am	(revision 17)
@@ -0,0 +1,2 @@
+SUBDIRS = pkgconfig
+
Index: /openal-0.0.8/admin/Makefile.in
===================================================================
--- /openal-0.0.8/admin/Makefile.in	(revision 17)
+++ /openal-0.0.8/admin/Makefile.in	(revision 17)
@@ -0,0 +1,538 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = admin
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/admin/autotools/m4/acx_pthread.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSC_CONFIG = @ARTSC_CONFIG@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLEEXTENSIONALEXTMP3_FALSE = @ENABLEEXTENSIONALEXTMP3_FALSE@
+ENABLEEXTENSIONALEXTMP3_TRUE = @ENABLEEXTENSIONALEXTMP3_TRUE@
+ENABLEEXTENSIONALEXTVORBIS_FALSE = @ENABLEEXTENSIONALEXTVORBIS_FALSE@
+ENABLEEXTENSIONALEXTVORBIS_TRUE = @ENABLEEXTENSIONALEXTVORBIS_TRUE@
+ESD_CONFIG = @ESD_CONFIG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEATURECFLAGS = @FEATURECFLAGS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+NASM = @NASM@
+NASM_FORMAT = @NASM_FORMAT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZATIONCFLAGS = @OPTIMIZATIONCFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PROFILINGLDFLAGS = @PROFILINGLDFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SDL_CONFIG = @SDL_CONFIG@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZEOF_VOID_P = @SIZEOF_VOID_P@
+SMPEG_CONFIG = @SMPEG_CONFIG@
+STRIP = @STRIP@
+USEBACKENDALSA_FALSE = @USEBACKENDALSA_FALSE@
+USEBACKENDALSA_TRUE = @USEBACKENDALSA_TRUE@
+USEBACKENDARTS_FALSE = @USEBACKENDARTS_FALSE@
+USEBACKENDARTS_TRUE = @USEBACKENDARTS_TRUE@
+USEBACKENDESD_FALSE = @USEBACKENDESD_FALSE@
+USEBACKENDESD_TRUE = @USEBACKENDESD_TRUE@
+USEBACKENDNATIVEBSD_FALSE = @USEBACKENDNATIVEBSD_FALSE@
+USEBACKENDNATIVEBSD_TRUE = @USEBACKENDNATIVEBSD_TRUE@
+USEBACKENDNATIVEDARWIN_FALSE = @USEBACKENDNATIVEDARWIN_FALSE@
+USEBACKENDNATIVEDARWIN_TRUE = @USEBACKENDNATIVEDARWIN_TRUE@
+USEBACKENDNATIVEIRIX_FALSE = @USEBACKENDNATIVEIRIX_FALSE@
+USEBACKENDNATIVEIRIX_TRUE = @USEBACKENDNATIVEIRIX_TRUE@
+USEBACKENDNATIVELINUX_FALSE = @USEBACKENDNATIVELINUX_FALSE@
+USEBACKENDNATIVELINUX_TRUE = @USEBACKENDNATIVELINUX_TRUE@
+USEBACKENDNATIVEMORPHOS_FALSE = @USEBACKENDNATIVEMORPHOS_FALSE@
+USEBACKENDNATIVEMORPHOS_TRUE = @USEBACKENDNATIVEMORPHOS_TRUE@
+USEBACKENDNATIVESOLARIS_FALSE = @USEBACKENDNATIVESOLARIS_FALSE@
+USEBACKENDNATIVESOLARIS_TRUE = @USEBACKENDNATIVESOLARIS_TRUE@
+USEBACKENDNATIVEWINDOWS_FALSE = @USEBACKENDNATIVEWINDOWS_FALSE@
+USEBACKENDNATIVEWINDOWS_TRUE = @USEBACKENDNATIVEWINDOWS_TRUE@
+USEBACKENDNULL_FALSE = @USEBACKENDNULL_FALSE@
+USEBACKENDNULL_TRUE = @USEBACKENDNULL_TRUE@
+USEBACKENDSDL_FALSE = @USEBACKENDSDL_FALSE@
+USEBACKENDSDL_TRUE = @USEBACKENDSDL_TRUE@
+USEBACKENDWAVEOUT_FALSE = @USEBACKENDWAVEOUT_FALSE@
+USEBACKENDWAVEOUT_TRUE = @USEBACKENDWAVEOUT_TRUE@
+VERSION = @VERSION@
+WARNINGCFLAGS = @WARNINGCFLAGS@
+X86ENABLED_FALSE = @X86ENABLED_FALSE@
+X86ENABLED_TRUE = @X86ENABLED_TRUE@
+X86MMXENABLED_FALSE = @X86MMXENABLED_FALSE@
+X86MMXENABLED_TRUE = @X86MMXENABLED_TRUE@
+X86NASMENABLED_FALSE = @X86NASMENABLED_FALSE@
+X86NASMENABLED_TRUE = @X86NASMENABLED_TRUE@
+X86NASMMMXENABLED_FALSE = @X86NASMMMXENABLED_FALSE@
+X86NASMMMXENABLED_TRUE = @X86NASMMMXENABLED_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+SUBDIRS = pkgconfig
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  admin/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  admin/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libtool clean-recursive ctags \
+	ctags-recursive distclean distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /openal-0.0.8/admin/RPM/openal.spec
===================================================================
--- /openal-0.0.8/admin/RPM/openal.spec	(revision 17)
+++ /openal-0.0.8/admin/RPM/openal.spec	(revision 17)
@@ -0,0 +1,272 @@
+#
+# spec file for package openal (Version 0.0.8)
+#
+# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://www.suse.de/feedback/
+#
+
+# norootforbuild
+# neededforbuild SDL SDL-devel aalib aalib-devel alsa alsa-devel arts arts-devel audiofile esound esound-devel glib2 glib2-devel libogg libogg-devel libstdc++-devel libvorbis libvorbis-devel pkgconfig resmgr slang smpeg smpeg-devel xorg-x11-libs
+
+BuildRequires: aaa_base acl attr bash bind-utils bison bzip2 coreutils cpio cpp cracklib cvs cyrus-sasl db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv klogd less libacl libattr libgcc libnscd libselinux libstdc++ libxcrypt libzio m4 make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch permissions popt procinfo procps psmisc pwdutils rcs readline sed strace syslogd sysvinit tar tcpd texinfo timezone unzip util-linux vim zlib zlib-devel autoconf automake binutils gcc gdbm gettext libtool perl rpm SDL SDL-devel aalib aalib-devel alsa alsa-devel arts arts-devel audiofile esound esound-devel glib2 glib2-devel libogg libogg-devel libstdc++-devel libvorbis libvorbis-devel pkgconfig resmgr slang smpeg smpeg-devel xorg-x11-libs dialog expat fontconfig fontconfig-devel freeglut freeglut-devel freetype2 freetype2-devel gcc-c++ gnome-filesystem jack jack-devel libjpeg liblcms liblcms-devel libmng libmng-devel libpng libpng-devel libsndfile libtiff pciutils qt3 qt3-devel xorg-x11-Mesa xorg-x11-Mesa-devel xorg-x11-devel aaa_skel ash bind-libs gpg libgcj logrotate openslp suse-build-key suse-release tcsh
+
+Name:         openal
+License:      LGPL
+Group:        System/Libraries
+Autoreqprov:  on
+Version:      0.0.8
+Release:      1
+URL:          http://www.openal.org/
+Icon:         openal.xpm
+Summary:      Open Audio Library
+Source:       openal-%{version}.tar.gz
+BuildRoot:    %{_tmppath}/%{name}-%{version}-build
+
+%description
+OpenAL is an audio library designed in the spirit of OpenGL--machine
+independent, cross platform, and data format neutral with a clean,
+simple C-based API.
+
+
+
+Authors:
+--------
+    Adam D. Moss <adam@steambird.com>
+    Bernd Kreimeier <bk@oddworld.com>
+    Christopher Purnell <cjp@lost.org.uk>
+    Dirk Ehlke <dehlke@mip.informatik.uni-kiel.de>
+    Elias Naur <elias@oddlabs.com>
+    Erik Greenwald <erik@smluc.org>
+    Erik Hofman <erik@ehofman.com>
+    Garin Hiebert <garinh@cheesetoast.net>
+    Guillaume Borios <gborios@free.fr>
+    Jason Daly <jdaly@ist.ucf.edu>
+    John E. Stone <j.stone@acm.org>
+    Joseph I. Valenzuela <valenzuela@treyarch.com>
+    Michael Vance <michael@linuxgames.com>
+    Prakash Punnoor <prakash@punnoor.de>
+    Ryan C. Gordon <ryan@epicgames.com>
+    Sven Panne <sven.panne@aedion.de>
+    Yotam Gingold <ygingold@cs.brown.edu>
+    Zoltan Ponekker <pontscho@kac.poliod.hu>
+
+%package devel
+Summary:      Static libraries, header files and tests for openal library
+Requires:     openal = %{version}
+Group:        Development/Libraries/C and C++
+
+%description devel
+OpenAL is an audio library designed in the spirit of OpenGL - machine
+independent, cross platform, and data format neutral, with a clean,
+simple C-based API.
+
+
+
+Authors:
+--------
+    Adam D. Moss <adam@steambird.com>
+    Bernd Kreimeier <bk@oddworld.com>
+    Christopher Purnell <cjp@lost.org.uk>
+    Dirk Ehlke <dehlke@mip.informatik.uni-kiel.de>
+    Elias Naur <elias@oddlabs.com>
+    Erik Greenwald <erik@smluc.org>
+    Erik Hofman <erik@ehofman.com>
+    Garin Hiebert <garinh@cheesetoast.net>
+    Guillaume Borios <gborios@free.fr>
+    Jason Daly <jdaly@ist.ucf.edu>
+    John E. Stone <j.stone@acm.org>
+    Joseph I. Valenzuela <valenzuela@treyarch.com>
+    Michael Vance <michael@linuxgames.com>
+    Prakash Punnoor <prakash@punnoor.de>
+    Ryan C. Gordon <ryan@epicgames.com>
+    Sven Panne <sven.panne@aedion.de>
+    Yotam Gingold <ygingold@cs.brown.edu>
+    Zoltan Ponekker <pontscho@kac.poliod.hu>
+
+%debug_package
+%prep
+%setup -q
+
+%build
+%{?suse_update_config:%{suse_update_config -f admin/autotools}}
+./autogen.sh
+export CFLAGS="$RPM_OPT_FLAGS"
+%ifarch ia64
+export LDFLAGS=-Wl,-relax
+%endif
+./configure --prefix=%{_prefix}
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT \
+     DESTLIB=$RPM_BUILD_ROOT%{_libdir} \
+     install
+#
+# documentation
+install -m 755 -d $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
+install -m 644 ChangeLog				\
+	       AUTHORS 					\
+	       README					\
+	       common/specification/OpenAL1-1Spec.pdf	\
+	       $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/
+#
+# configuration
+install -m 755 -d $RPM_BUILD_ROOT/etc
+cat > $RPM_BUILD_ROOT/etc/openalrc <<EOFMARKER
+(define devices '(alsa native))
+
+;; uncomment this to output via the 2nd soundcard
+;;(define alsa-device "plughw:2,0")
+EOFMARKER
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc %{_defaultdocdir}/%{name}/ChangeLog
+%doc %{_defaultdocdir}/%{name}/AUTHORS
+%doc %{_defaultdocdir}/%{name}/README
+/etc/openalrc
+%{_libdir}/libopenal.so.*
+
+%files devel
+%defattr(-,root,root)
+%doc %{_defaultdocdir}/%{name}/OpenAL1-1Spec.pdf
+%{_prefix}/bin/openal-config
+%{_includedir}/AL/al.h
+%{_includedir}/AL/alc.h
+%{_includedir}/AL/alext.h
+%{_libdir}/libopenal.a
+%{_libdir}/libopenal.la
+%{_libdir}/libopenal.so
+%{_libdir}/pkgconfig/openal.pc
+
+%changelog -n openal
+* Thu Jan 05 2006 - sven.panne@aedion.de
+- Optimizations are enabled by default now
+* Thu Dec 22 2005 - sven.panne@aedion.de
+- Removed superfluous/outdated configure flags
+* Tue Nov 29 2005 - sven.panne@aedion.de
+- Synched with new directory structure
+* Mon Nov 28 2005 - sven.panne@aedion.de
+- Fixed build dependencies
+- Updated file list
+* Thu Oct 27 2005 - sven.panne@aedion.de
+- Synched with latest Makefile changes
+* Fri Sep 30 2005 - sven.panne@aedion.de
+- Updated authors
+* Fri Sep 23 2005 - sven.panne@aedion.de
+- Various changes to bring the spec file in line with the OpenAL repository again.
+* Tue Mar 15 2005 - sbrabec@suse.cz
+- Removed incorrect ALSA flags (#72855).
+* Thu Feb 03 2005 - sbrabec@suse.cz
+- Updated to 2005-01-06 CVS snapshot (version 0.0.8).
+* Fri Jan 21 2005 - ro@suse.de
+- disable arch-asm (does not compile ATM)
+* Fri Jan 21 2005 - sbrabec@suse.cz
+- Updated to 2005-01-06 CVS snapshot.
+* Thu Sep 02 2004 - sbrabec@suse.cz
+- Updated to actual CVS snapshot.
+* Wed Apr 28 2004 - ro@suse.de
+- added -fno-strict-aliasing
+* Sat Jan 10 2004 - adrian@suse.de
+- add %%defattr
+* Tue Dec 09 2003 - ro@suse.de
+- build with alsa compatibility defines
+* Mon Oct 06 2003 - ro@suse.de
+- added glib2, glib2-devel to neededforbuild (arts)
+* Mon Aug 11 2003 - sbrabec@suse.cz
+- Updated to actual CVS snapshot.
+* Thu Jul 31 2003 - ro@suse.de
+- include sys/time.h before alsa
+* Thu Apr 24 2003 - ro@suse.de
+- fix install_info --delete call and move from preun to postun
+* Mon Feb 10 2003 - sbrabec@suse.cz
+- Use %%install_info (bug #23445).
+* Mon Feb 10 2003 - sbrabec@suse.cz
+- Updated to 20030131 CVS snapshot.
+* Wed Oct 30 2002 - sbrabec@suse.cz
+- Updated to actual CVS version.
+- Fixed compiler warnings.
+* Fri Aug 30 2002 - pmladek@suse.cz
+- fixed dependency of the devel subpackage on the main package (used %%version)
+* Fri Jul 05 2002 - kukuk@suse.de
+- Use %%ix86 macro
+* Mon Apr 08 2002 - pmladek@suse.cz
+- arch specific assembler is only for i386
+- fixed includes for ia64
+* Wed Apr 03 2002 - pmladek@suse.cz
+- used some pieces from old patches
+- fixed to compile with autoconf-2.53:
+- fixed acinclude.m4, used aclocal
+- some fixes in configure.in
+- cleaned up spec file
+- removed boom.mp3 to avoid potential license problems
+* Wed Feb 20 2002 - ro@suse.de
+- removed kdelibs3-artsd from neededforbuild
+  (artsd is there anyway)
+* Sat Feb 16 2002 - sndirsch@suse.de
+- enabled optimization and arch specific assembler
+* Fri Feb 15 2002 - sndirsch@suse.de
+- added SMPEG/SDL support to get MP3 playback support (required
+  by VegaStrike)
+* Fri Feb 15 2002 - ro@suse.de
+- changed neededforbuild <kdelibs3-artsd> to <arts arts-devel>
+* Fri Feb 08 2002 - bk@suse.de
+- (re)enable optimisations and move prepare stuff to %%prep
+* Thu Feb 07 2002 - sndirsch@suse.de
+- added Ogg/Vorbis and Capture support
+- removed compiler flags "-Werror -pedantic-errors"
+* Thu Feb 07 2002 - sndirsch@suse.de
+- added support for aRTs and esound daemon
+- added global config file + a small patch to read this one
+* Wed Feb 06 2002 - tiwai@suse.de
+- added ALSA 0.9.0 support.  see README.alsa.
+- clean up spec file, using %%_libdir.
+- removed SDL.
+* Fri Feb 01 2002 - sndirsch@suse.de
+- updated to CVS sources of 20020201 (required for vegastrike)
+- disabled patches (not required any more)
+* Fri Jan 11 2002 - pmladek@suse.cz
+- devel package created
+- used macro %%{_librdir} to fix for lib64
+* Wed Aug 08 2001 - ro@suse.de
+- changed neededforbuild <sdl> to <SDL>
+- changed neededforbuild <sdl-devel> to <SDL-devel>
+* Tue May 22 2001 - pmladek@suse.cz
+- fixed include files on ia64
+- fixed preprocessor warnigs by patch for alpha
+* Tue May 08 2001 - mfabian@suse.de
+- bzip2 sources
+* Thu Apr 19 2001 - pmladek@suse.cz
+- fixed to compile on axp
+* Wed Apr 04 2001 - schwab@suse.de
+- Pass -relax to linker on ia64.
+- Fix makefile to use LDFLAGS.
+- Remove -fPIC when building non-library object.
+* Mon Mar 26 2001 - ro@suse.de
+- changed neededforbuild <sdl> to <sdl sdl-devel>
+* Thu Nov 30 2000 - ro@suse.de
+- added suse-update-config
+* Mon Nov 06 2000 - ro@suse.de
+- fixed neededforbuild
+* Thu Jun 08 2000 - cihlar@suse.cz
+- uncommented %%clean
+* Tue May 09 2000 - smid@suse.cz
+- buildroot added
+- upgrade to version from 08.05.2000
+* Tue Apr 11 2000 - sndirsch@suse.de
+- removed '-Werror' and '-pedantic-erros' compiler flags
+* Mon Mar 27 2000 - uli@suse.de
+- renamed dif for easier maintenance
+- __linux -> __linux__
+- now uses RPM_OPT_FLAGS
+  Wed Mar 15 19:31:35 CET 2000
+- added test demos
+* Thu Mar 09 2000 - sndirsch@suse.de
+- created package
Index: /openal-0.0.8/admin/RPM/openal.xpm
===================================================================
--- /openal-0.0.8/admin/RPM/openal.xpm	(revision 17)
+++ /openal-0.0.8/admin/RPM/openal.xpm	(revision 17)
@@ -0,0 +1,211 @@
+/* XPM */
+static char *openal[] = {
+/* columns rows colors chars-per-pixel */
+"82 44 161 2",
+"   c opaque",
+".  c #6d0000",
+"X  c #6e0015",
+"o  c #6e1515",
+"O  c #721515",
+"+  c #701c1c",
+"@  c #731c22",
+"#  c #742324",
+"$  c #75272b",
+"%  c #742c2c",
+"&  c #7b272b",
+"*  c #7c2b2d",
+"=  c #762e32",
+"-  c #763232",
+";  c #773838",
+":  c #793434",
+">  c #7d3b3b",
+",  c #7f3d40",
+"<  c #7b403d",
+"1  c #7d4141",
+"2  c #7f4846",
+"3  c #863538",
+"4  c #83393c",
+"5  c #804444",
+"6  c #824648",
+"7  c #804a44",
+"8  c #834c4a",
+"9  c #8b4245",
+"0  c #8d4549",
+"q  c #884b4d",
+"w  c #85524c",
+"e  c #865252",
+"r  c #8a5453",
+"t  c #8b5a55",
+"y  c #8b5c5c",
+"u  c #905456",
+"i  c #905c57",
+"p  c #965c5d",
+"a  c #985f60",
+"s  c #91625d",
+"d  c #8f6260",
+"f  c #956663",
+"g  c #956a69",
+"h  c #9c6366",
+"j  c #996966",
+"k  c #9b6c6b",
+"l  c #98706e",
+"z  c #9b7373",
+"x  c #a06669",
+"c  c #a16c6e",
+"v  c #a27474",
+"b  c #a37678",
+"n  c #a57b77",
+"m  c #a37b7b",
+"M  c #ab7477",
+"N  c #ad767a",
+"B  c #ad7b7d",
+"V  c #a97f81",
+"C  c #b67f82",
+"Z  c #a5807c",
+"A  c #aa827a",
+"S  c #dda415",
+"D  c #dda41c",
+"F  c #dea523",
+"G  c #dea62c",
+"H  c #dfa827",
+"J  c #dfa82b",
+"K  c #dfa732",
+"L  c #dfa834",
+"P  c #dfa938",
+"I  c #e0aa2d",
+"U  c #e0ac33",
+"Y  c #e0ab3a",
+"T  c #e3b23d",
+"R  c #e0ad43",
+"E  c #e1ae48",
+"W  c #e1ae52",
+"Q  c #e2b341",
+"!  c #e3b44c",
+"~  c #e5b94c",
+"^  c #e2b253",
+"/  c #e2b35b",
+"(  c #e5ba57",
+")  c #e5ba5a",
+"_  c #e2b563",
+"`  c #e4b769",
+"'  c #e4b964",
+"]  c #e5ba6c",
+"[  c #e5bd73",
+"{  c #e7c06b",
+"}  c #e8c264",
+"|  c #ebc86f",
+" . c #e7c177",
+".. c #e7c07b",
+"X. c #e9c375",
+"o. c #e9c47d",
+"O. c #a58280",
+"+. c #ab8282",
+"@. c #ac8a82",
+"#. c #ae8c89",
+"$. c #b68583",
+"%. c #b18b85",
+"&. c #b08a89",
+"*. c #ba868a",
+"=. c #bc8e90",
+"-. c #b29085",
+";. c #b4928d",
+":. c #b49090",
+">. c #b99696",
+",. c #b89798",
+"<. c #be9f91",
+"1. c #ba9b9a",
+"2. c #c3979a",
+"3. c #c3989b",
+"4. c #c59ea0",
+"5. c #c1a0a2",
+"6. c #c9a2a3",
+"7. c #cbafad",
+"8. c #ccb4ad",
+"9. c #cfb3b4",
+"0. c #cfb8b3",
+"q. c #d1aeb0",
+"w. c #d3b3ad",
+"e. c #d5b5b7",
+"r. c #d6b7ba",
+"t. c #d2b8b5",
+"y. c #d7babb",
+"u. c #d9bcbe",
+"i. c #ddc7b3",
+"p. c #dccab9",
+"a. c #e8c584",
+"s. c #e8c58b",
+"d. c #eccd84",
+"f. c #eac889",
+"g. c #eacb93",
+"h. c #ebce99",
+"j. c #efd289",
+"k. c #edd097",
+"l. c #edd29b",
+"z. c #f0d693",
+"x. c #f0d79b",
+"c. c #f0d99d",
+"v. c #ecd2a3",
+"b. c #eed6aa",
+"n. c #e6d3bd",
+"m. c #f1d9a0",
+"M. c #f1dcad",
+"N. c #f0dbb1",
+"B. c #f1debe",
+"V. c #f3e0b3",
+"C. c #ddc2c3",
+"Z. c #ddc9c4",
+"A. c #e3cbc3",
+"S. c #ead9d6",
+"D. c #ecddda",
+"F. c #ece1db",
+"G. c #f3e1c1",
+"H. c #f4e7cb",
+"J. c #f5e8cd",
+"K. c #f9f4ec",
+"L. c None",
+/* pixels */
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.b.E E P E _ v.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.v.E S S S S S R h.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L./ S P / E S S S / L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.K.J.H.k.c.L.l.J F s.L.! S S S F v.L.m.j.H.J.K.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.l.E F W W P  .L.} S P L.L.! S S S S ! L. .P W W G E g.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N._ H S D a.L.E S G L.L.^ S S S S T L.X.J S F _ b.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.[ E R H.L.Q S G L.L.! S S S S T L.K.P R ] L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.K.h.` / L.L.Q S J ' / / / W S S T L.L./ _ g.J.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.a.W R H S J L.L.Q S I I D ] b.s.S S T L.L.J S F R _  .M.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.V.' W L S S J L.L.Q S I a.[ ! R P S S T L.L.U S S P W ' M.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.l. ./ W L.L.Q S I R R / [ [ S S T L.L.! / [ d.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.a./ E L.L.Q S H R R ' s.[ S S T L.L.W W a.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.J./ P S F f.L.Q S H ] [ ^ R P S S T L.v.G S U ` G.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.l._ F D S S / L.Q S G U F ] b.h.S S T L.` S S D F / l.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.m.} ~ U S v.G.L.Q S J / ^ / / ! S S T L.G.v.S U ~ } m.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.Q S J L.L.^ S S S S T L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.4.y.L.L.L.L.L.L.L.L.L.5.A.L.L.L.L.L.L.L.L.F.3.S.L.L.L.L.L.L.L.L.p.6.J.L.L.L.L.k.x.c.) S U j.j.! S S S S ( z.x.z.L.L.L.L.L.w.q.L.L.L.L.L.3.C C C L.L.L.L.L.L.",
+"L.0.y % # # 5 z L.L.L.y.e.m 1 # % w O.L.L.L.L.m e : $ : y A L.L.L.L.#.2 # $ - y 5.L.L.T ! ~ J S S F D I F F D S I ~ ! T L.L.D.s < $ # 2 z L.L.L.r + + + L.L.L.L.L.L.",
+"Z.e . . . . . % z L.L.$ $ . . . . . % Z L.L.b + . . . . . # m L.L.z - . . . . . t ;.L.U E } Q S S S S P g.~ E S T } E U L.$.l . . . . . O g L.L.q . . . L.L.L.L.L.L.",
+"e . . - : > . . - B L.. . . @ : 7 . . 1 8.L.q . . - > - . . > C.<.1 . . : , % . . t L.U E L.Q S S S S S P l.E S T L.E I L.k . . o 8 : . . # @.L.q . . . L.L.L.L.L.L.",
+"7 . @ m L.u.2 . . f L.. . % Z L.$., . . r >.$ . # k L.;.7 . . k j . . e p.L.m % . 2 D.U E L.Q S S S S S S E / S T L.! I L.> . . g J.i.l . . e L.q . . . L.L.L.L.L.L.",
+"% . 1 L.L.L.t . . > L.. . q L.L.L.2 . . z ;.. . 8 L.L.L.y . . . * . . q L.L.L.: . % *.U E L.Q S S S S P ' Y R S T L.E U L.5 . + 6.L.L.h . . & L.q . . . L.L.L.L.L.L.",
+"@ . , L.L.L.h . . & L.. . y L.L.L.. . . z ,.. . * p p p p L.L.L.* . . t L.L.L.# . $ C U E L.Q S S S S S ^ H.E S T L.E U L.> . @ . . . M . . @ L.q . . . L.L.L.L.L.L.",
+"@ . , L.L.L.p . . & L.. . y L.L.L.. . . z ,.. . . . . . . L.L.L.* . . u L.L.L.# . $ C U E L.Q S S S S S S _ E S T L.! U L.4 . . . . . . . . & L.q . . . L.L.L.L.L.L.",
+"@ . , L.L.L.a . . & L.. . y L.L.L.. . . l ,.. . . . . . . L.L.L.* . . u L.L.L.# . $ C U E L.Q S S S S L J L W S T L.E I L.> . . . . . . . . @ L.q . . . L.L.L.L.L.L.",
+"@ . , L.L.L.a . . & L.. . y L.L.L.. . . z ,.. . O * & * * L.L.L.* . . u L.L.L.# . $ C U E L.Q S S S S D [ L.! S T L.! I L.4 . + y d d y . . & L.q . . . L.L.L.L.L.L.",
+"@ . : L.L.L.u . . : L.. . r L.L.L.8 . . z ,.. . 2 L.L.L.n 8 q q * . . u L.L.L.# . $ $.Y E L.Q S S S S S U ] ! S T L.E U L.> . @ L.L.L.N . . # L.q . . . L.L.L.j q q ",
+"6 . # &.L.K.e . . f L.. . # v L.C.d . . g ;.+ . < 5.L.9.> . . m * . . u L.L.L.# . $ C U Q L.Q S S S S F F E / S T L.E U L.4 . @ L.L.L.N . . # L.q . . . L.L.1.; . > ",
+"t . . % 6 q o . % %.L.. . . , q > o . % m L.w . . 1 6 e . . 8 t.3 . . u L.L.L.# . $ C U E L.Q S S S S U s.L.E S T L.E U L.4 . @ L.L.L.N . . . L.q . . > q 8 > . . 8 ",
+"+.% . . . . . X r L.L.. . . . . . . o k L.L.#.- . . . . . : O.L.3 . . u L.L.L.# . $ C U E L.Q S S S S S P h.E S T L.E I L.> . @ L.L.L.N . . . L.q . . . . . . . > %.",
+"L.V 8 # . . > f L.L.L.. . # # . . , z Z.L.L.L.m : O . O > m L.L.# . . u L.L.L.# . $ $.U E L.Q S S S S S S E ! S T L.! U L.4 . @ L.L.L.N . . . L.q . . . . . # q n L.",
+"L.L.L.>.9 k 8.L.L.L.L.. . y %.9 Z 4.L.L.L.L.L.L.Z.&.4 &.n.L.L.L.u 3 3 c L.L.L.0 3 0 3.Q P L.' S S S S G  .! R S ) L.E U L.u 3 0 L.L.L.=.3 3 3 L.h 3 3 3 3 9 @.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.. . y L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.[ E L.b.I S S S S E [ D F h.L.E ` L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.. . y L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.f.U o.L._ S S S S S S S / L.h.U s.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.. . y L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.K.E ` L.o.L S S S S S E f.L.] E K.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.. . y L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.[ U a.L.N.^ P S Y W v.L.] L [ L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L./ Y [ L.L.L.L.L.L.L...P W L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.| _ Y _ s.J.L.J.s.^ L _ | L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.g.^ L L / P J W s.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.h.{ S ' l.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.I S S S S S S S J L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.I S S S S S S S J L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.",
+"L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.' _ _ _ _ _ _ _ ' L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L."
+};
Index: /openal-0.0.8/admin/autotools/.indent.pro
===================================================================
--- /openal-0.0.8/admin/autotools/.indent.pro	(revision 17)
+++ /openal-0.0.8/admin/autotools/.indent.pro	(revision 17)
@@ -0,0 +1,42 @@
+/* use GNU coding style */
+--gnu-style
+
+/* TABs are evil! */
+--no-tabs
+
+/* for more consistency */
+--swallow-optional-blank-lines
+
+/* OpenAL typedefs */
+-T ALboolean
+-T ALchar
+-T ALbyte
+-T ALubyte
+-T ALshort
+-T ALushort
+-T ALint
+-T ALuint
+-T ALsizei
+-T ALenum
+-T ALfloat
+-T ALdouble
+-T ALvoid
+-T ALCboolean
+-T ALCchar
+-T ALCbyte
+-T ALCubyte
+-T ALCshort
+-T ALCushort
+-T ALCint
+-T ALCuint
+-T ALCsizei
+-T ALCenum
+-T ALCfloat
+-T ALCdouble
+-T ALCvoid
+-T ALCdevice
+-T ALCcontext
+
+/* Our own internal types */
+-T ALC_Backend
+-T ALC_BackendPrivateData
Index: /openal-0.0.8/admin/autotools/compile
===================================================================
--- /openal-0.0.8/admin/autotools/compile	(revision 17)
+++ /openal-0.0.8/admin/autotools/compile	(revision 17)
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-02-03.08
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as `compile cc -o foo foo.c'.
+	# So we strip `-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
Index: /openal-0.0.8/admin/autotools/config.guess
===================================================================
--- /openal-0.0.8/admin/autotools/config.guess	(revision 17)
+++ /openal-0.0.8/admin/autotools/config.guess	(revision 17)
@@ -0,0 +1,1469 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-02-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_MACHINE}" in
+    i?86)
+	test -z "$VENDOR" && VENDOR=pc
+	;;
+    *)
+	test -z "$VENDOR" && VENDOR=unknown
+	;;
+esac
+test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
+    amd64:OpenBSD:*:*)
+	echo x86_64-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    cats:OpenBSD:*:*)
+	echo arm-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    luna88k:OpenBSD:*:*)
+    	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mips64-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:MirBSD:*:*)
+	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit 0 ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c \
+	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && exit 0
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    # avoid double evaluation of $set_cc_for_build
+	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    x86:Interix*:[34]*)
+	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+	exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    amd64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux
+	exit 0 ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux
+	exit 0 ;;
+    frv:Linux:*:*)
+    	echo frv-${VENDOR}-linux
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-${VENDOR}-linux
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-${VENDOR}-linux
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-${VENDOR}-linux ;;
+	  PA8*) echo hppa2.0-${VENDOR}-linux ;;
+	  *)    echo hppa-${VENDOR}-linux ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-${VENDOR}-linux
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit 0 ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR}-linux
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-${VENDOR}-linux
+	exit 0 ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
+		exit 0 ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linuxoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+	i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit 0 ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit 0 ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit 0 ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms && exit 0 ;;
+	    I*) echo ia64-dec-vms && exit 0 ;;
+	    V*) echo vax-dec-vms && exit 0 ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Index: /openal-0.0.8/admin/autotools/config.sub
===================================================================
--- /openal-0.0.8/admin/autotools/config.sub	(revision 17)
+++ /openal-0.0.8/admin/autotools/config.sub	(revision 17)
@@ -0,0 +1,1563 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-02-10'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| msp430 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| msp430-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16c)
+		basic_machine=cr16c-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+        -os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+        -tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+    	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Index: /openal-0.0.8/admin/autotools/depcomp
===================================================================
--- /openal-0.0.8/admin/autotools/depcomp	(revision 17)
+++ /openal-0.0.8/admin/autotools/depcomp	(revision 17)
@@ -0,0 +1,529 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-02-09.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
Index: /openal-0.0.8/admin/autotools/install-sh
===================================================================
--- /openal-0.0.8/admin/autotools/install-sh	(revision 17)
+++ /openal-0.0.8/admin/autotools/install-sh	(revision 17)
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-02-02.21
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
+
+    -T) no_target_directory=true
+	shift
+	continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+	for arg
+	do
+          if test -n "$dstarg"; then
+	    # $@ is not empty: it contains at least $arg.
+	    set fnord "$@" "$dstarg"
+	    shift # fnord
+	  fi
+	  shift # arg
+	  dstarg=$arg
+	done
+	break;;
+  esac
+done
+
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dstarg: Is a directory" >&2
+	exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+	# mkdir can fail with a `File exist' error in case several
+	# install-sh are creating the directory concurrently.  This
+	# is OK.
+	test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
+
+	   # Now remove or move aside any old file at destination location.
+	   # We try this two ways since rm can't unlink itself on some
+	   # systems and the destination file might be busy for other
+	   # reasons.  In this case, the final cleanup might fail but the new
+	   # file should still install successfully.
+	   {
+	     if test -f "$dstdir/$dstfile"; then
+	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+	       || {
+		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
Index: /openal-0.0.8/admin/autotools/ltmain.sh
===================================================================
--- /openal-0.0.8/admin/autotools/ltmain.sh	(revision 17)
+++ /openal-0.0.8/admin/autotools/ltmain.sh	(revision 17)
@@ -0,0 +1,6460 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.14
+TIMESTAMP=" (1.1220.2.195 2005/02/12 12:12:33)"
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
+  setopt NO_GLOB_SUBST
+fi
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+: ${IFS=" 	
+"}
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+quote_scanset='[[~#^*{};<>?'"'"' 	]'
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+      if test "X$win32_nmres" = "Ximport" ; then
+        win32_libid_type="x86 archive import"
+      else
+        win32_libid_type="x86 archive static"
+      fi
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	case $arg in
+	  *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	    # Double-quote args containing other shell metacharacters.
+	    case $arg in
+	      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    CC_quoted="$CC_quoted $arg"
+	  done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    f_ex_an_ar_lib=`$echo "X$f_ex_an_ar_oldlib" | $Xsed -e 's%^.*/%%'`
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+      $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+      $show "cp $f_ex_an_ar_oldlib $f_ex_an_ar_dir/$f_ex_an_ar_lib"
+      $run eval "cp \$f_ex_an_ar_oldlib \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
+      $AR t "$f_ex_an_ar_oldlib" | sort | uniq -c \
+	| $EGREP -v '^[ 	]*1[ 	]' | while read count name
+      do
+	i=1
+	while test "$i" -le "$count"
+	  do
+	  # Put our $i before any first dot (extension)
+	  # Never overwrite any file
+	  name_to="$name"
+	  while test "X$name_to" = "X$name" || test -f "$f_ex_an_ar_dir/$name_to"
+	    do
+	    name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+	  done
+	  $show "(cd $f_ex_an_ar_dir && $AR x  $f_ex_an_ar_lib '$name' && $mv '$name' '$name_to')"
+	  $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_lib '$name' && $mv '$name' '$name_to' && $AR -d \$f_ex_an_ar_lib '$name')" || exit $?
+	  i=`expr $i + 1`
+	done
+      done
+      $show "$rm $f_ex_an_ar_dir/$f_ex_an_ar_lib"
+      $run eval "$rm \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xdir="$my_gentop/$my_xlib"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $status
+      fi
+      case $host in
+      *-darwin*)
+	$show "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	if test -z "$run"; then
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+	  if test -n "$darwin_arches"; then 
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      lipo -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    ${rm}r unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd "$darwin_orig_dir"
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	fi # $run
+      ;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit $EXIT_FAILURE
+	;;
+      esac
+
+      case $tagname in
+      CC)
+	# Don't test for the "default" C tag, as we know, it's there, but
+	# not specially marked.
+	;;
+      *)
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+	  taglist="$taglist $tagname"
+	  # Evaluate the configuration.
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+	else
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
+	fi
+	;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $?
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $?
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    $echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $echo "enable shared libraries"
+    else
+      $echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $echo "enable static libraries"
+    else
+      $echo "disable static libraries"
+    fi
+    exit $?
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag) prevopt="--tag" prev=tag ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case "$arg_mode" in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
+
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
+	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+      $echo $srcfile > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $srcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+	$show "$mkdir ${xdir}$objdir"
+	$run $mkdir ${xdir}$objdir
+	status=$?
+	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $status
+	fi
+      fi
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	$show "$mv $output_obj $lobj"
+	if $run $mv $output_obj $lobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      else
+	command="$base_compile $srcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static)
+	if test "X$arg" = "X-all-static"; then
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	else
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	fi
+	build_libtool_libs=no
+	build_old_libs=yes
+	prefer_static_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat $save_arg`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		# If there is no directory component, then add one.
+		case $arg in
+		*/* | *\\*) . $arg ;;
+		*) . ./$arg ;;
+		esac
+
+		if test -z "$pic_object" || \
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none && \
+		   test "$non_pic_object" = none; then
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+
+		# Extract subdirectory from the argument.
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		if test "X$xdir" = "X$arg"; then
+		  xdir=
+		else
+		  xdir="$xdir/"
+		fi
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs="$libobjs $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if test -z "$run"; then
+		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+		  exit $EXIT_FAILURE
+		else
+		  # Dry-run case.
+
+		  # Extract subdirectory from the argument.
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		  if test "X$xdir" = "X$arg"; then
+		    xdir=
+		  else
+		    xdir="$xdir/"
+		  fi
+
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+		  libobjs="$libobjs $pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      fi
+	    done
+	  else
+	    $echo "$modename: link input file \`$save_arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	shrext)
+  	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+        darwin_framework)
+	  compiler_flags="$compiler_flags $arg"
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
+	  exit $EXIT_FAILURE
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework)
+        prev=darwin_framework
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-mingw* | *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs -framework System"
+	    continue
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+	compile_command="$compile_command $arg"
+	compiler_flags="$compiler_flags $arg"
+	finalize_command="$finalize_command $arg"
+	prev=xcompiler
+	continue
+	;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	compiler_flags="$compiler_flags $arg"
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        if test "$with_gcc" = "yes" ; then
+          compiler_flags="$compiler_flags $arg"
+        fi
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  # If there is no directory component, then add one.
+	  case $arg in
+	  */* | *\\*) . $arg ;;
+	  *) . ./$arg ;;
+	  esac
+
+	  if test -z "$pic_object" || \
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none && \
+	     test "$non_pic_object" = none; then
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$arg"; then
+	    xdir=
+ 	  else
+	    xdir="$xdir/"
+	  fi
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs="$libobjs $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if test -z "$run"; then
+	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+	    exit $EXIT_FAILURE
+	  else
+	    # Dry-run case.
+
+	    # Extract subdirectory from the argument.
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$arg"; then
+	      xdir=
+	    else
+	      xdir="$xdir/"
+	    fi
+
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+	    libobjs="$libobjs $pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    valid_a_lib=no
+	    case $deplibs_check_method in
+	      match_pattern*)
+		set dummy $deplibs_check_method
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+		if eval $echo \"$deplib\" 2>/dev/null \
+		    | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		  valid_a_lib=yes
+		fi
+		;;
+	      pass_all)
+		valid_a_lib=yes
+		;;
+            esac
+	    if test "$valid_a_lib" != yes; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
+	      $echo "*** I have the capability to make that library automatically link in when"
+	      $echo "*** you link to this library.  But I can only do this if you have a"
+	      $echo "*** shared version of the library, which you do not appear to have"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
+	    else
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit $EXIT_FAILURE
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+	        case "$tmp_libs " in
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	        esac
+              fi
+	      tmp_libs="$tmp_libs $deplib"
+	    done
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath " in
+	      *" $dir "*) ;;
+	      *" $absdir "*) ;;
+	      *) temp_rpath="$temp_rpath $dir" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	if test -n "$library_names" &&
+	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on
+	  # some systems (darwin)
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$extract_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$old_archive_from_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against
+		    # it, someone is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case "$libdir" in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit $EXIT_FAILURE
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case "$libdir" in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $echo "*** I have the capability to make that library automatically link in when"
+	    $echo "*** you link to this library.  But I can only do this if you have a"
+	    $echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$echo
+		$echo "*** However, this would only work if libtool was able to extract symbol"
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$echo "*** not find such a program.  So, this module is probably useless."
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    convenience="$convenience $dir/$old_library"
+	    old_convenience="$old_convenience $dir/$old_library"
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="$absdir/$objdir"
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit $EXIT_FAILURE
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="$absdir"
+		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs,
+		  # but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		    fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		  fi
+		  path=""
+		  ;;
+		*)
+		  path="-L$path"
+		  ;;
+		esac
+		;;
+	      -l*)
+		case $host in
+		*-*-darwin*)
+		  # Again, we only want to link against shared libraries
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		  for tmp in $newlib_search_path ; do
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
+		      break
+		    fi
+		  done
+		  path=""
+		  ;;
+		*) continue ;;
+		esac
+		;;
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$deplibs $path" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit $EXIT_FAILURE
+	else
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor - 1`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix | nonstopux)
+	  major=`expr $current - $age + 1`
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=.`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$echo "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+	         then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	if test -n "$removelist"; then
+	  $show "${rm}r $removelist"
+	  $run ${rm}r $removelist
+	fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      for path in $notinst_path; do
+	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+      done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs -framework System"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+ 	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  $LTCC -o conftest conftest.c $deplibs
+	  if test "$?" -eq 0 ; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" -ne "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; then
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $echo
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
+		    $echo "*** I have the capability to make that library automatically link in when"
+		    $echo "*** you link to this library.  But I can only do this if you have a"
+		    $echo "*** shared version of the library, which I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		$rm conftest
+		$LTCC -o conftest conftest.c $i
+		# Did it work?
+		if test "$?" -eq 0 ; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval \\$echo \"$libname_spec\"`
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		    set dummy $deplib_matches
+		    deplib_match=$2
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $echo
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
+		      $echo "*** I have the capability to make that library automatically link in when"
+		      $echo "*** you link to this library.  But I can only do this if you have a"
+		      $echo "*** shared version of the library, which you do not appear to have"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $echo
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $echo "***  make it link in!  You will probably need to install it or some"
+		  $echo "*** library that it depends on before this library will be fully"
+		  $echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | ${SED} 10q \
+			 | $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
+	    | grep . >/dev/null; then
+	    $echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $echo
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $echo "*** a static module, that should work as long as the dlopening"
+	    $echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $echo
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $echo "*** not find such a program.  So, this module is probably useless."
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
+	    $echo "*** automatically added whenever a program is linked with this library"
+	    $echo "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	realname="$2"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	  fi
+	fi
+	
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
+	else
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise.
+	  $echo "creating reloadable object files..."
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  delfiles=
+	  last_robj=
+	  k=1
+	  output=$output_objdir/$output_la-${k}.$objext
+	  # Loop over the list of objects to be linked.
+	  for obj in $save_libobjs
+	  do
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+	    if test "X$objlist" = X ||
+	       { len=`expr "X$test_cmds" : ".*"` &&
+		 test "$len" -le "$max_cmd_len"; }; then
+	      objlist="$objlist $obj"
+	    else
+	      # The command $test_cmds is almost too long, add a
+	      # command to the queue.
+	      if test "$k" -eq 1 ; then
+		# The first file doesn't have a previous command to add.
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+	      else
+		# All subsequent reloadable object files will link in
+		# the last one created.
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+	      fi
+	      last_robj=$output_objdir/$output_la-${k}.$objext
+	      k=`expr $k + 1`
+	      output=$output_objdir/$output_la-${k}.$objext
+	      objlist=$obj
+	      len=1
+	    fi
+	  done
+	  # Handle the remaining objects by creating one last
+	  # reloadable object file.  All subsequent reloadable object
+	  # files will link in the last one created.
+	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+	  # Set up a command to remove the reloadable object files
+	  # after they are used.
+	  i=0
+	  while test "$i" -lt "$k"
+	  do
+	    i=`expr $i + 1`
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+	  done
+
+	  $echo "creating a temporary reloadable object file: $output"
+
+	  # Loop through the commands generated above and execute them.
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $concat_cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    cmds=$archive_expsym_cmds
+	  else
+	    cmds=$archive_cmds
+	    fi
+	  fi
+
+	  # Append the command to remove the reloadable object files
+	  # to the just-reset $cmds.
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $run eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	cmds=$reload_cmds
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    if test -n "$export_symbols_regex"; then
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$outputname.exp"
+	      $run $rm $export_symbols
+	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	    else
+	      $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+"
+
+	    case $host in
+	    *cygwin* | *mingw* )
+	  $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+	      ;;
+	    * )
+	  $echo >> "$output_objdir/$dlsyms" "\
+const struct {
+"
+	      ;;
+	    esac
+
+
+	  $echo >> "$output_objdir/$dlsyms" "\
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case $dir in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
+	    cwrapper=`$echo ${output}.exe`
+	    $rm $cwrappersource $cwrapper
+	    trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  newargz[0] = "$SHELL";
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+  newargz[1] = fnqualify(argv[0]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha (name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+  size_t size;
+  char *p;
+  char tmp[LT_PATHMAX + 1];
+
+  assert(path != NULL);
+
+  /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha (path[0]) && path[1] == ':')
+    return xstrdup (path);
+#endif
+  if (IS_DIR_SEPARATOR (path[0]))
+    return xstrdup (path);
+
+  /* prepend the current directory */
+  /* doesn't handle '~' */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+  p = XMALLOC(char, size);
+  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+  return p;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+	  # we should really use a build-platform specific compiler
+	  # here, but OTOH, the wrappers (shell script and this C one)
+	  # are only useful if you want to execute the "real" binary.
+	  # Since the "real" binary is built for $host, then this
+	  # wrapper might as well be built for $host, too.
+	  $run $LTCC -s -o $cwrapper $cwrappersource
+	  ;;
+	esac
+	$rm $output
+	trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      exec \$progdir/\$program \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      exit $EXIT_FAILURE
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+	eval cmds=\"$old_archive_cmds\"
+
+	if len=`expr "X$cmds" : ".*"` &&
+	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  $echo "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+	  # GNU ar 2.10+ was changed to match POSIX; thus no paths are
+	  # encoded into archives.  This makes 'ar r' malfunction in
+	  # this piecewise linking case whenever conflicting object
+	  # names appear in distinct ar calls; check, warn and compensate.
+	    if (for obj in $save_oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	    :
+	  else
+	    $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
+	    $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
+	    AR_FLAGS=cq
+	  fi
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  for obj in $save_oldobjs
+	  do
+	    oldobjs="$objlist $obj"
+	    objlist="$objlist $obj"
+	    eval test_cmds=\"$old_archive_cmds\"
+	    if len=`expr "X$test_cmds" : ".*"` &&
+	       test "$len" -le "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest="$arg"
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) prev="-f" ;;
+      -g) prev="-g" ;;
+      -m) prev="-m" ;;
+      -o) prev="-o" ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*) ;;
+
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest="$arg"
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+	test "X$dir" = "X$file/" && dir=
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  cmds=$postinstall_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin*|*mingw*)
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case $lib in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir="/tmp"
+	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
+	      tmpdir="$tmpdir/libtool-$$"
+	      save_umask=`umask`
+	      umask 0077
+	      if $mkdir "$tmpdir"; then
+	        umask $save_umask
+	      else
+	        umask $save_umask
+		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+		continue
+	      fi
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyways
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  cmds=$finish_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $echo "----------------------------------------------------------------------"
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $echo "   $libdir"
+    done
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "----------------------------------------------------------------------"
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      if test "${save_LC_ALL+set}" = set; then
+	LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+	LANG="$save_LANG"; export LANG
+      fi
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\"\$cmd\"$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      eval \$echo \"\$cmd\"$args
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+	  if test "$mode" = uninstall; then
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      cmds=$postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      cmds=$old_postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+	  # Read the .lo file
+	  . $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" \
+	     && test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" \
+	     && test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+		    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+		    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+		    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $?
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
Index: /openal-0.0.8/admin/autotools/m4/acx_pthread.m4
===================================================================
--- /openal-0.0.8/admin/autotools/m4/acx_pthread.m4	(revision 17)
+++ /openal-0.0.8/admin/autotools/m4/acx_pthread.m4	(revision 17)
@@ -0,0 +1,246 @@
+dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+dnl
+dnl @summary figure out how to build C programs using POSIX threads
+dnl
+dnl This macro figures out how to build C programs using POSIX threads.
+dnl It sets the PTHREAD_LIBS output variable to the threads library and
+dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
+dnl C compiler flags that are needed. (The user can also force certain
+dnl compiler flags/libs to be tested by setting these environment
+dnl variables.)
+dnl
+dnl Also sets PTHREAD_CC to any special C compiler that is needed for
+dnl multi-threaded programs (defaults to the value of CC otherwise).
+dnl (This is necessary on AIX to use the special cc_r compiler alias.)
+dnl
+dnl NOTE: You are assumed to not only compile your program with these
+dnl flags, but also link it with them as well. e.g. you should link
+dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
+dnl $LIBS
+dnl
+dnl If you are only building threads programs, you may wish to use
+dnl these variables in your default LIBS, CFLAGS, and CC:
+dnl
+dnl        LIBS="$PTHREAD_LIBS $LIBS"
+dnl        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+dnl        CC="$PTHREAD_CC"
+dnl
+dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
+dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
+dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+dnl
+dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
+dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
+dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
+dnl default action will define HAVE_PTHREAD.
+dnl
+dnl Please let the authors know if this macro fails on any platform, or
+dnl if you have any other suggestions or comments. This macro was based
+dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
+dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
+dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
+dnl We are also grateful for the helpful feedback of numerous users.
+dnl
+dnl @category InstalledPackages
+dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
+dnl @version 2005-06-15
+dnl @license GPLWithACException
+
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+        ;;
+
+
+        *linux*)
+
+        # On Linux we want to actually link to pthread library, so test lib first
+
+        acx_pthread_flags="pthread -pthread --thread-safe pthread-config"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+		pthread-config)
+		AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+		if test x"$acx_pthread_config" = xno; then continue; fi
+		PTHREAD_CFLAGS="`pthread-config --cflags`"
+		PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+		;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        AC_TRY_LINK([#include <pthread.h>],
+                    [pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+                    [acx_pthread_ok=yes])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+	AC_MSG_CHECKING([for joinable pthread attribute])
+	attr_name=unknown
+	for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+	    AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
+                        [attr_name=$attr; break])
+	done
+        AC_MSG_RESULT($attr_name)
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+                               [Define to necessary symbol if this constant
+                                uses a non-standard name on your system.])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        flag=no
+        case "${host_cpu}-${host_os}" in
+            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        AC_MSG_RESULT(${flag})
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+else
+        PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+        :
+else
+        acx_pthread_ok=no
+        $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
Index: /openal-0.0.8/admin/autotools/m4/alut_c__attribute.m4
===================================================================
--- /openal-0.0.8/admin/autotools/m4/alut_c__attribute.m4	(revision 17)
+++ /openal-0.0.8/admin/autotools/m4/alut_c__attribute.m4	(revision 17)
@@ -0,0 +1,16 @@
+# ALUT_C__ATTRIBUTE__
+# -------------------
+AC_DEFUN([ALUT_C__ATTRIBUTE__],
+[AC_CACHE_CHECK([whether the C compiler supports __attribute__],
+  [alut_cv___attribute__],
+  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+    void  foo (int bar __attribute__((unused)) ) { }
+    static void baz (void) __attribute__((unused));
+    static void baz (void) { }]])],
+    [alut_cv___attribute__=yes],
+    [alut_cv___attribute__=no])])
+if test "$alut_cv___attribute__" = yes; then
+  AC_DEFINE([HAVE___ATTRIBUTE__], [1],
+            [Define to 1 if your C compiler supports __attribute__.])
+fi
+])# ALUT_C__ATTRIBUTE__
Index: /openal-0.0.8/admin/autotools/m4/alut_check_cflags_wall.m4
===================================================================
--- /openal-0.0.8/admin/autotools/m4/alut_check_cflags_wall.m4	(revision 17)
+++ /openal-0.0.8/admin/autotools/m4/alut_check_cflags_wall.m4	(revision 17)
@@ -0,0 +1,120 @@
+dnl NOTE: This is a modified version of ax_cflags_warn_all_ansi.m4
+dnl from the autoconf archive, updated to conform to more recent
+dnl autoconf standards. The original header follows...
+
+dnl @synopsis AX_CFLAGS_WARN_ALL_ANSI [(shellvar [,default, [A/NA]])]
+dnl
+dnl Try to find a compiler option that enables most reasonable
+dnl warnings. This macro is directly derived from VL_PROG_CC_WARNINGS
+dnl which is split up into two AX_CFLAGS_WARN_ALL and
+dnl AX_CFLAGS_WARN_ALL_ANSI
+dnl
+dnl For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The
+dnl result is added to the shellvar being CFLAGS by default.
+dnl
+dnl Currently this macro knows about GCC, Solaris C compiler, Digital
+dnl Unix C compiler, C for AIX Compiler, HP-UX C compiler, IRIX C
+dnl compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos
+dnl 10.0.0.8) C compiler.
+dnl
+dnl  - $1 shell-variable-to-add-to : CFLAGS
+dnl  - $2 add-value-if-not-found : nothing
+dnl  - $3 action-if-found : add value to shellvariable
+dnl  - $4 action-if-not-found : nothing
+dnl
+dnl @category C
+dnl @author Guido Draheim <guidod@gmx.de>
+dnl @version 2003-01-06
+dnl @license GPLWithACException
+
+AC_DEFUN([AX_CFLAGS_WARN_ALL_ANSI],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all_ansi])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ANSI warnings],
+VAR,[VAR="no, unknown"
+ AC_LANG_PUSH([C])
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+#      -use_readonly_const is the default for IRIX C,
+#       puts them into .rodata, but they are copied later.
+#       need to be "-G0 -rdatashared" for strictmode but
+#       I am not sure what effect that has really.         - guidod
+for ac_arg dnl
+in "-pedantic  % -Wall -ansi -pedantic"       dnl   GCC
+   "-xstrconst % -v -Xc"                      dnl Solaris C
+   "-std1      % -verbose -w0 -warnprotos -std1" dnl Digital Unix
+   " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+   " % -ansi -ansiE -fullwarn"                dnl IRIX
+   "+ESlit     % +w1 -Aa"                     dnl HP-UX C
+   "-Xc        % -pvctl[,]fullmsg -Xc"        dnl NEC SX-5 (Super-UX 10)
+   "-h conform % -h msglevel 2 -h conform"    dnl Cray C (Unicos)
+   #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
+   [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_POP([C])
+])
+case ".$VAR" in
+     .ok|.ok,*) m4_ifvaln($3,$3) ;;
+   .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+        AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+                      m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+   *) m4_ifvaln($3,$3,[
+   if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+   then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+   else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+                      m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+   fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
+
+dnl the only difference - the LANG selection... and the default FLAGS
+
+AC_DEFUN([AX_CXXFLAGS_WARN_ALL_ANSI],[dnl
+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
+AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all_ansi])dnl
+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ANSI warnings],
+VAR,[VAR="no, unknown"
+ AC_LANG_PUSH([C++])
+ ac_save_[]FLAGS="$[]FLAGS"
+# IRIX C compiler:
+#      -use_readonly_const is the default for IRIX C,
+#       puts them into .rodata, but they are copied later.
+#       need to be "-G0 -rdatashared" for strictmode but
+#       I am not sure what effect that has really.         - guidod
+for ac_arg dnl
+in "-pedantic  % -Wall -ansi -pedantic"       dnl   GCC
+   "-xstrconst % -v -Xc"                      dnl Solaris C
+   "-std1      % -verbose -w0 -warnprotos -std1" dnl Digital Unix
+   " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
+   " % -ansi -ansiE -fullwarn"                dnl IRIX
+   "+ESlit     % +w1 -Aa"                     dnl HP-UX C
+   "-Xc        % -pvctl[,]fullmsg -Xc"        dnl NEC SX-5 (Super-UX 10)
+   "-h conform % -h msglevel 2 -h conform"    dnl Cray C (Unicos)
+   #
+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
+   [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
+done
+ FLAGS="$ac_save_[]FLAGS"
+ AC_LANG_POP([C++])
+])
+case ".$VAR" in
+     .ok|.ok,*) m4_ifvaln($3,$3) ;;
+   .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
+        AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
+                      m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
+   *) m4_ifvaln($3,$3,[
+   if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
+   then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
+   else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
+                      m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
+   fi ]) ;;
+esac
+AS_VAR_POPDEF([VAR])dnl
+AS_VAR_POPDEF([FLAGS])dnl
+])
Index: /openal-0.0.8/admin/autotools/m4/alut_check_flag.m4
===================================================================
--- /openal-0.0.8/admin/autotools/m4/alut_check_flag.m4	(revision 17)
+++ /openal-0.0.8/admin/autotools/m4/alut_check_flag.m4	(revision 17)
@@ -0,0 +1,28 @@
+# ALUT_CHECK_FLAG(FLAG, [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED])
+# -----------------------------------------------------------------------
+# Check to see whether the compiler for the current language supports a
+# particular option.
+#
+# Implementation note: When given an unkown option, some GCC versions issue an
+# warning on stderr only, but return an exit value of 0 nevertheless.
+# Consequently we have to check stderr *and* the exit value.
+AC_DEFUN([ALUT_CHECK_FLAG],
+[AC_LANG_COMPILER_REQUIRE()dnl
+AC_LANG_CASE([C],          [alut_compiler="$CC"  m4_pushdef([alut_Flags], [CFLAGS])],
+             [C++],        [alut_compiler="$CXX" m4_pushdef([alut_Flags], [CXXFLAGS])],
+             [Fortran 77], [alut_compiler="$F77" m4_pushdef([alut_Flags], [FFLAGS])])
+m4_pushdef([alut_Cache], [alut_cv_[]alut_Flags[]AS_TR_SH([$1])])[]dnl
+AC_CACHE_CHECK([whether $alut_compiler accepts $1], [alut_Cache],
+[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
+alut_save_flags="$alut_Flags"
+alut_Flags="$alut_Flags $1"
+alut_Cache=no
+if ALUT_EVAL_STDERR([$ac_compile conftest.$ac_ext]) >/dev/null; then
+  test -s conftest.err || alut_Cache=yes
+fi
+alut_Flags="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext])
+AS_IF([test $alut_Cache = yes], [$2], [$3])[]dnl
+m4_popdef([alut_Cache])[]dnl
+m4_popdef([alut_Flags])[]dnl
+])# ALUT_CHECK_FLAG
Index: /openal-0.0.8/admin/autotools/m4/alut_eval_stderr.m4
===================================================================
--- /openal-0.0.8/admin/autotools/m4/alut_eval_stderr.m4	(revision 17)
+++ /openal-0.0.8/admin/autotools/m4/alut_eval_stderr.m4	(revision 17)
@@ -0,0 +1,11 @@
+# ALUT_EVAL_STDERR(COMMAND)
+# -------------------------
+# Eval COMMAND, save its stderr (without lines resulting from shell tracing)
+# into the file conftest.err and the exit status in the variable alut_status.
+AC_DEFUN([ALUT_EVAL_STDERR],
+[{ (eval $1) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); }[]dnl
+])# ALUT_EVAL_STDERR
Index: /openal-0.0.8/admin/autotools/missing
===================================================================
--- /openal-0.0.8/admin/autotools/missing	(revision 17)
+++ /openal-0.0.8/admin/autotools/missing	(revision 17)
@@ -0,0 +1,357 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-02-08.22
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
Index: /openal-0.0.8/admin/pkgconfig/Makefile.am
===================================================================
--- /openal-0.0.8/admin/pkgconfig/Makefile.am	(revision 17)
+++ /openal-0.0.8/admin/pkgconfig/Makefile.am	(revision 17)
@@ -0,0 +1,3 @@
+pkgconfigdir   = $(libdir)/pkgconfig
+pkgconfig_DATA = openal.pc
+bin_SCRIPTS    = openal-config
Index: /openal-0.0.8/admin/pkgconfig/Makefile.in
===================================================================
--- /openal-0.0.8/admin/pkgconfig/Makefile.in	(revision 17)
+++ /openal-0.0.8/admin/pkgconfig/Makefile.in	(revision 17)
@@ -0,0 +1,442 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = admin/pkgconfig
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/openal-config.in $(srcdir)/openal.pc.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/admin/autotools/m4/acx_pthread.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = openal-config openal.pc
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(bin_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSC_CONFIG = @ARTSC_CONFIG@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLEEXTENSIONALEXTMP3_FALSE = @ENABLEEXTENSIONALEXTMP3_FALSE@
+ENABLEEXTENSIONALEXTMP3_TRUE = @ENABLEEXTENSIONALEXTMP3_TRUE@
+ENABLEEXTENSIONALEXTVORBIS_FALSE = @ENABLEEXTENSIONALEXTVORBIS_FALSE@
+ENABLEEXTENSIONALEXTVORBIS_TRUE = @ENABLEEXTENSIONALEXTVORBIS_TRUE@
+ESD_CONFIG = @ESD_CONFIG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEATURECFLAGS = @FEATURECFLAGS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+NASM = @NASM@
+NASM_FORMAT = @NASM_FORMAT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZATIONCFLAGS = @OPTIMIZATIONCFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PROFILINGLDFLAGS = @PROFILINGLDFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SDL_CONFIG = @SDL_CONFIG@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZEOF_VOID_P = @SIZEOF_VOID_P@
+SMPEG_CONFIG = @SMPEG_CONFIG@
+STRIP = @STRIP@
+USEBACKENDALSA_FALSE = @USEBACKENDALSA_FALSE@
+USEBACKENDALSA_TRUE = @USEBACKENDALSA_TRUE@
+USEBACKENDARTS_FALSE = @USEBACKENDARTS_FALSE@
+USEBACKENDARTS_TRUE = @USEBACKENDARTS_TRUE@
+USEBACKENDESD_FALSE = @USEBACKENDESD_FALSE@
+USEBACKENDESD_TRUE = @USEBACKENDESD_TRUE@
+USEBACKENDNATIVEBSD_FALSE = @USEBACKENDNATIVEBSD_FALSE@
+USEBACKENDNATIVEBSD_TRUE = @USEBACKENDNATIVEBSD_TRUE@
+USEBACKENDNATIVEDARWIN_FALSE = @USEBACKENDNATIVEDARWIN_FALSE@
+USEBACKENDNATIVEDARWIN_TRUE = @USEBACKENDNATIVEDARWIN_TRUE@
+USEBACKENDNATIVEIRIX_FALSE = @USEBACKENDNATIVEIRIX_FALSE@
+USEBACKENDNATIVEIRIX_TRUE = @USEBACKENDNATIVEIRIX_TRUE@
+USEBACKENDNATIVELINUX_FALSE = @USEBACKENDNATIVELINUX_FALSE@
+USEBACKENDNATIVELINUX_TRUE = @USEBACKENDNATIVELINUX_TRUE@
+USEBACKENDNATIVEMORPHOS_FALSE = @USEBACKENDNATIVEMORPHOS_FALSE@
+USEBACKENDNATIVEMORPHOS_TRUE = @USEBACKENDNATIVEMORPHOS_TRUE@
+USEBACKENDNATIVESOLARIS_FALSE = @USEBACKENDNATIVESOLARIS_FALSE@
+USEBACKENDNATIVESOLARIS_TRUE = @USEBACKENDNATIVESOLARIS_TRUE@
+USEBACKENDNATIVEWINDOWS_FALSE = @USEBACKENDNATIVEWINDOWS_FALSE@
+USEBACKENDNATIVEWINDOWS_TRUE = @USEBACKENDNATIVEWINDOWS_TRUE@
+USEBACKENDNULL_FALSE = @USEBACKENDNULL_FALSE@
+USEBACKENDNULL_TRUE = @USEBACKENDNULL_TRUE@
+USEBACKENDSDL_FALSE = @USEBACKENDSDL_FALSE@
+USEBACKENDSDL_TRUE = @USEBACKENDSDL_TRUE@
+USEBACKENDWAVEOUT_FALSE = @USEBACKENDWAVEOUT_FALSE@
+USEBACKENDWAVEOUT_TRUE = @USEBACKENDWAVEOUT_TRUE@
+VERSION = @VERSION@
+WARNINGCFLAGS = @WARNINGCFLAGS@
+X86ENABLED_FALSE = @X86ENABLED_FALSE@
+X86ENABLED_TRUE = @X86ENABLED_TRUE@
+X86MMXENABLED_FALSE = @X86MMXENABLED_FALSE@
+X86MMXENABLED_TRUE = @X86MMXENABLED_TRUE@
+X86NASMENABLED_FALSE = @X86NASMENABLED_FALSE@
+X86NASMENABLED_TRUE = @X86NASMENABLED_TRUE@
+X86NASMMMXENABLED_FALSE = @X86NASMMMXENABLED_FALSE@
+X86NASMMMXENABLED_TRUE = @X86NASMMMXENABLED_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = openal.pc
+bin_SCRIPTS = openal-config
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  admin/pkgconfig/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  admin/pkgconfig/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+openal-config: $(top_builddir)/config.status $(srcdir)/openal-config.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+openal.pc: $(top_builddir)/config.status $(srcdir)/openal.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f $$d$$p; then \
+	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	    echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	    $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-pkgconfigDATA: $(pkgconfig_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
+	@list='$(pkgconfig_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+	  $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+	done
+
+uninstall-pkgconfigDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgconfig_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgconfigDATA
+
+install-exec-am: install-binSCRIPTS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-info-am \
+	uninstall-pkgconfigDATA
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binSCRIPTS install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-pkgconfigDATA install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-binSCRIPTS uninstall-info-am uninstall-pkgconfigDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /openal-0.0.8/admin/pkgconfig/openal-config.in
===================================================================
--- /openal-0.0.8/admin/pkgconfig/openal-config.in	(revision 17)
+++ /openal-0.0.8/admin/pkgconfig/openal-config.in	(revision 17)
@@ -0,0 +1,176 @@
+#!/bin/sh
+
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+bindir="@bindir@"
+includedir="@includedir@"
+libdir="@libdir@"
+PACKAGE_VERSION="@PACKAGE_VERSION@"
+# PTHREAD_CFLAGS="@PTHREAD_CFLAGS@"
+# PTHREAD_LIBS="@PTHREAD_LIBS@"
+
+openal_dynamic_ldflags="-lopenal"
+# TODO: configure should provide the following...
+openal_static_ldflags="-lopenal"
+
+prefix_set=no
+echo_prefix=no
+exec_prefix_set=no
+echo_exec_prefix=no
+bindir_set=no
+echo_bindir=no
+includedir_set=no
+echo_includedir=no
+libdir_set=no
+echo_libdir=no
+echo_version=no
+echo_cflags=no
+static_libs=no
+echo_libs=no
+
+usage()
+{
+  cat <<EOF 1>&2
+Usage: openal-config [OPTIONS]
+Options:
+  --prefix[=DIR]       print/set default prefix
+  --exec-prefix[=DIR]  print/set prefix for machine-specific files
+  --bindir[=DIR]       print/set prefix for executable programs
+  --includedir[=DIR]   print/set prefix for include files
+  --libdir[=DIR]       print/set prefix for libraries
+  --version            print OpenAL package version
+  --cflags             print flags for C compiler
+  --static             specify that static linker flags are wanted
+  --libs               print flags for linker
+EOF
+  exit 1
+}
+
+if test $# -eq 0; then
+  usage
+fi
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg="" ;;
+  esac
+
+  case $1 in
+    --prefix=*)
+      prefix="${optarg}"
+      prefix_set="yes"
+      ;;
+    --prefix)
+      echo_prefix="yes"
+      ;;
+    --exec-prefix=*)
+      exec_prefix="${optarg}"
+      exec_prefix_set="yes"
+      ;;
+    --exec-prefix)
+      echo_exec_prefix="yes"
+      ;;
+    --bindir=*)
+      bindir="${optarg}"
+      bindir_set="yes"
+      ;;
+    --bindir)
+      echo_bindir="yes"
+      ;;
+    --includedir=*)
+      includedir="${optarg}"
+      includedir_set="yes"
+      ;;
+    --includedir)
+      echo_includedir="yes"
+      ;;
+    --libdir=*)
+      libdir="${optarg}"
+      libdir_set="yes"
+      ;;
+    --libdir)
+      echo_libdir="yes"
+      ;;
+    --version)
+      echo_version="yes"
+      ;;
+    --cflags)
+      echo_cflags="yes"
+      ;;
+    --static)
+      static_libs="yes"
+      ;;
+    --libs)
+      echo_libs="yes"
+      ;;
+    *)
+      usage
+      ;;
+  esac
+  shift
+done
+
+if test "${echo_prefix}" = "yes"; then
+  echo "${prefix}"
+fi
+
+if test "${exec_prefix_set}" = "no" && test "${prefix_set}" = "yes"; then
+  exec_prefix="$prefix"
+  exec_prefix_set="yes"
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+  echo "${exec_prefix}"
+fi
+
+if test "${bindir_set}" = "no" && test "${exec_prefix_set}" = "yes"; then
+  bindir="${exec_prefix}/bin"
+fi
+
+if test "$echo_bindir" = "yes"; then
+  echo "${bindir}"
+fi
+
+if test "${includedir_set}" = "no" && test "${prefix_set}" = "yes"; then
+  includedir="${prefix}/include"
+fi
+
+if test "$echo_includedir" = "yes"; then
+  echo "${includedir}"
+fi
+
+if test "${libdir_set}" = "no" && test "${exec_prefix_set}" = "yes"; then
+  libdir="${exec_prefix}/lib"
+fi
+
+if test "$echo_libdir" = "yes"; then
+  echo "${libdir}"
+fi
+
+if test "$echo_version" = "yes"; then
+  echo "${PACKAGE_VERSION}"
+fi
+
+if test "$echo_cflags" = "yes"; then
+  if test "${includedir}" = "/usr/include" ; then
+    incpath=""
+  else
+    incpath="-I${includedir}"
+  fi
+  echo "${PTHREAD_CFLAGS} ${incpath}"
+fi
+
+if test "$echo_libs" = "yes"; then
+  if test "${libdir}" = "/usr/lib" ; then
+    libpathflag=""
+  else
+    libpathflag="-L${libdir}"
+  fi
+  if test "${static_libs}" = "yes"; then
+     ldflags="${openal_static_ldflags}"
+  else
+     ldflags="${openal_dynamic_ldflags}"
+  fi
+  echo "${libpathflag} ${ldflags} ${PTHREAD_LIBS}"
+fi
Index: /openal-0.0.8/admin/pkgconfig/openal.pc.in
===================================================================
--- /openal-0.0.8/admin/pkgconfig/openal.pc.in	(revision 17)
+++ /openal-0.0.8/admin/pkgconfig/openal.pc.in	(revision 17)
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: OpenAL
+Description:  OpenAL is a cross-platform 3D audio API.
+Requires: @requirements@
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lopenal
+Cflags: -I${includedir}
+
Index: /openal-0.0.8/autogen.sh
===================================================================
--- /openal-0.0.8/autogen.sh	(revision 17)
+++ /openal-0.0.8/autogen.sh	(revision 17)
@@ -0,0 +1,2 @@
+#! /bin/sh
+autoreconf --install --force --warnings=all
Index: /openal-0.0.8/common/Makefile.am
===================================================================
--- /openal-0.0.8/common/Makefile.am	(revision 17)
+++ /openal-0.0.8/common/Makefile.am	(revision 17)
@@ -0,0 +1,2 @@
+SUBDIRS = include
+
Index: /openal-0.0.8/common/Makefile.in
===================================================================
--- /openal-0.0.8/common/Makefile.in	(revision 17)
+++ /openal-0.0.8/common/Makefile.in	(revision 17)
@@ -0,0 +1,538 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = common
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/admin/autotools/m4/acx_pthread.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSC_CONFIG = @ARTSC_CONFIG@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLEEXTENSIONALEXTMP3_FALSE = @ENABLEEXTENSIONALEXTMP3_FALSE@
+ENABLEEXTENSIONALEXTMP3_TRUE = @ENABLEEXTENSIONALEXTMP3_TRUE@
+ENABLEEXTENSIONALEXTVORBIS_FALSE = @ENABLEEXTENSIONALEXTVORBIS_FALSE@
+ENABLEEXTENSIONALEXTVORBIS_TRUE = @ENABLEEXTENSIONALEXTVORBIS_TRUE@
+ESD_CONFIG = @ESD_CONFIG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEATURECFLAGS = @FEATURECFLAGS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+NASM = @NASM@
+NASM_FORMAT = @NASM_FORMAT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZATIONCFLAGS = @OPTIMIZATIONCFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PROFILINGLDFLAGS = @PROFILINGLDFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SDL_CONFIG = @SDL_CONFIG@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZEOF_VOID_P = @SIZEOF_VOID_P@
+SMPEG_CONFIG = @SMPEG_CONFIG@
+STRIP = @STRIP@
+USEBACKENDALSA_FALSE = @USEBACKENDALSA_FALSE@
+USEBACKENDALSA_TRUE = @USEBACKENDALSA_TRUE@
+USEBACKENDARTS_FALSE = @USEBACKENDARTS_FALSE@
+USEBACKENDARTS_TRUE = @USEBACKENDARTS_TRUE@
+USEBACKENDESD_FALSE = @USEBACKENDESD_FALSE@
+USEBACKENDESD_TRUE = @USEBACKENDESD_TRUE@
+USEBACKENDNATIVEBSD_FALSE = @USEBACKENDNATIVEBSD_FALSE@
+USEBACKENDNATIVEBSD_TRUE = @USEBACKENDNATIVEBSD_TRUE@
+USEBACKENDNATIVEDARWIN_FALSE = @USEBACKENDNATIVEDARWIN_FALSE@
+USEBACKENDNATIVEDARWIN_TRUE = @USEBACKENDNATIVEDARWIN_TRUE@
+USEBACKENDNATIVEIRIX_FALSE = @USEBACKENDNATIVEIRIX_FALSE@
+USEBACKENDNATIVEIRIX_TRUE = @USEBACKENDNATIVEIRIX_TRUE@
+USEBACKENDNATIVELINUX_FALSE = @USEBACKENDNATIVELINUX_FALSE@
+USEBACKENDNATIVELINUX_TRUE = @USEBACKENDNATIVELINUX_TRUE@
+USEBACKENDNATIVEMORPHOS_FALSE = @USEBACKENDNATIVEMORPHOS_FALSE@
+USEBACKENDNATIVEMORPHOS_TRUE = @USEBACKENDNATIVEMORPHOS_TRUE@
+USEBACKENDNATIVESOLARIS_FALSE = @USEBACKENDNATIVESOLARIS_FALSE@
+USEBACKENDNATIVESOLARIS_TRUE = @USEBACKENDNATIVESOLARIS_TRUE@
+USEBACKENDNATIVEWINDOWS_FALSE = @USEBACKENDNATIVEWINDOWS_FALSE@
+USEBACKENDNATIVEWINDOWS_TRUE = @USEBACKENDNATIVEWINDOWS_TRUE@
+USEBACKENDNULL_FALSE = @USEBACKENDNULL_FALSE@
+USEBACKENDNULL_TRUE = @USEBACKENDNULL_TRUE@
+USEBACKENDSDL_FALSE = @USEBACKENDSDL_FALSE@
+USEBACKENDSDL_TRUE = @USEBACKENDSDL_TRUE@
+USEBACKENDWAVEOUT_FALSE = @USEBACKENDWAVEOUT_FALSE@
+USEBACKENDWAVEOUT_TRUE = @USEBACKENDWAVEOUT_TRUE@
+VERSION = @VERSION@
+WARNINGCFLAGS = @WARNINGCFLAGS@
+X86ENABLED_FALSE = @X86ENABLED_FALSE@
+X86ENABLED_TRUE = @X86ENABLED_TRUE@
+X86MMXENABLED_FALSE = @X86MMXENABLED_FALSE@
+X86MMXENABLED_TRUE = @X86MMXENABLED_TRUE@
+X86NASMENABLED_FALSE = @X86NASMENABLED_FALSE@
+X86NASMENABLED_TRUE = @X86NASMENABLED_TRUE@
+X86NASMMMXENABLED_FALSE = @X86NASMMMXENABLED_FALSE@
+X86NASMMMXENABLED_TRUE = @X86NASMMMXENABLED_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+SUBDIRS = include
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  common/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  common/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libtool clean-recursive ctags \
+	ctags-recursive distclean distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /openal-0.0.8/common/include/AL/al.h
===================================================================
--- /openal-0.0.8/common/include/AL/al.h	(revision 17)
+++ /openal-0.0.8/common/include/AL/al.h	(revision 17)
@@ -0,0 +1,744 @@
+#ifndef AL_AL_H
+#define AL_AL_H
+
+/**
+ * OpenAL cross platform audio library
+ * Copyright (C) 1999-2000 by authors.
+ * This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ *  License along with this library; if not, write to the
+ *  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ *  Boston, MA  02111-1307, USA.
+ * Or go to http://www.gnu.org/copyleft/lgpl.html
+ */
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(_WIN32) && !defined(_XBOX)
+ /* _OPENAL32LIB is deprecated */
+ #if defined(AL_BUILD_LIBRARY) || defined (_OPENAL32LIB)
+  #define AL_API __declspec(dllexport)
+ #else
+  #define AL_API __declspec(dllimport)
+ #endif
+#else
+ #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY)
+  #define AL_API __attribute__((visibility("default")))
+ #else
+  #define AL_API extern
+ #endif
+#endif
+
+#if defined(_WIN32)
+ #define AL_APIENTRY __cdecl
+#else
+ #define AL_APIENTRY
+#endif
+
+#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
+ #pragma export on
+#endif
+
+/*
+ * The OPENAL, ALAPI, ALAPIENTRY, AL_INVALID, AL_ILLEGAL_ENUM, and
+ * AL_ILLEGAL_COMMAND macros are deprecated, but are included for
+ * applications porting code from AL 1.0
+ */
+#define OPENAL
+#define ALAPI AL_API
+#define ALAPIENTRY AL_APIENTRY
+#define AL_INVALID                                (-1)
+#define AL_ILLEGAL_ENUM                           AL_INVALID_ENUM
+#define AL_ILLEGAL_COMMAND                        AL_INVALID_OPERATION
+
+#define AL_VERSION_1_0
+#define AL_VERSION_1_1
+
+
+/** 8-bit boolean */
+typedef char ALboolean;
+
+/** character */
+typedef char ALchar;
+
+/** signed 8-bit 2's complement integer */
+typedef char ALbyte;
+
+/** unsigned 8-bit integer */
+typedef unsigned char ALubyte;
+
+/** signed 16-bit 2's complement integer */
+typedef short ALshort;
+
+/** unsigned 16-bit integer */
+typedef unsigned short ALushort;
+
+/** signed 32-bit 2's complement integer */
+typedef int ALint;
+
+/** unsigned 32-bit integer */
+typedef unsigned int ALuint;
+
+/** non-negative 32-bit binary integer size */
+typedef int ALsizei;
+
+/** enumerated 32-bit value */
+typedef int ALenum;
+
+/** 32-bit IEEE754 floating-point */
+typedef float ALfloat;
+
+/** 64-bit IEEE754 floating-point */
+typedef double ALdouble;
+
+/** void type (for opaque pointers only) */
+typedef void ALvoid;
+
+
+/* Enumerant values begin at column 50. No tabs. */
+
+/* "no distance model" or "no buffer" */
+#define AL_NONE                                   0
+
+/* Boolean False. */
+#define AL_FALSE                                  0
+
+/** Boolean True. */
+#define AL_TRUE                                   1
+
+/** Indicate Source has relative coordinates. */
+#define AL_SOURCE_RELATIVE                        0x202
+
+
+
+/**
+ * Directional source, inner cone angle, in degrees.
+ * Range:    [0-360] 
+ * Default:  360
+ */
+#define AL_CONE_INNER_ANGLE                       0x1001
+
+/**
+ * Directional source, outer cone angle, in degrees.
+ * Range:    [0-360] 
+ * Default:  360
+ */
+#define AL_CONE_OUTER_ANGLE                       0x1002
+
+/**
+ * Specify the pitch to be applied, either at source,
+ *  or on mixer results, at listener.
+ * Range:   [0.5-2.0]
+ * Default: 1.0
+ */
+#define AL_PITCH                                  0x1003
+  
+/** 
+ * Specify the current location in three dimensional space.
+ * OpenAL, like OpenGL, uses a right handed coordinate system,
+ *  where in a frontal default view X (thumb) points right, 
+ *  Y points up (index finger), and Z points towards the
+ *  viewer/camera (middle finger). 
+ * To switch from a left handed coordinate system, flip the
+ *  sign on the Z coordinate.
+ * Listener position is always in the world coordinate system.
+ */ 
+#define AL_POSITION                               0x1004
+  
+/** Specify the current direction. */
+#define AL_DIRECTION                              0x1005
+  
+/** Specify the current velocity in three dimensional space. */
+#define AL_VELOCITY                               0x1006
+
+/**
+ * Indicate whether source is looping.
+ * Type: ALboolean?
+ * Range:   [AL_TRUE, AL_FALSE]
+ * Default: FALSE.
+ */
+#define AL_LOOPING                                0x1007
+
+/**
+ * Indicate the buffer to provide sound samples. 
+ * Type: ALuint.
+ * Range: any valid Buffer id.
+ */
+#define AL_BUFFER                                 0x1009
+  
+/**
+ * Indicate the gain (volume amplification) applied. 
+ * Type:   ALfloat.
+ * Range:  ]0.0-  ]
+ * A value of 1.0 means un-attenuated/unchanged.
+ * Each division by 2 equals an attenuation of -6dB.
+ * Each multiplicaton with 2 equals an amplification of +6dB.
+ * A value of 0.0 is meaningless with respect to a logarithmic
+ *  scale; it is interpreted as zero volume - the channel
+ *  is effectively disabled.
+ */
+#define AL_GAIN                                   0x100A
+
+/*
+ * Indicate minimum source attenuation
+ * Type: ALfloat
+ * Range:  [0.0 - 1.0]
+ *
+ * Logarthmic
+ */
+#define AL_MIN_GAIN                               0x100D
+
+/**
+ * Indicate maximum source attenuation
+ * Type: ALfloat
+ * Range:  [0.0 - 1.0]
+ *
+ * Logarthmic
+ */
+#define AL_MAX_GAIN                               0x100E
+
+/**
+ * Indicate listener orientation.
+ *
+ * at/up 
+ */
+#define AL_ORIENTATION                            0x100F
+
+/**
+ * Source state information.
+ */
+#define AL_SOURCE_STATE                           0x1010
+#define AL_INITIAL                                0x1011
+#define AL_PLAYING                                0x1012
+#define AL_PAUSED                                 0x1013
+#define AL_STOPPED                                0x1014
+
+/**
+ * Buffer Queue params
+ */
+#define AL_BUFFERS_QUEUED                         0x1015
+#define AL_BUFFERS_PROCESSED                      0x1016
+
+/**
+ * Source buffer position information
+ */
+#define AL_SEC_OFFSET                             0x1024
+#define AL_SAMPLE_OFFSET                          0x1025
+#define AL_BYTE_OFFSET                            0x1026
+
+/*
+ * Source type (Static, Streaming or undetermined)
+ * Source is Static if a Buffer has been attached using AL_BUFFER
+ * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers
+ * Source is undetermined when it has the NULL buffer attached
+ */
+#define AL_SOURCE_TYPE                            0x1027
+#define AL_STATIC                                 0x1028
+#define AL_STREAMING                              0x1029
+#define AL_UNDETERMINED                           0x1030
+
+/** Sound samples: format specifier. */
+#define AL_FORMAT_MONO8                           0x1100
+#define AL_FORMAT_MONO16                          0x1101
+#define AL_FORMAT_STEREO8                         0x1102
+#define AL_FORMAT_STEREO16                        0x1103
+
+/**
+ * source specific reference distance
+ * Type: ALfloat
+ * Range:  0.0 - +inf
+ *
+ * At 0.0, no distance attenuation occurs.  Default is
+ * 1.0.
+ */
+#define AL_REFERENCE_DISTANCE                     0x1020
+
+/**
+ * source specific rolloff factor
+ * Type: ALfloat
+ * Range:  0.0 - +inf
+ *
+ */
+#define AL_ROLLOFF_FACTOR                         0x1021
+
+/**
+ * Directional source, outer cone gain.
+ *
+ * Default:  0.0
+ * Range:    [0.0 - 1.0]
+ * Logarithmic
+ */
+#define AL_CONE_OUTER_GAIN                        0x1022
+
+/**
+ * Indicate distance above which sources are not
+ * attenuated using the inverse clamped distance model.
+ *
+ * Default: +inf
+ * Type: ALfloat
+ * Range:  0.0 - +inf
+ */
+#define AL_MAX_DISTANCE                           0x1023
+
+/** 
+ * Sound samples: frequency, in units of Hertz [Hz].
+ * This is the number of samples per second. Half of the
+ *  sample frequency marks the maximum significant
+ *  frequency component.
+ */
+#define AL_FREQUENCY                              0x2001
+#define AL_BITS                                   0x2002
+#define AL_CHANNELS                               0x2003
+#define AL_SIZE                                   0x2004
+
+/**
+ * Buffer state.
+ *
+ * Not supported for public use (yet).
+ */
+#define AL_UNUSED                                 0x2010
+#define AL_PENDING                                0x2011
+#define AL_PROCESSED                              0x2012
+
+
+/** Errors: No Error. */
+#define AL_NO_ERROR                               AL_FALSE
+
+/** 
+ * Invalid Name paramater passed to AL call.
+ */
+#define AL_INVALID_NAME                           0xA001
+
+/** 
+ * Invalid parameter passed to AL call.
+ */
+#define AL_INVALID_ENUM                           0xA002
+
+/** 
+ * Invalid enum parameter value.
+ */
+#define AL_INVALID_VALUE                          0xA003
+
+/** 
+ * Illegal call.
+ */
+#define AL_INVALID_OPERATION                      0xA004
+
+  
+/**
+ * No mojo.
+ */
+#define AL_OUT_OF_MEMORY                          0xA005
+
+
+/** Context strings: Vendor Name. */
+#define AL_VENDOR                                 0xB001
+#define AL_VERSION                                0xB002
+#define AL_RENDERER                               0xB003
+#define AL_EXTENSIONS                             0xB004
+
+/** Global tweakage. */
+
+/**
+ * Doppler scale.  Default 1.0
+ */
+#define AL_DOPPLER_FACTOR                         0xC000
+
+/**
+ * Tweaks speed of propagation.
+ */
+#define AL_DOPPLER_VELOCITY                       0xC001
+
+/**
+ * Speed of Sound in units per second
+ */
+#define AL_SPEED_OF_SOUND                         0xC003
+
+/**
+ * Distance models
+ *
+ * used in conjunction with DistanceModel
+ *
+ * implicit: NONE, which disances distance attenuation.
+ */
+#define AL_DISTANCE_MODEL                         0xD000
+#define AL_INVERSE_DISTANCE                       0xD001
+#define AL_INVERSE_DISTANCE_CLAMPED               0xD002
+#define AL_LINEAR_DISTANCE                        0xD003
+#define AL_LINEAR_DISTANCE_CLAMPED                0xD004
+#define AL_EXPONENT_DISTANCE                      0xD005
+#define AL_EXPONENT_DISTANCE_CLAMPED              0xD006
+
+/*
+ * Renderer State management
+ */
+AL_API void AL_APIENTRY alEnable( ALenum capability );
+
+AL_API void AL_APIENTRY alDisable( ALenum capability ); 
+
+AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability ); 
+
+
+/*
+ * State retrieval
+ */
+AL_API const ALchar* AL_APIENTRY alGetString( ALenum param );
+
+AL_API void AL_APIENTRY alGetBooleanv( ALenum param, ALboolean* data );
+
+AL_API void AL_APIENTRY alGetIntegerv( ALenum param, ALint* data );
+
+AL_API void AL_APIENTRY alGetFloatv( ALenum param, ALfloat* data );
+
+AL_API void AL_APIENTRY alGetDoublev( ALenum param, ALdouble* data );
+
+AL_API ALboolean AL_APIENTRY alGetBoolean( ALenum param );
+
+AL_API ALint AL_APIENTRY alGetInteger( ALenum param );
+
+AL_API ALfloat AL_APIENTRY alGetFloat( ALenum param );
+
+AL_API ALdouble AL_APIENTRY alGetDouble( ALenum param );
+
+
+/*
+ * Error support.
+ * Obtain the most recent error generated in the AL state machine.
+ */
+AL_API ALenum AL_APIENTRY alGetError( void );
+
+
+/* 
+ * Extension support.
+ * Query for the presence of an extension, and obtain any appropriate
+ * function pointers and enum values.
+ */
+AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname );
+
+AL_API void* AL_APIENTRY alGetProcAddress( const ALchar* fname );
+
+AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename );
+
+
+/*
+ * LISTENER
+ * Listener represents the location and orientation of the
+ * 'user' in 3D-space.
+ *
+ * Properties include: -
+ *
+ * Gain         AL_GAIN         ALfloat
+ * Position     AL_POSITION     ALfloat[3]
+ * Velocity     AL_VELOCITY     ALfloat[3]
+ * Orientation  AL_ORIENTATION  ALfloat[6] (Forward then Up vectors)
+*/
+
+/*
+ * Set Listener parameters
+ */
+AL_API void AL_APIENTRY alListenerf( ALenum param, ALfloat value );
+
+AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+
+AL_API void AL_APIENTRY alListenerfv( ALenum param, const ALfloat* values ); 
+
+AL_API void AL_APIENTRY alListeneri( ALenum param, ALint value );
+
+AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 );
+
+AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values );
+
+/*
+ * Get Listener parameters
+ */
+AL_API void AL_APIENTRY alGetListenerf( ALenum param, ALfloat* value );
+
+AL_API void AL_APIENTRY alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
+
+AL_API void AL_APIENTRY alGetListenerfv( ALenum param, ALfloat* values );
+
+AL_API void AL_APIENTRY alGetListeneri( ALenum param, ALint* value );
+
+AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
+
+AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values );
+
+
+/**
+ * SOURCE
+ * Sources represent individual sound objects in 3D-space.
+ * Sources take the PCM data provided in the specified Buffer,
+ * apply Source-specific modifications, and then
+ * submit them to be mixed according to spatial arrangement etc.
+ * 
+ * Properties include: -
+ *
+ * Gain                              AL_GAIN                 ALfloat
+ * Min Gain                          AL_MIN_GAIN             ALfloat
+ * Max Gain                          AL_MAX_GAIN             ALfloat
+ * Position                          AL_POSITION             ALfloat[3]
+ * Velocity                          AL_VELOCITY             ALfloat[3]
+ * Direction                         AL_DIRECTION            ALfloat[3]
+ * Head Relative Mode                AL_SOURCE_RELATIVE      ALint (AL_TRUE or AL_FALSE)
+ * Reference Distance                AL_REFERENCE_DISTANCE   ALfloat
+ * Max Distance                      AL_MAX_DISTANCE         ALfloat
+ * RollOff Factor                    AL_ROLLOFF_FACTOR       ALfloat
+ * Inner Angle                       AL_CONE_INNER_ANGLE     ALint or ALfloat
+ * Outer Angle                       AL_CONE_OUTER_ANGLE     ALint or ALfloat
+ * Cone Outer Gain                   AL_CONE_OUTER_GAIN      ALint or ALfloat
+ * Pitch                             AL_PITCH                ALfloat
+ * Looping                           AL_LOOPING              ALint (AL_TRUE or AL_FALSE)
+ * MS Offset                         AL_MSEC_OFFSET          ALint or ALfloat
+ * Byte Offset                       AL_BYTE_OFFSET          ALint or ALfloat
+ * Sample Offset                     AL_SAMPLE_OFFSET        ALint or ALfloat
+ * Attached Buffer                   AL_BUFFER               ALint
+ * State (Query only)                AL_SOURCE_STATE         ALint
+ * Buffers Queued (Query only)       AL_BUFFERS_QUEUED       ALint
+ * Buffers Processed (Query only)    AL_BUFFERS_PROCESSED    ALint
+ */
+
+/* Create Source objects */
+AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* sources ); 
+
+/* Delete Source objects */
+AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources );
+
+/* Verify a handle is a valid Source */ 
+AL_API ALboolean AL_APIENTRY alIsSource( ALuint sid ); 
+
+/*
+ * Set Source parameters
+ */
+AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value ); 
+
+AL_API void AL_APIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+
+AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values ); 
+
+AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value ); 
+
+AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
+
+AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values );
+
+/*
+ * Get Source parameters
+ */
+AL_API void AL_APIENTRY alGetSourcef( ALuint sid, ALenum param, ALfloat* value );
+
+AL_API void AL_APIENTRY alGetSource3f( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+
+AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values );
+
+AL_API void AL_APIENTRY alGetSourcei( ALuint sid,  ALenum param, ALint* value );
+
+AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+
+AL_API void AL_APIENTRY alGetSourceiv( ALuint sid,  ALenum param, ALint* values );
+
+
+/*
+ * Source vector based playback calls
+ */
+
+/* Play, replay, or resume (if paused) a list of Sources */
+AL_API void AL_APIENTRY alSourcePlayv( ALsizei ns, const ALuint *sids );
+
+/* Stop a list of Sources */
+AL_API void AL_APIENTRY alSourceStopv( ALsizei ns, const ALuint *sids );
+
+/* Rewind a list of Sources */
+AL_API void AL_APIENTRY alSourceRewindv( ALsizei ns, const ALuint *sids );
+
+/* Pause a list of Sources */
+AL_API void AL_APIENTRY alSourcePausev( ALsizei ns, const ALuint *sids );
+
+/*
+ * Source based playback calls
+ */
+
+/* Play, replay, or resume a Source */
+AL_API void AL_APIENTRY alSourcePlay( ALuint sid );
+
+/* Stop a Source */
+AL_API void AL_APIENTRY alSourceStop( ALuint sid );
+
+/* Rewind a Source (set playback postiton to beginning) */
+AL_API void AL_APIENTRY alSourceRewind( ALuint sid );
+
+/* Pause a Source */
+AL_API void AL_APIENTRY alSourcePause( ALuint sid );
+
+/*
+ * Source Queuing 
+ */
+AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids );
+
+AL_API void AL_APIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids );
+
+
+/**
+ * BUFFER
+ * Buffer objects are storage space for sample data.
+ * Buffers are referred to by Sources. One Buffer can be used
+ * by multiple Sources.
+ *
+ * Properties include: -
+ *
+ * Frequency (Query only)    AL_FREQUENCY      ALint
+ * Size (Query only)         AL_SIZE           ALint
+ * Bits (Query only)         AL_BITS           ALint
+ * Channels (Query only)     AL_CHANNELS       ALint
+ */
+
+/* Create Buffer objects */
+AL_API void AL_APIENTRY alGenBuffers( ALsizei n, ALuint* buffers );
+
+/* Delete Buffer objects */
+AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, const ALuint* buffers );
+
+/* Verify a handle is a valid Buffer */
+AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid );
+
+/* Specify the data to be copied into a buffer */
+AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
+
+/*
+ * Set Buffer parameters
+ */
+AL_API void AL_APIENTRY alBufferf( ALuint bid, ALenum param, ALfloat value );
+
+AL_API void AL_APIENTRY alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+
+AL_API void AL_APIENTRY alBufferfv( ALuint bid, ALenum param, const ALfloat* values );
+
+AL_API void AL_APIENTRY alBufferi( ALuint bid, ALenum param, ALint value );
+
+AL_API void AL_APIENTRY alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
+
+AL_API void AL_APIENTRY alBufferiv( ALuint bid, ALenum param, const ALint* values );
+
+/*
+ * Get Buffer parameters
+ */
+AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value );
+
+AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+
+AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values );
+
+AL_API void AL_APIENTRY alGetBufferi( ALuint bid, ALenum param, ALint* value );
+
+AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+
+AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values );
+
+
+/*
+ * Global Parameters
+ */
+AL_API void AL_APIENTRY alDopplerFactor( ALfloat value );
+
+AL_API void AL_APIENTRY alDopplerVelocity( ALfloat value );
+
+AL_API void AL_APIENTRY alSpeedOfSound( ALfloat value );
+
+AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel );
+
+/*
+ * Pointer-to-function types, useful for dynamically getting AL entry points.
+ */
+typedef void           (AL_APIENTRY *LPALENABLE)( ALenum capability );
+typedef void           (AL_APIENTRY *LPALDISABLE)( ALenum capability ); 
+typedef ALboolean      (AL_APIENTRY *LPALISENABLED)( ALenum capability ); 
+typedef const ALchar*  (AL_APIENTRY *LPALGETSTRING)( ALenum param );
+typedef void           (AL_APIENTRY *LPALGETBOOLEANV)( ALenum param, ALboolean* data );
+typedef void           (AL_APIENTRY *LPALGETINTEGERV)( ALenum param, ALint* data );
+typedef void           (AL_APIENTRY *LPALGETFLOATV)( ALenum param, ALfloat* data );
+typedef void           (AL_APIENTRY *LPALGETDOUBLEV)( ALenum param, ALdouble* data );
+typedef ALboolean      (AL_APIENTRY *LPALGETBOOLEAN)( ALenum param );
+typedef ALint          (AL_APIENTRY *LPALGETINTEGER)( ALenum param );
+typedef ALfloat        (AL_APIENTRY *LPALGETFLOAT)( ALenum param );
+typedef ALdouble       (AL_APIENTRY *LPALGETDOUBLE)( ALenum param );
+typedef ALenum         (AL_APIENTRY *LPALGETERROR)( void );
+typedef ALboolean      (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar* extname );
+typedef void*          (AL_APIENTRY *LPALGETPROCADDRESS)( const ALchar* fname );
+typedef ALenum         (AL_APIENTRY *LPALGETENUMVALUE)( const ALchar* ename );
+typedef void           (AL_APIENTRY *LPALLISTENERF)( ALenum param, ALfloat value );
+typedef void           (AL_APIENTRY *LPALLISTENER3F)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+typedef void           (AL_APIENTRY *LPALLISTENERFV)( ALenum param, const ALfloat* values );
+typedef void           (AL_APIENTRY *LPALLISTENERI)( ALenum param, ALint value );
+typedef void           (AL_APIENTRY *LPALLISTENER3I)( ALenum param, ALint value1, ALint value2, ALint value3 );
+typedef void           (AL_APIENTRY *LPALLISTENERIV)( ALenum param, const ALint* values );
+typedef void           (AL_APIENTRY *LPALGETLISTENERF)( ALenum param, ALfloat* value );
+typedef void           (AL_APIENTRY *LPALGETLISTENER3F)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
+typedef void           (AL_APIENTRY *LPALGETLISTENERFV)( ALenum param, ALfloat* values );
+typedef void           (AL_APIENTRY *LPALGETLISTENERI)( ALenum param, ALint* value );
+typedef void           (AL_APIENTRY *LPALGETLISTENER3I)( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
+typedef void           (AL_APIENTRY *LPALGETLISTENERIV)( ALenum param, ALint* values );
+typedef void           (AL_APIENTRY *LPALGENSOURCES)( ALsizei n, ALuint* sources ); 
+typedef void           (AL_APIENTRY *LPALDELETESOURCES)( ALsizei n, const ALuint* sources );
+typedef ALboolean      (AL_APIENTRY *LPALISSOURCE)( ALuint sid ); 
+typedef void           (AL_APIENTRY *LPALSOURCEF)( ALuint sid, ALenum param, ALfloat value); 
+typedef void           (AL_APIENTRY *LPALSOURCE3F)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+typedef void           (AL_APIENTRY *LPALSOURCEFV)( ALuint sid, ALenum param, const ALfloat* values );
+typedef void           (AL_APIENTRY *LPALSOURCEI)( ALuint sid, ALenum param, ALint value); 
+typedef void           (AL_APIENTRY *LPALSOURCE3I)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
+typedef void           (AL_APIENTRY *LPALSOURCEIV)( ALuint sid, ALenum param, const ALint* values );
+typedef void           (AL_APIENTRY *LPALGETSOURCEF)( ALuint sid, ALenum param, ALfloat* value );
+typedef void           (AL_APIENTRY *LPALGETSOURCE3F)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+typedef void           (AL_APIENTRY *LPALGETSOURCEFV)( ALuint sid, ALenum param, ALfloat* values );
+typedef void           (AL_APIENTRY *LPALGETSOURCEI)( ALuint sid, ALenum param, ALint* value );
+typedef void           (AL_APIENTRY *LPALGETSOURCE3I)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+typedef void           (AL_APIENTRY *LPALGETSOURCEIV)( ALuint sid, ALenum param, ALint* values );
+typedef void           (AL_APIENTRY *LPALSOURCEPLAYV)( ALsizei ns, const ALuint *sids );
+typedef void           (AL_APIENTRY *LPALSOURCESTOPV)( ALsizei ns, const ALuint *sids );
+typedef void           (AL_APIENTRY *LPALSOURCEREWINDV)( ALsizei ns, const ALuint *sids );
+typedef void           (AL_APIENTRY *LPALSOURCEPAUSEV)( ALsizei ns, const ALuint *sids );
+typedef void           (AL_APIENTRY *LPALSOURCEPLAY)( ALuint sid );
+typedef void           (AL_APIENTRY *LPALSOURCESTOP)( ALuint sid );
+typedef void           (AL_APIENTRY *LPALSOURCEREWIND)( ALuint sid );
+typedef void           (AL_APIENTRY *LPALSOURCEPAUSE)( ALuint sid );
+typedef void           (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, const ALuint *bids );
+typedef void           (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, ALuint *bids );
+typedef void           (AL_APIENTRY *LPALGENBUFFERS)( ALsizei n, ALuint* buffers );
+typedef void           (AL_APIENTRY *LPALDELETEBUFFERS)( ALsizei n, const ALuint* buffers );
+typedef ALboolean      (AL_APIENTRY *LPALISBUFFER)( ALuint bid );
+typedef void           (AL_APIENTRY *LPALBUFFERDATA)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
+typedef void           (AL_APIENTRY *LPALBUFFERF)( ALuint bid, ALenum param, ALfloat value);
+typedef void           (AL_APIENTRY *LPALBUFFER3F)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
+typedef void           (AL_APIENTRY *LPALBUFFERFV)( ALuint bid, ALenum param, const ALfloat* values );
+typedef void           (AL_APIENTRY *LPALBUFFERI)( ALuint bid, ALenum param, ALint value);
+typedef void           (AL_APIENTRY *LPALBUFFER3I)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
+typedef void           (AL_APIENTRY *LPALBUFFERIV)( ALuint bid, ALenum param, const ALint* values );
+typedef void           (AL_APIENTRY *LPALGETBUFFERF)( ALuint bid, ALenum param, ALfloat* value );
+typedef void           (AL_APIENTRY *LPALGETBUFFER3F)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
+typedef void           (AL_APIENTRY *LPALGETBUFFERFV)( ALuint bid, ALenum param, ALfloat* values );
+typedef void           (AL_APIENTRY *LPALGETBUFFERI)( ALuint bid, ALenum param, ALint* value );
+typedef void           (AL_APIENTRY *LPALGETBUFFER3I)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
+typedef void           (AL_APIENTRY *LPALGETBUFFERIV)( ALuint bid, ALenum param, ALint* values );
+typedef void           (AL_APIENTRY *LPALDOPPLERFACTOR)( ALfloat value );
+typedef void           (AL_APIENTRY *LPALDOPPLERVELOCITY)( ALfloat value );
+typedef void           (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value );
+typedef void           (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel );
+
+#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
+ #pragma export off
+#endif
+
+#if defined(__cplusplus)
+}  /* extern "C" */
+#endif
+
+#endif /* AL_AL_H */
Index: /openal-0.0.8/common/include/AL/alc.h
===================================================================
--- /openal-0.0.8/common/include/AL/alc.h	(revision 17)
+++ /openal-0.0.8/common/include/AL/alc.h	(revision 17)
@@ -0,0 +1,275 @@
+#ifndef AL_ALC_H
+#define AL_ALC_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(_WIN32) && !defined(_XBOX)
+ /* _OPENAL32LIB is deprecated */
+ #if defined(AL_BUILD_LIBRARY) || defined (_OPENAL32LIB)
+  #define ALC_API __declspec(dllexport)
+ #else
+  #define ALC_API __declspec(dllimport)
+ #endif
+#else
+ #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY)
+  #define ALC_API __attribute__((visibility("default")))
+ #else
+  #define ALC_API extern
+ #endif
+#endif
+
+#if defined(_WIN32)
+ #define ALC_APIENTRY __cdecl
+#else
+ #define ALC_APIENTRY
+#endif
+
+#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
+ #pragma export on
+#endif
+
+/*
+ * The ALCAPI, ALCAPIENTRY, and ALC_INVALID macros are deprecated, but are
+ * included for applications porting code from AL 1.0
+ */
+#define ALCAPI ALC_API
+#define ALCAPIENTRY ALC_APIENTRY
+#define ALC_INVALID 0
+
+
+#define ALC_VERSION_0_1         1
+
+typedef struct ALCdevice_struct ALCdevice;
+typedef struct ALCcontext_struct ALCcontext;
+
+
+/** 8-bit boolean */
+typedef char ALCboolean;
+
+/** character */
+typedef char ALCchar;
+
+/** signed 8-bit 2's complement integer */
+typedef char ALCbyte;
+
+/** unsigned 8-bit integer */
+typedef unsigned char ALCubyte;
+
+/** signed 16-bit 2's complement integer */
+typedef short ALCshort;
+
+/** unsigned 16-bit integer */
+typedef unsigned short ALCushort;
+
+/** signed 32-bit 2's complement integer */
+typedef int ALCint;
+
+/** unsigned 32-bit integer */
+typedef unsigned int ALCuint;
+
+/** non-negative 32-bit binary integer size */
+typedef int ALCsizei;
+
+/** enumerated 32-bit value */
+typedef int ALCenum;
+
+/** 32-bit IEEE754 floating-point */
+typedef float ALCfloat;
+
+/** 64-bit IEEE754 floating-point */
+typedef double ALCdouble;
+
+/** void type (for opaque pointers only) */
+typedef void ALCvoid;
+
+
+/* Enumerant values begin at column 50. No tabs. */
+
+/* Boolean False. */
+#define ALC_FALSE                                0
+
+/* Boolean True. */
+#define ALC_TRUE                                 1
+
+/**
+ * followed by <int> Hz
+ */
+#define ALC_FREQUENCY                            0x1007
+
+/**
+ * followed by <int> Hz
+ */
+#define ALC_REFRESH                              0x1008
+
+/**
+ * followed by AL_TRUE, AL_FALSE
+ */
+#define ALC_SYNC                                 0x1009
+
+/**
+ * followed by <int> Num of requested Mono (3D) Sources
+ */
+#define ALC_MONO_SOURCES                         0x1010
+
+/**
+ * followed by <int> Num of requested Stereo Sources
+ */
+#define ALC_STEREO_SOURCES                       0x1011
+
+/**
+ * errors
+ */
+
+/**
+ * No error
+ */
+#define ALC_NO_ERROR                             ALC_FALSE
+
+/**
+ * No device
+ */
+#define ALC_INVALID_DEVICE                       0xA001
+
+/**
+ * invalid context ID
+ */
+#define ALC_INVALID_CONTEXT                      0xA002
+
+/**
+ * bad enum
+ */
+#define ALC_INVALID_ENUM                         0xA003
+
+/**
+ * bad value
+ */
+#define ALC_INVALID_VALUE                        0xA004
+
+/**
+ * Out of memory.
+ */
+#define ALC_OUT_OF_MEMORY                        0xA005
+
+
+/**
+ * The Specifier string for default device
+ */
+#define ALC_DEFAULT_DEVICE_SPECIFIER             0x1004
+#define ALC_DEVICE_SPECIFIER                     0x1005
+#define ALC_EXTENSIONS                           0x1006
+
+#define ALC_MAJOR_VERSION                        0x1000
+#define ALC_MINOR_VERSION                        0x1001
+
+#define ALC_ATTRIBUTES_SIZE                      0x1002
+#define ALC_ALL_ATTRIBUTES                       0x1003
+
+/**
+ * Capture extension
+ */
+#define ALC_CAPTURE_DEVICE_SPECIFIER             0x310
+#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER     0x311
+#define ALC_CAPTURE_SAMPLES                      0x312
+
+
+/*
+ * Context Management
+ */
+ALC_API ALCcontext *    ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist );
+
+ALC_API ALCboolean      ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context );
+
+ALC_API void            ALC_APIENTRY alcProcessContext( ALCcontext *context );
+
+ALC_API void            ALC_APIENTRY alcSuspendContext( ALCcontext *context );
+
+ALC_API void            ALC_APIENTRY alcDestroyContext( ALCcontext *context );
+
+ALC_API ALCcontext *    ALC_APIENTRY alcGetCurrentContext( ALCvoid );
+
+ALC_API ALCdevice*      ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
+
+
+/*
+ * Device Management
+ */
+ALC_API ALCdevice *     ALC_APIENTRY alcOpenDevice( const ALCchar *devicename );
+
+ALC_API ALCboolean      ALC_APIENTRY alcCloseDevice( ALCdevice *device );
+
+
+/*
+ * Error support.
+ * Obtain the most recent Context error
+ */
+ALC_API ALCenum         ALC_APIENTRY alcGetError( ALCdevice *device );
+
+
+/* 
+ * Extension support.
+ * Query for the presence of an extension, and obtain any appropriate
+ * function pointers and enum values.
+ */
+ALC_API ALCboolean      ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname );
+
+ALC_API void  *         ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname );
+
+ALC_API ALCenum         ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
+
+
+/*
+ * Query functions
+ */
+ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );
+
+ALC_API void            ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data );
+
+
+/*
+ * Capture functions
+ */
+ALC_API ALCdevice*      ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
+
+ALC_API ALCboolean      ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device );
+
+ALC_API void            ALC_APIENTRY alcCaptureStart( ALCdevice *device );
+
+ALC_API void            ALC_APIENTRY alcCaptureStop( ALCdevice *device );
+
+ALC_API void            ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
+
+/*
+ * Pointer-to-function types, useful for dynamically getting ALC entry points.
+ */
+typedef ALCcontext *   (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist);
+typedef ALCboolean     (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context );
+typedef void           (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );
+typedef void           (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );
+typedef void           (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );
+typedef ALCcontext *   (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( ALCvoid );
+typedef ALCdevice *    (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );
+typedef ALCdevice *    (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );
+typedef ALCboolean     (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );
+typedef ALCenum        (ALC_APIENTRY *LPALCGETERROR)( ALCdevice *device );
+typedef ALCboolean     (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname );
+typedef void *         (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname );
+typedef ALCenum        (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname );
+typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param );
+typedef void           (ALC_APIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest );
+typedef ALCdevice *    (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
+typedef ALCboolean     (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device );
+typedef void           (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device );
+typedef void           (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device );
+typedef void           (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
+
+#if defined(TARGET_OS_MAC) && TARGET_OS_MAC
+ #pragma export off
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* AL_ALC_H */
Index: /openal-0.0.8/common/include/Makefile.am
===================================================================
--- /openal-0.0.8/common/include/Makefile.am	(revision 17)
+++ /openal-0.0.8/common/include/Makefile.am	(revision 17)
@@ -0,0 +1,1 @@
+nobase_include_HEADERS = AL/al.h AL/alc.h
Index: /openal-0.0.8/common/include/Makefile.in
===================================================================
--- /openal-0.0.8/common/include/Makefile.in	(revision 17)
+++ /openal-0.0.8/common/include/Makefile.in	(revision 17)
@@ -0,0 +1,462 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = common/include
+DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/admin/autotools/m4/acx_pthread.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includedir)"
+nobase_includeHEADERS_INSTALL = $(install_sh_DATA)
+HEADERS = $(nobase_include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSC_CONFIG = @ARTSC_CONFIG@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLEEXTENSIONALEXTMP3_FALSE = @ENABLEEXTENSIONALEXTMP3_FALSE@
+ENABLEEXTENSIONALEXTMP3_TRUE = @ENABLEEXTENSIONALEXTMP3_TRUE@
+ENABLEEXTENSIONALEXTVORBIS_FALSE = @ENABLEEXTENSIONALEXTVORBIS_FALSE@
+ENABLEEXTENSIONALEXTVORBIS_TRUE = @ENABLEEXTENSIONALEXTVORBIS_TRUE@
+ESD_CONFIG = @ESD_CONFIG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEATURECFLAGS = @FEATURECFLAGS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+NASM = @NASM@
+NASM_FORMAT = @NASM_FORMAT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZATIONCFLAGS = @OPTIMIZATIONCFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PROFILINGLDFLAGS = @PROFILINGLDFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SDL_CONFIG = @SDL_CONFIG@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZEOF_VOID_P = @SIZEOF_VOID_P@
+SMPEG_CONFIG = @SMPEG_CONFIG@
+STRIP = @STRIP@
+USEBACKENDALSA_FALSE = @USEBACKENDALSA_FALSE@
+USEBACKENDALSA_TRUE = @USEBACKENDALSA_TRUE@
+USEBACKENDARTS_FALSE = @USEBACKENDARTS_FALSE@
+USEBACKENDARTS_TRUE = @USEBACKENDARTS_TRUE@
+USEBACKENDESD_FALSE = @USEBACKENDESD_FALSE@
+USEBACKENDESD_TRUE = @USEBACKENDESD_TRUE@
+USEBACKENDNATIVEBSD_FALSE = @USEBACKENDNATIVEBSD_FALSE@
+USEBACKENDNATIVEBSD_TRUE = @USEBACKENDNATIVEBSD_TRUE@
+USEBACKENDNATIVEDARWIN_FALSE = @USEBACKENDNATIVEDARWIN_FALSE@
+USEBACKENDNATIVEDARWIN_TRUE = @USEBACKENDNATIVEDARWIN_TRUE@
+USEBACKENDNATIVEIRIX_FALSE = @USEBACKENDNATIVEIRIX_FALSE@
+USEBACKENDNATIVEIRIX_TRUE = @USEBACKENDNATIVEIRIX_TRUE@
+USEBACKENDNATIVELINUX_FALSE = @USEBACKENDNATIVELINUX_FALSE@
+USEBACKENDNATIVELINUX_TRUE = @USEBACKENDNATIVELINUX_TRUE@
+USEBACKENDNATIVEMORPHOS_FALSE = @USEBACKENDNATIVEMORPHOS_FALSE@
+USEBACKENDNATIVEMORPHOS_TRUE = @USEBACKENDNATIVEMORPHOS_TRUE@
+USEBACKENDNATIVESOLARIS_FALSE = @USEBACKENDNATIVESOLARIS_FALSE@
+USEBACKENDNATIVESOLARIS_TRUE = @USEBACKENDNATIVESOLARIS_TRUE@
+USEBACKENDNATIVEWINDOWS_FALSE = @USEBACKENDNATIVEWINDOWS_FALSE@
+USEBACKENDNATIVEWINDOWS_TRUE = @USEBACKENDNATIVEWINDOWS_TRUE@
+USEBACKENDNULL_FALSE = @USEBACKENDNULL_FALSE@
+USEBACKENDNULL_TRUE = @USEBACKENDNULL_TRUE@
+USEBACKENDSDL_FALSE = @USEBACKENDSDL_FALSE@
+USEBACKENDSDL_TRUE = @USEBACKENDSDL_TRUE@
+USEBACKENDWAVEOUT_FALSE = @USEBACKENDWAVEOUT_FALSE@
+USEBACKENDWAVEOUT_TRUE = @USEBACKENDWAVEOUT_TRUE@
+VERSION = @VERSION@
+WARNINGCFLAGS = @WARNINGCFLAGS@
+X86ENABLED_FALSE = @X86ENABLED_FALSE@
+X86ENABLED_TRUE = @X86ENABLED_TRUE@
+X86MMXENABLED_FALSE = @X86MMXENABLED_FALSE@
+X86MMXENABLED_TRUE = @X86MMXENABLED_TRUE@
+X86NASMENABLED_FALSE = @X86NASMENABLED_FALSE@
+X86NASMENABLED_TRUE = @X86NASMENABLED_TRUE@
+X86NASMMMXENABLED_FALSE = @X86NASMMMXENABLED_FALSE@
+X86NASMMMXENABLED_TRUE = @X86NASMMMXENABLED_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+nobase_include_HEADERS = AL/al.h AL/alc.h
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  common/include/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  common/include/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_includeHEADERS: $(nobase_include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+	  $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+uninstall-nobase_includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_include_HEADERS)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(mkdir_p) $(distdir)/AL
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_includeHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool ctags distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-nobase_includeHEADERS \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-nobase_includeHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /openal-0.0.8/config-osx.h
===================================================================
--- /openal-0.0.8/config-osx.h	(revision 17)
+++ /openal-0.0.8/config-osx.h	(revision 17)
@@ -0,0 +1,41 @@
+#define WORDS_BIGENDIAN 1
+
+/* #undef DEBUG */
+/* #undef DEBUG_BUFFER */
+/* #undef DEBUG_CONFIG */
+/* #undef DEBUG_CONTEXT */
+/* #undef DEBUG_CONVERT */
+/* #undef DEBUG_EXT */
+/* #undef DEBUG_LOCK */
+/* #undef DEBUG_LOOP */
+/* #undef DEBUG_MATH */
+/* #undef DEBUG_MAXIMUS */
+/* #undef DEBUG_MEM */
+/* #undef DEBUG_MIXER */
+/* #undef DEBUG_SOURCE */
+/* #undef DEBUG_STREAMING */
+/* #undef DEBUG_STUB */
+/* #undef DEBUG_QUEUE */
+
+#define PIC 1
+
+#define USE_POSIXTHREADING 1
+
+#define NODLOPEN 1
+#define RDYNAMIC "-rdynamic"
+
+#define WORDS_BIGENDIAN 1
+
+#define USE_BACKEND_NATIVE_DARWIN 1
+#define USE_BACKEND_NULL 1
+#define USE_BACKEND_WAVEOUT 1
+/* #undef USE_BACKEND_ALSA */
+/* #undef USE_BACKEND_ARTS */
+/* #undef USE_BACKEND_ESD */
+/* #undef USE_BACKEND_NATIVE_IRIX */
+/* #undef USE_BACKEND_SDL */
+/* #undef ENABLE_EXTENSION_AL_EXT_MP3 */
+/* #undef ENABLE_EXTENSION_AL_EXT_VORBIS */
+
+/* The number of bytes in a void *.  */
+#define SIZEOF_VOID_P 4
Index: /openal-0.0.8/config.h.in
===================================================================
--- /openal-0.0.8/config.h.in	(revision 17)
+++ /openal-0.0.8/config.h.in	(revision 17)
@@ -0,0 +1,231 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if we are building the OpenAL library. */
+#undef AL_BUILD_LIBRARY
+
+/* Define to 1 if the AL_BYTE_LOKI source attribute shall be supported. */
+#undef AL_SUPPORT_BYTE_LOKI_SOURCE_ATTR_
+
+/* Define to 1 if you want to include debugging code. */
+#undef DEBUG
+
+/* Define to 1 to enable buffer debugging. */
+#undef DEBUG_BUFFER
+
+/* Define to 1 to enable config file debugging. */
+#undef DEBUG_CONFIG
+
+/* Define to 1 to enable context debugging. */
+#undef DEBUG_CONTEXT
+
+/* Define to 1 to enable conversion debugging. */
+#undef DEBUG_CONVERT
+
+/* Define to 1 to enable extension debugging. */
+#undef DEBUG_EXT
+
+/* Define to 1 to enable filter debugging. */
+#undef DEBUG_FILTER
+
+/* Define to 1 to enable lock debugging. */
+#undef DEBUG_LOCK
+
+/* Define to 1 to enable looping debugging. */
+#undef DEBUG_LOOP
+
+/* Define to 1 to enable math debugging. */
+#undef DEBUG_MATH
+
+/* Define to 1 to enable all debugging. */
+#undef DEBUG_MAXIMUS
+
+/* Define to 1 to enable memory debugging. */
+#undef DEBUG_MEM
+
+/* Define to 1 to enable mixer debugging. */
+#undef DEBUG_MIXER
+
+/* Define to 1 to enable queue debugging. */
+#undef DEBUG_QUEUE
+
+/* Define to 1 to enable source debugging. */
+#undef DEBUG_SOURCE
+
+/* Define to 1 to enable streaming debugging. */
+#undef DEBUG_STREAMING
+
+/* Define to 1 to enable stub debugging. */
+#undef DEBUG_STUB
+
+/* Define to 1 if the AL_EXT_mp3 extension should be used. */
+#undef ENABLE_EXTENSION_AL_EXT_MP3
+
+/* Define to 1 if the AL_EXT_vorbis supprt should be used. */
+#undef ENABLE_EXTENSION_AL_EXT_VORBIS
+
+/* detect cpu capabilities */
+#undef HAVE_CPU_CAPS_DETECTION
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if we are using a GCC with symbol visibility support. */
+#undef HAVE_GCC_VISIBILITY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* mmx memcpy */
+#undef HAVE_MMX_MEMCPY
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if your C compiler supports __attribute__. */
+#undef HAVE___ATTRIBUTE__
+
+/* Define to 1 if you want to disable the assert() macro. */
+#undef NDEBUG
+
+/* Define to 1 if dynamic loading of libraries is not available. */
+#undef NODLOPEN
+
+/* undocumented */
+#undef NO_THREADING
+
+/* dynamically load ALSA libs */
+#undef OPENAL_DLOPEN_ALSA
+
+/* dynamically load aRts libs */
+#undef OPENAL_DLOPEN_ARTS
+
+/* dynamically load ESD libs */
+#undef OPENAL_DLOPEN_ESD
+
+/* dynamically load SMPEG libs */
+#undef OPENAL_DLOPEN_MP3
+
+/* dynamically load SDL libs */
+#undef OPENAL_DLOPEN_SDL
+
+/* dynamically load Vorbis libs */
+#undef OPENAL_DLOPEN_VORBIS
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+   your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
+/* The size of a `void *', as computed by sizeof. */
+#undef SIZEOF_VOID_P
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if the ALSA backend should be used. */
+#undef USE_BACKEND_ALSA
+
+/* Define to 1 if the aRts backend should be used. */
+#undef USE_BACKEND_ARTS
+
+/* Define to 1 if the native IRIX backend should be used. */
+#undef USE_BACKEND_DMEDIA
+
+/* Define to 1 if the ESD backend should be used. */
+#undef USE_BACKEND_ESD
+
+/* Define to 1 if the native BSD/OSS backend should be used. */
+#undef USE_BACKEND_NATIVE_BSD
+
+/* Define to 1 if the native Darwin backend should be used. */
+#undef USE_BACKEND_NATIVE_DARWIN
+
+/* Define to 1 if the native Linux backend should be used. */
+#undef USE_BACKEND_NATIVE_LINUX
+
+/* Define to 1 if the native MorphOS backend should be used. */
+#undef USE_BACKEND_NATIVE_MORPHOS
+
+/* Define to 1 if the native Solaris backend should be used. */
+#undef USE_BACKEND_NATIVE_SOLARIS
+
+/* Define to 1 if the native Windows backend should be used. */
+#undef USE_BACKEND_NATIVE_WINDOWS
+
+/* Define to 1 if the null backend should be used. */
+#undef USE_BACKEND_NULL
+
+/* Define to 1 if the SDL backend should be used. */
+#undef USE_BACKEND_SDL
+
+/* Define to 1 if the WAVE backend should be used. */
+#undef USE_BACKEND_WAVEOUT
+
+/* build light generic mixing routines */
+#undef USE_LIGHT_GEN_MIXING
+
+/* Define to 1 if MorphOS threading should be used. */
+#undef USE_MORPHOSTHREADING
+
+/* Define to 1 if POSIX threading should be used. */
+#undef USE_POSIXTHREADING
+
+/* Define to 1 if Windows threading should be used. */
+#undef USE_WINDOWSTHREADING
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if extensions to ISO C89 from ISO C99 are needed. */
+#undef _ISOC99_SOURCE
+
+/* Define to the POSIX version that should be used. */
+#undef _POSIX_C_SOURCE
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
Index: /openal-0.0.8/configure
===================================================================
--- /openal-0.0.8/configure	(revision 17)
+++ /openal-0.0.8/configure	(revision 17)
@@ -0,0 +1,27161 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for OpenAL library 0.0.8.
+#
+# Report bugs to <openal-devel@opensource.creative.com>.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+       echo_test_string="`eval $cmd`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "$0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='OpenAL library'
+PACKAGE_TARNAME='openal'
+PACKAGE_VERSION='0.0.8'
+PACKAGE_STRING='OpenAL library 0.0.8'
+PACKAGE_BUGREPORT='openal-devel@opensource.creative.com'
+
+ac_unique_file="AUTHORS"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS PKG_CONFIG LIBM acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS NASM X86ENABLED_TRUE X86ENABLED_FALSE X86MMXENABLED_TRUE X86MMXENABLED_FALSE X86NASMENABLED_TRUE X86NASMENABLED_FALSE X86NASMMMXENABLED_TRUE X86NASMMMXENABLED_FALSE USEBACKENDALSA_TRUE USEBACKENDALSA_FALSE ARTSC_CONFIG USEBACKENDARTS_TRUE USEBACKENDARTS_FALSE USEBACKENDNATIVEBSD_TRUE USEBACKENDNATIVEBSD_FALSE USEBACKENDNATIVEDARWIN_TRUE USEBACKENDNATIVEDARWIN_FALSE ESD_CONFIG USEBACKENDESD_TRUE USEBACKENDESD_FALSE USEBACKENDNATIVEIRIX_TRUE USEBACKENDNATIVEIRIX_FALSE USEBACKENDNATIVELINUX_TRUE USEBACKENDNATIVELINUX_FALSE USEBACKENDNATIVEMORPHOS_TRUE USEBACKENDNATIVEMORPHOS_FALSE USEBACKENDNULL_TRUE USEBACKENDNULL_FALSE SDL_CONFIG USEBACKENDSDL_TRUE USEBACKENDSDL_FALSE USEBACKENDNATIVESOLARIS_TRUE USEBACKENDNATIVESOLARIS_FALSE USEBACKENDWAVEOUT_TRUE USEBACKENDWAVEOUT_FALSE USEBACKENDNATIVEWINDOWS_TRUE USEBACKENDNATIVEWINDOWS_FALSE ENABLEEXTENSIONALEXTVORBIS_TRUE ENABLEEXTENSIONALEXTVORBIS_FALSE SMPEG_CONFIG ENABLEEXTENSIONALEXTMP3_TRUE ENABLEEXTENSIONALEXTMP3_FALSE FEATURECFLAGS NASM_FORMAT OPTIMIZATIONCFLAGS PROFILINGLDFLAGS SIZEOF_VOID_P WARNINGCFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+ac_env_F77_set=${F77+set}
+ac_env_F77_value=$F77
+ac_cv_env_F77_set=${F77+set}
+ac_cv_env_F77_value=$F77
+ac_env_FFLAGS_set=${FFLAGS+set}
+ac_env_FFLAGS_value=$FFLAGS
+ac_cv_env_FFLAGS_set=${FFLAGS+set}
+ac_cv_env_FFLAGS_value=$FFLAGS
+ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
+ac_env_PKG_CONFIG_value=$PKG_CONFIG
+ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
+ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
+ac_env_ARTSC_CONFIG_set=${ARTSC_CONFIG+set}
+ac_env_ARTSC_CONFIG_value=$ARTSC_CONFIG
+ac_cv_env_ARTSC_CONFIG_set=${ARTSC_CONFIG+set}
+ac_cv_env_ARTSC_CONFIG_value=$ARTSC_CONFIG
+ac_env_ESD_CONFIG_set=${ESD_CONFIG+set}
+ac_env_ESD_CONFIG_value=$ESD_CONFIG
+ac_cv_env_ESD_CONFIG_set=${ESD_CONFIG+set}
+ac_cv_env_ESD_CONFIG_value=$ESD_CONFIG
+ac_env_SDL_CONFIG_set=${SDL_CONFIG+set}
+ac_env_SDL_CONFIG_value=$SDL_CONFIG
+ac_cv_env_SDL_CONFIG_set=${SDL_CONFIG+set}
+ac_cv_env_SDL_CONFIG_value=$SDL_CONFIG
+ac_env_SMPEG_CONFIG_set=${SMPEG_CONFIG+set}
+ac_env_SMPEG_CONFIG_value=$SMPEG_CONFIG
+ac_cv_env_SMPEG_CONFIG_set=${SMPEG_CONFIG+set}
+ac_cv_env_SMPEG_CONFIG_value=$SMPEG_CONFIG
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures OpenAL library 0.0.8 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of OpenAL library 0.0.8:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-shared[=PKGS]
+                          build shared libraries [default=yes]
+  --enable-static[=PKGS]
+                          build static libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-warnings       enable pedantic compiler warnings
+                          [default=yes]
+  --enable-more-warnings  enable even more compiler warnings
+                          [default=no]
+  --enable-werror         enable failure on all warnings [default=no]
+  --enable-debug          enable debug code and assertions [default=no]
+  --enable-efence         enable Electric Fence support [default=no]
+  --enable-debug-stub     enable stub debugging [default=no]
+  --enable-debug-loop     enable looping debugging [default=no]
+  --enable-debug-convert  enable conversion debugging [default=no]
+  --enable-debug-config   enable config file debugging [default=no]
+  --enable-debug-lock     enable lock debugging [default=no]
+  --enable-debug-ext      enable extension debugging [default=no]
+  --enable-debug-buffer   enable buffer debugging [default=no]
+  --enable-debug-source   enable source debugging [default=no]
+  --enable-debug-mixer    enable mixer debugging [default=no]
+  --enable-debug-streaming
+                          enable streaming debugging [default=no]
+  --enable-debug-math     enable math debugging [default=no]
+  --enable-debug-mem      enable memory debugging [default=no]
+  --enable-debug-context  enable context debugging [default=no]
+  --enable-debug-queue    enable queue debugging [default=no]
+  --enable-debug-filter   enable filter debugging [default=no]
+  --enable-debug-maximus  enable all debugging [default=no]
+  --enable-optimization   enable optimization [default=yes]
+  --enable-profile        enable profile [default=no]
+  --enable-optim-generic  x86(_64): even if mmx enabled, build optimized
+                          instead of light generic mixing routines
+                          [i686/x86_64:default=no]
+  --enable-alsa           enable ALSA backend [default=auto]
+  --enable-alsa-dlopen    dynamically load ALSA libs [default=yes]
+  --enable-arts           enable aRts backend [default=auto]
+  --enable-arts-dlopen    dynamically load aRts libs [default=yes]
+  --enable-bsd            enable native BSD/OSS backend [default=auto]
+  --enable-darwin         enable native Darwin backend [default=auto]
+  --enable-esd            enable ESD backend [default=auto]
+  --enable-esd-dlopen     dynamically load ESD libs [default=yes]
+  --enable-irix           enable native IRIX backend [default=auto]
+  --enable-linux          enable native Linux/OSS backend [default=auto]
+  --enable-morphos        enable native MorphOS backend [default=auto]
+  --enable-null           enable null backend [default=yes]
+  --enable-sdl            enable SDL backend [default=auto]
+  --enable-sdl-dlopen     dynamically load SDL libs [default=yes]
+  --enable-solaris        enable native Solaris backend [default=auto]
+  --enable-waveout        enable WAVE backend [default=yes]
+  --enable-windows        enable native Windows backend [default=auto]
+  --enable-vorbis         enable AL_EXT_vorbis extension [default=auto]
+  --enable-vorbis-dlopen  dynamically load Vorbis libs [default=yes]
+  --enable-mp3            enable AL_EXT_mp3 support [default=auto]
+  --enable-mp3-dlopen     dynamically load MP3 libs [default=yes]
+  --enable-smpeg          deprecated, use --enable-mp3 instead
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-tags[=TAGS]
+                          include additional configurations [automatic]
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+  PKG_CONFIG  package configuration utility
+  ARTSC_CONFIG
+              aRts configuration utility
+  ESD_CONFIG  esd configuration utility
+  SDL_CONFIG  sdl configuration utility
+  SMPEG_CONFIG
+              smpeg configuration utility
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <openal-devel@opensource.creative.com>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+OpenAL library configure 0.0.8
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by OpenAL library $as_me 0.0.8, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in admin/autotools $srcdir/admin/autotools; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in admin/autotools $srcdir/admin/autotools" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in admin/autotools $srcdir/admin/autotools" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+  ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+am__api_version="1.9"
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='openal'
+ VERSION='0.0.8'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+          ac_config_headers="$ac_config_headers config.h"
+
+
+# Compatibility hack for older autoconf versions
+
+
+################################################################################
+# Checks for programs.
+################################################################################
+
+# We need ISO C99 features (e.g. snprintf) and POSIX IEEE Std 1003.1b-1993
+# features (e.g. struct timespec, used in <alsa/asoundlib.h>)
+
+cat >>confdefs.h <<\_ACEOF
+#define _ISOC99_SOURCE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_C_SOURCE 199309
+_ACEOF
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define AL_BUILD_LIBRARY 1
+_ACEOF
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset x;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *ccp;
+  char **p;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  ccp = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++ccp;
+  p = (char**) ccp;
+  ccp = (char const *const *) p;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+  }
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_const=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether the C compiler supports __attribute__" >&5
+echo $ECHO_N "checking whether the C compiler supports __attribute__... $ECHO_C" >&6
+if test "${alut_cv___attribute__+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+    void  foo (int bar __attribute__((unused)) ) { }
+    static void baz (void) __attribute__((unused));
+    static void baz (void) { }
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  alut_cv___attribute__=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+alut_cv___attribute__=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv___attribute__" >&5
+echo "${ECHO_T}$alut_cv___attribute__" >&6
+if test "$alut_cv___attribute__" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___ATTRIBUTE__ 1
+_ACEOF
+
+fi
+
+
+
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi;
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi;
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval="$enable_fast_install"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi;
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+      */dev/null* | *'Invalid file or object type'*)
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+        ;;
+      *)
+	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	*/dev/null*)
+	  lt_cv_path_NM="$tmp_nm -p"
+	  break
+	  ;;
+	*)
+	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	  continue # so that we can try to find one that supports BSD flags
+	  ;;
+	esac
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+NM="$lt_cv_path_NM"
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case "$host_cpu" in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 3963 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  lt_cv_cc_needs_belf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  echo "$as_me:$LINENO: result: $DLLTOOL" >&5
+echo "${ECHO_T}$DLLTOOL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
+echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  DLLTOOL=$ac_ct_DLLTOOL
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AS="${ac_tool_prefix}as"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  echo "$as_me:$LINENO: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+  ac_ct_AS=$AS
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AS"; then
+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AS="as"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+  echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
+echo "${ECHO_T}$ac_ct_AS" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  AS=$ac_ct_AS
+else
+  AS="$ac_cv_prog_AS"
+fi
+
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+echo "${ECHO_T}$OBJDUMP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
+echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  OBJDUMP=$ac_ct_OBJDUMP
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+  ;;
+
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------------------------- ##
+## Report this to openal-devel@opensource.creative.com ##
+## --------------------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+fi
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_F77" && break
+done
+
+  F77=$ac_ct_F77
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:5784:" \
+     "checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_f77_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+G77=`test $ac_compiler_gnu = yes && echo yes`
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    ;;
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	    lt_cv_sys_max_cmd_len=$new_result &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+  echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+
+
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDGIRSTW]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris* | sysv5*)
+  symcode='[BDRT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+  echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  AR=$ac_ct_AR
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+enable_dlopen=no
+enable_win32_dll=yes
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+  withval="$with_pic"
+  pic_mode="$withval"
+else
+  pic_mode=default
+fi;
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+#
+# Check for any special shared library compilation flags.
+#
+lt_prog_cc_shlib=
+if test "$GCC" = no; then
+  case $host_os in
+  sco3.2v5*)
+    lt_prog_cc_shlib='-belf'
+    ;;
+  esac
+fi
+if test -n "$lt_prog_cc_shlib"; then
+  { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
+echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
+  if echo "$old_CC $old_CFLAGS " | grep "[ 	]$lt_prog_cc_shlib[ 	]" >/dev/null; then :
+  else
+    { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
+echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
+    lt_cv_prog_cc_can_build_shared=no
+  fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+     else
+       lt_prog_compiler_static_works=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6853: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:6857: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case "$cc_basename" in
+         xlc*)
+         lt_prog_compiler_pic='-qnocommon'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      pgcc | pgf77 | pgf90)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_prog_compiler_pic='-Kpic'
+      lt_prog_compiler_static='-dn'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7108: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7112: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
+
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7168: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:7172: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag=
+  enable_shared_with_static_runtimes=no
+  archive_cmds=
+  archive_expsym_cmds=
+  old_archive_From_new_cmds=
+  old_archive_from_expsyms_cmds=
+  export_dynamic_flag_spec=
+  whole_archive_flag_spec=
+  thread_safe_flag_spec=
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_direct=no
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  link_all_deplibs=unknown
+  hardcode_automatic=no
+  module_cmds=
+  module_expsym_cmds=
+  always_export_symbols=no
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      tmp_addflag=
+      case $CC,$host_cpu in
+      pgf77* | pgf90* )			# Portland Group f77 and f90 compilers
+        tmp_addflag=' -fpic' ;;
+      ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+        tmp_addflag=' -i_dynamic' ;;
+      efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+        tmp_addflag=' -i_dynamic -nofor_main' ;;
+      ifc* | ifort*)			# Intel Fortran compiler
+      	tmp_addflag=' -nofor_main' ;;
+      esac
+      archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        archive_expsym_cmds=$archive_cmds
+      fi
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = yes; then
+      runpath_var=LD_RUN_PATH
+      hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+      export_dynamic_flag_spec='${wl}--export-dynamic'
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ 	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L=yes
+  	  hardcode_libdir_flag_spec='-L$libdir'
+  	  hardcode_libdir_separator=
+	  fi
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  always_export_symbols=yes
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec=' '
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case "$host_os" in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc=no
+      hardcode_direct=no
+      hardcode_automatic=yes
+      hardcode_shlibpath_var=unsupported
+      whole_archive_flag_spec=''
+      link_all_deplibs=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_flag_spec_ld='+b $libdir'
+	  hardcode_libdir_separator=:
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	ia64*)
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	*)
+	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator=:
+	  hardcode_direct=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    openbsd*)
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+
+    sco3.2v5*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z text'
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+	whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=no
+      hardcode_shlibpath_var=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv5*)
+      no_undefined_flag=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      hardcode_libdir_flag_spec=
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var" || \
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 9368 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 9466 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# Report which librarie types wil actually be built
+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler \
+    CC \
+    LD \
+    lt_prog_compiler_wl \
+    lt_prog_compiler_pic \
+    lt_prog_compiler_static \
+    lt_prog_compiler_no_builtin_flag \
+    export_dynamic_flag_spec \
+    thread_safe_flag_spec \
+    whole_archive_flag_spec \
+    enable_shared_with_static_runtimes \
+    old_archive_cmds \
+    old_archive_from_new_cmds \
+    predep_objects \
+    postdep_objects \
+    predeps \
+    postdeps \
+    compiler_lib_search_path \
+    archive_cmds \
+    archive_expsym_cmds \
+    postinstall_cmds \
+    postuninstall_cmds \
+    old_archive_from_expsyms_cmds \
+    allow_undefined_flag \
+    no_undefined_flag \
+    export_symbols_cmds \
+    hardcode_libdir_flag_spec \
+    hardcode_libdir_flag_spec_ld \
+    hardcode_libdir_separator \
+    hardcode_automatic \
+    module_cmds \
+    module_expsym_cmds \
+    lt_cv_prog_compiler_c_o \
+    exclude_expsyms \
+    include_expsyms; do
+
+    case $var in
+    old_archive_cmds | \
+    old_archive_from_new_cmds | \
+    archive_cmds | \
+    archive_expsym_cmds | \
+    module_cmds | \
+    module_expsym_cmds | \
+    old_archive_from_expsyms_cmds | \
+    export_symbols_cmds | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  { echo "$as_me:$LINENO: creating $ofile" >&5
+echo "$as_me: creating $ofile" >&6;}
+
+  cat <<__EOF__ >> "$cfgfile"
+#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=$lt_AS
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+# Check whether --with-tags or --without-tags was given.
+if test "${with_tags+set}" = set; then
+  withval="$with_tags"
+  tagnames="$withval"
+fi;
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+    else
+      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+    fi
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
+    "") ;;
+    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+echo "$as_me: error: invalid tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_automatic_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+compiler_CXX=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+else
+  lt_prog_compiler_no_builtin_flag_CXX=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_CXX=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+ld_shlibs_CXX=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    archive_cmds_CXX=''
+    hardcode_direct_CXX=yes
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  hardcode_direct_CXX=yes
+	else
+	  # We have old collect2
+	  hardcode_direct_CXX=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L_CXX=yes
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  hardcode_libdir_separator_CXX=
+	fi
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    always_export_symbols_CXX=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      allow_undefined_flag_CXX='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	allow_undefined_flag_CXX="-z nodefs"
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	no_undefined_flag_CXX=' ${wl}-bernotok'
+	allow_undefined_flag_CXX=' ${wl}-berok'
+	# -bexpall does not export symbols beginning with underscore (_)
+	always_export_symbols_CXX=yes
+	# Exported symbols can be pulled into shared objects from archives
+	whole_archive_flag_spec_CXX=' '
+	archive_cmds_need_lc_CXX=yes
+	# This is similar to how AIX traditionally builds it's shared libraries.
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+    # as there is no search path for DLLs.
+    hardcode_libdir_flag_spec_CXX='-L$libdir'
+    allow_undefined_flag_CXX=unsupported
+    always_export_symbols_CXX=no
+    enable_shared_with_static_runtimes_CXX=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case "$host_os" in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      archive_cmds_need_lc_CXX=no
+      hardcode_direct_CXX=no
+      hardcode_automatic_CXX=yes
+      hardcode_shlibpath_var_CXX=unsupported
+      whole_archive_flag_spec_CXX=''
+      link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_CXX=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      ghcx)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    ld_shlibs_CXX=no
+    ;;
+  freebsd-elf*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  freebsd* | kfreebsd*-gnu | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    ld_shlibs_CXX=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    hardcode_direct_CXX=yes
+    hardcode_minus_L_CXX=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC)
+      # FIXME: insert proper C++ library support
+      ld_shlibs_CXX=no
+      ;;
+    aCC)
+      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      case "$host_cpu" in
+      hppa*64*)
+	hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+	hardcode_libdir_separator_CXX=:
+        ;;
+      ia64*)
+	hardcode_libdir_flag_spec_CXX='-L$libdir'
+        ;;
+      *)
+	hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_CXX=:
+	export_dynamic_flag_spec_CXX='${wl}-E'
+        ;;
+      esac
+    fi
+    case "$host_cpu" in
+    hppa*64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      ;;
+    ia64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    *)
+      hardcode_direct_CXX=yes
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      aCC)
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case "$host_cpu" in
+	    ia64*|hppa*64*)
+	      archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	      ;;
+	    *)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC)
+	# SGI C++
+	archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	  else
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	link_all_deplibs_CXX=yes
+	;;
+    esac
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	archive_cmds_need_lc_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC)
+        # Portland Group C++ compiler
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+        ;;
+      cxx)
+	# Compaq C++
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      hardcode_libdir_flag_spec_CXX='-R$libdir'
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    ld_shlibs_CXX=no
+    ;;
+  openbsd*)
+    hardcode_direct_CXX=yes
+    hardcode_shlibpath_var_CXX=no
+    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      export_dynamic_flag_spec_CXX='${wl}-E'
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      cxx)
+	allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	  archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+	;;
+      RCC)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      cxx)
+	allow_undefined_flag_CXX=' -expect_unresolved \*'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  sco*)
+    archive_cmds_need_lc_CXX=no
+    case $cc_basename in
+      CC)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      lcc)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC)
+	# Sun C++ 4.2, 5.x and Centerline C++
+	no_undefined_flag_CXX=' -zdefs'
+	archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-R$libdir'
+	hardcode_shlibpath_var_CXX=no
+	case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    # The C++ compiler is used as linker so we must use $wl
+	    # flag to pass the commands to the underlying system
+	    # linker.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	esac
+	link_all_deplibs_CXX=yes
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx)
+	# Green Hills C++ Compiler
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	fi
+	;;
+    esac
+    ;;
+  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+esac
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$rm -f confest.$objext
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+
+lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case "$cc_basename" in
+           xlc*)
+           lt_prog_compiler_pic_CXX='-qnocommon'
+           lt_prog_compiler_wl_CXX='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | kfreebsd*-gnu | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    case "$host_cpu" in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux*)
+	case $cc_basename in
+	  KCC)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC)
+	    # Portland Group C++ compiler.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  cxx)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      sco*)
+	case $cc_basename in
+	  CC)
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      unixware*)
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_CXX=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:11686: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:11690: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
+
+if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:11746: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:11750: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" || \
+   test -n "$runpath_var_CXX" || \
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6
+
+if test "$hardcode_action_CXX" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 13109 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 13207 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_CXX \
+    CC_CXX \
+    LD_CXX \
+    lt_prog_compiler_wl_CXX \
+    lt_prog_compiler_pic_CXX \
+    lt_prog_compiler_static_CXX \
+    lt_prog_compiler_no_builtin_flag_CXX \
+    export_dynamic_flag_spec_CXX \
+    thread_safe_flag_spec_CXX \
+    whole_archive_flag_spec_CXX \
+    enable_shared_with_static_runtimes_CXX \
+    old_archive_cmds_CXX \
+    old_archive_from_new_cmds_CXX \
+    predep_objects_CXX \
+    postdep_objects_CXX \
+    predeps_CXX \
+    postdeps_CXX \
+    compiler_lib_search_path_CXX \
+    archive_cmds_CXX \
+    archive_expsym_cmds_CXX \
+    postinstall_cmds_CXX \
+    postuninstall_cmds_CXX \
+    old_archive_from_expsyms_cmds_CXX \
+    allow_undefined_flag_CXX \
+    no_undefined_flag_CXX \
+    export_symbols_cmds_CXX \
+    hardcode_libdir_flag_spec_CXX \
+    hardcode_libdir_flag_spec_ld_CXX \
+    hardcode_libdir_separator_CXX \
+    hardcode_automatic_CXX \
+    module_cmds_CXX \
+    module_expsym_cmds_CXX \
+    lt_cv_prog_compiler_c_o_CXX \
+    exclude_expsyms_CXX \
+    include_expsyms_CXX; do
+
+    case $var in
+    old_archive_cmds_CXX | \
+    old_archive_from_new_cmds_CXX | \
+    archive_cmds_CXX | \
+    archive_expsym_cmds_CXX | \
+    module_cmds_CXX | \
+    module_expsym_cmds_CXX | \
+    old_archive_from_expsyms_cmds_CXX | \
+    export_symbols_cmds_CXX | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_CXX
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=$lt_AS
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_CXX
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_CXX
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_CXX"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+compiler_F77=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  test "$enable_shared" = yes && enable_static=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+GCC_F77="$G77"
+LD_F77="$LD"
+
+lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_F77='-Wl,'
+    lt_prog_compiler_static_F77='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_F77='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_F77=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_F77=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_F77='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      else
+	lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case "$cc_basename" in
+         xlc*)
+         lt_prog_compiler_pic_F77='-qnocommon'
+         lt_prog_compiler_wl_F77='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-KPIC'
+	lt_prog_compiler_static_F77='-static'
+        ;;
+      pgcc | pgf77 | pgf90)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-fpic'
+	lt_prog_compiler_static_F77='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_prog_compiler_pic_F77='-Kpic'
+      lt_prog_compiler_static_F77='-dn'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_F77='-Kconform_pic'
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_F77='-pic'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_F77=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14062: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:14066: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
+
+if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+     esac
+else
+    lt_prog_compiler_pic_F77=
+     lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_F77=
+    ;;
+  *)
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14122: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:14126: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o_F77=yes
+     fi
+   fi
+   chmod u+w .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag_F77=
+  enable_shared_with_static_runtimes_F77=no
+  archive_cmds_F77=
+  archive_expsym_cmds_F77=
+  old_archive_From_new_cmds_F77=
+  old_archive_from_expsyms_cmds_F77=
+  export_dynamic_flag_spec_F77=
+  whole_archive_flag_spec_F77=
+  thread_safe_flag_spec_F77=
+  hardcode_libdir_flag_spec_F77=
+  hardcode_libdir_flag_spec_ld_F77=
+  hardcode_libdir_separator_F77=
+  hardcode_direct_F77=no
+  hardcode_minus_L_F77=no
+  hardcode_shlibpath_var_F77=unsupported
+  link_all_deplibs_F77=unknown
+  hardcode_automatic_F77=no
+  module_cmds_F77=
+  module_expsym_cmds_F77=
+  always_export_symbols_F77=no
+  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_F77=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_F77=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_F77=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_F77=unsupported
+	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=no
+      enable_shared_with_static_runtimes_F77=yes
+      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    sunos4*)
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      tmp_addflag=
+      case $CC,$host_cpu in
+      pgf77* | pgf90* )			# Portland Group f77 and f90 compilers
+        tmp_addflag=' -fpic' ;;
+      ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+        tmp_addflag=' -i_dynamic' ;;
+      efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+        tmp_addflag=' -i_dynamic -nofor_main' ;;
+      ifc* | ifort*)			# Intel Fortran compiler
+      	tmp_addflag=' -nofor_main' ;;
+      esac
+      archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        archive_expsym_cmds_F77=$archive_cmds_F77
+      fi
+    else
+      ld_shlibs_F77=no
+    fi
+    ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_F77" = yes; then
+      runpath_var=LD_RUN_PATH
+      hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+      export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ 	whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_F77=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=yes
+      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_F77=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_F77=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_F77=''
+      hardcode_direct_F77=yes
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct_F77=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_F77=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_F77=yes
+  	  hardcode_libdir_flag_spec_F77='-L$libdir'
+  	  hardcode_libdir_separator_F77=
+	  fi
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_F77=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_F77='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_F77="-z nodefs"
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_F77=' ${wl}-bernotok'
+	  allow_undefined_flag_F77=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  always_export_symbols_F77=yes
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_F77=' '
+	  archive_cmds_need_lc_F77=yes
+	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_F77=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_F77=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_F77=' '
+      allow_undefined_flag_F77=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_F77='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case "$host_os" in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_F77=no
+      hardcode_direct_F77=no
+      hardcode_automatic_F77=yes
+      hardcode_shlibpath_var_F77=unsupported
+      whole_archive_flag_spec_F77=''
+      link_all_deplibs_F77=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_F77=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_F77=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_direct_F77=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+	  hardcode_libdir_separator_F77=:
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+	  ;;
+	ia64*)
+	  hardcode_libdir_flag_spec_F77='-L$libdir'
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	*)
+	  hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_F77=:
+	  hardcode_direct_F77=yes
+	  export_dynamic_flag_spec_F77='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      link_all_deplibs_F77=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    newsos6)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_F77='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec_F77='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    sco3.2v5*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      no_undefined_flag_F77=' -z text'
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+	whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
+      esac
+      link_all_deplibs_F77=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_F77='$CC -r -o $output$reload_objs'
+	  hardcode_direct_F77=no
+        ;;
+	motorola)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_F77=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_F77=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag_F77='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv5*)
+      no_undefined_flag_F77=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      hardcode_libdir_flag_spec_F77=
+      hardcode_shlibpath_var_F77=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      ld_shlibs_F77=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+echo "${ECHO_T}$ld_shlibs_F77" >&6
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_F77=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_F77 in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+        allow_undefined_flag_F77=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_F77=no
+        else
+	  archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" || \
+   test -n "$runpath_var_F77" || \
+   test "X$hardcode_automatic_F77" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_F77" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+     test "$hardcode_minus_L_F77" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_F77=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_F77=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_F77=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+echo "${ECHO_T}$hardcode_action_F77" >&6
+
+if test "$hardcode_action_F77" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_F77 \
+    CC_F77 \
+    LD_F77 \
+    lt_prog_compiler_wl_F77 \
+    lt_prog_compiler_pic_F77 \
+    lt_prog_compiler_static_F77 \
+    lt_prog_compiler_no_builtin_flag_F77 \
+    export_dynamic_flag_spec_F77 \
+    thread_safe_flag_spec_F77 \
+    whole_archive_flag_spec_F77 \
+    enable_shared_with_static_runtimes_F77 \
+    old_archive_cmds_F77 \
+    old_archive_from_new_cmds_F77 \
+    predep_objects_F77 \
+    postdep_objects_F77 \
+    predeps_F77 \
+    postdeps_F77 \
+    compiler_lib_search_path_F77 \
+    archive_cmds_F77 \
+    archive_expsym_cmds_F77 \
+    postinstall_cmds_F77 \
+    postuninstall_cmds_F77 \
+    old_archive_from_expsyms_cmds_F77 \
+    allow_undefined_flag_F77 \
+    no_undefined_flag_F77 \
+    export_symbols_cmds_F77 \
+    hardcode_libdir_flag_spec_F77 \
+    hardcode_libdir_flag_spec_ld_F77 \
+    hardcode_libdir_separator_F77 \
+    hardcode_automatic_F77 \
+    module_cmds_F77 \
+    module_expsym_cmds_F77 \
+    lt_cv_prog_compiler_c_o_F77 \
+    exclude_expsyms_F77 \
+    include_expsyms_F77; do
+
+    case $var in
+    old_archive_cmds_F77 | \
+    old_archive_from_new_cmds_F77 | \
+    archive_cmds_F77 | \
+    archive_expsym_cmds_F77 | \
+    module_cmds_F77 | \
+    module_expsym_cmds_F77 | \
+    old_archive_from_expsyms_cmds_F77 | \
+    export_symbols_cmds_F77 | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=$lt_AS
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_F77
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_F77
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_F77
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_F77
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_F77"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+
+
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+objext_GCJ=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+compiler_GCJ=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+archive_cmds_need_lc_GCJ=no
+
+
+lt_prog_compiler_no_builtin_flag_GCJ=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16178: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:16182: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_GCJ='-Wl,'
+    lt_prog_compiler_static_GCJ='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_GCJ='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_GCJ=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_GCJ=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_GCJ='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      else
+	lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case "$cc_basename" in
+         xlc*)
+         lt_prog_compiler_pic_GCJ='-qnocommon'
+         lt_prog_compiler_wl_GCJ='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-KPIC'
+	lt_prog_compiler_static_GCJ='-static'
+        ;;
+      pgcc | pgf77 | pgf90)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-fpic'
+	lt_prog_compiler_static_GCJ='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_GCJ='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_GCJ='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_prog_compiler_pic_GCJ='-Kpic'
+      lt_prog_compiler_static_GCJ='-dn'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_GCJ='-Qoption ld '
+      lt_prog_compiler_pic_GCJ='-PIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_GCJ='-Kconform_pic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_GCJ='-pic'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_GCJ"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_GCJ=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16433: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:16437: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
+
+if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+    case $lt_prog_compiler_pic_GCJ in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     esac
+else
+    lt_prog_compiler_pic_GCJ=
+     lt_prog_compiler_can_build_shared_GCJ=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_GCJ=
+    ;;
+  *)
+    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_GCJ=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16493: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:16497: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o_GCJ=yes
+     fi
+   fi
+   chmod u+w .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag_GCJ=
+  enable_shared_with_static_runtimes_GCJ=no
+  archive_cmds_GCJ=
+  archive_expsym_cmds_GCJ=
+  old_archive_From_new_cmds_GCJ=
+  old_archive_from_expsyms_cmds_GCJ=
+  export_dynamic_flag_spec_GCJ=
+  whole_archive_flag_spec_GCJ=
+  thread_safe_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_ld_GCJ=
+  hardcode_libdir_separator_GCJ=
+  hardcode_direct_GCJ=no
+  hardcode_minus_L_GCJ=no
+  hardcode_shlibpath_var_GCJ=unsupported
+  link_all_deplibs_GCJ=unknown
+  hardcode_automatic_GCJ=no
+  module_cmds_GCJ=
+  module_expsym_cmds_GCJ=
+  always_export_symbols_GCJ=no
+  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_GCJ=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_GCJ=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_GCJ=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_GCJ=unsupported
+	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=no
+      enable_shared_with_static_runtimes_GCJ=yes
+      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    sunos4*)
+      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      tmp_addflag=
+      case $CC,$host_cpu in
+      pgf77* | pgf90* )			# Portland Group f77 and f90 compilers
+        tmp_addflag=' -fpic' ;;
+      ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+        tmp_addflag=' -i_dynamic' ;;
+      efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+        tmp_addflag=' -i_dynamic -nofor_main' ;;
+      ifc* | ifort*)			# Intel Fortran compiler
+      	tmp_addflag=' -nofor_main' ;;
+      esac
+      archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        archive_expsym_cmds_GCJ=$archive_cmds_GCJ
+      fi
+    else
+      ld_shlibs_GCJ=no
+    fi
+    ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_GCJ" = yes; then
+      runpath_var=LD_RUN_PATH
+      hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+      export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ 	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_GCJ=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=yes
+      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_GCJ=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_GCJ=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_GCJ=''
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct_GCJ=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_GCJ=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_GCJ=yes
+  	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
+  	  hardcode_libdir_separator_GCJ=
+	  fi
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_GCJ=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_GCJ='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_GCJ="-z nodefs"
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_GCJ=' ${wl}-bernotok'
+	  allow_undefined_flag_GCJ=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  always_export_symbols_GCJ=yes
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_GCJ=' '
+	  archive_cmds_need_lc_GCJ=yes
+	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_GCJ=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_GCJ=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ=' '
+      allow_undefined_flag_GCJ=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_GCJ='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_GCJ=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case "$host_os" in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_GCJ=no
+      hardcode_direct_GCJ=no
+      hardcode_automatic_GCJ=yes
+      hardcode_shlibpath_var_GCJ=unsupported
+      whole_archive_flag_spec_GCJ=''
+      link_all_deplibs_GCJ=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_GCJ=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_GCJ=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_direct_GCJ=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+	  hardcode_libdir_separator_GCJ=:
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+	  ;;
+	ia64*)
+	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_GCJ=yes
+	  ;;
+	*)
+	  hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_GCJ=:
+	  hardcode_direct_GCJ=yes
+	  export_dynamic_flag_spec_GCJ='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_GCJ=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    newsos6)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_GCJ='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec_GCJ='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      allow_undefined_flag_GCJ=unsupported
+      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    sco3.2v5*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      no_undefined_flag_GCJ=' -z text'
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+	whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
+      esac
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_GCJ='$CC -r -o $output$reload_objs'
+	  hardcode_direct_GCJ=no
+        ;;
+	motorola)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_GCJ=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_GCJ=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag_GCJ='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv5*)
+      no_undefined_flag_GCJ=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      hardcode_libdir_flag_spec_GCJ=
+      hardcode_shlibpath_var_GCJ=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      ld_shlibs_GCJ=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+echo "${ECHO_T}$ld_shlibs_GCJ" >&6
+test "$ld_shlibs_GCJ" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_GCJ" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_GCJ=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_GCJ in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_GCJ
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+        allow_undefined_flag_GCJ=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_GCJ=no
+        else
+	  archive_cmds_need_lc_GCJ=yes
+        fi
+        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_GCJ=
+if test -n "$hardcode_libdir_flag_spec_GCJ" || \
+   test -n "$runpath_var_GCJ" || \
+   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_GCJ" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
+     test "$hardcode_minus_L_GCJ" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_GCJ=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_GCJ=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_GCJ=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+echo "${ECHO_T}$hardcode_action_GCJ" >&6
+
+if test "$hardcode_action_GCJ" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 18693 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 18791 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_GCJ \
+    CC_GCJ \
+    LD_GCJ \
+    lt_prog_compiler_wl_GCJ \
+    lt_prog_compiler_pic_GCJ \
+    lt_prog_compiler_static_GCJ \
+    lt_prog_compiler_no_builtin_flag_GCJ \
+    export_dynamic_flag_spec_GCJ \
+    thread_safe_flag_spec_GCJ \
+    whole_archive_flag_spec_GCJ \
+    enable_shared_with_static_runtimes_GCJ \
+    old_archive_cmds_GCJ \
+    old_archive_from_new_cmds_GCJ \
+    predep_objects_GCJ \
+    postdep_objects_GCJ \
+    predeps_GCJ \
+    postdeps_GCJ \
+    compiler_lib_search_path_GCJ \
+    archive_cmds_GCJ \
+    archive_expsym_cmds_GCJ \
+    postinstall_cmds_GCJ \
+    postuninstall_cmds_GCJ \
+    old_archive_from_expsyms_cmds_GCJ \
+    allow_undefined_flag_GCJ \
+    no_undefined_flag_GCJ \
+    export_symbols_cmds_GCJ \
+    hardcode_libdir_flag_spec_GCJ \
+    hardcode_libdir_flag_spec_ld_GCJ \
+    hardcode_libdir_separator_GCJ \
+    hardcode_automatic_GCJ \
+    module_cmds_GCJ \
+    module_expsym_cmds_GCJ \
+    lt_cv_prog_compiler_c_o_GCJ \
+    exclude_expsyms_GCJ \
+    include_expsyms_GCJ; do
+
+    case $var in
+    old_archive_cmds_GCJ | \
+    old_archive_from_new_cmds_GCJ | \
+    archive_cmds_GCJ | \
+    archive_expsym_cmds_GCJ | \
+    module_cmds_GCJ | \
+    module_expsym_cmds_GCJ | \
+    old_archive_from_expsyms_cmds_GCJ | \
+    export_symbols_cmds_GCJ | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_GCJ
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_GCJ
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=$lt_AS
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_GCJ
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_GCJ
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_GCJ
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_GCJ
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_GCJ
+archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_GCJ
+module_expsym_cmds=$lt_module_expsym_cmds_GCJ
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_GCJ
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_GCJ
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_GCJ
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_GCJ
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_GCJ
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_GCJ"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_GCJ
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+compiler_RC=$CC
+lt_cv_prog_compiler_c_o_RC=yes
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS AS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_RC \
+    CC_RC \
+    LD_RC \
+    lt_prog_compiler_wl_RC \
+    lt_prog_compiler_pic_RC \
+    lt_prog_compiler_static_RC \
+    lt_prog_compiler_no_builtin_flag_RC \
+    export_dynamic_flag_spec_RC \
+    thread_safe_flag_spec_RC \
+    whole_archive_flag_spec_RC \
+    enable_shared_with_static_runtimes_RC \
+    old_archive_cmds_RC \
+    old_archive_from_new_cmds_RC \
+    predep_objects_RC \
+    postdep_objects_RC \
+    predeps_RC \
+    postdeps_RC \
+    compiler_lib_search_path_RC \
+    archive_cmds_RC \
+    archive_expsym_cmds_RC \
+    postinstall_cmds_RC \
+    postuninstall_cmds_RC \
+    old_archive_from_expsyms_cmds_RC \
+    allow_undefined_flag_RC \
+    no_undefined_flag_RC \
+    export_symbols_cmds_RC \
+    hardcode_libdir_flag_spec_RC \
+    hardcode_libdir_flag_spec_ld_RC \
+    hardcode_libdir_separator_RC \
+    hardcode_automatic_RC \
+    module_cmds_RC \
+    module_expsym_cmds_RC \
+    lt_cv_prog_compiler_c_o_RC \
+    exclude_expsyms_RC \
+    include_expsyms_RC; do
+
+    case $var in
+    old_archive_cmds_RC | \
+    old_archive_from_new_cmds_RC | \
+    archive_cmds_RC | \
+    archive_expsym_cmds_RC | \
+    module_cmds_RC | \
+    module_expsym_cmds_RC | \
+    old_archive_from_expsyms_cmds_RC | \
+    export_symbols_cmds_RC | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_RC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=$lt_AS
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_RC
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_RC
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_RC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_RC"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+	;;
+
+      *)
+	{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Prevent multiple expansion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+for ac_prog in pkg-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$PKG_CONFIG"; then
+  ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_PKG_CONFIG="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$PKG_CONFIG" && break
+done
+test -n "$PKG_CONFIG" || PKG_CONFIG="none"
+
+
+################################################################################
+# Checks for library functions.
+################################################################################
+
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  echo "$as_me:$LINENO: checking for _mwvalidcheckl in -lmw" >&5
+echo $ECHO_N "checking for _mwvalidcheckl in -lmw... $ECHO_C" >&6
+if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmw  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char _mwvalidcheckl ();
+int
+main ()
+{
+_mwvalidcheckl ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_mw__mwvalidcheckl=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_mw__mwvalidcheckl=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
+echo "${ECHO_T}$ac_cv_lib_mw__mwvalidcheckl" >&6
+if test $ac_cv_lib_mw__mwvalidcheckl = yes; then
+  LIBM="-lmw"
+fi
+
+  echo "$as_me:$LINENO: checking for cos in -lm" >&5
+echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_cos+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char cos ();
+int
+main ()
+{
+cos ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_m_cos=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_cos=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
+echo "${ECHO_T}$ac_cv_lib_m_cos" >&6
+if test $ac_cv_lib_m_cos = yes; then
+  LIBM="$LIBM -lm"
+fi
+
+  ;;
+*)
+  echo "$as_me:$LINENO: checking for cos in -lm" >&5
+echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_cos+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char cos ();
+int
+main ()
+{
+cos ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_m_cos=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_cos=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
+echo "${ECHO_T}$ac_cv_lib_m_cos" >&6
+if test $ac_cv_lib_m_cos = yes; then
+  LIBM="-lm"
+fi
+
+  ;;
+esac
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_join ();
+int
+main ()
+{
+pthread_join ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  acx_pthread_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+        echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+echo "${ECHO_T}$acx_pthread_ok" >&6
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+        ;;
+
+
+        *linux*)
+
+        # On Linux we want to actually link to pthread library, so test lib first
+
+        acx_pthread_flags="pthread -pthread --thread-safe pthread-config"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
+echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
+                ;;
+
+                -*)
+                echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
+echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+		pthread-config)
+		# Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$acx_pthread_config"; then
+  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_acx_pthread_config="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+fi
+fi
+acx_pthread_config=$ac_cv_prog_acx_pthread_config
+if test -n "$acx_pthread_config"; then
+  echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
+echo "${ECHO_T}$acx_pthread_config" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+		if test x"$acx_pthread_config" = xno; then continue; fi
+		PTHREAD_CFLAGS="`pthread-config --cflags`"
+		PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+		;;
+
+                *)
+                echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
+echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  acx_pthread_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+echo "${ECHO_T}$acx_pthread_ok" >&6
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+	echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
+echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
+	attr_name=unknown
+	for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+	    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int attr=$attr; return attr;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  attr_name=$attr; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+	done
+        echo "$as_me:$LINENO: result: $attr_name" >&5
+echo "${ECHO_T}$attr_name" >&6
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
+_ACEOF
+
+        fi
+
+        echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
+echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
+        flag=no
+        case "${host_cpu}-${host_os}" in
+            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        echo "$as_me:$LINENO: result: ${flag}" >&5
+echo "${ECHO_T}${flag}" >&6
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        # Extract the first word of "cc_r", so it can be a program name with args.
+set dummy cc_r; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$PTHREAD_CC"; then
+  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_PTHREAD_CC="cc_r"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+  echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
+echo "${ECHO_T}$PTHREAD_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+else
+        PTHREAD_CC="$CC"
+fi
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+        LIBS="$PTHREAD_LIBS $LIBS"
+   FEATURECFLAGS="$FEATURECFLAGS $PTHREAD_CFLAGS"
+   CC=$PTHREAD_CC
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_POSIXTHREADING 1
+_ACEOF
+
+        :
+else
+        acx_pthread_ok=no
+        echo "$as_me:$LINENO: checking for windows.h" >&5
+echo $ECHO_N "checking for windows.h... $ECHO_C" >&6
+if test "${ac_cv_header_windows_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <windows.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_windows_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_windows_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5
+echo "${ECHO_T}$ac_cv_header_windows_h" >&6
+if test $ac_cv_header_windows_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_WINDOWSTHREADING 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for dos/dosextens.h" >&5
+echo $ECHO_N "checking for dos/dosextens.h... $ECHO_C" >&6
+if test "${ac_cv_header_dos_dosextens_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <dos/dosextens.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_dos_dosextens_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_dos_dosextens_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dos_dosextens_h" >&5
+echo "${ECHO_T}$ac_cv_header_dos_dosextens_h" >&6
+if test $ac_cv_header_dos_dosextens_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_MORPHOSTHREADING 1
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_THREADING 1
+_ACEOF
+
+fi
+
+
+fi
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+################################################################################
+# Handle warning-related options.
+################################################################################
+
+# Check whether --enable-warnings or --disable-warnings was given.
+if test "${enable_warnings+set}" = set; then
+  enableval="$enable_warnings"
+
+fi;
+
+if test "x$enable_warnings" = xno; then
+  WARNINGCFLAGS=""
+else
+  # Doing it in two steps gives a nicer message...
+  echo "$as_me:$LINENO: checking flags for maximum ANSI warnings" >&5
+echo $ECHO_N "checking flags for maximum ANSI warnings... $ECHO_C" >&6
+if test "${ac_cv_cflags_warn_all_ansi+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_cflags_warn_all_ansi="no, unknown"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_save_CFLAGS="$CFLAGS"
+# IRIX C compiler:
+#      -use_readonly_const is the default for IRIX C,
+#       puts them into .rodata, but they are copied later.
+#       need to be "-G0 -rdatashared" for strictmode but
+#       I am not sure what effect that has really.         - guidod
+for ac_arg in "-pedantic  % -Wall -ansi -pedantic"          "-xstrconst % -v -Xc"                         "-std1      % -verbose -w0 -warnprotos -std1"    " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"    " % -ansi -ansiE -fullwarn"                   "+ESlit     % +w1 -Aa"                        "-Xc        % -pvctl,fullmsg -Xc"           "-h conform % -h msglevel 2 -h conform"       #
+do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cflags_warn_all_ansi=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+ CFLAGS="$ac_save_CFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cflags_warn_all_ansi" >&5
+echo "${ECHO_T}$ac_cv_cflags_warn_all_ansi" >&6
+case ".$ac_cv_cflags_warn_all_ansi" in
+     .ok|.ok,*)  ;;
+   .|.no|.no,*)
+ ;;
+   *)
+   if echo " $flags " | grep " $ac_cv_cflags_warn_all_ansi " 2>&1 >/dev/null
+   then { (echo "$as_me:$LINENO: : flags does contain \$ac_cv_cflags_warn_all_ansi") >&5
+  (: flags does contain $ac_cv_cflags_warn_all_ansi) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+   else { (echo "$as_me:$LINENO: : flags=\"\$flags \$ac_cv_cflags_warn_all_ansi\"") >&5
+  (: flags="$flags $ac_cv_cflags_warn_all_ansi") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+                      flags="$flags $ac_cv_cflags_warn_all_ansi"
+   fi
+ ;;
+esac
+
+  WARNINGCFLAGS=$flags
+fi
+
+# Check whether --enable-more-warnings or --disable-more-warnings was given.
+if test "${enable_more_warnings+set}" = set; then
+  enableval="$enable_more_warnings"
+
+fi;
+
+if test "x$enable_more_warnings" = xyes; then
+  if test "x$enable_warnings" = xno; then
+    { echo "$as_me:$LINENO: WARNING: --enable-more-warnings ignored because of --disable-warnings" >&5
+echo "$as_me: WARNING: --enable-more-warnings ignored because of --disable-warnings" >&2;}
+  elif test "x$GCC" != xyes; then
+    { echo "$as_me:$LINENO: WARNING: --enable-more-warnings ignored because no GCC was detected" >&5
+echo "$as_me: WARNING: --enable-more-warnings ignored because no GCC was detected" >&2;}
+  else
+    # The long list of warning options below contains every GCC warning option
+    # which is not automatically enabled with -Wall. The only exceptions to this
+    # rule are:
+    #
+    #    -Wpadded:
+    #      Perhaps good for optimizing out data layout, but not in general.
+    #
+    #    -Wconversion:
+    #      Passing e.g. float as an argument is fine, we always have prototypes.
+    #
+    #    -Wfloat-equal:
+    #       Often we should use an epsilon, but there are some correct uses,
+    #       too, so we leave it out for now. ToDo: Fix those warnings, anyway!
+    #
+    # Note that some older GCC versions give false positives about unreachable
+    # code. Furthermore, using GNU's <string.h> header normally results in lots
+    # of string functions like strcmp being macros which result in such false
+    # positives, too. To disable those, one can use -D__NO_STRING_INLINES for
+    # testing. And another source for false positives is inlining, so leaving
+    # out -finline-functions or using -fno-inline-functions explicitly might
+    # help, too.
+    WARNINGCFLAGS="$WARNINGCFLAGS -W -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wdisabled-optimization -Wendif-labels -Winline -Wlong-long -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef -Wunreachable-code -Wwrite-strings"
+
+    # Check for GCC 4.x-only warning options.
+    alut_compiler="$CC"
+echo "$as_me:$LINENO: checking whether $alut_compiler accepts -Wdeclaration-after-statement" >&5
+echo $ECHO_N "checking whether $alut_compiler accepts -Wdeclaration-after-statement... $ECHO_C" >&6
+if test "${alut_cv_CFLAGS_Wdeclaration_after_statement+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+alut_save_flags="$CFLAGS"
+CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+alut_cv_CFLAGS_Wdeclaration_after_statement=no
+if { (eval $ac_compile conftest.$ac_ext) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); } >/dev/null; then
+  test -s conftest.err || alut_cv_CFLAGS_Wdeclaration_after_statement=yes
+fi
+CFLAGS="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv_CFLAGS_Wdeclaration_after_statement" >&5
+echo "${ECHO_T}$alut_cv_CFLAGS_Wdeclaration_after_statement" >&6
+if test $alut_cv_CFLAGS_Wdeclaration_after_statement = yes; then
+  WARNINGCFLAGS="$WARNINGCFLAGS -Wdeclaration-after-statement"
+fi
+
+    alut_compiler="$CC"
+echo "$as_me:$LINENO: checking whether $alut_compiler accepts -Winvalid-pch" >&5
+echo $ECHO_N "checking whether $alut_compiler accepts -Winvalid-pch... $ECHO_C" >&6
+if test "${alut_cv_CFLAGS_Winvalid_pch+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+alut_save_flags="$CFLAGS"
+CFLAGS="$CFLAGS -Winvalid-pch"
+alut_cv_CFLAGS_Winvalid_pch=no
+if { (eval $ac_compile conftest.$ac_ext) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); } >/dev/null; then
+  test -s conftest.err || alut_cv_CFLAGS_Winvalid_pch=yes
+fi
+CFLAGS="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv_CFLAGS_Winvalid_pch" >&5
+echo "${ECHO_T}$alut_cv_CFLAGS_Winvalid_pch" >&6
+if test $alut_cv_CFLAGS_Winvalid_pch = yes; then
+  WARNINGCFLAGS="$WARNINGCFLAGS -Winvalid-pch"
+fi
+
+    alut_compiler="$CC"
+echo "$as_me:$LINENO: checking whether $alut_compiler accepts -Wmissing-field-initializers" >&5
+echo $ECHO_N "checking whether $alut_compiler accepts -Wmissing-field-initializers... $ECHO_C" >&6
+if test "${alut_cv_CFLAGS_Wmissing_field_initializers+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+alut_save_flags="$CFLAGS"
+CFLAGS="$CFLAGS -Wmissing-field-initializers"
+alut_cv_CFLAGS_Wmissing_field_initializers=no
+if { (eval $ac_compile conftest.$ac_ext) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); } >/dev/null; then
+  test -s conftest.err || alut_cv_CFLAGS_Wmissing_field_initializers=yes
+fi
+CFLAGS="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv_CFLAGS_Wmissing_field_initializers" >&5
+echo "${ECHO_T}$alut_cv_CFLAGS_Wmissing_field_initializers" >&6
+if test $alut_cv_CFLAGS_Wmissing_field_initializers = yes; then
+  WARNINGCFLAGS="$WARNINGCFLAGS -Wmissing-field-initializers"
+fi
+
+    # We cheat here a bit: The code generated by AC_LANG_PROGRAM triggers a
+    # warning with -Wold-style-definition, so we assume that this flag is
+    # supported whenever -Wvariadic-macros is.
+    alut_compiler="$CC"
+echo "$as_me:$LINENO: checking whether $alut_compiler accepts -Wvariadic-macros" >&5
+echo $ECHO_N "checking whether $alut_compiler accepts -Wvariadic-macros... $ECHO_C" >&6
+if test "${alut_cv_CFLAGS_Wvariadic_macros+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+alut_save_flags="$CFLAGS"
+CFLAGS="$CFLAGS -Wvariadic-macros"
+alut_cv_CFLAGS_Wvariadic_macros=no
+if { (eval $ac_compile conftest.$ac_ext) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); } >/dev/null; then
+  test -s conftest.err || alut_cv_CFLAGS_Wvariadic_macros=yes
+fi
+CFLAGS="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv_CFLAGS_Wvariadic_macros" >&5
+echo "${ECHO_T}$alut_cv_CFLAGS_Wvariadic_macros" >&6
+if test $alut_cv_CFLAGS_Wvariadic_macros = yes; then
+  WARNINGCFLAGS="$WARNINGCFLAGS -Wvariadic-macros -Wold-style-definition"
+fi
+
+  fi
+fi
+
+# Check whether --enable-werror or --disable-werror was given.
+if test "${enable_werror+set}" = set; then
+  enableval="$enable_werror"
+
+fi;
+
+if test "x$enable_werror" = xyes; then
+  if test "x$enable_warnings" = xno; then
+    { echo "$as_me:$LINENO: WARNING: --enable-werror ignored because of --disable-warnings" >&5
+echo "$as_me: WARNING: --enable-werror ignored because of --disable-warnings" >&2;}
+  elif test "x$GCC" != xyes; then
+    { echo "$as_me:$LINENO: WARNING: --enable-werror ignored because no GCC was detected" >&5
+echo "$as_me: WARNING: --enable-werror ignored because no GCC was detected" >&2;}
+  else
+    WARNINGCFLAGS="$WARNINGCFLAGS -Werror"
+  fi
+fi
+
+################################################################################
+# Handle debugging-related options.
+################################################################################
+
+# Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval="$enable_debug"
+
+fi;
+
+if test "x$enable_debug" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG 1
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NDEBUG 1
+_ACEOF
+
+fi
+
+# Check whether --enable-efence or --disable-efence was given.
+if test "${enable_efence+set}" = set; then
+  enableval="$enable_efence"
+
+fi;
+
+if test "x$enable_efence" = xyes; then
+  openal_saved_LIBS=$LIBS
+  LIBS="-lefence $LIBS"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+extern int EF_ALIGNMENT;
+int
+main ()
+{
+EF_ALIGNMENT = 8;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ echo "$as_me:$LINENO: WARNING: --enable-efence ignored because the Electric Fence library was not found." >&5
+echo "$as_me: WARNING: --enable-efence ignored because the Electric Fence library was not found." >&2;}
+     LIBS=$openal_saved_LIBS
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+
+# stubifying
+# Check whether --enable-debug-stub or --disable-debug-stub was given.
+if test "${enable_debug_stub+set}" = set; then
+  enableval="$enable_debug_stub"
+
+fi;
+
+if test "x$enable_debug_stub" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_STUB 1
+_ACEOF
+
+fi
+
+# looping debug notification
+# Check whether --enable-debug-loop or --disable-debug-loop was given.
+if test "${enable_debug_loop+set}" = set; then
+  enableval="$enable_debug_loop"
+
+fi;
+
+if test "x$enable_debug_loop" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_LOOP 1
+_ACEOF
+
+fi
+
+# conversion debug notification
+# Check whether --enable-debug-convert or --disable-debug-convert was given.
+if test "${enable_debug_convert+set}" = set; then
+  enableval="$enable_debug_convert"
+
+fi;
+
+if test "x$enable_debug_convert" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_CONVERT 1
+_ACEOF
+
+fi
+
+# config file debug notification
+# Check whether --enable-debug-config or --disable-debug-config was given.
+if test "${enable_debug_config+set}" = set; then
+  enableval="$enable_debug_config"
+
+fi;
+
+if test "x$enable_debug_config" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_CONFIG 1
+_ACEOF
+
+fi
+
+# lock debug notification
+# Check whether --enable-debug-lock or --disable-debug-lock was given.
+if test "${enable_debug_lock+set}" = set; then
+  enableval="$enable_debug_lock"
+
+fi;
+
+if test "x$enable_debug_lock" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_LOCK 1
+_ACEOF
+
+fi
+
+# extension debug notification
+# Check whether --enable-debug-ext or --disable-debug-ext was given.
+if test "${enable_debug_ext+set}" = set; then
+  enableval="$enable_debug_ext"
+
+fi;
+
+if test "x$enable_debug_ext" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_EXT 1
+_ACEOF
+
+fi
+
+# buffer debug notification
+# Check whether --enable-debug-buffer or --disable-debug-buffer was given.
+if test "${enable_debug_buffer+set}" = set; then
+  enableval="$enable_debug_buffer"
+
+fi;
+
+if test "x$enable_debug_buffer" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_BUFFER 1
+_ACEOF
+
+fi
+
+# source debug notification
+# Check whether --enable-debug-source or --disable-debug-source was given.
+if test "${enable_debug_source+set}" = set; then
+  enableval="$enable_debug_source"
+
+fi;
+
+if test "x$enable_debug_source" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_SOURCE 1
+_ACEOF
+
+fi
+
+# mixer debug notification
+# Check whether --enable-debug-mixer or --disable-debug-mixer was given.
+if test "${enable_debug_mixer+set}" = set; then
+  enableval="$enable_debug_mixer"
+
+fi;
+
+if test "x$enable_debug_mixer" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_MIXER 1
+_ACEOF
+
+fi
+
+# streaming debug notification
+# Check whether --enable-debug-streaming or --disable-debug-streaming was given.
+if test "${enable_debug_streaming+set}" = set; then
+  enableval="$enable_debug_streaming"
+
+fi;
+
+if test "x$enable_debug_streaming" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_STREAMING 1
+_ACEOF
+
+fi
+
+# math debug notification
+# Check whether --enable-debug-math or --disable-debug-math was given.
+if test "${enable_debug_math+set}" = set; then
+  enableval="$enable_debug_math"
+
+fi;
+
+if test "x$enable_debug_math" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_MATH 1
+_ACEOF
+
+fi
+
+# mem debug notification
+# Check whether --enable-debug-mem or --disable-debug-mem was given.
+if test "${enable_debug_mem+set}" = set; then
+  enableval="$enable_debug_mem"
+
+fi;
+
+if test "x$enable_debug_mem" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_MEM 1
+_ACEOF
+
+fi
+
+# context debug notification
+# Check whether --enable-debug-context or --disable-debug-context was given.
+if test "${enable_debug_context+set}" = set; then
+  enableval="$enable_debug_context"
+
+fi;
+
+if test "x$enable_debug_context" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_CONTEXT 1
+_ACEOF
+
+fi
+
+# debug queue structures/functions/etc
+# Check whether --enable-debug-queue or --disable-debug-queue was given.
+if test "${enable_debug_queue+set}" = set; then
+  enableval="$enable_debug_queue"
+
+fi;
+
+if test "x$enable_debug_queue" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_QUEUE 1
+_ACEOF
+
+fi
+
+# debug filter
+# Check whether --enable-debug-filter or --disable-debug-filter was given.
+if test "${enable_debug_filter+set}" = set; then
+  enableval="$enable_debug_filter"
+
+fi;
+
+if test "x$enable_debug_filter" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_FILTER 1
+_ACEOF
+
+fi
+
+# debug maximus
+# Check whether --enable-debug-maximus or --disable-debug-maximus was given.
+if test "${enable_debug_maximus+set}" = set; then
+  enableval="$enable_debug_maximus"
+
+fi;
+
+if test "x$enable_debug_maximus" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_MAXIMUS 1
+_ACEOF
+
+fi
+
+################################################################################
+# Handle optimization-related options.
+################################################################################
+
+# Check whether --enable-optimization or --disable-optimization was given.
+if test "${enable_optimization+set}" = set; then
+  enableval="$enable_optimization"
+
+fi;
+
+if test "x$enable_optimization" != xno; then
+  alut_compiler="$CC"
+echo "$as_me:$LINENO: checking whether $alut_compiler accepts -finline-functions" >&5
+echo $ECHO_N "checking whether $alut_compiler accepts -finline-functions... $ECHO_C" >&6
+if test "${alut_cv_CFLAGS_finline_functions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+alut_save_flags="$CFLAGS"
+CFLAGS="$CFLAGS -finline-functions"
+alut_cv_CFLAGS_finline_functions=no
+if { (eval $ac_compile conftest.$ac_ext) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); } >/dev/null; then
+  test -s conftest.err || alut_cv_CFLAGS_finline_functions=yes
+fi
+CFLAGS="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv_CFLAGS_finline_functions" >&5
+echo "${ECHO_T}$alut_cv_CFLAGS_finline_functions" >&6
+if test $alut_cv_CFLAGS_finline_functions = yes; then
+  OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -finline-functions"
+fi
+
+  alut_compiler="$CC"
+echo "$as_me:$LINENO: checking whether $alut_compiler accepts -ffast-math" >&5
+echo $ECHO_N "checking whether $alut_compiler accepts -ffast-math... $ECHO_C" >&6
+if test "${alut_cv_CFLAGS_ffast_math+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+alut_save_flags="$CFLAGS"
+CFLAGS="$CFLAGS -ffast-math"
+alut_cv_CFLAGS_ffast_math=no
+if { (eval $ac_compile conftest.$ac_ext) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); } >/dev/null; then
+  test -s conftest.err || alut_cv_CFLAGS_ffast_math=yes
+fi
+CFLAGS="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv_CFLAGS_ffast_math" >&5
+echo "${ECHO_T}$alut_cv_CFLAGS_ffast_math" >&6
+if test $alut_cv_CFLAGS_ffast_math = yes; then
+  OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -ffast-math"
+fi
+
+  # -pg and -fomit-frame-pointer are incompatible. ToDo: Test for this!
+  if test "x$enable_profile" != xyes; then
+    alut_compiler="$CC"
+echo "$as_me:$LINENO: checking whether $alut_compiler accepts -fomit-frame-pointer" >&5
+echo $ECHO_N "checking whether $alut_compiler accepts -fomit-frame-pointer... $ECHO_C" >&6
+if test "${alut_cv_CFLAGS_fomit_frame_pointer+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+alut_save_flags="$CFLAGS"
+CFLAGS="$CFLAGS -fomit-frame-pointer"
+alut_cv_CFLAGS_fomit_frame_pointer=no
+if { (eval $ac_compile conftest.$ac_ext) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); } >/dev/null; then
+  test -s conftest.err || alut_cv_CFLAGS_fomit_frame_pointer=yes
+fi
+CFLAGS="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv_CFLAGS_fomit_frame_pointer" >&5
+echo "${ECHO_T}$alut_cv_CFLAGS_fomit_frame_pointer" >&6
+if test $alut_cv_CFLAGS_fomit_frame_pointer = yes; then
+  OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -fomit-frame-pointer"
+fi
+
+  fi
+fi
+
+# profiling stuff
+# Check whether --enable-profile or --disable-profile was given.
+if test "${enable_profile+set}" = set; then
+  enableval="$enable_profile"
+
+fi;
+
+if test "x$enable_profile" = xyes; then
+  alut_compiler="$CC"
+echo "$as_me:$LINENO: checking whether $alut_compiler accepts -pg" >&5
+echo $ECHO_N "checking whether $alut_compiler accepts -pg... $ECHO_C" >&6
+if test "${alut_cv_CFLAGS_pg+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+alut_save_flags="$CFLAGS"
+CFLAGS="$CFLAGS -pg"
+alut_cv_CFLAGS_pg=no
+if { (eval $ac_compile conftest.$ac_ext) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); } >/dev/null; then
+  test -s conftest.err || alut_cv_CFLAGS_pg=yes
+fi
+CFLAGS="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv_CFLAGS_pg" >&5
+echo "${ECHO_T}$alut_cv_CFLAGS_pg" >&6
+if test $alut_cv_CFLAGS_pg = yes; then
+  OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -pg"
+                   PROFILINGLDFLAGS="$LDFLAGS -pg"
+else
+  { echo "$as_me:$LINENO: WARNING: --enable-profile ignored because $CC does not support -pg." >&5
+echo "$as_me: WARNING: --enable-profile ignored because $CC does not support -pg." >&2;}
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianness by grepping values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+int
+main ()
+{
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+  yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+  no)
+     ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+
+# A few notes about dynamic loading of libraries: We should really use libtool's
+# mechanisms for this, but for now we have to get our hands dirty with dlopen
+# and friends and hope for the best. These calls are available on a lot of
+# *nices and Cygwin and according to Apple's developer pages, they are available
+# on Mac OS X 10.3 and later, too. In former Mac OS X versions one has to use
+# the dlcompat library to emulate this facility. Furthermore, adding "-ldl"
+# might be required, but not always (e.g. Cygwin).
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------------------------- ##
+## Report this to openal-devel@opensource.creative.com ##
+## --------------------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  LIBS="-ldl $LIBS"
+fi
+
+else
+  { echo "$as_me:$LINENO: WARNING: Dynamic loading of libraries is not available." >&5
+echo "$as_me: WARNING: Dynamic loading of libraries is not available." >&2;}
+
+cat >>confdefs.h <<\_ACEOF
+#define NODLOPEN 1
+_ACEOF
+
+fi
+
+done
+
+
+# ranlib stuff
+case "$target" in
+    *darwin*) RANLIB=ranlib ;;
+    *) RANLIB=echo ;;
+esac
+
+case "$target" in
+  *darwin*) LIBS="$LIBS -I/System/Library/Frameworks/CoreAudio.framework/Headers/ -framework CoreAudio"
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_NATIVE_DARWIN 1
+_ACEOF
+ ;;
+esac
+
+case "$target" in
+    *i386* | *i486* | *i586* | *i686* | *x86_64*)
+    openal_x86_support_yn=yes
+
+    echo "$as_me:$LINENO: checking for MMX support" >&5
+echo $ECHO_N "checking for MMX support... $ECHO_C" >&6
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifndef __MMX__
+#error no MMX support
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  openal_x86_mmx_support_yn=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+openal_x86_mmx_support_yn=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    echo "$as_me:$LINENO: result: $openal_x86_mmx_support_yn" >&5
+echo "${ECHO_T}$openal_x86_mmx_support_yn" >&6
+    ;;
+esac
+
+if test "x$openal_x86_mmx_support_yn" = xyes; then
+case "$target" in
+    *i386* | *i486* | *i586* | *i686*)
+        # Extract the first word of "nasm", so it can be a program name with args.
+set dummy nasm; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_NASM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $NASM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NASM="$NASM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_NASM="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_NASM" && ac_cv_path_NASM="no"
+  ;;
+esac
+fi
+NASM=$ac_cv_path_NASM
+
+if test -n "$NASM"; then
+  echo "$as_me:$LINENO: result: $NASM" >&5
+echo "${ECHO_T}$NASM" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+        if test "x$NASM" != xno; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CPU_CAPS_DETECTION 1
+_ACEOF
+
+            openal_x86_nasm_support_yn=yes
+
+            if test "x$openal_x86_mmx_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMX_MEMCPY 1
+_ACEOF
+
+                openal_x86_nasm_mmx_support_yn=yes
+            fi
+
+            case "$target" in
+            *linux*)
+                NASM_FORMAT="-f elf"
+                ;;
+            *cygwin* | *mingw*)
+                NASM_FORMAT="-f win32 -DWIN32"
+                ;;
+            esac
+        fi
+        ;;
+    *x86_64*)
+        ;;
+    *)
+        ;;
+esac
+
+
+# Check whether --enable-optim-generic or --disable-optim-generic was given.
+if test "${enable_optim_generic+set}" = set; then
+  enableval="$enable_optim_generic"
+
+fi;
+
+if test "x$openal_x86_mmx_support_yn" = xyes; then
+    case "$target" in
+    *i686* | *x86_64*)
+        if test "x$enable_optim_generic" != xyes; then
+            enable_optim_generic=no
+        fi
+        ;;
+    *)
+        if test "x$enable_optim_generic" != xno; then
+            enable_optim_generic=yes
+        fi
+        ;;
+    esac
+
+    if test "x$enable_optim_generic" = xno; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_LIGHT_GEN_MIXING 1
+_ACEOF
+
+    fi
+fi
+fi
+
+
+
+if test "x$openal_x86_support_yn" = xyes; then
+  X86ENABLED_TRUE=
+  X86ENABLED_FALSE='#'
+else
+  X86ENABLED_TRUE='#'
+  X86ENABLED_FALSE=
+fi
+
+
+
+if test "x$openal_x86_mmx_support_yn" = xyes; then
+  X86MMXENABLED_TRUE=
+  X86MMXENABLED_FALSE='#'
+else
+  X86MMXENABLED_TRUE='#'
+  X86MMXENABLED_FALSE=
+fi
+
+
+
+if test "x$openal_x86_nasm_support_yn" = xyes; then
+  X86NASMENABLED_TRUE=
+  X86NASMENABLED_FALSE='#'
+else
+  X86NASMENABLED_TRUE='#'
+  X86NASMENABLED_FALSE=
+fi
+
+
+
+if test "x$openal_x86_nasm_mmx_support_yn" = xyes; then
+  X86NASMMMXENABLED_TRUE=
+  X86NASMMMXENABLED_FALSE='#'
+else
+  X86NASMMMXENABLED_TRUE='#'
+  X86NASMMMXENABLED_FALSE=
+fi
+
+
+# Note that -fvisibility=... support implies __attribute__((visibility(...)))
+# support.
+alut_compiler="$CC"
+echo "$as_me:$LINENO: checking whether $alut_compiler accepts -fvisibility=hidden" >&5
+echo $ECHO_N "checking whether $alut_compiler accepts -fvisibility=hidden... $ECHO_C" >&6
+if test "${alut_cv_CFLAGS_fvisibility_hidden+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+alut_save_flags="$CFLAGS"
+CFLAGS="$CFLAGS -fvisibility=hidden"
+alut_cv_CFLAGS_fvisibility_hidden=no
+if { (eval $ac_compile conftest.$ac_ext) 2>conftest.er1
+  alut_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  (exit $alut_status); } >/dev/null; then
+  test -s conftest.err || alut_cv_CFLAGS_fvisibility_hidden=yes
+fi
+CFLAGS="$alut_save_flags"
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $alut_cv_CFLAGS_fvisibility_hidden" >&5
+echo "${ECHO_T}$alut_cv_CFLAGS_fvisibility_hidden" >&6
+if test $alut_cv_CFLAGS_fvisibility_hidden = yes; then
+  OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -fvisibility=hidden"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GCC_VISIBILITY 1
+_ACEOF
+
+fi
+
+
+################################################################################
+# Checks for backends.
+################################################################################
+#
+# Detecting backends in the various configurations and on the various platforms
+# is a nightmare, but let's at least describe the general ideas:
+#
+#  * Every non-trivial backend has two switches: One for enabling/disabling the
+#    backend and one for enabling/disabling dlopening the relevant libraries at
+#    runtime.
+#
+#  * If the backend has been disabled explicitly, there is nothing to do,
+#    otherwise we need at least the relevant header.
+#
+#  * To find any needed flags for the C compiler, use pkg-config or the outdated
+#    foo-config. If neither is available, assume that no special flags are
+#    needed (and guess a library later if necessary).
+#
+#  * If static linking to the backend has been requested, we have to find out
+#    any needed linker flags, too.
+#
+# ToDo: There is far too much cut-n-paste below, we should really refactor this
+# using some nice macros...
+
+
+# OPENAL_ENABLE(FEATURE-NAME, SUPPORT-VAR, SUPPORT-DEFINE, SUPPORT-MAKEVAR)
+#--------------------------------------------------------------------------
+ # OPENAL_ENABLE
+
+
+# check for ALSA backend #######################################################
+
+# Check whether --enable-alsa or --disable-alsa was given.
+if test "${enable_alsa+set}" = set; then
+  enableval="$enable_alsa"
+
+fi;
+
+# Check whether --enable-alsa-dlopen or --disable-alsa-dlopen was given.
+if test "${enable_alsa_dlopen+set}" = set; then
+  enableval="$enable_alsa_dlopen"
+
+fi;
+
+if test "x$enable_alsa" = xno; then
+  openal_backend_alsa_support=disabled
+else
+  echo "$as_me:$LINENO: checking for ALSA compiler flags" >&5
+echo $ECHO_N "checking for ALSA compiler flags... $ECHO_C" >&6
+if test "${openal_cv_cflags_alsa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  openal_cv_cflags_alsa=unknown
+     test "x$PKG_CONFIG" != xnone && "$PKG_CONFIG" --exists alsa && openal_cv_cflags_alsa="`$PKG_CONFIG --cflags alsa`"
+     test -z "$openal_cv_cflags_alsa" && openal_cv_cflags_alsa=none
+fi
+echo "$as_me:$LINENO: result: $openal_cv_cflags_alsa" >&5
+echo "${ECHO_T}$openal_cv_cflags_alsa" >&6
+  case $openal_cv_cflags_alsa in
+    unknown|none) openal_cflags_alsa="" ;;
+    *) openal_cflags_alsa=$openal_cv_cflags_alsa ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_alsa"
+  echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5
+echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <alsa/asoundlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_alsa_asoundlib_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_alsa_asoundlib_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_alsa_asoundlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_alsa_asoundlib_h" >&6
+if test $ac_cv_header_alsa_asoundlib_h = yes; then
+  if test "x$enable_alsa_dlopen" != xno; then
+       openal_backend_alsa_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_alsa"
+
+cat >>confdefs.h <<\_ACEOF
+#define OPENAL_DLOPEN_ALSA 1
+_ACEOF
+
+     else
+       echo "$as_me:$LINENO: checking for ALSA linker flags" >&5
+echo $ECHO_N "checking for ALSA linker flags... $ECHO_C" >&6
+if test "${openal_cv_libs_alsa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$PKG_CONFIG" != xnone && "$PKG_CONFIG" --exists alsa; then
+            openal_cv_libs_alsa="`$PKG_CONFIG --libs alsa`"
+            if test -z "$openal_cv_libs_alsa"; then
+              openal_cv_libs_alsa=none
+            fi
+          else
+            openal_cv_libs_alsa=unknown
+          fi
+fi
+echo "$as_me:$LINENO: result: $openal_cv_libs_alsa" >&5
+echo "${ECHO_T}$openal_cv_libs_alsa" >&6
+       if test "x$openal_cv_libs_alsa" = xunknown; then
+         openal_libs_alsa="-lasound"
+       else
+         openal_libs_alsa=$openal_cv_libs_alsa
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_alsa $LIBS"
+       echo "$as_me:$LINENO: checking for snd_pcm_info_sizeof" >&5
+echo $ECHO_N "checking for snd_pcm_info_sizeof... $ECHO_C" >&6
+if test "${openal_cv_func_snd_pcm_info_sizeof+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char snd_pcm_info_sizeof ();
+int
+main ()
+{
+snd_pcm_info_sizeof ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  openal_cv_func_snd_pcm_info_sizeof=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+openal_cv_func_snd_pcm_info_sizeof=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $openal_cv_func_snd_pcm_info_sizeof" >&5
+echo "${ECHO_T}$openal_cv_func_snd_pcm_info_sizeof" >&6
+       if test "x$openal_cv_func_snd_pcm_info_sizeof" = xyes; then
+         openal_backend_alsa_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_alsa"
+         LIBS="$openal_libs_alsa $LIBS"
+       else
+         openal_backend_alsa_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_alsa" = xyes; then
+           { echo "$as_me:$LINENO: WARNING: --enable-alsa ignored because the ALSA library could not be found." >&5
+echo "$as_me: WARNING: --enable-alsa ignored because the ALSA library could not be found." >&2;}
+         fi
+       fi
+     fi
+else
+  openal_backend_alsa_support=none
+     if test "x$enable_alsa" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-alsa ignored because the ALSA header could not be found." >&5
+echo "$as_me: WARNING: --enable-alsa ignored because the ALSA header could not be found." >&2;}
+     fi
+fi
+
+
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+echo "$as_me:$LINENO: checking for ALSA backend support" >&5
+echo $ECHO_N "checking for ALSA backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_alsa_support" >&5
+echo "${ECHO_T}$openal_backend_alsa_support" >&6
+
+ case $openal_backend_alsa_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_ALSA 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDALSA_TRUE=
+  USEBACKENDALSA_FALSE='#'
+else
+  USEBACKENDALSA_TRUE='#'
+  USEBACKENDALSA_FALSE=
+fi
+
+
+
+# check for aRts backend #######################################################
+
+# Check whether --enable-arts or --disable-arts was given.
+if test "${enable_arts+set}" = set; then
+  enableval="$enable_arts"
+
+fi;
+
+# Check whether --enable-arts-dlopen or --disable-arts-dlopen was given.
+if test "${enable_arts_dlopen+set}" = set; then
+  enableval="$enable_arts_dlopen"
+
+fi;
+
+if test "x$enable_arts" = xno; then
+  openal_backend_arts_support=disabled
+else
+
+  for ac_prog in artsc-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ARTSC_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ARTSC_CONFIG"; then
+  ac_cv_prog_ARTSC_CONFIG="$ARTSC_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ARTSC_CONFIG="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ARTSC_CONFIG=$ac_cv_prog_ARTSC_CONFIG
+if test -n "$ARTSC_CONFIG"; then
+  echo "$as_me:$LINENO: result: $ARTSC_CONFIG" >&5
+echo "${ECHO_T}$ARTSC_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ARTSC_CONFIG" && break
+done
+test -n "$ARTSC_CONFIG" || ARTSC_CONFIG="none"
+
+  echo "$as_me:$LINENO: checking for aRts compiler flags" >&5
+echo $ECHO_N "checking for aRts compiler flags... $ECHO_C" >&6
+if test "${openal_cv_cflags_arts+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  openal_cv_cflags_arts=unknown
+     test "x$ARTSC_CONFIG" != xnone && openal_cv_cflags_arts="`$ARTSC_CONFIG --cflags`"
+     test -z "$openal_cv_cflags_arts" && openal_cv_cflags_arts=none
+fi
+echo "$as_me:$LINENO: result: $openal_cv_cflags_arts" >&5
+echo "${ECHO_T}$openal_cv_cflags_arts" >&6
+  case $openal_cv_cflags_arts in
+    unknown|none) openal_cflags_arts="" ;;
+    *) openal_cflags_arts=$openal_cv_cflags_arts ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_arts"
+  echo "$as_me:$LINENO: checking for artsc.h" >&5
+echo $ECHO_N "checking for artsc.h... $ECHO_C" >&6
+if test "${ac_cv_header_artsc_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <artsc.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_artsc_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_artsc_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_artsc_h" >&5
+echo "${ECHO_T}$ac_cv_header_artsc_h" >&6
+if test $ac_cv_header_artsc_h = yes; then
+  if test "x$enable_arts_dlopen" != xno; then
+       openal_backend_arts_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_arts"
+
+cat >>confdefs.h <<\_ACEOF
+#define OPENAL_DLOPEN_ARTS 1
+_ACEOF
+
+     else
+       echo "$as_me:$LINENO: checking for aRts linker flags" >&5
+echo $ECHO_N "checking for aRts linker flags... $ECHO_C" >&6
+if test "${openal_cv_libs_arts+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$ARTSC_CONFIG" != xnone; then
+            openal_cv_libs_arts="`$ARTSC_CONFIG --libs`"
+            if test -z "$openal_cv_libs_arts"; then
+              openal_cv_libs_arts=none
+            fi
+          else
+            openal_cv_libs_arts=unknown
+          fi
+fi
+echo "$as_me:$LINENO: result: $openal_cv_libs_arts" >&5
+echo "${ECHO_T}$openal_cv_libs_arts" >&6
+       if test "x$openal_cv_libs_arts" = xunknown; then
+         openal_libs_arts="-lartsc"
+       else
+         openal_libs_arts=$openal_cv_libs_arts
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_arts $LIBS"
+       echo "$as_me:$LINENO: checking for arts_free" >&5
+echo $ECHO_N "checking for arts_free... $ECHO_C" >&6
+if test "${openal_cv_func_arts_free+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char arts_free ();
+int
+main ()
+{
+arts_free ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  openal_cv_func_arts_free=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+openal_cv_func_arts_free=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $openal_cv_func_arts_free" >&5
+echo "${ECHO_T}$openal_cv_func_arts_free" >&6
+       if test "x$openal_cv_func_arts_free" = xyes; then
+         openal_backend_arts_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_arts"
+         LIBS="$openal_libs_arts $LIBS"
+       else
+         openal_backend_arts_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_arts" = xyes; then
+           { echo "$as_me:$LINENO: WARNING: --enable-arts ignored because the aRts library could not be found." >&5
+echo "$as_me: WARNING: --enable-arts ignored because the aRts library could not be found." >&2;}
+         fi
+       fi
+     fi
+else
+  openal_backend_arts_support=none
+     if test "x$enable_arts" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-arts ignored because the aRts header could not be found." >&5
+echo "$as_me: WARNING: --enable-arts ignored because the aRts header could not be found." >&2;}
+     fi
+fi
+
+
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+echo "$as_me:$LINENO: checking for aRts backend support" >&5
+echo $ECHO_N "checking for aRts backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_arts_support" >&5
+echo "${ECHO_T}$openal_backend_arts_support" >&6
+
+ case $openal_backend_arts_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_ARTS 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDARTS_TRUE=
+  USEBACKENDARTS_FALSE='#'
+else
+  USEBACKENDARTS_TRUE='#'
+  USEBACKENDARTS_FALSE=
+fi
+
+
+
+# check for native BSD/OSS backend #############################################
+
+# ToDo: Hmmm, OpenBSD/FreeBSD are using OSS, too, just like Linux. Perhaps some
+# re-use is possible?
+
+# Check whether --enable-bsd or --disable-bsd was given.
+if test "${enable_bsd+set}" = set; then
+  enableval="$enable_bsd"
+
+fi;
+
+if test "x$enable_bsd" = xno; then
+  openal_backend_bsd_support=disabled
+else
+  case "$target" in
+    *bsd*) openal_backend_bsd_support=static ;;
+    *) openal_backend_bsd_support=none
+       if test "x$enable_bsd" = xyes; then
+         { echo "$as_me:$LINENO: WARNING: --enable-bsd ignored because this is no BSD build." >&5
+echo "$as_me: WARNING: --enable-bsd ignored because this is no BSD build." >&2;}
+       fi ;;
+  esac
+fi
+
+echo "$as_me:$LINENO: checking for native BSD/OSS backend support" >&5
+echo $ECHO_N "checking for native BSD/OSS backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_bsd_support" >&5
+echo "${ECHO_T}$openal_backend_bsd_support" >&6
+
+ case $openal_backend_bsd_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_NATIVE_BSD 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDNATIVEBSD_TRUE=
+  USEBACKENDNATIVEBSD_FALSE='#'
+else
+  USEBACKENDNATIVEBSD_TRUE='#'
+  USEBACKENDNATIVEBSD_FALSE=
+fi
+
+
+
+# check for native Darwin backend ##############################################
+
+# Check whether --enable-darwin or --disable-darwin was given.
+if test "${enable_darwin+set}" = set; then
+  enableval="$enable_darwin"
+
+fi;
+
+if test "x$enable_darwin" = xno; then
+  openal_backend_darwin_support=disabled
+else
+  case "$target" in
+    *darwin*) openal_backend_darwin_support=static ;;
+    *) openal_backend_darwin_support=none
+       if test "x$enable_darwin" = xyes; then
+         { echo "$as_me:$LINENO: WARNING: --enable-darwin ignored because this is no Darwin build." >&5
+echo "$as_me: WARNING: --enable-darwin ignored because this is no Darwin build." >&2;}
+       fi ;;
+  esac
+fi
+
+echo "$as_me:$LINENO: checking for native Darwin backend support" >&5
+echo $ECHO_N "checking for native Darwin backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_darwin_support" >&5
+echo "${ECHO_T}$openal_backend_darwin_support" >&6
+
+ case $openal_backend_darwin_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_NATIVE_DARWIN 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDNATIVEDARWIN_TRUE=
+  USEBACKENDNATIVEDARWIN_FALSE='#'
+else
+  USEBACKENDNATIVEDARWIN_TRUE='#'
+  USEBACKENDNATIVEDARWIN_FALSE=
+fi
+
+
+
+# check for ESD backend ########################################################
+
+# Check whether --enable-esd or --disable-esd was given.
+if test "${enable_esd+set}" = set; then
+  enableval="$enable_esd"
+
+fi;
+
+# Check whether --enable-esd-dlopen or --disable-esd-dlopen was given.
+if test "${enable_esd_dlopen+set}" = set; then
+  enableval="$enable_esd_dlopen"
+
+fi;
+
+if test "x$enable_esd" = xno; then
+  openal_backend_esd_support=disabled
+else
+
+  for ac_prog in esd-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ESD_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ESD_CONFIG"; then
+  ac_cv_prog_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ESD_CONFIG="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ESD_CONFIG=$ac_cv_prog_ESD_CONFIG
+if test -n "$ESD_CONFIG"; then
+  echo "$as_me:$LINENO: result: $ESD_CONFIG" >&5
+echo "${ECHO_T}$ESD_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ESD_CONFIG" && break
+done
+test -n "$ESD_CONFIG" || ESD_CONFIG="none"
+
+  echo "$as_me:$LINENO: checking for ESD compiler flags" >&5
+echo $ECHO_N "checking for ESD compiler flags... $ECHO_C" >&6
+if test "${openal_cv_cflags_esd+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  openal_cv_cflags_esd=unknown
+     test "x$ESD_CONFIG" != xnone && openal_cv_cflags_esd="`$ESD_CONFIG --cflags`"
+     test -z "$openal_cv_cflags_esd" && openal_cv_cflags_esd=none
+fi
+echo "$as_me:$LINENO: result: $openal_cv_cflags_esd" >&5
+echo "${ECHO_T}$openal_cv_cflags_esd" >&6
+  case $openal_cv_cflags_esd in
+    unknown|none) openal_cv_cflags_esd="" ;;
+    *) openal_cflags_esd=$openal_cv_cflags_esd ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_esd"
+  echo "$as_me:$LINENO: checking for esd.h" >&5
+echo $ECHO_N "checking for esd.h... $ECHO_C" >&6
+if test "${ac_cv_header_esd_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <esd.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_esd_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_esd_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_esd_h" >&5
+echo "${ECHO_T}$ac_cv_header_esd_h" >&6
+if test $ac_cv_header_esd_h = yes; then
+  if test "x$enable_esd_dlopen" != xno; then
+       openal_backend_esd_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_esd"
+
+cat >>confdefs.h <<\_ACEOF
+#define OPENAL_DLOPEN_ESD 1
+_ACEOF
+
+     else
+       echo "$as_me:$LINENO: checking for ESD linker flags" >&5
+echo $ECHO_N "checking for ESD linker flags... $ECHO_C" >&6
+if test "${openal_cv_libs_esd+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$ESD_CONFIG" != xnone; then
+            openal_cv_libs_esd="`$ESD_CONFIG --libs`"
+            if test -z "$openal_cv_libs_esd"; then
+              openal_cv_libs_esd=none
+            fi
+          else
+            openal_cv_libs_esd=unknown
+          fi
+fi
+echo "$as_me:$LINENO: result: $openal_cv_libs_esd" >&5
+echo "${ECHO_T}$openal_cv_libs_esd" >&6
+       if test "x$openal_cv_libs_esd" = xunknown; then
+         openal_libs_esd="-lesd"
+       else
+         openal_libs_esd=$openal_cv_libs_esd
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_esd $LIBS"
+       echo "$as_me:$LINENO: checking for esd_audio_open" >&5
+echo $ECHO_N "checking for esd_audio_open... $ECHO_C" >&6
+if test "${openal_cv_func_esd_audio_open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char esd_audio_open ();
+int
+main ()
+{
+esd_audio_open ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  openal_cv_func_esd_audio_open=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+openal_cv_func_esd_audio_open=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $openal_cv_func_esd_audio_open" >&5
+echo "${ECHO_T}$openal_cv_func_esd_audio_open" >&6
+       if test "x$openal_cv_func_esd_audio_open" = xyes; then
+         openal_backend_esd_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_esd"
+         LIBS="$openal_libs_esd $LIBS"
+       else
+         openal_backend_esd_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_esd" = xyes; then
+           { echo "$as_me:$LINENO: WARNING: --enable-esd ignored because the ESD library could not be found." >&5
+echo "$as_me: WARNING: --enable-esd ignored because the ESD library could not be found." >&2;}
+         fi
+       fi
+     fi
+else
+  openal_backend_esd_support=none
+     if test "x$enable_esd" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-esd ignored because the ESD header could not be found." >&5
+echo "$as_me: WARNING: --enable-esd ignored because the ESD header could not be found." >&2;}
+     fi
+fi
+
+
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+echo "$as_me:$LINENO: checking for ESD backend support" >&5
+echo $ECHO_N "checking for ESD backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_esd_support" >&5
+echo "${ECHO_T}$openal_backend_esd_support" >&6
+
+ case $openal_backend_esd_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_ESD 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDESD_TRUE=
+  USEBACKENDESD_FALSE='#'
+else
+  USEBACKENDESD_TRUE='#'
+  USEBACKENDESD_FALSE=
+fi
+
+
+
+# check for native IRIX backend ################################################
+
+# Check whether --enable-irix or --disable-irix was given.
+if test "${enable_irix+set}" = set; then
+  enableval="$enable_irix"
+
+fi;
+
+if test "x$enable_irix" = xno; then
+  openal_backend_irix_support=disabled
+else
+  echo "$as_me:$LINENO: checking for dmedia/audio.h" >&5
+echo $ECHO_N "checking for dmedia/audio.h... $ECHO_C" >&6
+if test "${ac_cv_header_dmedia_audio_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <dmedia/audio.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_dmedia_audio_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_dmedia_audio_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dmedia_audio_h" >&5
+echo "${ECHO_T}$ac_cv_header_dmedia_audio_h" >&6
+if test $ac_cv_header_dmedia_audio_h = yes; then
+  openal_libs_irix="-laudio"
+     openal_saved_LIBS=$LIBS
+     LIBS="$openal_libs_irix $LIBS"
+     echo "$as_me:$LINENO: checking for alGetResourceByName" >&5
+echo $ECHO_N "checking for alGetResourceByName... $ECHO_C" >&6
+if test "${openal_cv_func_algetresourcebyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char alGetResourceByName ();
+int
+main ()
+{
+alGetResourceByName ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  openal_cv_func_algetresourcebyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+openal_cv_func_algetresourcebyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $openal_cv_func_algetresourcebyname" >&5
+echo "${ECHO_T}$openal_cv_func_algetresourcebyname" >&6
+     if test "x$openal_cv_func_algetresourcebyname" = xyes; then
+       openal_backend_irix_support=static
+       LIBS="$openal_libs_irix $LIBS"
+     else
+       openal_backend_irix_support=none
+       LIBS=$openal_saved_LIBS
+       if test "x$enable_irix" = xyes; then
+         { echo "$as_me:$LINENO: WARNING: --enable-irix ignored because the Irix Multimedia library could not be found." >&5
+echo "$as_me: WARNING: --enable-irix ignored because the Irix Multimedia library could not be found." >&2;}
+       fi
+     fi
+else
+  openal_backend_irix_support=none
+     if test "x$enable_irix" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-irix ignored because the Irix header could not be found." >&5
+echo "$as_me: WARNING: --enable-irix ignored because the Irix header could not be found." >&2;}
+     fi
+fi
+
+
+fi
+
+echo "$as_me:$LINENO: checking for native IRIX backend support" >&5
+echo $ECHO_N "checking for native IRIX backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_irix_support" >&5
+echo "${ECHO_T}$openal_backend_irix_support" >&6
+
+ case $openal_backend_irix_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_DMEDIA 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDNATIVEIRIX_TRUE=
+  USEBACKENDNATIVEIRIX_FALSE='#'
+else
+  USEBACKENDNATIVEIRIX_TRUE='#'
+  USEBACKENDNATIVEIRIX_FALSE=
+fi
+
+
+
+# check for native Linux backend ###############################################
+
+# Check whether --enable-linux or --disable-linux was given.
+if test "${enable_linux+set}" = set; then
+  enableval="$enable_linux"
+
+fi;
+
+if test "x$enable_linux" = xno; then
+  openal_backend_linux_support=disabled
+else
+  echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5
+echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_soundcard_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <linux/soundcard.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_linux_soundcard_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_linux_soundcard_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6
+if test $ac_cv_header_linux_soundcard_h = yes; then
+  openal_backend_linux_support=static
+else
+  openal_backend_linux_support=none
+     if test "x$enable_linux" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-linux ignored because the Linux OSS header could not be found." >&5
+echo "$as_me: WARNING: --enable-linux ignored because the Linux OSS header could not be found." >&2;}
+     fi
+fi
+
+
+fi
+
+echo "$as_me:$LINENO: checking for native Linux backend support" >&5
+echo $ECHO_N "checking for native Linux backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_linux_support" >&5
+echo "${ECHO_T}$openal_backend_linux_support" >&6
+
+ case $openal_backend_linux_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_NATIVE_LINUX 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDNATIVELINUX_TRUE=
+  USEBACKENDNATIVELINUX_FALSE='#'
+else
+  USEBACKENDNATIVELINUX_TRUE='#'
+  USEBACKENDNATIVELINUX_FALSE=
+fi
+
+
+
+# check for native MorphOS backend #############################################
+
+# Check whether --enable-morphos or --disable-morphos was given.
+if test "${enable_morphos+set}" = set; then
+  enableval="$enable_morphos"
+
+fi;
+
+if test "x$enable_morphos" = xno; then
+  openal_backend_morphos_support=disabled
+else
+  case "$target" in
+    *morphos*) openal_backend_morphos_support=static ;;
+    *) openal_backend_morphos_support=none
+       if test "x$enable_morphos" = xyes; then
+         { echo "$as_me:$LINENO: WARNING: --enable-morphos ignored because this is no MorphOS build." >&5
+echo "$as_me: WARNING: --enable-morphos ignored because this is no MorphOS build." >&2;}
+       fi ;;
+  esac
+fi
+
+echo "$as_me:$LINENO: checking for native MorphOS backend support" >&5
+echo $ECHO_N "checking for native MorphOS backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_morphos_support" >&5
+echo "${ECHO_T}$openal_backend_morphos_support" >&6
+
+ case $openal_backend_morphos_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_NATIVE_MORPHOS 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDNATIVEMORPHOS_TRUE=
+  USEBACKENDNATIVEMORPHOS_FALSE='#'
+else
+  USEBACKENDNATIVEMORPHOS_TRUE='#'
+  USEBACKENDNATIVEMORPHOS_FALSE=
+fi
+
+
+
+# check for null backend #######################################################
+
+# Check whether --enable-null or --disable-null was given.
+if test "${enable_null+set}" = set; then
+  enableval="$enable_null"
+
+fi;
+
+case $enable_null in
+  no) openal_backend_null_support=disabled ;;
+  *) openal_backend_null_support=static ;;
+esac
+
+echo "$as_me:$LINENO: checking for null backend support" >&5
+echo $ECHO_N "checking for null backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_null_support" >&5
+echo "${ECHO_T}$openal_backend_null_support" >&6
+
+ case $openal_backend_null_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_NULL 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDNULL_TRUE=
+  USEBACKENDNULL_FALSE='#'
+else
+  USEBACKENDNULL_TRUE='#'
+  USEBACKENDNULL_FALSE=
+fi
+
+
+
+# check for SDL backend ########################################################
+
+# Check whether --enable-sdl or --disable-sdl was given.
+if test "${enable_sdl+set}" = set; then
+  enableval="$enable_sdl"
+
+fi;
+
+# Check whether --enable-sdl-dlopen or --disable-sdl-dlopen was given.
+if test "${enable_sdl_dlopen+set}" = set; then
+  enableval="$enable_sdl_dlopen"
+
+fi;
+
+if test "x$enable_sdl" = xno; then
+  openal_backend_sdl_support=disabled
+else
+
+  for ac_prog in sdl-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_SDL_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$SDL_CONFIG"; then
+  ac_cv_prog_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_SDL_CONFIG="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+SDL_CONFIG=$ac_cv_prog_SDL_CONFIG
+if test -n "$SDL_CONFIG"; then
+  echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5
+echo "${ECHO_T}$SDL_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$SDL_CONFIG" && break
+done
+test -n "$SDL_CONFIG" || SDL_CONFIG="none"
+
+  echo "$as_me:$LINENO: checking for SDL compiler flags" >&5
+echo $ECHO_N "checking for SDL compiler flags... $ECHO_C" >&6
+if test "${openal_cv_cflags_sdl+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  openal_cv_cflags_sdl=unknown
+     test "x$SDL_CONFIG" != xnone && openal_cv_cflags_sdl="`$SDL_CONFIG --cflags`"
+     test -z "$openal_cv_cflags_sdl" && openal_cv_cflags_sdl=none
+fi
+echo "$as_me:$LINENO: result: $openal_cv_cflags_sdl" >&5
+echo "${ECHO_T}$openal_cv_cflags_sdl" >&6
+  case $openal_cv_cflags_sdl in
+    unknown|none) openal_cv_cflags_sdl="" ;;
+    *) openal_cflags_sdl=$openal_cv_cflags_sdl ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_sdl"
+  echo "$as_me:$LINENO: checking for SDL.h" >&5
+echo $ECHO_N "checking for SDL.h... $ECHO_C" >&6
+if test "${ac_cv_header_SDL_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <SDL.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_SDL_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_SDL_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_SDL_h" >&5
+echo "${ECHO_T}$ac_cv_header_SDL_h" >&6
+if test $ac_cv_header_SDL_h = yes; then
+  if test "x$enable_sdl_dlopen" != xno; then
+       openal_backend_sdl_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_sdl"
+
+cat >>confdefs.h <<\_ACEOF
+#define OPENAL_DLOPEN_SDL 1
+_ACEOF
+
+     else
+       echo "$as_me:$LINENO: checking for SDL linker flags" >&5
+echo $ECHO_N "checking for SDL linker flags... $ECHO_C" >&6
+if test "${openal_cv_libs_sdl+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$SDL_CONFIG" != xnone; then
+            openal_cv_libs_sdl="`$SDL_CONFIG --libs`"
+            if test -z "$openal_cv_libs_sdl"; then
+              openal_cv_libs_sdl=none
+            fi
+          else
+            openal_cv_libs_sdl=unknown
+          fi
+fi
+echo "$as_me:$LINENO: result: $openal_cv_libs_sdl" >&5
+echo "${ECHO_T}$openal_cv_libs_sdl" >&6
+       if test "x$openal_cv_libs_sdl" = xunknown; then
+         openal_libs_sdl="-lsdl"
+       else
+         openal_libs_sdl=$openal_cv_libs_sdl
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_sdl $LIBS"
+       echo "$as_me:$LINENO: checking for SDL_LockAudio" >&5
+echo $ECHO_N "checking for SDL_LockAudio... $ECHO_C" >&6
+if test "${openal_cv_func_sdl_lockaudio+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char SDL_LockAudio ();
+int
+main ()
+{
+SDL_LockAudio ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  openal_cv_func_sdl_lockaudio=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+openal_cv_func_sdl_lockaudio=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $openal_cv_func_sdl_lockaudio" >&5
+echo "${ECHO_T}$openal_cv_func_sdl_lockaudio" >&6
+       if test "x$openal_cv_func_sdl_lockaudio" = xyes; then
+         openal_backend_sdl_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_sdl"
+         LIBS="$openal_libs_sdl $LIBS"
+       else
+         openal_backend_sdl_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_sdl" = xyes; then
+           { echo "$as_me:$LINENO: WARNING: --enable-sdl ignored because the SDL library could not be found." >&5
+echo "$as_me: WARNING: --enable-sdl ignored because the SDL library could not be found." >&2;}
+         fi
+       fi
+     fi
+else
+  openal_backend_sdl_support=none
+     if test "x$enable_sdl" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-sdl ignored because the SDL header could not be found." >&5
+echo "$as_me: WARNING: --enable-sdl ignored because the SDL header could not be found." >&2;}
+     fi
+fi
+
+
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+echo "$as_me:$LINENO: checking for SDL backend support" >&5
+echo $ECHO_N "checking for SDL backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_sdl_support" >&5
+echo "${ECHO_T}$openal_backend_sdl_support" >&6
+
+ case $openal_backend_sdl_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_SDL 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDSDL_TRUE=
+  USEBACKENDSDL_FALSE='#'
+else
+  USEBACKENDSDL_TRUE='#'
+  USEBACKENDSDL_FALSE=
+fi
+
+
+
+# check for native Solaris backend #############################################
+
+# Check whether --enable-solaris or --disable-solaris was given.
+if test "${enable_solaris+set}" = set; then
+  enableval="$enable_solaris"
+
+fi;
+
+if test "x$enable_solaris" = xno; then
+  openal_backend_solaris_support=disabled
+else
+  echo "$as_me:$LINENO: checking for sys/audioio.h" >&5
+echo $ECHO_N "checking for sys/audioio.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_audioio_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <sys/audioio.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_sys_audioio_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_sys_audioio_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_audioio_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_audioio_h" >&6
+if test $ac_cv_header_sys_audioio_h = yes; then
+  openal_backend_solaris_support=static
+else
+  openal_backend_solaris_support=none
+     if test "x$enable_solaris" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-solaris ignored because the Solaris audio header could not be found." >&5
+echo "$as_me: WARNING: --enable-solaris ignored because the Solaris audio header could not be found." >&2;}
+     fi
+fi
+
+
+fi
+
+echo "$as_me:$LINENO: checking for native Solaris backend support" >&5
+echo $ECHO_N "checking for native Solaris backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_solaris_support" >&5
+echo "${ECHO_T}$openal_backend_solaris_support" >&6
+
+ case $openal_backend_solaris_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_NATIVE_SOLARIS 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDNATIVESOLARIS_TRUE=
+  USEBACKENDNATIVESOLARIS_FALSE='#'
+else
+  USEBACKENDNATIVESOLARIS_TRUE='#'
+  USEBACKENDNATIVESOLARIS_FALSE=
+fi
+
+
+
+# check for WAVE backend #######################################################
+
+# Check whether --enable-waveout or --disable-waveout was given.
+if test "${enable_waveout+set}" = set; then
+  enableval="$enable_waveout"
+
+fi;
+
+case $enable_waveout in
+  no) openal_backend_waveout_support=disabled ;;
+  *) openal_backend_waveout_support=static ;;
+esac
+
+echo "$as_me:$LINENO: checking for WAVE backend support" >&5
+echo $ECHO_N "checking for WAVE backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_waveout_support" >&5
+echo "${ECHO_T}$openal_backend_waveout_support" >&6
+
+ case $openal_backend_waveout_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_WAVEOUT 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDWAVEOUT_TRUE=
+  USEBACKENDWAVEOUT_FALSE='#'
+else
+  USEBACKENDWAVEOUT_TRUE='#'
+  USEBACKENDWAVEOUT_FALSE=
+fi
+
+
+
+# check for native Windows backend #############################################
+
+# Check whether --enable-windows or --disable-windows was given.
+if test "${enable_windows+set}" = set; then
+  enableval="$enable_windows"
+
+fi;
+
+if test "x$enable_windows" = xno; then
+  openal_backend_windows_support=disabled
+else
+  echo "$as_me:$LINENO: checking for windows.h" >&5
+echo $ECHO_N "checking for windows.h... $ECHO_C" >&6
+if test "${ac_cv_header_windows_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <windows.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_windows_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_windows_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5
+echo "${ECHO_T}$ac_cv_header_windows_h" >&6
+if test $ac_cv_header_windows_h = yes; then
+  openal_libs_windows="-lwinmm"
+     openal_saved_LIBS=$LIBS
+     LIBS="$openal_libs_windows $LIBS"
+     echo "$as_me:$LINENO: checking for waveOutOpen" >&5
+echo $ECHO_N "checking for waveOutOpen... $ECHO_C" >&6
+if test "${openal_cv_func_waveoutopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <windows.h>
+int
+main ()
+{
+waveOutOpen(NULL, WAVE_MAPPER, NULL, 0, 0, CALLBACK_FUNCTION);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  openal_cv_func_waveoutopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+openal_cv_func_waveoutopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $openal_cv_func_waveoutopen" >&5
+echo "${ECHO_T}$openal_cv_func_waveoutopen" >&6
+     if test "x$openal_cv_func_waveoutopen" = xyes; then
+       openal_backend_windows_support=static
+       LIBS="$openal_libs_windows $LIBS"
+     else
+       openal_backend_windows_support=none
+       LIBS=$openal_saved_LIBS
+       if test "x$enable_windows" = xyes; then
+         { echo "$as_me:$LINENO: WARNING: --enable-windows ignored because the Windows Multimedia library could not be found." >&5
+echo "$as_me: WARNING: --enable-windows ignored because the Windows Multimedia library could not be found." >&2;}
+       fi
+     fi
+else
+  openal_backend_windows_support=none
+     if test "x$enable_windows" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-windows ignored because the Windows header could not be found." >&5
+echo "$as_me: WARNING: --enable-windows ignored because the Windows header could not be found." >&2;}
+     fi
+fi
+
+
+fi
+
+echo "$as_me:$LINENO: checking for native Windows backend support" >&5
+echo $ECHO_N "checking for native Windows backend support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_backend_windows_support" >&5
+echo "${ECHO_T}$openal_backend_windows_support" >&6
+
+ case $openal_backend_windows_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BACKEND_NATIVE_WINDOWS 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  USEBACKENDNATIVEWINDOWS_TRUE=
+  USEBACKENDNATIVEWINDOWS_FALSE='#'
+else
+  USEBACKENDNATIVEWINDOWS_TRUE='#'
+  USEBACKENDNATIVEWINDOWS_FALSE=
+fi
+
+
+
+################################################################################
+# Checks for extensions.
+################################################################################
+
+# check for AL_EXT_vorbis extension ############################################
+
+# Check whether --enable-vorbis or --disable-vorbis was given.
+if test "${enable_vorbis+set}" = set; then
+  enableval="$enable_vorbis"
+
+fi;
+
+# Check whether --enable-vorbis-dlopen or --disable-vorbis-dlopen was given.
+if test "${enable_vorbis_dlopen+set}" = set; then
+  enableval="$enable_vorbis_dlopen"
+
+fi;
+
+if test "x$enable_vorbis" = xno; then
+  openal_extension_vorbis_support=disabled
+else
+  echo "$as_me:$LINENO: checking for Vorbis compiler flags" >&5
+echo $ECHO_N "checking for Vorbis compiler flags... $ECHO_C" >&6
+if test "${openal_cv_cflags_vorbis+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  openal_cv_cflags_vorbis=unknown
+     test "x$PKG_CONFIG" != xnone && "$PKG_CONFIG" --exists vorbis && openal_cv_cflags_vorbis="`$PKG_CONFIG --cflags vorbisfile`"
+     test -z "$openal_cv_cflags_vorbis" && openal_cv_cflags_vorbis=none
+fi
+echo "$as_me:$LINENO: result: $openal_cv_cflags_vorbis" >&5
+echo "${ECHO_T}$openal_cv_cflags_vorbis" >&6
+  case $openal_cv_cflags_vorbis in
+    unknown|none) openal_cflags_vorbis="" ;;
+    *) openal_cflags_vorbis=$openal_cv_cflags_vorbis ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_vorbis"
+  echo "$as_me:$LINENO: checking for vorbis/vorbisfile.h" >&5
+echo $ECHO_N "checking for vorbis/vorbisfile.h... $ECHO_C" >&6
+if test "${ac_cv_header_vorbis_vorbisfile_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <vorbis/vorbisfile.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_vorbis_vorbisfile_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_vorbis_vorbisfile_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_vorbisfile_h" >&5
+echo "${ECHO_T}$ac_cv_header_vorbis_vorbisfile_h" >&6
+if test $ac_cv_header_vorbis_vorbisfile_h = yes; then
+  if test "x$enable_vorbis_dlopen" != xno; then
+       openal_extension_vorbis_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_vorbis"
+
+cat >>confdefs.h <<\_ACEOF
+#define OPENAL_DLOPEN_VORBIS 1
+_ACEOF
+
+     else
+       echo "$as_me:$LINENO: checking for Vorbis linker flags" >&5
+echo $ECHO_N "checking for Vorbis linker flags... $ECHO_C" >&6
+if test "${openal_cv_libs_vorbis+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$PKG_CONFIG" != xnone && "$PKG_CONFIG" --exists vorbis; then
+            openal_cv_libs_vorbis="`$PKG_CONFIG --libs vorbisfile`"
+            if test -z "$openal_cv_libs_vorbis"; then
+              openal_cv_libs_vorbis=none
+            fi
+          else
+            openal_cv_libs_vorbis=unknown
+          fi
+fi
+echo "$as_me:$LINENO: result: $openal_cv_libs_vorbis" >&5
+echo "${ECHO_T}$openal_cv_libs_vorbis" >&6
+       if test "x$openal_cv_libs_vorbis" = xunknown; then
+         openal_libs_vorbis="-lvorbisfile -lvorbis -logg"
+       else
+         openal_libs_vorbis=$openal_cv_libs_vorbis
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_vorbis $LIBS"
+       echo "$as_me:$LINENO: checking for ov_clear" >&5
+echo $ECHO_N "checking for ov_clear... $ECHO_C" >&6
+if test "${openal_cv_func_ov_clear+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char ov_clear ();
+int
+main ()
+{
+ov_clear ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  openal_cv_func_ov_clear=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+openal_cv_func_ov_clear=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $openal_cv_func_ov_clear" >&5
+echo "${ECHO_T}$openal_cv_func_ov_clear" >&6
+       if test "x$openal_cv_func_ov_clear" = xyes; then
+         openal_extension_vorbis_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_vorbis"
+         LIBS="$openal_libs_vorbis $LIBS"
+       else
+         openal_extension_vorbis_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_vorbis" = xyes; then
+           { echo "$as_me:$LINENO: WARNING: --enable-vorbis ignored because the Vorbis library could not be found." >&5
+echo "$as_me: WARNING: --enable-vorbis ignored because the Vorbis library could not be found." >&2;}
+         fi
+       fi
+     fi
+else
+  openal_extension_vorbis_support=none
+     if test "x$enable_vorbis" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-vorbis ignored because the Vorbis header could not be found." >&5
+echo "$as_me: WARNING: --enable-vorbis ignored because the Vorbis header could not be found." >&2;}
+     fi
+fi
+
+
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+echo "$as_me:$LINENO: checking for AL_EXT_vorbis supprt support" >&5
+echo $ECHO_N "checking for AL_EXT_vorbis supprt support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_extension_vorbis_support" >&5
+echo "${ECHO_T}$openal_extension_vorbis_support" >&6
+
+ case $openal_extension_vorbis_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_EXTENSION_AL_EXT_VORBIS 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  ENABLEEXTENSIONALEXTVORBIS_TRUE=
+  ENABLEEXTENSIONALEXTVORBIS_FALSE='#'
+else
+  ENABLEEXTENSIONALEXTVORBIS_TRUE='#'
+  ENABLEEXTENSIONALEXTVORBIS_FALSE=
+fi
+
+
+
+# check for AL_EXT_mp3 extension ###############################################
+
+# Check whether --enable-mp3 or --disable-mp3 was given.
+if test "${enable_mp3+set}" = set; then
+  enableval="$enable_mp3"
+
+fi;
+
+# Check whether --enable-mp3-dlopen or --disable-mp3-dlopen was given.
+if test "${enable_mp3_dlopen+set}" = set; then
+  enableval="$enable_mp3_dlopen"
+
+fi;
+
+# For legacy reasons only, this misnomer will be nuked some day.
+# Check whether --enable-smpeg or --disable-smpeg was given.
+if test "${enable_smpeg+set}" = set; then
+  enableval="$enable_smpeg"
+  { echo "$as_me:$LINENO: WARNING: DO NOT USE --enable-smpeg ANYMORE, IT WILL BE REMOVED SOON. USE --enable-mp3 INSTEAD." >&5
+echo "$as_me: WARNING: DO NOT USE --enable-smpeg ANYMORE, IT WILL BE REMOVED SOON. USE --enable-mp3 INSTEAD." >&2;}
+ enable_mp3=$enable_smpeg
+fi;
+
+if test "x$enable_mp3" = xno; then
+  openal_extension_smpeg_support=disabled
+else
+
+  for ac_prog in smpeg-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_SMPEG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$SMPEG_CONFIG"; then
+  ac_cv_prog_SMPEG_CONFIG="$SMPEG_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_SMPEG_CONFIG="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+SMPEG_CONFIG=$ac_cv_prog_SMPEG_CONFIG
+if test -n "$SMPEG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $SMPEG_CONFIG" >&5
+echo "${ECHO_T}$SMPEG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$SMPEG_CONFIG" && break
+done
+test -n "$SMPEG_CONFIG" || SMPEG_CONFIG="none"
+
+  echo "$as_me:$LINENO: checking for SMPEG compiler flags" >&5
+echo $ECHO_N "checking for SMPEG compiler flags... $ECHO_C" >&6
+if test "${openal_cv_cflags_smpeg+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  openal_cv_cflags_smpeg=unknown
+     test "x$SMPEG_CONFIG" != xnone && openal_cv_cflags_smpeg="`$SMPEG_CONFIG --cflags`"
+     test -z "$openal_cv_cflags_smpeg" && openal_cv_cflags_smpeg=none
+fi
+echo "$as_me:$LINENO: result: $openal_cv_cflags_smpeg" >&5
+echo "${ECHO_T}$openal_cv_cflags_smpeg" >&6
+  case $openal_cv_cflags_smpeg in
+    unknown|none) openal_cv_cflags_smpeg="" ;;
+    *) openal_cflags_smpeg=$openal_cv_cflags_smpeg ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_smpeg"
+  echo "$as_me:$LINENO: checking for smpeg.h" >&5
+echo $ECHO_N "checking for smpeg.h... $ECHO_C" >&6
+if test "${ac_cv_header_smpeg_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <smpeg.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_smpeg_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_smpeg_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_smpeg_h" >&5
+echo "${ECHO_T}$ac_cv_header_smpeg_h" >&6
+if test $ac_cv_header_smpeg_h = yes; then
+  if test "x$enable_mp3_dlopen" != xno; then
+       openal_extension_smpeg_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_smpeg"
+
+cat >>confdefs.h <<\_ACEOF
+#define OPENAL_DLOPEN_MP3 1
+_ACEOF
+
+     else
+       echo "$as_me:$LINENO: checking for SMPEG linker flags" >&5
+echo $ECHO_N "checking for SMPEG linker flags... $ECHO_C" >&6
+if test "${openal_cv_libs_smpeg+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$SMPEG_CONFIG" != xnone; then
+            openal_cv_libs_smpeg="`$SMPEG_CONFIG --libs`"
+            if test -z "$openal_cv_libs_smpeg"; then
+              openal_cv_libs_smpeg=none
+            fi
+          else
+            openal_cv_libs_smpeg=unknown
+          fi
+fi
+echo "$as_me:$LINENO: result: $openal_cv_libs_smpeg" >&5
+echo "${ECHO_T}$openal_cv_libs_smpeg" >&6
+       if test "x$openal_cv_libs_smpeg" = xunknown; then
+         openal_libs_smpeg="-lsmpeg"
+       else
+         openal_libs_smpeg=$openal_cv_libs_smpeg
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_smpeg $LIBS"
+       echo "$as_me:$LINENO: checking for SMPEG_play" >&5
+echo $ECHO_N "checking for SMPEG_play... $ECHO_C" >&6
+if test "${openal_cv_func_SMPEG_play+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char SMPEG_play ();
+int
+main ()
+{
+SMPEG_play ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  openal_cv_func_SMPEG_play=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+openal_cv_func_SMPEG_play=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $openal_cv_func_SMPEG_play" >&5
+echo "${ECHO_T}$openal_cv_func_SMPEG_play" >&6
+       if test "x$openal_cv_func_SMPEG_play" = xyes; then
+         openal_extension_smpeg_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_smpeg"
+         LIBS="$openal_libs_smpeg $LIBS"
+       else
+         openal_extension_smpeg_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_mp3" = xyes; then
+           { echo "$as_me:$LINENO: WARNING: --enable-smpeg ignored because the SMPEG library could not be found." >&5
+echo "$as_me: WARNING: --enable-smpeg ignored because the SMPEG library could not be found." >&2;}
+         fi
+       fi
+     fi
+else
+  openal_extension_smpeg_support=none
+     if test "x$enable_mp3" = xyes; then
+       { echo "$as_me:$LINENO: WARNING: --enable-smpeg ignored because the SMPEG header could not be found." >&5
+echo "$as_me: WARNING: --enable-smpeg ignored because the SMPEG header could not be found." >&2;}
+     fi
+fi
+
+
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+echo "$as_me:$LINENO: checking for AL_EXT_mp3 extension support" >&5
+echo $ECHO_N "checking for AL_EXT_mp3 extension support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $openal_extension_smpeg_support" >&5
+echo "${ECHO_T}$openal_extension_smpeg_support" >&6
+
+ case $openal_extension_smpeg_support in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_EXTENSION_AL_EXT_MP3 1
+_ACEOF
+
+ fi
+
+
+
+if test "x$openal_support_yn" = xyes; then
+  ENABLEEXTENSIONALEXTMP3_TRUE=
+  ENABLEEXTENSIONALEXTMP3_FALSE='#'
+else
+  ENABLEEXTENSIONALEXTMP3_TRUE='#'
+  ENABLEEXTENSIONALEXTMP3_FALSE=
+fi
+
+
+
+################################################################################
+# Misc stuff
+################################################################################
+
+echo "$as_me:$LINENO: checking for void *" >&5
+echo $ECHO_N "checking for void *... $ECHO_C" >&6
+if test "${ac_cv_type_void_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((void * *) 0)
+  return 0;
+if (sizeof (void *))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_void_p=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_void_p=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
+echo "${ECHO_T}$ac_cv_type_void_p" >&6
+
+echo "$as_me:$LINENO: checking size of void *" >&5
+echo $ECHO_N "checking size of void *... $ECHO_C" >&6
+if test "${ac_cv_sizeof_void_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_void_p" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+		    if test $ac_lo -le $ac_mid; then
+		      ac_lo= ac_hi=
+		      break
+		    fi
+		    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+		       if test $ac_mid -le $ac_hi; then
+			 ac_lo= ac_hi=
+			 break
+		       fi
+		       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_void_p=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+long longval () { return (long) (sizeof (void *)); }
+unsigned long ulongval () { return (long) (sizeof (void *)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (void *))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (void *))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (void *))))
+	exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_void_p=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_void_p=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
+echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define AL_SUPPORT_BYTE_LOKI_SOURCE_ATTR_ 1
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+# Generate output.
+# NOTE: Do not break the following line, otherwise we are into CR/LF vs. LF
+# trouble! This is a buglet in autoconf IMHO, but easy to work around.
+                                                                                                              ac_config_files="$ac_config_files Makefile admin/Makefile admin/pkgconfig/Makefile admin/pkgconfig/openal-config admin/pkgconfig/openal.pc common/Makefile common/include/Makefile include/Makefile src/Makefile src/arch/Makefile src/arch/i386/Makefile"
+
+
+          ac_config_commands="$ac_config_commands default"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${X86ENABLED_TRUE}" && test -z "${X86ENABLED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"X86ENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"X86ENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${X86MMXENABLED_TRUE}" && test -z "${X86MMXENABLED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"X86MMXENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"X86MMXENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${X86NASMENABLED_TRUE}" && test -z "${X86NASMENABLED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"X86NASMENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"X86NASMENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${X86NASMMMXENABLED_TRUE}" && test -z "${X86NASMMMXENABLED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"X86NASMMMXENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"X86NASMMMXENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDALSA_TRUE}" && test -z "${USEBACKENDALSA_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDALSA\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDALSA\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDARTS_TRUE}" && test -z "${USEBACKENDARTS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDARTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDARTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDNATIVEBSD_TRUE}" && test -z "${USEBACKENDNATIVEBSD_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDNATIVEBSD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDNATIVEBSD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDNATIVEDARWIN_TRUE}" && test -z "${USEBACKENDNATIVEDARWIN_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDNATIVEDARWIN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDNATIVEDARWIN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDESD_TRUE}" && test -z "${USEBACKENDESD_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDESD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDESD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDNATIVEIRIX_TRUE}" && test -z "${USEBACKENDNATIVEIRIX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDNATIVEIRIX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDNATIVEIRIX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDNATIVELINUX_TRUE}" && test -z "${USEBACKENDNATIVELINUX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDNATIVELINUX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDNATIVELINUX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDNATIVEMORPHOS_TRUE}" && test -z "${USEBACKENDNATIVEMORPHOS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDNATIVEMORPHOS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDNATIVEMORPHOS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDNULL_TRUE}" && test -z "${USEBACKENDNULL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDNULL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDNULL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDSDL_TRUE}" && test -z "${USEBACKENDSDL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDSDL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDSDL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDNATIVESOLARIS_TRUE}" && test -z "${USEBACKENDNATIVESOLARIS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDNATIVESOLARIS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDNATIVESOLARIS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDWAVEOUT_TRUE}" && test -z "${USEBACKENDWAVEOUT_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDWAVEOUT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDWAVEOUT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USEBACKENDNATIVEWINDOWS_TRUE}" && test -z "${USEBACKENDNATIVEWINDOWS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USEBACKENDNATIVEWINDOWS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USEBACKENDNATIVEWINDOWS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLEEXTENSIONALEXTVORBIS_TRUE}" && test -z "${ENABLEEXTENSIONALEXTVORBIS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENABLEEXTENSIONALEXTVORBIS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLEEXTENSIONALEXTVORBIS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLEEXTENSIONALEXTMP3_TRUE}" && test -z "${ENABLEEXTENSIONALEXTMP3_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENABLEEXTENSIONALEXTMP3\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLEEXTENSIONALEXTMP3\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by OpenAL library $as_me 0.0.8, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+OpenAL library config.status 0.0.8
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "admin/Makefile" ) CONFIG_FILES="$CONFIG_FILES admin/Makefile" ;;
+  "admin/pkgconfig/Makefile" ) CONFIG_FILES="$CONFIG_FILES admin/pkgconfig/Makefile" ;;
+  "admin/pkgconfig/openal-config" ) CONFIG_FILES="$CONFIG_FILES admin/pkgconfig/openal-config" ;;
+  "admin/pkgconfig/openal.pc" ) CONFIG_FILES="$CONFIG_FILES admin/pkgconfig/openal.pc" ;;
+  "common/Makefile" ) CONFIG_FILES="$CONFIG_FILES common/Makefile" ;;
+  "common/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES common/include/Makefile" ;;
+  "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+  "src/arch/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/arch/Makefile" ;;
+  "src/arch/i386/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/arch/i386/Makefile" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@EGREP@,$EGREP,;t t
+s,@LN_S@,$LN_S,;t t
+s,@ECHO@,$ECHO,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@DLLTOOL@,$DLLTOOL,;t t
+s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
+s,@AS@,$AS,;t t
+s,@ac_ct_AS@,$ac_ct_AS,;t t
+s,@OBJDUMP@,$OBJDUMP,;t t
+s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
+s,@CPP@,$CPP,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@CXXDEPMODE@,$CXXDEPMODE,;t t
+s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s,@CXXCPP@,$CXXCPP,;t t
+s,@F77@,$F77,;t t
+s,@FFLAGS@,$FFLAGS,;t t
+s,@ac_ct_F77@,$ac_ct_F77,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@LIBM@,$LIBM,;t t
+s,@acx_pthread_config@,$acx_pthread_config,;t t
+s,@PTHREAD_CC@,$PTHREAD_CC,;t t
+s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
+s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
+s,@NASM@,$NASM,;t t
+s,@X86ENABLED_TRUE@,$X86ENABLED_TRUE,;t t
+s,@X86ENABLED_FALSE@,$X86ENABLED_FALSE,;t t
+s,@X86MMXENABLED_TRUE@,$X86MMXENABLED_TRUE,;t t
+s,@X86MMXENABLED_FALSE@,$X86MMXENABLED_FALSE,;t t
+s,@X86NASMENABLED_TRUE@,$X86NASMENABLED_TRUE,;t t
+s,@X86NASMENABLED_FALSE@,$X86NASMENABLED_FALSE,;t t
+s,@X86NASMMMXENABLED_TRUE@,$X86NASMMMXENABLED_TRUE,;t t
+s,@X86NASMMMXENABLED_FALSE@,$X86NASMMMXENABLED_FALSE,;t t
+s,@USEBACKENDALSA_TRUE@,$USEBACKENDALSA_TRUE,;t t
+s,@USEBACKENDALSA_FALSE@,$USEBACKENDALSA_FALSE,;t t
+s,@ARTSC_CONFIG@,$ARTSC_CONFIG,;t t
+s,@USEBACKENDARTS_TRUE@,$USEBACKENDARTS_TRUE,;t t
+s,@USEBACKENDARTS_FALSE@,$USEBACKENDARTS_FALSE,;t t
+s,@USEBACKENDNATIVEBSD_TRUE@,$USEBACKENDNATIVEBSD_TRUE,;t t
+s,@USEBACKENDNATIVEBSD_FALSE@,$USEBACKENDNATIVEBSD_FALSE,;t t
+s,@USEBACKENDNATIVEDARWIN_TRUE@,$USEBACKENDNATIVEDARWIN_TRUE,;t t
+s,@USEBACKENDNATIVEDARWIN_FALSE@,$USEBACKENDNATIVEDARWIN_FALSE,;t t
+s,@ESD_CONFIG@,$ESD_CONFIG,;t t
+s,@USEBACKENDESD_TRUE@,$USEBACKENDESD_TRUE,;t t
+s,@USEBACKENDESD_FALSE@,$USEBACKENDESD_FALSE,;t t
+s,@USEBACKENDNATIVEIRIX_TRUE@,$USEBACKENDNATIVEIRIX_TRUE,;t t
+s,@USEBACKENDNATIVEIRIX_FALSE@,$USEBACKENDNATIVEIRIX_FALSE,;t t
+s,@USEBACKENDNATIVELINUX_TRUE@,$USEBACKENDNATIVELINUX_TRUE,;t t
+s,@USEBACKENDNATIVELINUX_FALSE@,$USEBACKENDNATIVELINUX_FALSE,;t t
+s,@USEBACKENDNATIVEMORPHOS_TRUE@,$USEBACKENDNATIVEMORPHOS_TRUE,;t t
+s,@USEBACKENDNATIVEMORPHOS_FALSE@,$USEBACKENDNATIVEMORPHOS_FALSE,;t t
+s,@USEBACKENDNULL_TRUE@,$USEBACKENDNULL_TRUE,;t t
+s,@USEBACKENDNULL_FALSE@,$USEBACKENDNULL_FALSE,;t t
+s,@SDL_CONFIG@,$SDL_CONFIG,;t t
+s,@USEBACKENDSDL_TRUE@,$USEBACKENDSDL_TRUE,;t t
+s,@USEBACKENDSDL_FALSE@,$USEBACKENDSDL_FALSE,;t t
+s,@USEBACKENDNATIVESOLARIS_TRUE@,$USEBACKENDNATIVESOLARIS_TRUE,;t t
+s,@USEBACKENDNATIVESOLARIS_FALSE@,$USEBACKENDNATIVESOLARIS_FALSE,;t t
+s,@USEBACKENDWAVEOUT_TRUE@,$USEBACKENDWAVEOUT_TRUE,;t t
+s,@USEBACKENDWAVEOUT_FALSE@,$USEBACKENDWAVEOUT_FALSE,;t t
+s,@USEBACKENDNATIVEWINDOWS_TRUE@,$USEBACKENDNATIVEWINDOWS_TRUE,;t t
+s,@USEBACKENDNATIVEWINDOWS_FALSE@,$USEBACKENDNATIVEWINDOWS_FALSE,;t t
+s,@ENABLEEXTENSIONALEXTVORBIS_TRUE@,$ENABLEEXTENSIONALEXTVORBIS_TRUE,;t t
+s,@ENABLEEXTENSIONALEXTVORBIS_FALSE@,$ENABLEEXTENSIONALEXTVORBIS_FALSE,;t t
+s,@SMPEG_CONFIG@,$SMPEG_CONFIG,;t t
+s,@ENABLEEXTENSIONALEXTMP3_TRUE@,$ENABLEEXTENSIONALEXTMP3_TRUE,;t t
+s,@ENABLEEXTENSIONALEXTMP3_FALSE@,$ENABLEEXTENSIONALEXTMP3_FALSE,;t t
+s,@FEATURECFLAGS@,$FEATURECFLAGS,;t t
+s,@NASM_FORMAT@,$NASM_FORMAT,;t t
+s,@OPTIMIZATIONCFLAGS@,$OPTIMIZATIONCFLAGS,;t t
+s,@PROFILINGLDFLAGS@,$PROFILINGLDFLAGS,;t t
+s,@SIZEOF_VOID_P@,$SIZEOF_VOID_P,;t t
+s,@WARNINGCFLAGS@,$WARNINGCFLAGS,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X$ac_file : 'X\(//\)[^/]' \| \
+	 X$ac_file : 'X\(//\)$' \| \
+	 X$ac_file : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+    default ) chmod +x admin/pkgconfig/openal-config ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Index: /openal-0.0.8/configure.ac
===================================================================
--- /openal-0.0.8/configure.ac	(revision 17)
+++ /openal-0.0.8/configure.ac	(revision 17)
@@ -0,0 +1,1179 @@
+################################################################################
+# Process this file with autoconf to produce a configure script.
+################################################################################
+
+AC_INIT([OpenAL library], [0.0.8], [openal-devel@opensource.creative.com], [openal])
+AC_CONFIG_AUX_DIR([admin/autotools])
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE
+AC_PREREQ([2.56])
+AC_CONFIG_SRCDIR([AUTHORS])
+AC_CONFIG_HEADERS([config.h])
+
+# Compatibility hack for older autoconf versions
+m4_ifdef([AS_HELP_STRING], [], [AC_DEFUN([AS_HELP_STRING], [AC_HELP_STRING($][@)])])
+
+################################################################################
+# Checks for programs.
+################################################################################
+
+# We need ISO C99 features (e.g. snprintf) and POSIX IEEE Std 1003.1b-1993
+# features (e.g. struct timespec, used in <alsa/asoundlib.h>)
+AC_DEFINE([_ISOC99_SOURCE], [1], [Define to 1 if extensions to ISO C89 from ISO C99 are needed.])
+AC_DEFINE([_POSIX_C_SOURCE], [199309], [Define to the POSIX version that should be used.])
+
+AC_DEFINE([AL_BUILD_LIBRARY], [1], [Define to 1 if we are building the OpenAL library.])
+
+AC_PROG_CC
+AC_C_CONST
+ALUT_C__ATTRIBUTE__
+AC_EXEEXT
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+AC_SUBST([LIBTOOL_DEPS])
+AC_PROG_CXX
+AC_ARG_VAR([PKG_CONFIG], [package configuration utility])
+AC_CHECK_PROGS([PKG_CONFIG], [pkg-config], [none])
+
+################################################################################
+# Checks for library functions.
+################################################################################
+
+AC_CHECK_LIBM
+AC_SUBST([LIBM])
+
+ACX_PTHREAD(
+  [LIBS="$PTHREAD_LIBS $LIBS"
+   FEATURECFLAGS="$FEATURECFLAGS $PTHREAD_CFLAGS"
+   CC=$PTHREAD_CC
+   AC_DEFINE([USE_POSIXTHREADING], [1], [Define to 1 if POSIX threading should be used.])],
+  [AC_CHECK_HEADER([windows.h],
+    [AC_DEFINE([USE_WINDOWSTHREADING], [1], [Define to 1 if Windows threading should be used.])],
+    [AC_CHECK_HEADER([dos/dosextens.h],
+      [AC_DEFINE([USE_MORPHOSTHREADING], [1], [Define to 1 if MorphOS threading should be used.])],
+      [AC_DEFINE([NO_THREADING], [1], [undocumented])],
+      [AC_INCLUDES_DEFAULT([])])],
+    [AC_INCLUDES_DEFAULT([])])])
+
+################################################################################
+# Handle warning-related options.
+################################################################################
+
+AC_ARG_ENABLE([warnings],
+[AS_HELP_STRING([--enable-warnings],
+                [enable pedantic compiler warnings @<:@default=yes@:>@])])
+
+if test "x$enable_warnings" = xno; then
+  WARNINGCFLAGS=""
+else
+  # Doing it in two steps gives a nicer message...
+  AX_CFLAGS_WARN_ALL_ANSI([flags])
+  WARNINGCFLAGS=$flags
+fi
+
+AC_ARG_ENABLE([more-warnings],
+[AS_HELP_STRING([--enable-more-warnings],
+                [enable even more compiler warnings @<:@default=no@:>@])])
+
+if test "x$enable_more_warnings" = xyes; then
+  if test "x$enable_warnings" = xno; then
+    AC_MSG_WARN([--enable-more-warnings ignored because of --disable-warnings])
+  elif test "x$GCC" != xyes; then
+    AC_MSG_WARN([--enable-more-warnings ignored because no GCC was detected])
+  else
+    # The long list of warning options below contains every GCC warning option
+    # which is not automatically enabled with -Wall. The only exceptions to this
+    # rule are:
+    #
+    #    -Wpadded:
+    #      Perhaps good for optimizing out data layout, but not in general.
+    #
+    #    -Wconversion:
+    #      Passing e.g. float as an argument is fine, we always have prototypes.
+    #
+    #    -Wfloat-equal:
+    #       Often we should use an epsilon, but there are some correct uses,
+    #       too, so we leave it out for now. ToDo: Fix those warnings, anyway!
+    #
+    # Note that some older GCC versions give false positives about unreachable
+    # code. Furthermore, using GNU's <string.h> header normally results in lots
+    # of string functions like strcmp being macros which result in such false
+    # positives, too. To disable those, one can use -D__NO_STRING_INLINES for
+    # testing. And another source for false positives is inlining, so leaving
+    # out -finline-functions or using -fno-inline-functions explicitly might
+    # help, too.
+    WARNINGCFLAGS="$WARNINGCFLAGS -W -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wdisabled-optimization -Wendif-labels -Winline -Wlong-long -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef -Wunreachable-code -Wwrite-strings"
+
+    # Check for GCC 4.x-only warning options.
+    ALUT_CHECK_FLAG([-Wdeclaration-after-statement],
+                    [WARNINGCFLAGS="$WARNINGCFLAGS -Wdeclaration-after-statement"])
+    ALUT_CHECK_FLAG([-Winvalid-pch],
+                    [WARNINGCFLAGS="$WARNINGCFLAGS -Winvalid-pch"])
+    ALUT_CHECK_FLAG([-Wmissing-field-initializers],
+                    [WARNINGCFLAGS="$WARNINGCFLAGS -Wmissing-field-initializers"])
+    # We cheat here a bit: The code generated by AC_LANG_PROGRAM triggers a
+    # warning with -Wold-style-definition, so we assume that this flag is
+    # supported whenever -Wvariadic-macros is.
+    ALUT_CHECK_FLAG([-Wvariadic-macros],
+                    [WARNINGCFLAGS="$WARNINGCFLAGS -Wvariadic-macros -Wold-style-definition"])
+  fi
+fi
+
+AC_ARG_ENABLE([werror],
+[AS_HELP_STRING([--enable-werror],
+                [enable failure on all warnings @<:@default=no@:>@])])
+
+if test "x$enable_werror" = xyes; then
+  if test "x$enable_warnings" = xno; then
+    AC_MSG_WARN([--enable-werror ignored because of --disable-warnings])
+  elif test "x$GCC" != xyes; then
+    AC_MSG_WARN([--enable-werror ignored because no GCC was detected])
+  else
+    WARNINGCFLAGS="$WARNINGCFLAGS -Werror"
+  fi
+fi
+
+################################################################################
+# Handle debugging-related options.
+################################################################################
+
+AC_ARG_ENABLE([debug],
+[AS_HELP_STRING([--enable-debug],
+                [enable debug code and assertions @<:@default=no@:>@])])
+
+if test "x$enable_debug" = xyes; then
+  AC_DEFINE([DEBUG], [1], [Define to 1 if you want to include debugging code.])
+else
+  AC_DEFINE([NDEBUG], [1], [Define to 1 if you want to disable the assert() macro.])
+fi
+
+AC_ARG_ENABLE([efence],
+[AS_HELP_STRING([--enable-efence],
+                [enable Electric Fence support @<:@default=no@:>@])])
+
+if test "x$enable_efence" = xyes; then
+  openal_saved_LIBS=$LIBS
+  LIBS="-lefence $LIBS"
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([extern int EF_ALIGNMENT;], [EF_ALIGNMENT = 8;])],
+    [:],
+    [AC_MSG_WARN([--enable-efence ignored because the Electric Fence library was not found.])
+     LIBS=$openal_saved_LIBS])
+fi
+
+# stubifying
+AC_ARG_ENABLE([debug-stub],
+[AS_HELP_STRING([--enable-debug-stub],
+                [enable stub debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_stub" = xyes; then
+  AC_DEFINE([DEBUG_STUB], [1], [Define to 1 to enable stub debugging.])
+fi
+
+# looping debug notification
+AC_ARG_ENABLE([debug-loop],
+[AS_HELP_STRING([--enable-debug-loop],
+                [enable looping debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_loop" = xyes; then
+  AC_DEFINE([DEBUG_LOOP], [1], [Define to 1 to enable looping debugging.])
+fi
+
+# conversion debug notification
+AC_ARG_ENABLE([debug-convert],
+[AS_HELP_STRING([--enable-debug-convert],
+                [enable conversion debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_convert" = xyes; then
+  AC_DEFINE([DEBUG_CONVERT], [1], [Define to 1 to enable conversion debugging.])
+fi
+
+# config file debug notification
+AC_ARG_ENABLE([debug-config],
+[AS_HELP_STRING([--enable-debug-config],
+                [enable config file debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_config" = xyes; then
+  AC_DEFINE([DEBUG_CONFIG], [1], [Define to 1 to enable config file debugging.])
+fi
+
+# lock debug notification
+AC_ARG_ENABLE([debug-lock],
+[AS_HELP_STRING([--enable-debug-lock],
+                [enable lock debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_lock" = xyes; then
+  AC_DEFINE([DEBUG_LOCK], [1], [Define to 1 to enable lock debugging.])
+fi
+
+# extension debug notification
+AC_ARG_ENABLE([debug-ext],
+[AS_HELP_STRING([--enable-debug-ext],
+                [enable extension debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_ext" = xyes; then
+  AC_DEFINE([DEBUG_EXT], [1], [Define to 1 to enable extension debugging.])
+fi
+
+# buffer debug notification
+AC_ARG_ENABLE([debug-buffer],
+[AS_HELP_STRING([--enable-debug-buffer],
+                [enable buffer debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_buffer" = xyes; then
+  AC_DEFINE([DEBUG_BUFFER], [1], [Define to 1 to enable buffer debugging.])
+fi
+
+# source debug notification
+AC_ARG_ENABLE([debug-source],
+[AS_HELP_STRING([--enable-debug-source],
+                [enable source debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_source" = xyes; then
+  AC_DEFINE([DEBUG_SOURCE], [1], [Define to 1 to enable source debugging.])
+fi
+
+# mixer debug notification
+AC_ARG_ENABLE([debug-mixer],
+[AS_HELP_STRING([--enable-debug-mixer],
+                [enable mixer debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_mixer" = xyes; then
+  AC_DEFINE([DEBUG_MIXER], [1], [Define to 1 to enable mixer debugging.])
+fi
+
+# streaming debug notification
+AC_ARG_ENABLE([debug-streaming],
+[AS_HELP_STRING([--enable-debug-streaming],
+                [enable streaming debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_streaming" = xyes; then
+  AC_DEFINE([DEBUG_STREAMING], [1], [Define to 1 to enable streaming debugging.])
+fi
+
+# math debug notification
+AC_ARG_ENABLE([debug-math],
+[AS_HELP_STRING([--enable-debug-math],
+                [enable math debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_math" = xyes; then
+  AC_DEFINE([DEBUG_MATH], [1], [Define to 1 to enable math debugging.])
+fi
+
+# mem debug notification
+AC_ARG_ENABLE([debug-mem],
+[AS_HELP_STRING([--enable-debug-mem],
+                [enable memory debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_mem" = xyes; then
+  AC_DEFINE([DEBUG_MEM], [1], [Define to 1 to enable memory debugging.])
+fi
+
+# context debug notification
+AC_ARG_ENABLE([debug-context],
+[AS_HELP_STRING([--enable-debug-context],
+                [enable context debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_context" = xyes; then
+  AC_DEFINE([DEBUG_CONTEXT], [1], [Define to 1 to enable context debugging.])
+fi
+
+# debug queue structures/functions/etc
+AC_ARG_ENABLE([debug-queue],
+[AS_HELP_STRING([--enable-debug-queue],
+                [enable queue debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_queue" = xyes; then
+  AC_DEFINE([DEBUG_QUEUE], [1], [Define to 1 to enable queue debugging.])
+fi
+
+# debug filter
+AC_ARG_ENABLE([debug-filter],
+[AS_HELP_STRING([--enable-debug-filter],
+                [enable filter debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_filter" = xyes; then
+  AC_DEFINE([DEBUG_FILTER], [1], [Define to 1 to enable filter debugging.])
+fi
+
+# debug maximus
+AC_ARG_ENABLE([debug-maximus],
+[AS_HELP_STRING([--enable-debug-maximus],
+                [enable all debugging @<:@default=no@:>@])])
+
+if test "x$enable_debug_maximus" = xyes; then
+  AC_DEFINE([DEBUG_MAXIMUS], [1], [Define to 1 to enable all debugging.])
+fi
+
+################################################################################
+# Handle optimization-related options.
+################################################################################
+
+AC_ARG_ENABLE([optimization],
+[AS_HELP_STRING([--enable-optimization],
+                [enable optimization @<:@default=yes@:>@])])
+
+if test "x$enable_optimization" != xno; then
+  ALUT_CHECK_FLAG([-finline-functions],
+                  [OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -finline-functions"])
+  ALUT_CHECK_FLAG([-ffast-math],
+                  [OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -ffast-math"])
+  # -pg and -fomit-frame-pointer are incompatible. ToDo: Test for this!
+  if test "x$enable_profile" != xyes; then
+    ALUT_CHECK_FLAG([-fomit-frame-pointer],
+                    [OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -fomit-frame-pointer"])
+  fi
+fi
+
+# profiling stuff
+AC_ARG_ENABLE([profile],
+[AS_HELP_STRING([--enable-profile],
+                [enable profile @<:@default=no@:>@])])
+
+if test "x$enable_profile" = xyes; then
+  ALUT_CHECK_FLAG([-pg],
+                  [OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -pg"
+                   PROFILINGLDFLAGS="$LDFLAGS -pg"],
+                  [AC_MSG_WARN([--enable-profile ignored because $CC does not support -pg.])])
+fi
+
+AC_C_BIGENDIAN
+
+# A few notes about dynamic loading of libraries: We should really use libtool's
+# mechanisms for this, but for now we have to get our hands dirty with dlopen
+# and friends and hope for the best. These calls are available on a lot of
+# *nices and Cygwin and according to Apple's developer pages, they are available
+# on Mac OS X 10.3 and later, too. In former Mac OS X versions one has to use
+# the dlcompat library to emulate this facility. Furthermore, adding "-ldl"
+# might be required, but not always (e.g. Cygwin).
+
+AC_CHECK_HEADERS([dlfcn.h],
+  [AC_CHECK_LIB([dl], [dlopen], [LIBS="-ldl $LIBS"])],
+  [AC_MSG_WARN([Dynamic loading of libraries is not available.])
+   AC_DEFINE([NODLOPEN], [1], [Define to 1 if dynamic loading of libraries is not available.])])
+
+# ranlib stuff
+case "$target" in
+    *darwin*) RANLIB=ranlib ;;
+    *) RANLIB=echo ;;
+esac
+
+dnl Special OS objs for target systems
+case "$target" in
+  *darwin*) LIBS="$LIBS -I/System/Library/Frameworks/CoreAudio.framework/Headers/ -framework CoreAudio"
+            AC_DEFINE([USE_BACKEND_NATIVE_DARWIN], [1], [undocumented]) ;;
+esac
+
+dnl Special objs for architectures
+case "$target" in
+    *i386* | *i486* | *i586* | *i686* | *x86_64*)
+    openal_x86_support_yn=yes
+
+    AC_MSG_CHECKING([for MMX support])
+    AC_TRY_COMPILE([
+#ifndef __MMX__
+#error no MMX support
+#endif
+      ],, [openal_x86_mmx_support_yn=yes], [openal_x86_mmx_support_yn=no])
+    AC_MSG_RESULT([$openal_x86_mmx_support_yn])
+    ;;
+esac
+
+if test "x$openal_x86_mmx_support_yn" = xyes; then
+case "$target" in
+    *i386* | *i486* | *i586* | *i686*)
+        AC_PATH_PROG([NASM], [nasm], [no])
+
+        if test "x$NASM" != xno; then
+            AC_DEFINE([HAVE_CPU_CAPS_DETECTION], [1], [detect cpu capabilities])
+            openal_x86_nasm_support_yn=yes
+
+            if test "x$openal_x86_mmx_support_yn" = xyes; then
+                AC_DEFINE([HAVE_MMX_MEMCPY], [1], [mmx memcpy])
+                openal_x86_nasm_mmx_support_yn=yes
+            fi
+
+            case "$target" in
+            *linux*)
+                NASM_FORMAT="-f elf"
+                ;;
+            *cygwin* | *mingw*)
+                NASM_FORMAT="-f win32 -DWIN32"
+                ;;
+            esac
+        fi
+        ;;
+    *x86_64*)
+        ;;
+    *)
+        ;;
+esac
+
+
+AC_ARG_ENABLE([optim-generic],
+[AS_HELP_STRING([--enable-optim-generic],
+                [x86(_64): even if mmx enabled, build optimized instead of light generic mixing routines  @<:@i686/x86_64:default=no@:>@])])
+
+if test "x$openal_x86_mmx_support_yn" = xyes; then
+    case "$target" in
+    *i686* | *x86_64*)
+        if test "x$enable_optim_generic" != xyes; then
+            enable_optim_generic=no
+        fi
+        ;;
+    *)
+        if test "x$enable_optim_generic" != xno; then
+            enable_optim_generic=yes
+        fi
+        ;;
+    esac
+
+    if test "x$enable_optim_generic" = xno; then
+        AC_DEFINE([USE_LIGHT_GEN_MIXING], [1], [build light generic mixing routines])
+    fi
+fi
+fi
+
+AM_CONDITIONAL([X86ENABLED], [test "x$openal_x86_support_yn" = xyes])
+AM_CONDITIONAL([X86MMXENABLED], [test "x$openal_x86_mmx_support_yn" = xyes])
+AM_CONDITIONAL([X86NASMENABLED], [test "x$openal_x86_nasm_support_yn" = xyes])
+AM_CONDITIONAL([X86NASMMMXENABLED], [test "x$openal_x86_nasm_mmx_support_yn" = xyes])
+
+# Note that -fvisibility=... support implies __attribute__((visibility(...))) 
+# support.
+ALUT_CHECK_FLAG([-fvisibility=hidden],
+                [OPTIMIZATIONCFLAGS="$OPTIMIZATIONCFLAGS -fvisibility=hidden"
+                 AC_DEFINE([HAVE_GCC_VISIBILITY], [1],
+                           [Define to 1 if we are using a GCC with symbol visibility support.])])
+
+################################################################################
+# Checks for backends.
+################################################################################
+#
+# Detecting backends in the various configurations and on the various platforms
+# is a nightmare, but let's at least describe the general ideas:
+#
+#  * Every non-trivial backend has two switches: One for enabling/disabling the
+#    backend and one for enabling/disabling dlopening the relevant libraries at
+#    runtime.
+#
+#  * If the backend has been disabled explicitly, there is nothing to do,
+#    otherwise we need at least the relevant header.
+#
+#  * To find any needed flags for the C compiler, use pkg-config or the outdated
+#    foo-config. If neither is available, assume that no special flags are
+#    needed (and guess a library later if necessary).
+#
+#  * If static linking to the backend has been requested, we have to find out
+#    any needed linker flags, too.
+#
+# ToDo: There is far too much cut-n-paste below, we should really refactor this
+# using some nice macros...
+
+
+# OPENAL_ENABLE(FEATURE-NAME, SUPPORT-VAR, SUPPORT-DEFINE, SUPPORT-MAKEVAR)
+#--------------------------------------------------------------------------
+AC_DEFUN([OPENAL_ENABLE],
+[AC_MSG_CHECKING([for $1 support])
+ AC_MSG_RESULT([[$]$2])
+
+ case [$]$2 in
+   dynamic|static) openal_support_yn=yes ;;
+   *) openal_support_yn=no ;;
+ esac
+
+ if test "x$openal_support_yn" = xyes; then
+   AC_DEFINE([$3], [1], [Define to 1 if the $1 should be used.])
+ fi
+
+ AM_CONDITIONAL([$4], [test "x$openal_support_yn" = xyes])
+]) # OPENAL_ENABLE
+
+
+# check for ALSA backend #######################################################
+
+AC_ARG_ENABLE([alsa],
+[AS_HELP_STRING([--enable-alsa],
+                [enable ALSA backend @<:@default=auto@:>@])])
+
+AC_ARG_ENABLE([alsa-dlopen],
+[AS_HELP_STRING([--enable-alsa-dlopen],
+                [dynamically load ALSA libs @<:@default=yes@:>@])])
+
+if test "x$enable_alsa" = xno; then
+  openal_backend_alsa_support=disabled
+else
+  AC_CACHE_CHECK([for ALSA compiler flags], [openal_cv_cflags_alsa],
+    [openal_cv_cflags_alsa=unknown
+     test "x$PKG_CONFIG" != xnone && "$PKG_CONFIG" --exists alsa && openal_cv_cflags_alsa="`$PKG_CONFIG --cflags alsa`"
+     test -z "$openal_cv_cflags_alsa" && openal_cv_cflags_alsa=none])
+  case $openal_cv_cflags_alsa in
+    unknown|none) openal_cflags_alsa="" ;;
+    *) openal_cflags_alsa=$openal_cv_cflags_alsa ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_alsa"
+  AC_CHECK_HEADER([alsa/asoundlib.h],
+    [if test "x$enable_alsa_dlopen" != xno; then
+       openal_backend_alsa_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_alsa"
+       AC_DEFINE([OPENAL_DLOPEN_ALSA], [1], [dynamically load ALSA libs])
+     else
+       AC_CACHE_CHECK([for ALSA linker flags], [openal_cv_libs_alsa],
+         [if test "x$PKG_CONFIG" != xnone && "$PKG_CONFIG" --exists alsa; then
+            openal_cv_libs_alsa="`$PKG_CONFIG --libs alsa`"
+            if test -z "$openal_cv_libs_alsa"; then
+              openal_cv_libs_alsa=none
+            fi
+          else
+            openal_cv_libs_alsa=unknown
+          fi])
+       if test "x$openal_cv_libs_alsa" = xunknown; then
+         openal_libs_alsa="-lasound"
+       else
+         openal_libs_alsa=$openal_cv_libs_alsa
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_alsa $LIBS"
+       AC_CACHE_CHECK([for snd_pcm_info_sizeof], [openal_cv_func_snd_pcm_info_sizeof],
+         [AC_LINK_IFELSE([AC_LANG_CALL([], [snd_pcm_info_sizeof])],
+            [openal_cv_func_snd_pcm_info_sizeof=yes],
+            [openal_cv_func_snd_pcm_info_sizeof=no])])
+       if test "x$openal_cv_func_snd_pcm_info_sizeof" = xyes; then
+         openal_backend_alsa_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_alsa"
+         LIBS="$openal_libs_alsa $LIBS"
+       else
+         openal_backend_alsa_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_alsa" = xyes; then
+           AC_MSG_WARN([--enable-alsa ignored because the ALSA library could not be found.])
+         fi
+       fi
+     fi],
+    [openal_backend_alsa_support=none
+     if test "x$enable_alsa" = xyes; then
+       AC_MSG_WARN([--enable-alsa ignored because the ALSA header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+OPENAL_ENABLE([ALSA backend], [openal_backend_alsa_support],
+              [USE_BACKEND_ALSA], [USEBACKENDALSA])
+
+# check for aRts backend #######################################################
+
+AC_ARG_ENABLE([arts],
+[AS_HELP_STRING([--enable-arts],
+                [enable aRts backend @<:@default=auto@:>@])])
+
+AC_ARG_ENABLE([arts-dlopen],
+[AS_HELP_STRING([--enable-arts-dlopen],
+                [dynamically load aRts libs @<:@default=yes@:>@])])
+
+if test "x$enable_arts" = xno; then
+  openal_backend_arts_support=disabled
+else
+  AC_ARG_VAR([ARTSC_CONFIG], [aRts configuration utility])
+  AC_CHECK_PROGS([ARTSC_CONFIG], [artsc-config], [none])
+  AC_CACHE_CHECK([for aRts compiler flags], [openal_cv_cflags_arts],
+    [openal_cv_cflags_arts=unknown
+     test "x$ARTSC_CONFIG" != xnone && openal_cv_cflags_arts="`$ARTSC_CONFIG --cflags`"
+     test -z "$openal_cv_cflags_arts" && openal_cv_cflags_arts=none])
+  case $openal_cv_cflags_arts in
+    unknown|none) openal_cflags_arts="" ;;
+    *) openal_cflags_arts=$openal_cv_cflags_arts ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_arts"
+  AC_CHECK_HEADER([artsc.h],
+    [if test "x$enable_arts_dlopen" != xno; then
+       openal_backend_arts_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_arts"
+       AC_DEFINE([OPENAL_DLOPEN_ARTS], [1], [dynamically load aRts libs])
+     else
+       AC_CACHE_CHECK([for aRts linker flags], [openal_cv_libs_arts],
+         [if test "x$ARTSC_CONFIG" != xnone; then
+            openal_cv_libs_arts="`$ARTSC_CONFIG --libs`"
+            if test -z "$openal_cv_libs_arts"; then
+              openal_cv_libs_arts=none
+            fi
+          else
+            openal_cv_libs_arts=unknown
+          fi])
+       if test "x$openal_cv_libs_arts" = xunknown; then
+         openal_libs_arts="-lartsc"
+       else
+         openal_libs_arts=$openal_cv_libs_arts
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_arts $LIBS"
+       AC_CACHE_CHECK([for arts_free], [openal_cv_func_arts_free],
+         [AC_LINK_IFELSE([AC_LANG_CALL([], [arts_free])],
+            [openal_cv_func_arts_free=yes],
+            [openal_cv_func_arts_free=no])])
+       if test "x$openal_cv_func_arts_free" = xyes; then
+         openal_backend_arts_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_arts"
+         LIBS="$openal_libs_arts $LIBS"
+       else
+         openal_backend_arts_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_arts" = xyes; then
+           AC_MSG_WARN([--enable-arts ignored because the aRts library could not be found.])
+         fi
+       fi
+     fi],
+    [openal_backend_arts_support=none
+     if test "x$enable_arts" = xyes; then
+       AC_MSG_WARN([--enable-arts ignored because the aRts header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+OPENAL_ENABLE([aRts backend], [openal_backend_arts_support],
+              [USE_BACKEND_ARTS], [USEBACKENDARTS])
+
+# check for native BSD/OSS backend #############################################
+
+# ToDo: Hmmm, OpenBSD/FreeBSD are using OSS, too, just like Linux. Perhaps some
+# re-use is possible?
+
+AC_ARG_ENABLE([bsd],
+[AS_HELP_STRING([--enable-bsd],
+                [enable native BSD/OSS backend @<:@default=auto@:>@])])
+
+if test "x$enable_bsd" = xno; then
+  openal_backend_bsd_support=disabled
+else
+  case "$target" in
+    *bsd*) openal_backend_bsd_support=static ;;
+    *) openal_backend_bsd_support=none
+       if test "x$enable_bsd" = xyes; then
+         AC_MSG_WARN([--enable-bsd ignored because this is no BSD build.])
+       fi ;;
+  esac
+fi
+
+OPENAL_ENABLE([native BSD/OSS backend], [openal_backend_bsd_support],
+              [USE_BACKEND_NATIVE_BSD], [USEBACKENDNATIVEBSD])
+
+# check for native Darwin backend ##############################################
+
+AC_ARG_ENABLE([darwin],
+[AS_HELP_STRING([--enable-darwin],
+                [enable native Darwin backend @<:@default=auto@:>@])])
+
+if test "x$enable_darwin" = xno; then
+  openal_backend_darwin_support=disabled
+else
+  case "$target" in
+    *darwin*) openal_backend_darwin_support=static ;;
+    *) openal_backend_darwin_support=none
+       if test "x$enable_darwin" = xyes; then
+         AC_MSG_WARN([--enable-darwin ignored because this is no Darwin build.])
+       fi ;;
+  esac
+fi
+
+OPENAL_ENABLE([native Darwin backend], [openal_backend_darwin_support],
+              [USE_BACKEND_NATIVE_DARWIN], [USEBACKENDNATIVEDARWIN])
+
+# check for ESD backend ########################################################
+
+AC_ARG_ENABLE([esd],
+[AS_HELP_STRING([--enable-esd],
+                [enable ESD backend @<:@default=auto@:>@])])
+
+AC_ARG_ENABLE([esd-dlopen],
+[AS_HELP_STRING([--enable-esd-dlopen],
+                [dynamically load ESD libs @<:@default=yes@:>@])])
+
+if test "x$enable_esd" = xno; then
+  openal_backend_esd_support=disabled
+else
+  AC_ARG_VAR([ESD_CONFIG], [esd configuration utility])
+  AC_CHECK_PROGS([ESD_CONFIG], [esd-config], [none])
+  AC_CACHE_CHECK([for ESD compiler flags], [openal_cv_cflags_esd],
+    [openal_cv_cflags_esd=unknown
+     test "x$ESD_CONFIG" != xnone && openal_cv_cflags_esd="`$ESD_CONFIG --cflags`"
+     test -z "$openal_cv_cflags_esd" && openal_cv_cflags_esd=none])
+  case $openal_cv_cflags_esd in
+    unknown|none) openal_cv_cflags_esd="" ;;
+    *) openal_cflags_esd=$openal_cv_cflags_esd ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_esd"
+  AC_CHECK_HEADER([esd.h],
+    [if test "x$enable_esd_dlopen" != xno; then
+       openal_backend_esd_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_esd"
+       AC_DEFINE([OPENAL_DLOPEN_ESD], [1], [dynamically load ESD libs])
+     else
+       AC_CACHE_CHECK([for ESD linker flags], [openal_cv_libs_esd],
+         [if test "x$ESD_CONFIG" != xnone; then
+            openal_cv_libs_esd="`$ESD_CONFIG --libs`"
+            if test -z "$openal_cv_libs_esd"; then
+              openal_cv_libs_esd=none
+            fi
+          else
+            openal_cv_libs_esd=unknown
+          fi])
+       if test "x$openal_cv_libs_esd" = xunknown; then
+         openal_libs_esd="-lesd"
+       else
+         openal_libs_esd=$openal_cv_libs_esd
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_esd $LIBS"
+       AC_CACHE_CHECK([for esd_audio_open], [openal_cv_func_esd_audio_open],
+         [AC_LINK_IFELSE([AC_LANG_CALL([], [esd_audio_open])],
+            [openal_cv_func_esd_audio_open=yes],
+            [openal_cv_func_esd_audio_open=no])])
+       if test "x$openal_cv_func_esd_audio_open" = xyes; then
+         openal_backend_esd_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_esd"
+         LIBS="$openal_libs_esd $LIBS"
+       else
+         openal_backend_esd_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_esd" = xyes; then
+           AC_MSG_WARN([--enable-esd ignored because the ESD library could not be found.])
+         fi
+       fi
+     fi],
+    [openal_backend_esd_support=none
+     if test "x$enable_esd" = xyes; then
+       AC_MSG_WARN([--enable-esd ignored because the ESD header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+OPENAL_ENABLE([ESD backend], [openal_backend_esd_support],
+              [USE_BACKEND_ESD], [USEBACKENDESD])
+
+# check for native IRIX backend ################################################
+
+AC_ARG_ENABLE([irix],
+[AS_HELP_STRING([--enable-irix],
+                [enable native IRIX backend @<:@default=auto@:>@])])
+
+if test "x$enable_irix" = xno; then
+  openal_backend_irix_support=disabled
+else
+  AC_CHECK_HEADER([dmedia/audio.h],
+    [openal_libs_irix="-laudio"
+     openal_saved_LIBS=$LIBS
+     LIBS="$openal_libs_irix $LIBS"
+     AC_CACHE_CHECK([for alGetResourceByName], [openal_cv_func_algetresourcebyname],
+       [AC_LINK_IFELSE([AC_LANG_CALL([], [alGetResourceByName])],
+          [openal_cv_func_algetresourcebyname=yes],
+          [openal_cv_func_algetresourcebyname=no])])
+     if test "x$openal_cv_func_algetresourcebyname" = xyes; then
+       openal_backend_irix_support=static
+       LIBS="$openal_libs_irix $LIBS"
+     else
+       openal_backend_irix_support=none
+       LIBS=$openal_saved_LIBS
+       if test "x$enable_irix" = xyes; then
+         AC_MSG_WARN([--enable-irix ignored because the Irix Multimedia library could not be found.])
+       fi
+     fi],
+    [openal_backend_irix_support=none
+     if test "x$enable_irix" = xyes; then
+       AC_MSG_WARN([--enable-irix ignored because the Irix header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+fi
+
+OPENAL_ENABLE([native IRIX backend], [openal_backend_irix_support],
+              [USE_BACKEND_DMEDIA], [USEBACKENDNATIVEIRIX])
+
+# check for native Linux backend ###############################################
+
+AC_ARG_ENABLE([linux],
+[AS_HELP_STRING([--enable-linux],
+                [enable native Linux/OSS backend @<:@default=auto@:>@])])
+
+if test "x$enable_linux" = xno; then
+  openal_backend_linux_support=disabled
+else
+  AC_CHECK_HEADER([linux/soundcard.h],
+    [openal_backend_linux_support=static],
+    [openal_backend_linux_support=none
+     if test "x$enable_linux" = xyes; then
+       AC_MSG_WARN([--enable-linux ignored because the Linux OSS header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+fi
+
+OPENAL_ENABLE([native Linux backend], [openal_backend_linux_support],
+              [USE_BACKEND_NATIVE_LINUX], [USEBACKENDNATIVELINUX])
+
+# check for native MorphOS backend #############################################
+
+AC_ARG_ENABLE([morphos],
+[AS_HELP_STRING([--enable-morphos],
+                [enable native MorphOS backend @<:@default=auto@:>@])])
+
+if test "x$enable_morphos" = xno; then
+  openal_backend_morphos_support=disabled
+else
+  case "$target" in
+    *morphos*) openal_backend_morphos_support=static ;;
+    *) openal_backend_morphos_support=none
+       if test "x$enable_morphos" = xyes; then
+         AC_MSG_WARN([--enable-morphos ignored because this is no MorphOS build.])
+       fi ;;
+  esac
+fi
+
+OPENAL_ENABLE([native MorphOS backend], [openal_backend_morphos_support],
+              [USE_BACKEND_NATIVE_MORPHOS], [USEBACKENDNATIVEMORPHOS])
+
+# check for null backend #######################################################
+
+AC_ARG_ENABLE([null],
+[AS_HELP_STRING([--enable-null],
+                [enable null backend @<:@default=yes@:>@])])
+
+case $enable_null in
+  no) openal_backend_null_support=disabled ;;
+  *) openal_backend_null_support=static ;;
+esac
+
+OPENAL_ENABLE([null backend], [openal_backend_null_support],
+              [USE_BACKEND_NULL], [USEBACKENDNULL])
+
+# check for SDL backend ########################################################
+
+AC_ARG_ENABLE([sdl],
+[AS_HELP_STRING([--enable-sdl],
+                [enable SDL backend @<:@default=auto@:>@])])
+
+AC_ARG_ENABLE([sdl-dlopen],
+[AS_HELP_STRING([--enable-sdl-dlopen],
+                [dynamically load SDL libs @<:@default=yes@:>@])])
+
+if test "x$enable_sdl" = xno; then
+  openal_backend_sdl_support=disabled
+else
+  AC_ARG_VAR([SDL_CONFIG], [sdl configuration utility])
+  AC_CHECK_PROGS([SDL_CONFIG], [sdl-config], [none])
+  AC_CACHE_CHECK([for SDL compiler flags], [openal_cv_cflags_sdl],
+    [openal_cv_cflags_sdl=unknown
+     test "x$SDL_CONFIG" != xnone && openal_cv_cflags_sdl="`$SDL_CONFIG --cflags`"
+     test -z "$openal_cv_cflags_sdl" && openal_cv_cflags_sdl=none])
+  case $openal_cv_cflags_sdl in
+    unknown|none) openal_cv_cflags_sdl="" ;;
+    *) openal_cflags_sdl=$openal_cv_cflags_sdl ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_sdl"
+  AC_CHECK_HEADER([SDL.h],
+    [if test "x$enable_sdl_dlopen" != xno; then
+       openal_backend_sdl_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_sdl"
+       AC_DEFINE([OPENAL_DLOPEN_SDL], [1], [dynamically load SDL libs])
+     else
+       AC_CACHE_CHECK([for SDL linker flags], [openal_cv_libs_sdl],
+         [if test "x$SDL_CONFIG" != xnone; then
+            openal_cv_libs_sdl="`$SDL_CONFIG --libs`"
+            if test -z "$openal_cv_libs_sdl"; then
+              openal_cv_libs_sdl=none
+            fi
+          else
+            openal_cv_libs_sdl=unknown
+          fi])
+       if test "x$openal_cv_libs_sdl" = xunknown; then
+         openal_libs_sdl="-lsdl"
+       else
+         openal_libs_sdl=$openal_cv_libs_sdl
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_sdl $LIBS"
+       AC_CACHE_CHECK([for SDL_LockAudio], [openal_cv_func_sdl_lockaudio],
+         [AC_LINK_IFELSE([AC_LANG_CALL([], [SDL_LockAudio])],
+            [openal_cv_func_sdl_lockaudio=yes],
+            [openal_cv_func_sdl_lockaudio=no])])
+       if test "x$openal_cv_func_sdl_lockaudio" = xyes; then
+         openal_backend_sdl_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_sdl"
+         LIBS="$openal_libs_sdl $LIBS"
+       else
+         openal_backend_sdl_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_sdl" = xyes; then
+           AC_MSG_WARN([--enable-sdl ignored because the SDL library could not be found.])
+         fi
+       fi
+     fi],
+    [openal_backend_sdl_support=none
+     if test "x$enable_sdl" = xyes; then
+       AC_MSG_WARN([--enable-sdl ignored because the SDL header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+OPENAL_ENABLE([SDL backend], [openal_backend_sdl_support],
+              [USE_BACKEND_SDL], [USEBACKENDSDL])
+
+# check for native Solaris backend #############################################
+
+AC_ARG_ENABLE([solaris],
+[AS_HELP_STRING([--enable-solaris],
+                [enable native Solaris backend @<:@default=auto@:>@])])
+
+if test "x$enable_solaris" = xno; then
+  openal_backend_solaris_support=disabled
+else
+  AC_CHECK_HEADER([sys/audioio.h],
+    [openal_backend_solaris_support=static],
+    [openal_backend_solaris_support=none
+     if test "x$enable_solaris" = xyes; then
+       AC_MSG_WARN([--enable-solaris ignored because the Solaris audio header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+fi
+
+OPENAL_ENABLE([native Solaris backend], [openal_backend_solaris_support],
+              [USE_BACKEND_NATIVE_SOLARIS], [USEBACKENDNATIVESOLARIS])
+
+# check for WAVE backend #######################################################
+
+AC_ARG_ENABLE([waveout],
+[AS_HELP_STRING([--enable-waveout],
+                [enable WAVE backend @<:@default=yes@:>@])])
+
+case $enable_waveout in
+  no) openal_backend_waveout_support=disabled ;;
+  *) openal_backend_waveout_support=static ;;
+esac
+
+OPENAL_ENABLE([WAVE backend], [openal_backend_waveout_support],
+              [USE_BACKEND_WAVEOUT], [USEBACKENDWAVEOUT])
+
+# check for native Windows backend #############################################
+
+AC_ARG_ENABLE([windows],
+[AS_HELP_STRING([--enable-windows],
+                [enable native Windows backend @<:@default=auto@:>@])])
+
+if test "x$enable_windows" = xno; then
+  openal_backend_windows_support=disabled
+else
+  AC_CHECK_HEADER([windows.h],
+    [openal_libs_windows="-lwinmm"
+     openal_saved_LIBS=$LIBS
+     LIBS="$openal_libs_windows $LIBS"
+     AC_CACHE_CHECK([for waveOutOpen], [openal_cv_func_waveoutopen],
+       [AC_LINK_IFELSE(
+         [AC_LANG_PROGRAM([[@%:@include <windows.h>]],
+                          [[waveOutOpen(NULL, WAVE_MAPPER, NULL, 0, 0, CALLBACK_FUNCTION);]])],
+          [openal_cv_func_waveoutopen=yes],
+          [openal_cv_func_waveoutopen=no])])
+     if test "x$openal_cv_func_waveoutopen" = xyes; then
+       openal_backend_windows_support=static
+       LIBS="$openal_libs_windows $LIBS"
+     else
+       openal_backend_windows_support=none
+       LIBS=$openal_saved_LIBS
+       if test "x$enable_windows" = xyes; then
+         AC_MSG_WARN([--enable-windows ignored because the Windows Multimedia library could not be found.])
+       fi
+     fi],
+    [openal_backend_windows_support=none
+     if test "x$enable_windows" = xyes; then
+       AC_MSG_WARN([--enable-windows ignored because the Windows header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+fi
+
+OPENAL_ENABLE([native Windows backend], [openal_backend_windows_support],
+              [USE_BACKEND_NATIVE_WINDOWS], [USEBACKENDNATIVEWINDOWS])
+
+################################################################################
+# Checks for extensions.
+################################################################################
+
+# check for AL_EXT_vorbis extension ############################################
+
+AC_ARG_ENABLE([vorbis],
+[AS_HELP_STRING([--enable-vorbis],
+                [enable AL_EXT_vorbis extension @<:@default=auto@:>@])])
+
+AC_ARG_ENABLE([vorbis-dlopen],
+[AS_HELP_STRING([--enable-vorbis-dlopen],
+                [dynamically load Vorbis libs @<:@default=yes@:>@])])
+
+if test "x$enable_vorbis" = xno; then
+  openal_extension_vorbis_support=disabled
+else
+  AC_CACHE_CHECK([for Vorbis compiler flags], [openal_cv_cflags_vorbis],
+    [openal_cv_cflags_vorbis=unknown
+     test "x$PKG_CONFIG" != xnone && "$PKG_CONFIG" --exists vorbis && openal_cv_cflags_vorbis="`$PKG_CONFIG --cflags vorbisfile`"
+     test -z "$openal_cv_cflags_vorbis" && openal_cv_cflags_vorbis=none])
+  case $openal_cv_cflags_vorbis in
+    unknown|none) openal_cflags_vorbis="" ;;
+    *) openal_cflags_vorbis=$openal_cv_cflags_vorbis ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_vorbis"
+  AC_CHECK_HEADER([vorbis/vorbisfile.h],
+    [if test "x$enable_vorbis_dlopen" != xno; then
+       openal_extension_vorbis_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_vorbis"
+       AC_DEFINE([OPENAL_DLOPEN_VORBIS], [1], [dynamically load Vorbis libs])
+     else
+       AC_CACHE_CHECK([for Vorbis linker flags], [openal_cv_libs_vorbis],
+         [if test "x$PKG_CONFIG" != xnone && "$PKG_CONFIG" --exists vorbis; then
+            openal_cv_libs_vorbis="`$PKG_CONFIG --libs vorbisfile`"
+            if test -z "$openal_cv_libs_vorbis"; then
+              openal_cv_libs_vorbis=none
+            fi
+          else
+            openal_cv_libs_vorbis=unknown
+          fi])
+       if test "x$openal_cv_libs_vorbis" = xunknown; then
+         openal_libs_vorbis="-lvorbisfile -lvorbis -logg"
+       else
+         openal_libs_vorbis=$openal_cv_libs_vorbis
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_vorbis $LIBS"
+       AC_CACHE_CHECK([for ov_clear], [openal_cv_func_ov_clear],
+         [AC_LINK_IFELSE([AC_LANG_CALL([], [ov_clear])],
+            [openal_cv_func_ov_clear=yes],
+            [openal_cv_func_ov_clear=no])])
+       if test "x$openal_cv_func_ov_clear" = xyes; then
+         openal_extension_vorbis_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_vorbis"
+         LIBS="$openal_libs_vorbis $LIBS"
+       else
+         openal_extension_vorbis_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_vorbis" = xyes; then
+           AC_MSG_WARN([--enable-vorbis ignored because the Vorbis library could not be found.])
+         fi
+       fi
+     fi],
+    [openal_extension_vorbis_support=none
+     if test "x$enable_vorbis" = xyes; then
+       AC_MSG_WARN([--enable-vorbis ignored because the Vorbis header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+OPENAL_ENABLE([AL_EXT_vorbis supprt], [openal_extension_vorbis_support],
+              [ENABLE_EXTENSION_AL_EXT_VORBIS], [ENABLEEXTENSIONALEXTVORBIS])
+
+# check for AL_EXT_mp3 extension ###############################################
+
+AC_ARG_ENABLE([mp3],
+[AS_HELP_STRING([--enable-mp3],
+                [enable AL_EXT_mp3 support @<:@default=auto@:>@])])
+
+AC_ARG_ENABLE([mp3-dlopen],
+[AS_HELP_STRING([--enable-mp3-dlopen],
+                [dynamically load MP3 libs @<:@default=yes@:>@])])
+
+# For legacy reasons only, this misnomer will be nuked some day.
+AC_ARG_ENABLE([smpeg],
+[AS_HELP_STRING([--enable-smpeg],
+                [deprecated, use --enable-mp3 instead])],
+[AC_MSG_WARN([DO NOT USE --enable-smpeg ANYMORE, IT WILL BE REMOVED SOON. USE --enable-mp3 INSTEAD.])
+ enable_mp3=$enable_smpeg])
+
+if test "x$enable_mp3" = xno; then
+  openal_extension_smpeg_support=disabled
+else
+  AC_ARG_VAR([SMPEG_CONFIG], [smpeg configuration utility])
+  AC_CHECK_PROGS([SMPEG_CONFIG], [smpeg-config], [none])
+  AC_CACHE_CHECK([for SMPEG compiler flags], [openal_cv_cflags_smpeg],
+    [openal_cv_cflags_smpeg=unknown
+     test "x$SMPEG_CONFIG" != xnone && openal_cv_cflags_smpeg="`$SMPEG_CONFIG --cflags`"
+     test -z "$openal_cv_cflags_smpeg" && openal_cv_cflags_smpeg=none])
+  case $openal_cv_cflags_smpeg in
+    unknown|none) openal_cv_cflags_smpeg="" ;;
+    *) openal_cflags_smpeg=$openal_cv_cflags_smpeg ;;
+  esac
+  openal_saved_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $openal_cflags_smpeg"
+  AC_CHECK_HEADER([smpeg.h],
+    [if test "x$enable_mp3_dlopen" != xno; then
+       openal_extension_smpeg_support=dynamic
+       FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_smpeg"
+       AC_DEFINE([OPENAL_DLOPEN_MP3], [1], [dynamically load SMPEG libs])
+     else
+       AC_CACHE_CHECK([for SMPEG linker flags], [openal_cv_libs_smpeg],
+         [if test "x$SMPEG_CONFIG" != xnone; then
+            openal_cv_libs_smpeg="`$SMPEG_CONFIG --libs`"
+            if test -z "$openal_cv_libs_smpeg"; then
+              openal_cv_libs_smpeg=none
+            fi
+          else
+            openal_cv_libs_smpeg=unknown
+          fi])
+       if test "x$openal_cv_libs_smpeg" = xunknown; then
+         openal_libs_smpeg="-lsmpeg"
+       else
+         openal_libs_smpeg=$openal_cv_libs_smpeg
+       fi
+       openal_saved_LIBS=$LIBS
+       LIBS="$openal_libs_smpeg $LIBS"
+       AC_CACHE_CHECK([for SMPEG_play], [openal_cv_func_SMPEG_play],
+         [AC_LINK_IFELSE([AC_LANG_CALL([], [SMPEG_play])],
+            [openal_cv_func_SMPEG_play=yes],
+            [openal_cv_func_SMPEG_play=no])])
+       if test "x$openal_cv_func_SMPEG_play" = xyes; then
+         openal_extension_smpeg_support=static
+         FEATURECFLAGS="$FEATURECFLAGS $openal_cflags_smpeg"
+         LIBS="$openal_libs_smpeg $LIBS"
+       else
+         openal_extension_smpeg_support=none
+         LIBS=$openal_saved_LIBS
+         if test "x$enable_mp3" = xyes; then
+           AC_MSG_WARN([--enable-smpeg ignored because the SMPEG library could not be found.])
+         fi
+       fi
+     fi],
+    [openal_extension_smpeg_support=none
+     if test "x$enable_mp3" = xyes; then
+       AC_MSG_WARN([--enable-smpeg ignored because the SMPEG header could not be found.])
+     fi],
+    [AC_INCLUDES_DEFAULT([])])
+  CFLAGS=$openal_saved_CFLAGS
+fi
+
+OPENAL_ENABLE([AL_EXT_mp3 extension], [openal_extension_smpeg_support],
+              [ENABLE_EXTENSION_AL_EXT_MP3], [ENABLEEXTENSIONALEXTMP3])
+
+################################################################################
+# Misc stuff
+################################################################################
+
+AC_CHECK_SIZEOF([void *])
+
+AC_DEFINE([AL_SUPPORT_BYTE_LOKI_SOURCE_ATTR_], [1], [Define to 1 if the AL_BYTE_LOKI source attribute shall be supported.])
+
+AC_SUBST([FEATURECFLAGS])
+AC_SUBST([LIBS])
+AC_SUBST([NASM])
+AC_SUBST([NASM_FORMAT])
+AC_SUBST([OPTIMIZATIONCFLAGS])
+AC_SUBST([PROFILINGLDFLAGS])
+AC_SUBST([RANLIB])
+AC_SUBST([SIZEOF_VOID_P])
+AC_SUBST([WARNINGCFLAGS])
+
+# Generate output.
+# NOTE: Do not break the following line, otherwise we are into CR/LF vs. LF
+# trouble! This is a buglet in autoconf IMHO, but easy to work around.
+AC_CONFIG_FILES([Makefile admin/Makefile admin/pkgconfig/Makefile admin/pkgconfig/openal-config admin/pkgconfig/openal.pc common/Makefile common/include/Makefile include/Makefile src/Makefile src/arch/Makefile src/arch/i386/Makefile])
+
+AC_CONFIG_COMMANDS([default], [chmod +x admin/pkgconfig/openal-config])
+AC_OUTPUT
Index: /openal-0.0.8/include/AL/alext.h
===================================================================
--- /openal-0.0.8/include/AL/alext.h	(revision 17)
+++ /openal-0.0.8/include/AL/alext.h	(revision 17)
@@ -0,0 +1,164 @@
+#ifndef _AL_ALEXT_H
+#define _AL_ALEXT_H
+
+#include <AL/al.h>
+#include <AL/alc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* format base 0x10000 */
+#define AL_FORMAT_IMA_ADPCM_MONO16_EXT            0x10000
+#define AL_FORMAT_IMA_ADPCM_STEREO16_EXT          0x10001
+#define AL_FORMAT_WAVE_EXT                        0x10002
+#define AL_FORMAT_VORBIS_EXT                      0x10003
+
+/* four point formats */
+#define AL_FORMAT_QUAD8_LOKI                      0x10004
+#define AL_FORMAT_QUAD16_LOKI                     0x10005
+
+/**
+ * token extensions, base 0x20000
+ */
+
+/* deprecated, use AL_GAIN */
+#define AL_GAIN_LINEAR_LOKI                      0x20000
+
+/*
+ * types for special loaders.  This should be deprecated in favor
+ * of the special format tags.
+ */
+
+typedef struct WaveFMT {
+	ALushort encoding;
+	ALushort channels;	/* 1 = mono, 2 = stereo */
+	ALuint frequency;	/* One of 11025, 22050, or 44100 Hz */
+	ALuint byterate;	/* Average bytes per second */
+	ALushort blockalign;	/* Bytes per sample block */
+	ALushort bitspersample;
+} alWaveFMT_LOKI;
+
+typedef struct _MS_ADPCM_decodestate {
+	ALubyte hPredictor;
+	ALushort iDelta;
+	ALshort iSamp1;
+	ALshort iSamp2;
+} alMSADPCM_decodestate_LOKI;
+
+typedef struct MS_ADPCM_decoder {
+	alWaveFMT_LOKI wavefmt;
+	ALushort wSamplesPerBlock;
+	ALushort wNumCoef;
+	ALshort aCoeff[7][2];
+	/* * * */
+	alMSADPCM_decodestate_LOKI state[2];
+} alMSADPCM_state_LOKI;
+
+typedef struct IMA_ADPCM_decodestate_s {
+	ALint valprev;		/* Previous output value */
+	ALbyte index;		/* Index into stepsize table */
+} alIMAADPCM_decodestate_LOKI;
+
+typedef struct IMA_ADPCM_decoder {
+	alWaveFMT_LOKI wavefmt;
+	ALushort wSamplesPerBlock;
+	/* * * */
+	alIMAADPCM_decodestate_LOKI state[2];
+} alIMAADPCM_state_LOKI;
+
+/**
+ * Context creation extension tokens
+ * base 0x200000
+ */
+
+/**
+ * followed by ### of sources
+ */
+#define ALC_SOURCES_LOKI                         0x200000
+
+/**
+ * followed by ### of buffers
+ */
+#define ALC_BUFFERS_LOKI                         0x200001
+
+/*
+ *  Channel operations are probably a big no-no and destined
+ *  for obsolesence.
+ *
+ *  base 0x300000
+ */
+#define	ALC_CHAN_MAIN_LOKI                       0x300000
+#define	ALC_CHAN_PCM_LOKI                        0x300001
+#define	ALC_CHAN_CD_LOKI                         0x300002
+
+/* loki */
+
+ALC_API ALfloat  ALC_APIENTRY alcGetAudioChannel_LOKI( ALuint channel );
+ALC_API void     ALC_APIENTRY alcSetAudioChannel_LOKI( ALuint channel, ALfloat volume );
+AL_API  void     AL_APIENTRY  alBombOnError_LOKI( void );
+AL_API  void     AL_APIENTRY  alBufferi_LOKI( ALuint bid, ALenum param, ALint value );
+AL_API  void     AL_APIENTRY  alBufferDataWithCallback_LOKI( ALuint bid, int ( *Callback ) ( ALuint, ALuint, ALshort *, ALenum, ALint, ALint ) );
+AL_API  void     AL_APIENTRY  alBufferWriteData_LOKI( ALuint buffer, ALenum format, ALvoid *data, ALsizei size, ALsizei freq, ALenum internalFormat );
+AL_API  void     AL_APIENTRY  alGenStreamingBuffers_LOKI( ALsizei n, ALuint *samples );
+AL_API  ALsizei  AL_APIENTRY  alBufferAppendData_LOKI( ALuint buffer, ALenum format, ALvoid *data, ALsizei size, ALsizei freq );
+AL_API  ALsizei  AL_APIENTRY  alBufferAppendWriteData_LOKI( ALuint buffer, ALenum format, ALvoid *data, ALsizei size, ALsizei freq, ALenum internalFormat );
+
+/* binary compatibility */
+AL_API  ALsizei  AL_APIENTRY alBufferAppendData( ALuint buffer, ALenum format, ALvoid *data, ALsizei size, ALsizei freq );
+
+/*
+ * Don't use these.  If you're reading this, you should remove these functions
+ * and all other reverb functions.  Now.
+ */
+AL_API void AL_APIENTRY alReverbScale_LOKI(ALuint sid, ALfloat param);
+AL_API void AL_APIENTRY alReverbDelay_LOKI(ALuint sid, ALfloat param);
+
+/* Capture api */
+
+ALC_API ALboolean ALC_APIENTRY alCaptureInit_EXT( ALenum format, ALuint rate, ALsizei bufferSize );
+ALC_API ALboolean ALC_APIENTRY alCaptureDestroy_EXT( void );
+ALC_API ALboolean ALC_APIENTRY alCaptureStart_EXT( void );
+ALC_API ALboolean ALC_APIENTRY alCaptureStop_EXT( void );
+
+/* Non-blocking device read */
+
+ALC_API ALsizei   ALC_APIENTRY alCaptureGetData_EXT( ALvoid *data, ALsizei n, ALenum format, ALuint rate );
+
+/* custom loaders */
+
+AL_API ALboolean AL_APIENTRY alutLoadVorbis_LOKI( ALuint bid, const ALvoid *data, ALint size );
+AL_API ALboolean AL_APIENTRY alutLoadMP3_LOKI( ALuint bid, ALvoid *data, ALint size );
+
+/* function pointers */
+
+typedef ALfloat   ( ALC_APIENTRY *PFNALCGETAUDIOCHANNELPROC ) ( ALuint channel );
+typedef void      ( ALC_APIENTRY *PFNALCSETAUDIOCHANNELPROC ) ( ALuint channel, ALfloat volume );
+typedef void      ( AL_APIENTRY *PFNALBOMBONERRORPROC ) ( void );
+typedef void      ( AL_APIENTRY *PFNALBUFFERIPROC ) ( ALuint bid, ALenum param, ALint value );
+typedef void      ( AL_APIENTRY *PFNALBUFFERDATAWITHCALLBACKPROC ) ( ALuint bid, int ( *Callback ) ( ALuint, ALuint, ALshort *, ALenum, ALint, ALint ) );
+typedef void      ( AL_APIENTRY *PFNALBUFFERWRITEDATAPROC ) ( ALuint buffer, ALenum format, ALvoid *data, ALsizei size, ALsizei freq, ALenum internalFormat );
+typedef void      ( AL_APIENTRY *PFNALGENSTREAMINGBUFFERSPROC ) ( ALsizei n, ALuint *samples );
+typedef ALsizei   ( AL_APIENTRY *PFNALBUFFERAPPENDDATAPROC ) ( ALuint buffer, ALenum format, ALvoid *data, ALsizei size, ALsizei freq );
+typedef ALsizei   ( AL_APIENTRY *PFNALBUFFERAPPENDWRITEDATAPROC ) ( ALuint buffer, ALenum format, ALvoid *data, ALsizei size, ALsizei freq, ALenum internalFormat );
+
+typedef ALboolean ( ALC_APIENTRY *PFNALCAPTUREINITPROC ) ( ALenum format, ALuint rate, ALsizei bufferSize );
+typedef ALboolean ( ALC_APIENTRY *PFNALCAPTUREDESTROYPROC ) ( void );
+typedef ALboolean ( ALC_APIENTRY *PFNALCAPTURESTARTPROC ) ( void );
+typedef ALboolean ( ALC_APIENTRY *PFNALCAPTURESTOPPROC ) ( void );
+
+typedef ALsizei   ( ALC_APIENTRY *PFNALCAPTUREGETDATAPROC ) ( ALvoid *data, ALsizei n, ALenum format, ALuint rate );
+
+typedef ALboolean ( AL_APIENTRY *PFNALUTLOADVORBISPROC ) ( ALuint bid, ALvoid *data, ALint size );
+typedef ALboolean ( AL_APIENTRY *PFNALUTLOADRAW_ADPCMDATAPROC ) ( ALuint bid, ALvoid *data, ALuint size, ALuint freq, ALenum format );
+typedef ALboolean ( AL_APIENTRY *ALUTLOADIMA_ADPCMDATAPROC ) ( ALuint bid, ALvoid *data, ALuint size, alIMAADPCM_state_LOKI *ias );
+typedef ALboolean ( AL_APIENTRY *ALUTLOADMS_ADPCMDATAPROC ) ( ALuint bid, void *data, int size, alMSADPCM_state_LOKI *mss );
+
+typedef void      ( AL_APIENTRY *PFNALREVERBSCALEPROC ) ( ALuint sid, ALfloat param );
+typedef void      ( AL_APIENTRY *PFNALREVERBDELAYPROC ) ( ALuint sid, ALfloat param );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif				/* _AL_ALEXT_H */
Index: /openal-0.0.8/include/Makefile.am
===================================================================
--- /openal-0.0.8/include/Makefile.am	(revision 17)
+++ /openal-0.0.8/include/Makefile.am	(revision 17)
@@ -0,0 +1,1 @@
+nobase_include_HEADERS = AL/alext.h
Index: /openal-0.0.8/include/Makefile.in
===================================================================
--- /openal-0.0.8/include/Makefile.in	(revision 17)
+++ /openal-0.0.8/include/Makefile.in	(revision 17)
@@ -0,0 +1,462 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = include
+DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/admin/autotools/m4/acx_pthread.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includedir)"
+nobase_includeHEADERS_INSTALL = $(install_sh_DATA)
+HEADERS = $(nobase_include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSC_CONFIG = @ARTSC_CONFIG@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLEEXTENSIONALEXTMP3_FALSE = @ENABLEEXTENSIONALEXTMP3_FALSE@
+ENABLEEXTENSIONALEXTMP3_TRUE = @ENABLEEXTENSIONALEXTMP3_TRUE@
+ENABLEEXTENSIONALEXTVORBIS_FALSE = @ENABLEEXTENSIONALEXTVORBIS_FALSE@
+ENABLEEXTENSIONALEXTVORBIS_TRUE = @ENABLEEXTENSIONALEXTVORBIS_TRUE@
+ESD_CONFIG = @ESD_CONFIG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEATURECFLAGS = @FEATURECFLAGS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+NASM = @NASM@
+NASM_FORMAT = @NASM_FORMAT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZATIONCFLAGS = @OPTIMIZATIONCFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PROFILINGLDFLAGS = @PROFILINGLDFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SDL_CONFIG = @SDL_CONFIG@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZEOF_VOID_P = @SIZEOF_VOID_P@
+SMPEG_CONFIG = @SMPEG_CONFIG@
+STRIP = @STRIP@
+USEBACKENDALSA_FALSE = @USEBACKENDALSA_FALSE@
+USEBACKENDALSA_TRUE = @USEBACKENDALSA_TRUE@
+USEBACKENDARTS_FALSE = @USEBACKENDARTS_FALSE@
+USEBACKENDARTS_TRUE = @USEBACKENDARTS_TRUE@
+USEBACKENDESD_FALSE = @USEBACKENDESD_FALSE@
+USEBACKENDESD_TRUE = @USEBACKENDESD_TRUE@
+USEBACKENDNATIVEBSD_FALSE = @USEBACKENDNATIVEBSD_FALSE@
+USEBACKENDNATIVEBSD_TRUE = @USEBACKENDNATIVEBSD_TRUE@
+USEBACKENDNATIVEDARWIN_FALSE = @USEBACKENDNATIVEDARWIN_FALSE@
+USEBACKENDNATIVEDARWIN_TRUE = @USEBACKENDNATIVEDARWIN_TRUE@
+USEBACKENDNATIVEIRIX_FALSE = @USEBACKENDNATIVEIRIX_FALSE@
+USEBACKENDNATIVEIRIX_TRUE = @USEBACKENDNATIVEIRIX_TRUE@
+USEBACKENDNATIVELINUX_FALSE = @USEBACKENDNATIVELINUX_FALSE@
+USEBACKENDNATIVELINUX_TRUE = @USEBACKENDNATIVELINUX_TRUE@
+USEBACKENDNATIVEMORPHOS_FALSE = @USEBACKENDNATIVEMORPHOS_FALSE@
+USEBACKENDNATIVEMORPHOS_TRUE = @USEBACKENDNATIVEMORPHOS_TRUE@
+USEBACKENDNATIVESOLARIS_FALSE = @USEBACKENDNATIVESOLARIS_FALSE@
+USEBACKENDNATIVESOLARIS_TRUE = @USEBACKENDNATIVESOLARIS_TRUE@
+USEBACKENDNATIVEWINDOWS_FALSE = @USEBACKENDNATIVEWINDOWS_FALSE@
+USEBACKENDNATIVEWINDOWS_TRUE = @USEBACKENDNATIVEWINDOWS_TRUE@
+USEBACKENDNULL_FALSE = @USEBACKENDNULL_FALSE@
+USEBACKENDNULL_TRUE = @USEBACKENDNULL_TRUE@
+USEBACKENDSDL_FALSE = @USEBACKENDSDL_FALSE@
+USEBACKENDSDL_TRUE = @USEBACKENDSDL_TRUE@
+USEBACKENDWAVEOUT_FALSE = @USEBACKENDWAVEOUT_FALSE@
+USEBACKENDWAVEOUT_TRUE = @USEBACKENDWAVEOUT_TRUE@
+VERSION = @VERSION@
+WARNINGCFLAGS = @WARNINGCFLAGS@
+X86ENABLED_FALSE = @X86ENABLED_FALSE@
+X86ENABLED_TRUE = @X86ENABLED_TRUE@
+X86MMXENABLED_FALSE = @X86MMXENABLED_FALSE@
+X86MMXENABLED_TRUE = @X86MMXENABLED_TRUE@
+X86NASMENABLED_FALSE = @X86NASMENABLED_FALSE@
+X86NASMENABLED_TRUE = @X86NASMENABLED_TRUE@
+X86NASMMMXENABLED_FALSE = @X86NASMMMXENABLED_FALSE@
+X86NASMMMXENABLED_TRUE = @X86NASMMMXENABLED_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+nobase_include_HEADERS = AL/alext.h
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  include/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  include/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-nobase_includeHEADERS: $(nobase_include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  $(am__vpath_adj) \
+	  echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+	  $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+uninstall-nobase_includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@$(am__vpath_adj_setup) \
+	list='$(nobase_include_HEADERS)'; for p in $$list; do \
+	  $(am__vpath_adj) \
+	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(mkdir_p) $(distdir)/AL
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_includeHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool ctags distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-nobase_includeHEADERS \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-nobase_includeHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /openal-0.0.8/src/Makefile.am
===================================================================
--- /openal-0.0.8/src/Makefile.am	(revision 17)
+++ /openal-0.0.8/src/Makefile.am	(revision 17)
@@ -0,0 +1,222 @@
+# We want to build a libopeanl library with libtool.
+lib_LTLIBRARIES = libopenal.la
+
+# The first path is needed to find <AL/alc.h> and <AL/al.h> and the second one
+# is needed for <AL/alext.h>
+libopenal_la_CPPFLAGS =			\
+	-I$(top_srcdir)/common/include	\
+	-I$(top_srcdir)/include
+
+# libopenal consists of the following sources and internal headers:
+libopenal_la_SOURCES =			\
+	al_bpool.c			\
+	al_bpool.h			\
+	al_buffer.c			\
+	al_buffer.h			\
+	al_config.c			\
+	al_config.h			\
+	al_cpu_caps.h			\
+	al_debug.c			\
+	al_debug.h			\
+	al_distance.c			\
+	al_distance.h			\
+	al_error.c			\
+	al_error.h			\
+	al_ext.c			\
+	al_ext.h			\
+	al_filter.c			\
+	al_filter.h			\
+	al_listen.c			\
+	al_listen.h			\
+	al_main.c			\
+	al_main.h			\
+	al_mixer.c			\
+	al_mixer.h			\
+	al_mixfunc.c			\
+	al_mixfunc.h			\
+	al_mixmanager.c			\
+	al_mixmanager.h			\
+	al_mspool.c			\
+	al_mspool.h			\
+	al_mutexlib.c			\
+	al_mutexlib.h			\
+	al_queue.c			\
+	al_queue.h			\
+	al_rctree.c			\
+	al_rctree.h			\
+	al_rcvar.c			\
+	al_rcvar.h			\
+	al_siteconfig.h			\
+	al_source.c			\
+	al_source.h			\
+	al_spool.c			\
+	al_spool.h			\
+	al_state.c			\
+	al_threadlib.c			\
+	al_threadlib.h			\
+	al_types.h			\
+	al_vector.c			\
+	al_vector.h			\
+	al_matrix.c			\
+	al_matrix.h			\
+	mixaudio16.h			\
+	mixaudio16.c
+
+# backend sources
+
+if USEBACKENDALSA
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_alsa.c
+endif
+
+if USEBACKENDARTS
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_arts.c
+endif
+
+if USEBACKENDNATIVEBSD
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_bsd.c
+endif
+
+if USEBACKENDNATIVEDARWIN
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_darwin.c
+endif
+
+if USEBACKENDESD
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_esd.c
+endif
+
+if USEBACKENDNATIVEIRIX
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_irix.c
+endif
+
+if USEBACKENDNATIVELINUX
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_linux.c
+endif
+
+if USEBACKENDNATIVEMORPHOS
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_morphos.c
+endif
+
+if USEBACKENDNULL
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_null.c
+endif
+
+if USEBACKENDSDL
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_sdl.c
+endif
+
+if USEBACKENDNATIVESOLARIS
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_solaris.c
+endif
+
+if USEBACKENDWAVEOUT
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_wave.c
+endif
+
+if USEBACKENDNATIVEWINDOWS
+libopenal_la_SOURCES +=			\
+	backends/alc_backend_windows.c
+endif
+
+libopenal_la_SOURCES +=			\
+	backends/alc_backend.c \
+	backends/alc_backend.h
+
+# processor-specific sources
+
+if X86ENABLED
+libopenal_la_SOURCES +=			\
+	arch/i386/x86_floatmul.c	\
+	arch/i386/x86_cpu_caps_prk.c	\
+	arch/i386/x86_cpu_caps_prk.h	\
+	arch/i386/x86_simd_support_prk.h
+
+if X86MMXENABLED
+libopenal_la_CPPFLAGS +=		\
+	-I$(top_srcdir)/src/arch/i386
+
+libopenal_la_SOURCES +=			\
+	arch/i386/mixaudio16_mmx_prk.c	\
+	arch/i386/mixaudio16_mmx_prk.h
+endif
+
+if X86NASMENABLED
+# autotools suck hard; this is the only way I got it working
+X86_SUBDIR = arch
+asm_ldadd = $(top_builddir)/src/arch/i386/libx86_asm_routines.la
+endif
+
+else
+# no x86, so use portable stuff
+libopenal_la_SOURCES +=			\
+	arch/portable/floatmul.c	\
+	arch/portable/cpu_caps.c
+endif
+
+# ALC sources
+libopenal_la_SOURCES +=			\
+	alc/alc_context.c		\
+	alc/alc_context.h		\
+	alc/alc_device.c		\
+	alc/alc_device.h		\
+	alc/alc_error.c			\
+	alc/alc_error.h			\
+	alc/alc_speaker.c		\
+	alc/alc_speaker.h
+
+# audiconvert sources
+libopenal_la_SOURCES +=			\
+	audioconvert/ac_adpcm.c		\
+	audioconvert/ac_adpcm.h		\
+	audioconvert/ac_bits.c		\
+	audioconvert/ac_channels.c	\
+	audioconvert/ac_endian.c	\
+	audioconvert/ac_endian.h	\
+	audioconvert/ac_freq.c		\
+	audioconvert/ac_helper.c	\
+	audioconvert/ac_misc.c		\
+	audioconvert/ac_wave.h		\
+	audioconvert/audioconvert.h
+
+# extension sources
+
+if ENABLEEXTENSIONALEXTVORBIS
+libopenal_la_SOURCES +=			\
+	extensions/al_ext_vorbis.c	\
+	extensions/al_ext_vorbis.h
+endif
+
+if ENABLEEXTENSIONALEXTMP3
+libopenal_la_SOURCES +=			\
+	extensions/al_ext_mp3.c		\
+	extensions/al_ext_mp3.h
+endif
+
+libopenal_la_SOURCES +=			\
+	extensions/al_ext_capture.c	\
+	extensions/al_ext_capture.h	\
+	extensions/al_ext_loki.c	\
+	extensions/al_ext_loki.h	\
+	extensions/al_ext_needed.h
+
+# Add compiler flags.
+libopenal_la_CFLAGS = $(WARNINGCFLAGS) $(OPTIMIZATIONCFLAGS) $(FEATURECFLAGS)
+
+# The -no-undefined flag is neccessary for building DLLs on Windows.
+libopenal_la_LDFLAGS = -no-undefined $(PROFILINGLDFLAGS)
+
+# We use sin and friends, so we might need -lm, autoconf takes care of this.
+libopenal_la_LIBADD = $(LIBM) $(asm_ldadd)
+
+SUBDIRS = $(X86_SUBDIR)
Index: /openal-0.0.8/src/Makefile.in
===================================================================
--- /openal-0.0.8/src/Makefile.in	(revision 17)
+++ /openal-0.0.8/src/Makefile.in	(revision 17)
@@ -0,0 +1,1319 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+SOURCES = $(libopenal_la_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+
+# backend sources
+@USEBACKENDALSA_TRUE@am__append_1 = \
+@USEBACKENDALSA_TRUE@	backends/alc_backend_alsa.c
+
+@USEBACKENDARTS_TRUE@am__append_2 = \
+@USEBACKENDARTS_TRUE@	backends/alc_backend_arts.c
+
+@USEBACKENDNATIVEBSD_TRUE@am__append_3 = \
+@USEBACKENDNATIVEBSD_TRUE@	backends/alc_backend_bsd.c
+
+@USEBACKENDNATIVEDARWIN_TRUE@am__append_4 = \
+@USEBACKENDNATIVEDARWIN_TRUE@	backends/alc_backend_darwin.c
+
+@USEBACKENDESD_TRUE@am__append_5 = \
+@USEBACKENDESD_TRUE@	backends/alc_backend_esd.c
+
+@USEBACKENDNATIVEIRIX_TRUE@am__append_6 = \
+@USEBACKENDNATIVEIRIX_TRUE@	backends/alc_backend_irix.c
+
+@USEBACKENDNATIVELINUX_TRUE@am__append_7 = \
+@USEBACKENDNATIVELINUX_TRUE@	backends/alc_backend_linux.c
+
+@USEBACKENDNATIVEMORPHOS_TRUE@am__append_8 = \
+@USEBACKENDNATIVEMORPHOS_TRUE@	backends/alc_backend_morphos.c
+
+@USEBACKENDNULL_TRUE@am__append_9 = \
+@USEBACKENDNULL_TRUE@	backends/alc_backend_null.c
+
+@USEBACKENDSDL_TRUE@am__append_10 = \
+@USEBACKENDSDL_TRUE@	backends/alc_backend_sdl.c
+
+@USEBACKENDNATIVESOLARIS_TRUE@am__append_11 = \
+@USEBACKENDNATIVESOLARIS_TRUE@	backends/alc_backend_solaris.c
+
+@USEBACKENDWAVEOUT_TRUE@am__append_12 = \
+@USEBACKENDWAVEOUT_TRUE@	backends/alc_backend_wave.c
+
+@USEBACKENDNATIVEWINDOWS_TRUE@am__append_13 = \
+@USEBACKENDNATIVEWINDOWS_TRUE@	backends/alc_backend_windows.c
+
+
+# processor-specific sources
+@X86ENABLED_TRUE@am__append_14 = \
+@X86ENABLED_TRUE@	arch/i386/x86_floatmul.c	\
+@X86ENABLED_TRUE@	arch/i386/x86_cpu_caps_prk.c	\
+@X86ENABLED_TRUE@	arch/i386/x86_cpu_caps_prk.h	\
+@X86ENABLED_TRUE@	arch/i386/x86_simd_support_prk.h
+
+@X86ENABLED_TRUE@@X86MMXENABLED_TRUE@am__append_15 = \
+@X86ENABLED_TRUE@@X86MMXENABLED_TRUE@	-I$(top_srcdir)/src/arch/i386
+
+@X86ENABLED_TRUE@@X86MMXENABLED_TRUE@am__append_16 = \
+@X86ENABLED_TRUE@@X86MMXENABLED_TRUE@	arch/i386/mixaudio16_mmx_prk.c	\
+@X86ENABLED_TRUE@@X86MMXENABLED_TRUE@	arch/i386/mixaudio16_mmx_prk.h
+
+
+# no x86, so use portable stuff
+@X86ENABLED_FALSE@am__append_17 = \
+@X86ENABLED_FALSE@	arch/portable/floatmul.c	\
+@X86ENABLED_FALSE@	arch/portable/cpu_caps.c
+
+
+# extension sources
+@ENABLEEXTENSIONALEXTVORBIS_TRUE@am__append_18 = \
+@ENABLEEXTENSIONALEXTVORBIS_TRUE@	extensions/al_ext_vorbis.c	\
+@ENABLEEXTENSIONALEXTVORBIS_TRUE@	extensions/al_ext_vorbis.h
+
+@ENABLEEXTENSIONALEXTMP3_TRUE@am__append_19 = \
+@ENABLEEXTENSIONALEXTMP3_TRUE@	extensions/al_ext_mp3.c		\
+@ENABLEEXTENSIONALEXTMP3_TRUE@	extensions/al_ext_mp3.h
+
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/admin/autotools/m4/acx_pthread.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+@X86ENABLED_TRUE@@X86NASMENABLED_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/src/arch/i386/libx86_asm_routines.la
+libopenal_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_2)
+am__libopenal_la_SOURCES_DIST = al_bpool.c al_bpool.h al_buffer.c \
+	al_buffer.h al_config.c al_config.h al_cpu_caps.h al_debug.c \
+	al_debug.h al_distance.c al_distance.h al_error.c al_error.h \
+	al_ext.c al_ext.h al_filter.c al_filter.h al_listen.c \
+	al_listen.h al_main.c al_main.h al_mixer.c al_mixer.h \
+	al_mixfunc.c al_mixfunc.h al_mixmanager.c al_mixmanager.h \
+	al_mspool.c al_mspool.h al_mutexlib.c al_mutexlib.h al_queue.c \
+	al_queue.h al_rctree.c al_rctree.h al_rcvar.c al_rcvar.h \
+	al_siteconfig.h al_source.c al_source.h al_spool.c al_spool.h \
+	al_state.c al_threadlib.c al_threadlib.h al_types.h \
+	al_vector.c al_vector.h al_matrix.c al_matrix.h mixaudio16.h \
+	mixaudio16.c backends/alc_backend_alsa.c \
+	backends/alc_backend_arts.c backends/alc_backend_bsd.c \
+	backends/alc_backend_darwin.c backends/alc_backend_esd.c \
+	backends/alc_backend_irix.c backends/alc_backend_linux.c \
+	backends/alc_backend_morphos.c backends/alc_backend_null.c \
+	backends/alc_backend_sdl.c backends/alc_backend_solaris.c \
+	backends/alc_backend_wave.c backends/alc_backend_windows.c \
+	backends/alc_backend.c backends/alc_backend.h \
+	arch/i386/x86_floatmul.c arch/i386/x86_cpu_caps_prk.c \
+	arch/i386/x86_cpu_caps_prk.h arch/i386/x86_simd_support_prk.h \
+	arch/i386/mixaudio16_mmx_prk.c arch/i386/mixaudio16_mmx_prk.h \
+	arch/portable/floatmul.c arch/portable/cpu_caps.c \
+	alc/alc_context.c alc/alc_context.h alc/alc_device.c \
+	alc/alc_device.h alc/alc_error.c alc/alc_error.h \
+	alc/alc_speaker.c alc/alc_speaker.h audioconvert/ac_adpcm.c \
+	audioconvert/ac_adpcm.h audioconvert/ac_bits.c \
+	audioconvert/ac_channels.c audioconvert/ac_endian.c \
+	audioconvert/ac_endian.h audioconvert/ac_freq.c \
+	audioconvert/ac_helper.c audioconvert/ac_misc.c \
+	audioconvert/ac_wave.h audioconvert/audioconvert.h \
+	extensions/al_ext_vorbis.c extensions/al_ext_vorbis.h \
+	extensions/al_ext_mp3.c extensions/al_ext_mp3.h \
+	extensions/al_ext_capture.c extensions/al_ext_capture.h \
+	extensions/al_ext_loki.c extensions/al_ext_loki.h \
+	extensions/al_ext_needed.h
+@USEBACKENDALSA_TRUE@am__objects_1 = libopenal_la-alc_backend_alsa.lo
+@USEBACKENDARTS_TRUE@am__objects_2 = libopenal_la-alc_backend_arts.lo
+@USEBACKENDNATIVEBSD_TRUE@am__objects_3 =  \
+@USEBACKENDNATIVEBSD_TRUE@	libopenal_la-alc_backend_bsd.lo
+@USEBACKENDNATIVEDARWIN_TRUE@am__objects_4 = libopenal_la-alc_backend_darwin.lo
+@USEBACKENDESD_TRUE@am__objects_5 = libopenal_la-alc_backend_esd.lo
+@USEBACKENDNATIVEIRIX_TRUE@am__objects_6 =  \
+@USEBACKENDNATIVEIRIX_TRUE@	libopenal_la-alc_backend_irix.lo
+@USEBACKENDNATIVELINUX_TRUE@am__objects_7 =  \
+@USEBACKENDNATIVELINUX_TRUE@	libopenal_la-alc_backend_linux.lo
+@USEBACKENDNATIVEMORPHOS_TRUE@am__objects_8 = libopenal_la-alc_backend_morphos.lo
+@USEBACKENDNULL_TRUE@am__objects_9 = libopenal_la-alc_backend_null.lo
+@USEBACKENDSDL_TRUE@am__objects_10 = libopenal_la-alc_backend_sdl.lo
+@USEBACKENDNATIVESOLARIS_TRUE@am__objects_11 = libopenal_la-alc_backend_solaris.lo
+@USEBACKENDWAVEOUT_TRUE@am__objects_12 =  \
+@USEBACKENDWAVEOUT_TRUE@	libopenal_la-alc_backend_wave.lo
+@USEBACKENDNATIVEWINDOWS_TRUE@am__objects_13 = libopenal_la-alc_backend_windows.lo
+@X86ENABLED_TRUE@am__objects_14 = libopenal_la-x86_floatmul.lo \
+@X86ENABLED_TRUE@	libopenal_la-x86_cpu_caps_prk.lo
+@X86ENABLED_TRUE@@X86MMXENABLED_TRUE@am__objects_15 = libopenal_la-mixaudio16_mmx_prk.lo
+@X86ENABLED_FALSE@am__objects_16 = libopenal_la-floatmul.lo \
+@X86ENABLED_FALSE@	libopenal_la-cpu_caps.lo
+@ENABLEEXTENSIONALEXTVORBIS_TRUE@am__objects_17 = libopenal_la-al_ext_vorbis.lo
+@ENABLEEXTENSIONALEXTMP3_TRUE@am__objects_18 =  \
+@ENABLEEXTENSIONALEXTMP3_TRUE@	libopenal_la-al_ext_mp3.lo
+am_libopenal_la_OBJECTS = libopenal_la-al_bpool.lo \
+	libopenal_la-al_buffer.lo libopenal_la-al_config.lo \
+	libopenal_la-al_debug.lo libopenal_la-al_distance.lo \
+	libopenal_la-al_error.lo libopenal_la-al_ext.lo \
+	libopenal_la-al_filter.lo libopenal_la-al_listen.lo \
+	libopenal_la-al_main.lo libopenal_la-al_mixer.lo \
+	libopenal_la-al_mixfunc.lo libopenal_la-al_mixmanager.lo \
+	libopenal_la-al_mspool.lo libopenal_la-al_mutexlib.lo \
+	libopenal_la-al_queue.lo libopenal_la-al_rctree.lo \
+	libopenal_la-al_rcvar.lo libopenal_la-al_source.lo \
+	libopenal_la-al_spool.lo libopenal_la-al_state.lo \
+	libopenal_la-al_threadlib.lo libopenal_la-al_vector.lo \
+	libopenal_la-al_matrix.lo libopenal_la-mixaudio16.lo \
+	$(am__objects_1) $(am__objects_2) $(am__objects_3) \
+	$(am__objects_4) $(am__objects_5) $(am__objects_6) \
+	$(am__objects_7) $(am__objects_8) $(am__objects_9) \
+	$(am__objects_10) $(am__objects_11) $(am__objects_12) \
+	$(am__objects_13) libopenal_la-alc_backend.lo \
+	$(am__objects_14) $(am__objects_15) $(am__objects_16) \
+	libopenal_la-alc_context.lo libopenal_la-alc_device.lo \
+	libopenal_la-alc_error.lo libopenal_la-alc_speaker.lo \
+	libopenal_la-ac_adpcm.lo libopenal_la-ac_bits.lo \
+	libopenal_la-ac_channels.lo libopenal_la-ac_endian.lo \
+	libopenal_la-ac_freq.lo libopenal_la-ac_helper.lo \
+	libopenal_la-ac_misc.lo $(am__objects_17) $(am__objects_18) \
+	libopenal_la-al_ext_capture.lo libopenal_la-al_ext_loki.lo
+libopenal_la_OBJECTS = $(am_libopenal_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/admin/autotools/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libopenal_la_SOURCES)
+DIST_SOURCES = $(am__libopenal_la_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = arch
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSC_CONFIG = @ARTSC_CONFIG@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLEEXTENSIONALEXTMP3_FALSE = @ENABLEEXTENSIONALEXTMP3_FALSE@
+ENABLEEXTENSIONALEXTMP3_TRUE = @ENABLEEXTENSIONALEXTMP3_TRUE@
+ENABLEEXTENSIONALEXTVORBIS_FALSE = @ENABLEEXTENSIONALEXTVORBIS_FALSE@
+ENABLEEXTENSIONALEXTVORBIS_TRUE = @ENABLEEXTENSIONALEXTVORBIS_TRUE@
+ESD_CONFIG = @ESD_CONFIG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEATURECFLAGS = @FEATURECFLAGS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+NASM = @NASM@
+NASM_FORMAT = @NASM_FORMAT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZATIONCFLAGS = @OPTIMIZATIONCFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PROFILINGLDFLAGS = @PROFILINGLDFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SDL_CONFIG = @SDL_CONFIG@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZEOF_VOID_P = @SIZEOF_VOID_P@
+SMPEG_CONFIG = @SMPEG_CONFIG@
+STRIP = @STRIP@
+USEBACKENDALSA_FALSE = @USEBACKENDALSA_FALSE@
+USEBACKENDALSA_TRUE = @USEBACKENDALSA_TRUE@
+USEBACKENDARTS_FALSE = @USEBACKENDARTS_FALSE@
+USEBACKENDARTS_TRUE = @USEBACKENDARTS_TRUE@
+USEBACKENDESD_FALSE = @USEBACKENDESD_FALSE@
+USEBACKENDESD_TRUE = @USEBACKENDESD_TRUE@
+USEBACKENDNATIVEBSD_FALSE = @USEBACKENDNATIVEBSD_FALSE@
+USEBACKENDNATIVEBSD_TRUE = @USEBACKENDNATIVEBSD_TRUE@
+USEBACKENDNATIVEDARWIN_FALSE = @USEBACKENDNATIVEDARWIN_FALSE@
+USEBACKENDNATIVEDARWIN_TRUE = @USEBACKENDNATIVEDARWIN_TRUE@
+USEBACKENDNATIVEIRIX_FALSE = @USEBACKENDNATIVEIRIX_FALSE@
+USEBACKENDNATIVEIRIX_TRUE = @USEBACKENDNATIVEIRIX_TRUE@
+USEBACKENDNATIVELINUX_FALSE = @USEBACKENDNATIVELINUX_FALSE@
+USEBACKENDNATIVELINUX_TRUE = @USEBACKENDNATIVELINUX_TRUE@
+USEBACKENDNATIVEMORPHOS_FALSE = @USEBACKENDNATIVEMORPHOS_FALSE@
+USEBACKENDNATIVEMORPHOS_TRUE = @USEBACKENDNATIVEMORPHOS_TRUE@
+USEBACKENDNATIVESOLARIS_FALSE = @USEBACKENDNATIVESOLARIS_FALSE@
+USEBACKENDNATIVESOLARIS_TRUE = @USEBACKENDNATIVESOLARIS_TRUE@
+USEBACKENDNATIVEWINDOWS_FALSE = @USEBACKENDNATIVEWINDOWS_FALSE@
+USEBACKENDNATIVEWINDOWS_TRUE = @USEBACKENDNATIVEWINDOWS_TRUE@
+USEBACKENDNULL_FALSE = @USEBACKENDNULL_FALSE@
+USEBACKENDNULL_TRUE = @USEBACKENDNULL_TRUE@
+USEBACKENDSDL_FALSE = @USEBACKENDSDL_FALSE@
+USEBACKENDSDL_TRUE = @USEBACKENDSDL_TRUE@
+USEBACKENDWAVEOUT_FALSE = @USEBACKENDWAVEOUT_FALSE@
+USEBACKENDWAVEOUT_TRUE = @USEBACKENDWAVEOUT_TRUE@
+VERSION = @VERSION@
+WARNINGCFLAGS = @WARNINGCFLAGS@
+X86ENABLED_FALSE = @X86ENABLED_FALSE@
+X86ENABLED_TRUE = @X86ENABLED_TRUE@
+X86MMXENABLED_FALSE = @X86MMXENABLED_FALSE@
+X86MMXENABLED_TRUE = @X86MMXENABLED_TRUE@
+X86NASMENABLED_FALSE = @X86NASMENABLED_FALSE@
+X86NASMENABLED_TRUE = @X86NASMENABLED_TRUE@
+X86NASMMMXENABLED_FALSE = @X86NASMMMXENABLED_FALSE@
+X86NASMMMXENABLED_TRUE = @X86NASMMMXENABLED_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+
+# We want to build a libopeanl library with libtool.
+lib_LTLIBRARIES = libopenal.la
+
+# The first path is needed to find <AL/alc.h> and <AL/al.h> and the second one
+# is needed for <AL/alext.h>
+libopenal_la_CPPFLAGS = -I$(top_srcdir)/common/include \
+	-I$(top_srcdir)/include $(am__append_15)
+
+# libopenal consists of the following sources and internal headers:
+
+# ALC sources
+
+# audiconvert sources
+libopenal_la_SOURCES = al_bpool.c al_bpool.h al_buffer.c al_buffer.h \
+	al_config.c al_config.h al_cpu_caps.h al_debug.c al_debug.h \
+	al_distance.c al_distance.h al_error.c al_error.h al_ext.c \
+	al_ext.h al_filter.c al_filter.h al_listen.c al_listen.h \
+	al_main.c al_main.h al_mixer.c al_mixer.h al_mixfunc.c \
+	al_mixfunc.h al_mixmanager.c al_mixmanager.h al_mspool.c \
+	al_mspool.h al_mutexlib.c al_mutexlib.h al_queue.c al_queue.h \
+	al_rctree.c al_rctree.h al_rcvar.c al_rcvar.h al_siteconfig.h \
+	al_source.c al_source.h al_spool.c al_spool.h al_state.c \
+	al_threadlib.c al_threadlib.h al_types.h al_vector.c \
+	al_vector.h al_matrix.c al_matrix.h mixaudio16.h mixaudio16.c \
+	$(am__append_1) $(am__append_2) $(am__append_3) \
+	$(am__append_4) $(am__append_5) $(am__append_6) \
+	$(am__append_7) $(am__append_8) $(am__append_9) \
+	$(am__append_10) $(am__append_11) $(am__append_12) \
+	$(am__append_13) backends/alc_backend.c backends/alc_backend.h \
+	$(am__append_14) $(am__append_16) $(am__append_17) \
+	alc/alc_context.c alc/alc_context.h alc/alc_device.c \
+	alc/alc_device.h alc/alc_error.c alc/alc_error.h \
+	alc/alc_speaker.c alc/alc_speaker.h audioconvert/ac_adpcm.c \
+	audioconvert/ac_adpcm.h audioconvert/ac_bits.c \
+	audioconvert/ac_channels.c audioconvert/ac_endian.c \
+	audioconvert/ac_endian.h audioconvert/ac_freq.c \
+	audioconvert/ac_helper.c audioconvert/ac_misc.c \
+	audioconvert/ac_wave.h audioconvert/audioconvert.h \
+	$(am__append_18) $(am__append_19) extensions/al_ext_capture.c \
+	extensions/al_ext_capture.h extensions/al_ext_loki.c \
+	extensions/al_ext_loki.h extensions/al_ext_needed.h
+
+# autotools suck hard; this is the only way I got it working
+@X86ENABLED_TRUE@@X86NASMENABLED_TRUE@X86_SUBDIR = arch
+@X86ENABLED_TRUE@@X86NASMENABLED_TRUE@asm_ldadd = $(top_builddir)/src/arch/i386/libx86_asm_routines.la
+
+# Add compiler flags.
+libopenal_la_CFLAGS = $(WARNINGCFLAGS) $(OPTIMIZATIONCFLAGS) $(FEATURECFLAGS)
+
+# The -no-undefined flag is neccessary for building DLLs on Windows.
+libopenal_la_LDFLAGS = -no-undefined $(PROFILINGLDFLAGS)
+
+# We use sin and friends, so we might need -lm, autoconf takes care of this.
+libopenal_la_LIBADD = $(LIBM) $(asm_ldadd)
+SUBDIRS = $(X86_SUBDIR)
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libopenal.la: $(libopenal_la_OBJECTS) $(libopenal_la_DEPENDENCIES) 
+	$(LINK) -rpath $(libdir) $(libopenal_la_LDFLAGS) $(libopenal_la_OBJECTS) $(libopenal_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-ac_adpcm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-ac_bits.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-ac_channels.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-ac_endian.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-ac_freq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-ac_helper.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-ac_misc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_bpool.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_buffer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_config.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_debug.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_distance.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_ext.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_ext_capture.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_ext_loki.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_ext_mp3.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_ext_vorbis.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_filter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_listen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_main.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_matrix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_mixer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_mixfunc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_mixmanager.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_mspool.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_mutexlib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_queue.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_rctree.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_rcvar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_source.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_spool.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_state.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_threadlib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-al_vector.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_alsa.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_arts.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_bsd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_darwin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_esd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_irix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_linux.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_morphos.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_null.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_sdl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_solaris.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_wave.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_backend_windows.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_context.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_device.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-alc_speaker.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-cpu_caps.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-floatmul.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-mixaudio16.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-mixaudio16_mmx_prk.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-x86_cpu_caps_prk.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopenal_la-x86_floatmul.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+libopenal_la-al_bpool.lo: al_bpool.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_bpool.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_bpool.Tpo" -c -o libopenal_la-al_bpool.lo `test -f 'al_bpool.c' || echo '$(srcdir)/'`al_bpool.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_bpool.Tpo" "$(DEPDIR)/libopenal_la-al_bpool.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_bpool.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_bpool.c' object='libopenal_la-al_bpool.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_bpool.lo `test -f 'al_bpool.c' || echo '$(srcdir)/'`al_bpool.c
+
+libopenal_la-al_buffer.lo: al_buffer.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_buffer.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_buffer.Tpo" -c -o libopenal_la-al_buffer.lo `test -f 'al_buffer.c' || echo '$(srcdir)/'`al_buffer.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_buffer.Tpo" "$(DEPDIR)/libopenal_la-al_buffer.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_buffer.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_buffer.c' object='libopenal_la-al_buffer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_buffer.lo `test -f 'al_buffer.c' || echo '$(srcdir)/'`al_buffer.c
+
+libopenal_la-al_config.lo: al_config.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_config.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_config.Tpo" -c -o libopenal_la-al_config.lo `test -f 'al_config.c' || echo '$(srcdir)/'`al_config.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_config.Tpo" "$(DEPDIR)/libopenal_la-al_config.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_config.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_config.c' object='libopenal_la-al_config.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_config.lo `test -f 'al_config.c' || echo '$(srcdir)/'`al_config.c
+
+libopenal_la-al_debug.lo: al_debug.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_debug.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_debug.Tpo" -c -o libopenal_la-al_debug.lo `test -f 'al_debug.c' || echo '$(srcdir)/'`al_debug.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_debug.Tpo" "$(DEPDIR)/libopenal_la-al_debug.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_debug.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_debug.c' object='libopenal_la-al_debug.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_debug.lo `test -f 'al_debug.c' || echo '$(srcdir)/'`al_debug.c
+
+libopenal_la-al_distance.lo: al_distance.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_distance.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_distance.Tpo" -c -o libopenal_la-al_distance.lo `test -f 'al_distance.c' || echo '$(srcdir)/'`al_distance.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_distance.Tpo" "$(DEPDIR)/libopenal_la-al_distance.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_distance.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_distance.c' object='libopenal_la-al_distance.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_distance.lo `test -f 'al_distance.c' || echo '$(srcdir)/'`al_distance.c
+
+libopenal_la-al_error.lo: al_error.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_error.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_error.Tpo" -c -o libopenal_la-al_error.lo `test -f 'al_error.c' || echo '$(srcdir)/'`al_error.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_error.Tpo" "$(DEPDIR)/libopenal_la-al_error.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_error.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_error.c' object='libopenal_la-al_error.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_error.lo `test -f 'al_error.c' || echo '$(srcdir)/'`al_error.c
+
+libopenal_la-al_ext.lo: al_ext.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_ext.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_ext.Tpo" -c -o libopenal_la-al_ext.lo `test -f 'al_ext.c' || echo '$(srcdir)/'`al_ext.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_ext.Tpo" "$(DEPDIR)/libopenal_la-al_ext.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_ext.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_ext.c' object='libopenal_la-al_ext.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_ext.lo `test -f 'al_ext.c' || echo '$(srcdir)/'`al_ext.c
+
+libopenal_la-al_filter.lo: al_filter.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_filter.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_filter.Tpo" -c -o libopenal_la-al_filter.lo `test -f 'al_filter.c' || echo '$(srcdir)/'`al_filter.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_filter.Tpo" "$(DEPDIR)/libopenal_la-al_filter.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_filter.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_filter.c' object='libopenal_la-al_filter.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_filter.lo `test -f 'al_filter.c' || echo '$(srcdir)/'`al_filter.c
+
+libopenal_la-al_listen.lo: al_listen.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_listen.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_listen.Tpo" -c -o libopenal_la-al_listen.lo `test -f 'al_listen.c' || echo '$(srcdir)/'`al_listen.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_listen.Tpo" "$(DEPDIR)/libopenal_la-al_listen.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_listen.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_listen.c' object='libopenal_la-al_listen.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_listen.lo `test -f 'al_listen.c' || echo '$(srcdir)/'`al_listen.c
+
+libopenal_la-al_main.lo: al_main.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_main.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_main.Tpo" -c -o libopenal_la-al_main.lo `test -f 'al_main.c' || echo '$(srcdir)/'`al_main.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_main.Tpo" "$(DEPDIR)/libopenal_la-al_main.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_main.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_main.c' object='libopenal_la-al_main.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_main.lo `test -f 'al_main.c' || echo '$(srcdir)/'`al_main.c
+
+libopenal_la-al_mixer.lo: al_mixer.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_mixer.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_mixer.Tpo" -c -o libopenal_la-al_mixer.lo `test -f 'al_mixer.c' || echo '$(srcdir)/'`al_mixer.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_mixer.Tpo" "$(DEPDIR)/libopenal_la-al_mixer.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_mixer.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_mixer.c' object='libopenal_la-al_mixer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_mixer.lo `test -f 'al_mixer.c' || echo '$(srcdir)/'`al_mixer.c
+
+libopenal_la-al_mixfunc.lo: al_mixfunc.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_mixfunc.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_mixfunc.Tpo" -c -o libopenal_la-al_mixfunc.lo `test -f 'al_mixfunc.c' || echo '$(srcdir)/'`al_mixfunc.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_mixfunc.Tpo" "$(DEPDIR)/libopenal_la-al_mixfunc.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_mixfunc.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_mixfunc.c' object='libopenal_la-al_mixfunc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_mixfunc.lo `test -f 'al_mixfunc.c' || echo '$(srcdir)/'`al_mixfunc.c
+
+libopenal_la-al_mixmanager.lo: al_mixmanager.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_mixmanager.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_mixmanager.Tpo" -c -o libopenal_la-al_mixmanager.lo `test -f 'al_mixmanager.c' || echo '$(srcdir)/'`al_mixmanager.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_mixmanager.Tpo" "$(DEPDIR)/libopenal_la-al_mixmanager.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_mixmanager.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_mixmanager.c' object='libopenal_la-al_mixmanager.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_mixmanager.lo `test -f 'al_mixmanager.c' || echo '$(srcdir)/'`al_mixmanager.c
+
+libopenal_la-al_mspool.lo: al_mspool.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_mspool.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_mspool.Tpo" -c -o libopenal_la-al_mspool.lo `test -f 'al_mspool.c' || echo '$(srcdir)/'`al_mspool.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_mspool.Tpo" "$(DEPDIR)/libopenal_la-al_mspool.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_mspool.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_mspool.c' object='libopenal_la-al_mspool.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_mspool.lo `test -f 'al_mspool.c' || echo '$(srcdir)/'`al_mspool.c
+
+libopenal_la-al_mutexlib.lo: al_mutexlib.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_mutexlib.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_mutexlib.Tpo" -c -o libopenal_la-al_mutexlib.lo `test -f 'al_mutexlib.c' || echo '$(srcdir)/'`al_mutexlib.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_mutexlib.Tpo" "$(DEPDIR)/libopenal_la-al_mutexlib.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_mutexlib.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_mutexlib.c' object='libopenal_la-al_mutexlib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_mutexlib.lo `test -f 'al_mutexlib.c' || echo '$(srcdir)/'`al_mutexlib.c
+
+libopenal_la-al_queue.lo: al_queue.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_queue.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_queue.Tpo" -c -o libopenal_la-al_queue.lo `test -f 'al_queue.c' || echo '$(srcdir)/'`al_queue.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_queue.Tpo" "$(DEPDIR)/libopenal_la-al_queue.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_queue.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_queue.c' object='libopenal_la-al_queue.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_queue.lo `test -f 'al_queue.c' || echo '$(srcdir)/'`al_queue.c
+
+libopenal_la-al_rctree.lo: al_rctree.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_rctree.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_rctree.Tpo" -c -o libopenal_la-al_rctree.lo `test -f 'al_rctree.c' || echo '$(srcdir)/'`al_rctree.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_rctree.Tpo" "$(DEPDIR)/libopenal_la-al_rctree.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_rctree.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_rctree.c' object='libopenal_la-al_rctree.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_rctree.lo `test -f 'al_rctree.c' || echo '$(srcdir)/'`al_rctree.c
+
+libopenal_la-al_rcvar.lo: al_rcvar.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_rcvar.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_rcvar.Tpo" -c -o libopenal_la-al_rcvar.lo `test -f 'al_rcvar.c' || echo '$(srcdir)/'`al_rcvar.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_rcvar.Tpo" "$(DEPDIR)/libopenal_la-al_rcvar.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_rcvar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_rcvar.c' object='libopenal_la-al_rcvar.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_rcvar.lo `test -f 'al_rcvar.c' || echo '$(srcdir)/'`al_rcvar.c
+
+libopenal_la-al_source.lo: al_source.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_source.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_source.Tpo" -c -o libopenal_la-al_source.lo `test -f 'al_source.c' || echo '$(srcdir)/'`al_source.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_source.Tpo" "$(DEPDIR)/libopenal_la-al_source.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_source.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_source.c' object='libopenal_la-al_source.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_source.lo `test -f 'al_source.c' || echo '$(srcdir)/'`al_source.c
+
+libopenal_la-al_spool.lo: al_spool.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_spool.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_spool.Tpo" -c -o libopenal_la-al_spool.lo `test -f 'al_spool.c' || echo '$(srcdir)/'`al_spool.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_spool.Tpo" "$(DEPDIR)/libopenal_la-al_spool.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_spool.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_spool.c' object='libopenal_la-al_spool.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_spool.lo `test -f 'al_spool.c' || echo '$(srcdir)/'`al_spool.c
+
+libopenal_la-al_state.lo: al_state.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_state.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_state.Tpo" -c -o libopenal_la-al_state.lo `test -f 'al_state.c' || echo '$(srcdir)/'`al_state.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_state.Tpo" "$(DEPDIR)/libopenal_la-al_state.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_state.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_state.c' object='libopenal_la-al_state.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_state.lo `test -f 'al_state.c' || echo '$(srcdir)/'`al_state.c
+
+libopenal_la-al_threadlib.lo: al_threadlib.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_threadlib.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_threadlib.Tpo" -c -o libopenal_la-al_threadlib.lo `test -f 'al_threadlib.c' || echo '$(srcdir)/'`al_threadlib.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_threadlib.Tpo" "$(DEPDIR)/libopenal_la-al_threadlib.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_threadlib.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_threadlib.c' object='libopenal_la-al_threadlib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_threadlib.lo `test -f 'al_threadlib.c' || echo '$(srcdir)/'`al_threadlib.c
+
+libopenal_la-al_vector.lo: al_vector.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_vector.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_vector.Tpo" -c -o libopenal_la-al_vector.lo `test -f 'al_vector.c' || echo '$(srcdir)/'`al_vector.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_vector.Tpo" "$(DEPDIR)/libopenal_la-al_vector.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_vector.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_vector.c' object='libopenal_la-al_vector.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_vector.lo `test -f 'al_vector.c' || echo '$(srcdir)/'`al_vector.c
+
+libopenal_la-al_matrix.lo: al_matrix.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_matrix.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_matrix.Tpo" -c -o libopenal_la-al_matrix.lo `test -f 'al_matrix.c' || echo '$(srcdir)/'`al_matrix.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_matrix.Tpo" "$(DEPDIR)/libopenal_la-al_matrix.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_matrix.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='al_matrix.c' object='libopenal_la-al_matrix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_matrix.lo `test -f 'al_matrix.c' || echo '$(srcdir)/'`al_matrix.c
+
+libopenal_la-mixaudio16.lo: mixaudio16.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-mixaudio16.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-mixaudio16.Tpo" -c -o libopenal_la-mixaudio16.lo `test -f 'mixaudio16.c' || echo '$(srcdir)/'`mixaudio16.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-mixaudio16.Tpo" "$(DEPDIR)/libopenal_la-mixaudio16.Plo"; else rm -f "$(DEPDIR)/libopenal_la-mixaudio16.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='mixaudio16.c' object='libopenal_la-mixaudio16.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-mixaudio16.lo `test -f 'mixaudio16.c' || echo '$(srcdir)/'`mixaudio16.c
+
+libopenal_la-alc_backend_alsa.lo: backends/alc_backend_alsa.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_alsa.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_alsa.Tpo" -c -o libopenal_la-alc_backend_alsa.lo `test -f 'backends/alc_backend_alsa.c' || echo '$(srcdir)/'`backends/alc_backend_alsa.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_alsa.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_alsa.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_alsa.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_alsa.c' object='libopenal_la-alc_backend_alsa.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_alsa.lo `test -f 'backends/alc_backend_alsa.c' || echo '$(srcdir)/'`backends/alc_backend_alsa.c
+
+libopenal_la-alc_backend_arts.lo: backends/alc_backend_arts.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_arts.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_arts.Tpo" -c -o libopenal_la-alc_backend_arts.lo `test -f 'backends/alc_backend_arts.c' || echo '$(srcdir)/'`backends/alc_backend_arts.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_arts.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_arts.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_arts.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_arts.c' object='libopenal_la-alc_backend_arts.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_arts.lo `test -f 'backends/alc_backend_arts.c' || echo '$(srcdir)/'`backends/alc_backend_arts.c
+
+libopenal_la-alc_backend_bsd.lo: backends/alc_backend_bsd.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_bsd.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_bsd.Tpo" -c -o libopenal_la-alc_backend_bsd.lo `test -f 'backends/alc_backend_bsd.c' || echo '$(srcdir)/'`backends/alc_backend_bsd.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_bsd.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_bsd.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_bsd.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_bsd.c' object='libopenal_la-alc_backend_bsd.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_bsd.lo `test -f 'backends/alc_backend_bsd.c' || echo '$(srcdir)/'`backends/alc_backend_bsd.c
+
+libopenal_la-alc_backend_darwin.lo: backends/alc_backend_darwin.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_darwin.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_darwin.Tpo" -c -o libopenal_la-alc_backend_darwin.lo `test -f 'backends/alc_backend_darwin.c' || echo '$(srcdir)/'`backends/alc_backend_darwin.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_darwin.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_darwin.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_darwin.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_darwin.c' object='libopenal_la-alc_backend_darwin.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_darwin.lo `test -f 'backends/alc_backend_darwin.c' || echo '$(srcdir)/'`backends/alc_backend_darwin.c
+
+libopenal_la-alc_backend_esd.lo: backends/alc_backend_esd.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_esd.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_esd.Tpo" -c -o libopenal_la-alc_backend_esd.lo `test -f 'backends/alc_backend_esd.c' || echo '$(srcdir)/'`backends/alc_backend_esd.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_esd.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_esd.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_esd.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_esd.c' object='libopenal_la-alc_backend_esd.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_esd.lo `test -f 'backends/alc_backend_esd.c' || echo '$(srcdir)/'`backends/alc_backend_esd.c
+
+libopenal_la-alc_backend_irix.lo: backends/alc_backend_irix.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_irix.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_irix.Tpo" -c -o libopenal_la-alc_backend_irix.lo `test -f 'backends/alc_backend_irix.c' || echo '$(srcdir)/'`backends/alc_backend_irix.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_irix.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_irix.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_irix.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_irix.c' object='libopenal_la-alc_backend_irix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_irix.lo `test -f 'backends/alc_backend_irix.c' || echo '$(srcdir)/'`backends/alc_backend_irix.c
+
+libopenal_la-alc_backend_linux.lo: backends/alc_backend_linux.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_linux.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_linux.Tpo" -c -o libopenal_la-alc_backend_linux.lo `test -f 'backends/alc_backend_linux.c' || echo '$(srcdir)/'`backends/alc_backend_linux.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_linux.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_linux.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_linux.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_linux.c' object='libopenal_la-alc_backend_linux.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_linux.lo `test -f 'backends/alc_backend_linux.c' || echo '$(srcdir)/'`backends/alc_backend_linux.c
+
+libopenal_la-alc_backend_morphos.lo: backends/alc_backend_morphos.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_morphos.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_morphos.Tpo" -c -o libopenal_la-alc_backend_morphos.lo `test -f 'backends/alc_backend_morphos.c' || echo '$(srcdir)/'`backends/alc_backend_morphos.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_morphos.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_morphos.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_morphos.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_morphos.c' object='libopenal_la-alc_backend_morphos.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_morphos.lo `test -f 'backends/alc_backend_morphos.c' || echo '$(srcdir)/'`backends/alc_backend_morphos.c
+
+libopenal_la-alc_backend_null.lo: backends/alc_backend_null.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_null.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_null.Tpo" -c -o libopenal_la-alc_backend_null.lo `test -f 'backends/alc_backend_null.c' || echo '$(srcdir)/'`backends/alc_backend_null.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_null.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_null.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_null.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_null.c' object='libopenal_la-alc_backend_null.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_null.lo `test -f 'backends/alc_backend_null.c' || echo '$(srcdir)/'`backends/alc_backend_null.c
+
+libopenal_la-alc_backend_sdl.lo: backends/alc_backend_sdl.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_sdl.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_sdl.Tpo" -c -o libopenal_la-alc_backend_sdl.lo `test -f 'backends/alc_backend_sdl.c' || echo '$(srcdir)/'`backends/alc_backend_sdl.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_sdl.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_sdl.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_sdl.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_sdl.c' object='libopenal_la-alc_backend_sdl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_sdl.lo `test -f 'backends/alc_backend_sdl.c' || echo '$(srcdir)/'`backends/alc_backend_sdl.c
+
+libopenal_la-alc_backend_solaris.lo: backends/alc_backend_solaris.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_solaris.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_solaris.Tpo" -c -o libopenal_la-alc_backend_solaris.lo `test -f 'backends/alc_backend_solaris.c' || echo '$(srcdir)/'`backends/alc_backend_solaris.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_solaris.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_solaris.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_solaris.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_solaris.c' object='libopenal_la-alc_backend_solaris.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_solaris.lo `test -f 'backends/alc_backend_solaris.c' || echo '$(srcdir)/'`backends/alc_backend_solaris.c
+
+libopenal_la-alc_backend_wave.lo: backends/alc_backend_wave.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_wave.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_wave.Tpo" -c -o libopenal_la-alc_backend_wave.lo `test -f 'backends/alc_backend_wave.c' || echo '$(srcdir)/'`backends/alc_backend_wave.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_wave.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_wave.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_wave.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_wave.c' object='libopenal_la-alc_backend_wave.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_wave.lo `test -f 'backends/alc_backend_wave.c' || echo '$(srcdir)/'`backends/alc_backend_wave.c
+
+libopenal_la-alc_backend_windows.lo: backends/alc_backend_windows.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend_windows.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend_windows.Tpo" -c -o libopenal_la-alc_backend_windows.lo `test -f 'backends/alc_backend_windows.c' || echo '$(srcdir)/'`backends/alc_backend_windows.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend_windows.Tpo" "$(DEPDIR)/libopenal_la-alc_backend_windows.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend_windows.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend_windows.c' object='libopenal_la-alc_backend_windows.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend_windows.lo `test -f 'backends/alc_backend_windows.c' || echo '$(srcdir)/'`backends/alc_backend_windows.c
+
+libopenal_la-alc_backend.lo: backends/alc_backend.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_backend.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_backend.Tpo" -c -o libopenal_la-alc_backend.lo `test -f 'backends/alc_backend.c' || echo '$(srcdir)/'`backends/alc_backend.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_backend.Tpo" "$(DEPDIR)/libopenal_la-alc_backend.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_backend.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='backends/alc_backend.c' object='libopenal_la-alc_backend.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_backend.lo `test -f 'backends/alc_backend.c' || echo '$(srcdir)/'`backends/alc_backend.c
+
+libopenal_la-x86_floatmul.lo: arch/i386/x86_floatmul.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-x86_floatmul.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-x86_floatmul.Tpo" -c -o libopenal_la-x86_floatmul.lo `test -f 'arch/i386/x86_floatmul.c' || echo '$(srcdir)/'`arch/i386/x86_floatmul.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-x86_floatmul.Tpo" "$(DEPDIR)/libopenal_la-x86_floatmul.Plo"; else rm -f "$(DEPDIR)/libopenal_la-x86_floatmul.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='arch/i386/x86_floatmul.c' object='libopenal_la-x86_floatmul.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-x86_floatmul.lo `test -f 'arch/i386/x86_floatmul.c' || echo '$(srcdir)/'`arch/i386/x86_floatmul.c
+
+libopenal_la-x86_cpu_caps_prk.lo: arch/i386/x86_cpu_caps_prk.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-x86_cpu_caps_prk.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-x86_cpu_caps_prk.Tpo" -c -o libopenal_la-x86_cpu_caps_prk.lo `test -f 'arch/i386/x86_cpu_caps_prk.c' || echo '$(srcdir)/'`arch/i386/x86_cpu_caps_prk.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-x86_cpu_caps_prk.Tpo" "$(DEPDIR)/libopenal_la-x86_cpu_caps_prk.Plo"; else rm -f "$(DEPDIR)/libopenal_la-x86_cpu_caps_prk.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='arch/i386/x86_cpu_caps_prk.c' object='libopenal_la-x86_cpu_caps_prk.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-x86_cpu_caps_prk.lo `test -f 'arch/i386/x86_cpu_caps_prk.c' || echo '$(srcdir)/'`arch/i386/x86_cpu_caps_prk.c
+
+libopenal_la-mixaudio16_mmx_prk.lo: arch/i386/mixaudio16_mmx_prk.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-mixaudio16_mmx_prk.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-mixaudio16_mmx_prk.Tpo" -c -o libopenal_la-mixaudio16_mmx_prk.lo `test -f 'arch/i386/mixaudio16_mmx_prk.c' || echo '$(srcdir)/'`arch/i386/mixaudio16_mmx_prk.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-mixaudio16_mmx_prk.Tpo" "$(DEPDIR)/libopenal_la-mixaudio16_mmx_prk.Plo"; else rm -f "$(DEPDIR)/libopenal_la-mixaudio16_mmx_prk.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='arch/i386/mixaudio16_mmx_prk.c' object='libopenal_la-mixaudio16_mmx_prk.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-mixaudio16_mmx_prk.lo `test -f 'arch/i386/mixaudio16_mmx_prk.c' || echo '$(srcdir)/'`arch/i386/mixaudio16_mmx_prk.c
+
+libopenal_la-floatmul.lo: arch/portable/floatmul.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-floatmul.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-floatmul.Tpo" -c -o libopenal_la-floatmul.lo `test -f 'arch/portable/floatmul.c' || echo '$(srcdir)/'`arch/portable/floatmul.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-floatmul.Tpo" "$(DEPDIR)/libopenal_la-floatmul.Plo"; else rm -f "$(DEPDIR)/libopenal_la-floatmul.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='arch/portable/floatmul.c' object='libopenal_la-floatmul.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-floatmul.lo `test -f 'arch/portable/floatmul.c' || echo '$(srcdir)/'`arch/portable/floatmul.c
+
+libopenal_la-cpu_caps.lo: arch/portable/cpu_caps.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-cpu_caps.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-cpu_caps.Tpo" -c -o libopenal_la-cpu_caps.lo `test -f 'arch/portable/cpu_caps.c' || echo '$(srcdir)/'`arch/portable/cpu_caps.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-cpu_caps.Tpo" "$(DEPDIR)/libopenal_la-cpu_caps.Plo"; else rm -f "$(DEPDIR)/libopenal_la-cpu_caps.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='arch/portable/cpu_caps.c' object='libopenal_la-cpu_caps.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-cpu_caps.lo `test -f 'arch/portable/cpu_caps.c' || echo '$(srcdir)/'`arch/portable/cpu_caps.c
+
+libopenal_la-alc_context.lo: alc/alc_context.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_context.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_context.Tpo" -c -o libopenal_la-alc_context.lo `test -f 'alc/alc_context.c' || echo '$(srcdir)/'`alc/alc_context.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_context.Tpo" "$(DEPDIR)/libopenal_la-alc_context.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_context.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='alc/alc_context.c' object='libopenal_la-alc_context.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_context.lo `test -f 'alc/alc_context.c' || echo '$(srcdir)/'`alc/alc_context.c
+
+libopenal_la-alc_device.lo: alc/alc_device.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_device.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_device.Tpo" -c -o libopenal_la-alc_device.lo `test -f 'alc/alc_device.c' || echo '$(srcdir)/'`alc/alc_device.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_device.Tpo" "$(DEPDIR)/libopenal_la-alc_device.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_device.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='alc/alc_device.c' object='libopenal_la-alc_device.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_device.lo `test -f 'alc/alc_device.c' || echo '$(srcdir)/'`alc/alc_device.c
+
+libopenal_la-alc_error.lo: alc/alc_error.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_error.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_error.Tpo" -c -o libopenal_la-alc_error.lo `test -f 'alc/alc_error.c' || echo '$(srcdir)/'`alc/alc_error.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_error.Tpo" "$(DEPDIR)/libopenal_la-alc_error.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_error.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='alc/alc_error.c' object='libopenal_la-alc_error.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_error.lo `test -f 'alc/alc_error.c' || echo '$(srcdir)/'`alc/alc_error.c
+
+libopenal_la-alc_speaker.lo: alc/alc_speaker.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-alc_speaker.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-alc_speaker.Tpo" -c -o libopenal_la-alc_speaker.lo `test -f 'alc/alc_speaker.c' || echo '$(srcdir)/'`alc/alc_speaker.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-alc_speaker.Tpo" "$(DEPDIR)/libopenal_la-alc_speaker.Plo"; else rm -f "$(DEPDIR)/libopenal_la-alc_speaker.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='alc/alc_speaker.c' object='libopenal_la-alc_speaker.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-alc_speaker.lo `test -f 'alc/alc_speaker.c' || echo '$(srcdir)/'`alc/alc_speaker.c
+
+libopenal_la-ac_adpcm.lo: audioconvert/ac_adpcm.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-ac_adpcm.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-ac_adpcm.Tpo" -c -o libopenal_la-ac_adpcm.lo `test -f 'audioconvert/ac_adpcm.c' || echo '$(srcdir)/'`audioconvert/ac_adpcm.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-ac_adpcm.Tpo" "$(DEPDIR)/libopenal_la-ac_adpcm.Plo"; else rm -f "$(DEPDIR)/libopenal_la-ac_adpcm.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='audioconvert/ac_adpcm.c' object='libopenal_la-ac_adpcm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-ac_adpcm.lo `test -f 'audioconvert/ac_adpcm.c' || echo '$(srcdir)/'`audioconvert/ac_adpcm.c
+
+libopenal_la-ac_bits.lo: audioconvert/ac_bits.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-ac_bits.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-ac_bits.Tpo" -c -o libopenal_la-ac_bits.lo `test -f 'audioconvert/ac_bits.c' || echo '$(srcdir)/'`audioconvert/ac_bits.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-ac_bits.Tpo" "$(DEPDIR)/libopenal_la-ac_bits.Plo"; else rm -f "$(DEPDIR)/libopenal_la-ac_bits.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='audioconvert/ac_bits.c' object='libopenal_la-ac_bits.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-ac_bits.lo `test -f 'audioconvert/ac_bits.c' || echo '$(srcdir)/'`audioconvert/ac_bits.c
+
+libopenal_la-ac_channels.lo: audioconvert/ac_channels.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-ac_channels.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-ac_channels.Tpo" -c -o libopenal_la-ac_channels.lo `test -f 'audioconvert/ac_channels.c' || echo '$(srcdir)/'`audioconvert/ac_channels.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-ac_channels.Tpo" "$(DEPDIR)/libopenal_la-ac_channels.Plo"; else rm -f "$(DEPDIR)/libopenal_la-ac_channels.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='audioconvert/ac_channels.c' object='libopenal_la-ac_channels.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-ac_channels.lo `test -f 'audioconvert/ac_channels.c' || echo '$(srcdir)/'`audioconvert/ac_channels.c
+
+libopenal_la-ac_endian.lo: audioconvert/ac_endian.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-ac_endian.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-ac_endian.Tpo" -c -o libopenal_la-ac_endian.lo `test -f 'audioconvert/ac_endian.c' || echo '$(srcdir)/'`audioconvert/ac_endian.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-ac_endian.Tpo" "$(DEPDIR)/libopenal_la-ac_endian.Plo"; else rm -f "$(DEPDIR)/libopenal_la-ac_endian.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='audioconvert/ac_endian.c' object='libopenal_la-ac_endian.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-ac_endian.lo `test -f 'audioconvert/ac_endian.c' || echo '$(srcdir)/'`audioconvert/ac_endian.c
+
+libopenal_la-ac_freq.lo: audioconvert/ac_freq.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-ac_freq.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-ac_freq.Tpo" -c -o libopenal_la-ac_freq.lo `test -f 'audioconvert/ac_freq.c' || echo '$(srcdir)/'`audioconvert/ac_freq.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-ac_freq.Tpo" "$(DEPDIR)/libopenal_la-ac_freq.Plo"; else rm -f "$(DEPDIR)/libopenal_la-ac_freq.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='audioconvert/ac_freq.c' object='libopenal_la-ac_freq.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-ac_freq.lo `test -f 'audioconvert/ac_freq.c' || echo '$(srcdir)/'`audioconvert/ac_freq.c
+
+libopenal_la-ac_helper.lo: audioconvert/ac_helper.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-ac_helper.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-ac_helper.Tpo" -c -o libopenal_la-ac_helper.lo `test -f 'audioconvert/ac_helper.c' || echo '$(srcdir)/'`audioconvert/ac_helper.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-ac_helper.Tpo" "$(DEPDIR)/libopenal_la-ac_helper.Plo"; else rm -f "$(DEPDIR)/libopenal_la-ac_helper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='audioconvert/ac_helper.c' object='libopenal_la-ac_helper.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-ac_helper.lo `test -f 'audioconvert/ac_helper.c' || echo '$(srcdir)/'`audioconvert/ac_helper.c
+
+libopenal_la-ac_misc.lo: audioconvert/ac_misc.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-ac_misc.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-ac_misc.Tpo" -c -o libopenal_la-ac_misc.lo `test -f 'audioconvert/ac_misc.c' || echo '$(srcdir)/'`audioconvert/ac_misc.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-ac_misc.Tpo" "$(DEPDIR)/libopenal_la-ac_misc.Plo"; else rm -f "$(DEPDIR)/libopenal_la-ac_misc.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='audioconvert/ac_misc.c' object='libopenal_la-ac_misc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-ac_misc.lo `test -f 'audioconvert/ac_misc.c' || echo '$(srcdir)/'`audioconvert/ac_misc.c
+
+libopenal_la-al_ext_vorbis.lo: extensions/al_ext_vorbis.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_ext_vorbis.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_ext_vorbis.Tpo" -c -o libopenal_la-al_ext_vorbis.lo `test -f 'extensions/al_ext_vorbis.c' || echo '$(srcdir)/'`extensions/al_ext_vorbis.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_ext_vorbis.Tpo" "$(DEPDIR)/libopenal_la-al_ext_vorbis.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_ext_vorbis.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='extensions/al_ext_vorbis.c' object='libopenal_la-al_ext_vorbis.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_ext_vorbis.lo `test -f 'extensions/al_ext_vorbis.c' || echo '$(srcdir)/'`extensions/al_ext_vorbis.c
+
+libopenal_la-al_ext_mp3.lo: extensions/al_ext_mp3.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_ext_mp3.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_ext_mp3.Tpo" -c -o libopenal_la-al_ext_mp3.lo `test -f 'extensions/al_ext_mp3.c' || echo '$(srcdir)/'`extensions/al_ext_mp3.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_ext_mp3.Tpo" "$(DEPDIR)/libopenal_la-al_ext_mp3.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_ext_mp3.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='extensions/al_ext_mp3.c' object='libopenal_la-al_ext_mp3.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_ext_mp3.lo `test -f 'extensions/al_ext_mp3.c' || echo '$(srcdir)/'`extensions/al_ext_mp3.c
+
+libopenal_la-al_ext_capture.lo: extensions/al_ext_capture.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_ext_capture.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_ext_capture.Tpo" -c -o libopenal_la-al_ext_capture.lo `test -f 'extensions/al_ext_capture.c' || echo '$(srcdir)/'`extensions/al_ext_capture.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_ext_capture.Tpo" "$(DEPDIR)/libopenal_la-al_ext_capture.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_ext_capture.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='extensions/al_ext_capture.c' object='libopenal_la-al_ext_capture.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_ext_capture.lo `test -f 'extensions/al_ext_capture.c' || echo '$(srcdir)/'`extensions/al_ext_capture.c
+
+libopenal_la-al_ext_loki.lo: extensions/al_ext_loki.c
+@am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -MT libopenal_la-al_ext_loki.lo -MD -MP -MF "$(DEPDIR)/libopenal_la-al_ext_loki.Tpo" -c -o libopenal_la-al_ext_loki.lo `test -f 'extensions/al_ext_loki.c' || echo '$(srcdir)/'`extensions/al_ext_loki.c; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libopenal_la-al_ext_loki.Tpo" "$(DEPDIR)/libopenal_la-al_ext_loki.Plo"; else rm -f "$(DEPDIR)/libopenal_la-al_ext_loki.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='extensions/al_ext_loki.c' object='libopenal_la-al_ext_loki.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopenal_la_CPPFLAGS) $(CPPFLAGS) $(libopenal_la_CFLAGS) $(CFLAGS) -c -o libopenal_la-al_ext_loki.lo `test -f 'extensions/al_ext_loki.c' || echo '$(srcdir)/'`extensions/al_ext_loki.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(libdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-recursive ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-libLTLIBRARIES install-man \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+	pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-info-am uninstall-libLTLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /openal-0.0.8/src/al_bpool.c
===================================================================
--- /openal-0.0.8/src/al_bpool.c	(revision 17)
+++ /openal-0.0.8/src/al_bpool.c	(revision 17)
@@ -0,0 +1,321 @@
+#include "al_siteconfig.h"
+
+#include <stdlib.h>
+
+#include "al_bpool.h"
+#include "al_debug.h"
+
+#include "alc/alc_context.h"
+#include "alc/alc_speaker.h"
+
+#define AL_FIRST_BUFFER_ID  0x8000
+#define MINBUFFERS          20
+
+#ifndef elementsof
+#define elementsof(a) ((sizeof(a)) / (sizeof *(a)))
+#endif
+
+/*
+ * _alBufferInit( AL_buffer *buf, ALuint bid )
+ *
+ * Initializes AL_buffer *buf to defaults, set its id to bid.
+ */
+static void _alBufferInit( AL_buffer *buf, ALuint bid );
+
+/*
+ * bpool_resize( bpool_t *bpool, size_t newsize )
+ *
+ * increase size of buffer pool object (bpool) until it can contain up to
+ * newsize objects.  Return AL_TRUE if resize operation was successful,
+ * AL_FALSE otherwise.
+ */
+ALboolean bpool_resize( bpool_t *bpool, size_t newsize ) {
+	void *temp;
+	unsigned int i;
+
+	if(newsize < 1) {
+		newsize = 1;
+	}
+
+	if(bpool->size >= newsize) {
+		return AL_TRUE; /* no resize needed */
+	}
+
+	/*
+	 * Resize buffer pool
+	 */
+	temp = realloc(bpool->pool, newsize * sizeof *bpool->pool);
+	if(temp == NULL) {
+		return AL_FALSE; /* could not realloc */
+	}
+
+	bpool->pool = temp;
+
+	for(i = bpool->size; i < newsize; i++) {
+		bpool->pool[i].inuse = AL_FALSE;
+	}
+
+	/*
+	 * resize the sid <-> index map.
+	 */
+	temp = realloc(bpool->map, newsize * sizeof *bpool->map);
+	if(temp == NULL) {
+		return AL_FALSE;
+	}
+	bpool->map = temp;
+
+	for(i = bpool->size; i < newsize; i++) {
+		bpool->map[i] = 0;
+	}
+
+	bpool->size = newsize;
+
+	return AL_TRUE;
+}
+
+/*
+ * bpool_alloc( bpool_t *bpool )
+ *
+ * allocates a buffer pool node from bpool, returns index or -1
+ * on error.
+ */
+int bpool_alloc( bpool_t *bpool ) {
+	ALuint size = 0;
+	int bindex = 0;
+
+	bindex = bpool_first_free_index( bpool );
+	if(bindex == -1)  {
+		size = bpool->size + bpool->size / 2;
+
+		if(size < MINBUFFERS) {
+			size = MINBUFFERS;
+		}
+
+		if(bpool_resize(bpool, size) == AL_FALSE) {
+			return -1;
+		}
+
+		bindex = bpool_first_free_index(bpool);
+	}
+
+	bpool->pool[bindex].inuse = AL_TRUE;
+	bpool->map[bindex]        = bpool_next_bid();
+
+	_alBufferInit(&bpool->pool[bindex].data, bpool->map[bindex]);
+
+	return bpool->map[bindex];
+}
+
+/*
+ * bpool_index( bpool_t *bpool, ALuint bindex )
+ *
+ * retrieve a buffer pool node from a buffer pool ( bpool ), with index
+ * bindex.  Returns NULL if bindex is not a valid index into the bpool.
+ *
+ * NOTE: bindex is *not* a buffer name (bid).  It is a value returned from
+ * a successful call to bpool_alloc.
+ */
+AL_buffer *bpool_index( bpool_t *bpool, ALuint bid ) {
+	int bindex;
+
+	bindex = bpool_bid_to_index( bpool, bid );
+	if(bindex < 0) {
+		return NULL;
+	}
+
+	if(bindex >= (int) bpool->size) {
+		return NULL;
+	}
+
+	return &bpool->pool[bindex].data;
+}
+
+/*
+ * bpool_first_free_index( bpool_t *bpool )
+ *
+ * returns index of first unused buffer pool node in bpool.
+ */
+int bpool_first_free_index( bpool_t *bpool ) {
+	ALuint i;
+
+	for( i = 0; i < bpool->size; i++ ) {
+		if(bpool->pool[i].inuse == AL_FALSE) {
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+/*
+ * bpool_dealloc( bpool_t *bpool, ALuint bid, void (*freer_func)(void *) )
+ *
+ * finalizes a single buffer pool node, named by bid.  Returns AL_TRUE if the
+ * buffer pool node was valid, in use, and was finalized.  Returns AL_FALSE if
+ * the buffer pool node was invalid, not in use, or any other error occured.
+ */
+ALboolean bpool_dealloc( bpool_t *bpool, ALuint bid,
+				void (*freer_func)(void *) ) {
+	AL_buffer *src;
+	int bindex;
+
+	bindex = bpool_bid_to_index( bpool, bid );
+	if(bindex < 0) {
+		/* invalid bid */
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"bid %d is a bad index", bid);
+
+		return AL_FALSE;
+	}
+
+	if(bindex >= (int) bpool->size) {
+		return AL_FALSE;
+	}
+
+	src = bpool_index(bpool, bid);
+	if(src == NULL) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"bid %d is a bad index", bid);
+		return AL_FALSE;
+	}
+
+	if(bpool->pool[bindex].inuse == AL_FALSE) {
+		/* already deleted */
+		return AL_FALSE;
+	}
+
+	_alDebug(ALD_MEM, __FILE__, __LINE__, "freer_func'ing %d", bid);
+
+	freer_func(src);
+
+	bpool->pool[bindex].inuse = AL_FALSE;
+	bpool->map[bindex] = 0;
+
+	return AL_TRUE;
+}
+
+/*
+ * bpool_free( bpool_t *bpool, void (*freer_func)(void *) )
+ *
+ * dealloc all buffer pool nodes in a buffer pool object, using freer_func to
+ * finalize each node.
+ */
+void bpool_free( bpool_t *bpool, void (*freer_func)(void *) ) {
+	ALuint bid;
+	unsigned int i;
+
+	for(i = 0; i < bpool->size; i++) {
+		if(bpool->pool[i].inuse == AL_TRUE) {
+			bid = bpool->map[i];
+
+			bpool_dealloc(bpool, bid, freer_func);
+		}
+	}
+
+	free( bpool->pool );
+	bpool->pool = NULL;
+
+	free( bpool->map );
+	bpool->map = NULL;
+
+	bpool->size = 0;
+
+	/* let the caller free bpool itself */
+	return;
+}
+
+/*
+ * bpool_init( bpool_t *bpool )
+ *
+ * initializes buffer pool object (bpool).
+ */
+void bpool_init( bpool_t *bpool ) {
+	bpool->size = 0;
+	bpool->pool = NULL;
+	bpool->map  = NULL;
+
+	return;
+}
+
+/*
+ * bpool_bid_to_index( bpool_t *bpool, ALuint bid )
+ *
+ * converts an AL_buffer name (bid) to buffer pool node index suitable
+ * for passing to bpool_index.  Returns -1 if bid does not name a buffer id
+ * within bpool.
+ *
+ * FIXME: use binary search.
+ */
+int bpool_bid_to_index( bpool_t *bpool, ALuint bid ) {
+	unsigned int i;
+
+	if ( bid > 0 ) {
+		for(i = 0; i < bpool->size; i++) {
+			if(bpool->map[i] == bid) {
+				return i;
+			}
+		}
+	}
+
+	return -1;
+}
+
+/*
+ * bpool_next_bid( void )
+ *
+ * return next suitable AL_buffer name (bid) suitable for using in
+ * al calls ( alBufferData( bid, ... ), etc ).  These should be sequential
+ * and unique.
+ */
+ALuint bpool_next_bid( void ) {
+	static ALuint id = AL_FIRST_BUFFER_ID;
+
+	return ++id;
+}
+
+/*
+ * _alBufferInit( AL_buffer *buf, ALuint bid )
+ *
+ * Allocate and initialize a new buffer.  Probably shouldn't
+ * be called directly but from add_bufnod (which subsequently
+ * adds it to the pool data structure, which maintains these
+ * things)
+ *
+ * assumes locked buffers
+ */
+static void _alBufferInit( AL_buffer *buf, ALuint bid ) {
+	ALuint i;
+
+	if( buf == NULL ) {
+		return;
+	}
+
+	buf->num_buffers = _alcDCGetNumSpeakers();
+
+	for(i = 0; i < elementsof(buf->orig_buffers); i++) {
+		buf->orig_buffers[i] = NULL;
+	}
+
+	buf->bid            = bid;
+	buf->flags          = ALB_NONE;
+	buf->streampos      = 0;
+	buf->appendpos	    = 0;
+
+	buf->format         = canon_format;
+	buf->frequency      = canon_speed;
+	buf->size           = 0;
+
+	buf->callback                = NULL;
+	buf->destroy_source_callback = NULL;
+	buf->destroy_buffer_callback = NULL;
+
+	buf->queue_list.sids    = NULL;
+	buf->queue_list.size    = 0;
+	buf->queue_list.items   = 0;
+
+	buf->current_list.sids    = NULL;
+	buf->current_list.size    = 0;
+	buf->current_list.items   = 0;
+
+	return;
+}
Index: /openal-0.0.8/src/al_bpool.h
===================================================================
--- /openal-0.0.8/src/al_bpool.h	(revision 17)
+++ /openal-0.0.8/src/al_bpool.h	(revision 17)
@@ -0,0 +1,113 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_bpool.h
+ *
+ * Prototypes, macros and definitions related to the management of bpool
+ * objects.  bpool objects are objects which ease the slab allocation of
+ * AL_buffer objects.
+ *
+ */
+#ifndef _AL_BPOOL_H_
+#define _AL_BPOOL_H_
+
+#include "al_types.h"
+
+/*
+ * pool structures: bpool_node and bpool_t
+ *
+ * These structures are used to group buffers in a growable array, so that
+ * the relatively small allocations of AL_buffer objects can be combined into
+ * a larger structure, in the hopes of reducing the effects of fragmentation.
+ *
+ * Each AL_buffer manipulated is actually a pointer to a bpool_node->data
+ * object.  The bpool->node inuse flag marks whether the AL_buffer in a bpool_node
+ * object is currently "alloced" (in the sense that the application/library is
+ * using it) or "dealloced".
+ *
+ * The bpool_t object is used to collect those variables needed to manage the
+ * bpool_node pool, in point of fact the size and the data itself.  Also, a
+ * mapping of buffer ids (used internally and by the application) is present
+ * to facilitate the easy conversion from buffer ids (which are in essence
+ * arbitrary other than their requirement to be unique) and indexes into
+ * the bpool_node pool.
+ */
+typedef struct {
+	AL_buffer data;
+	ALboolean inuse;
+} bpool_node;
+
+typedef struct {
+	bpool_node *pool;
+	ALuint size;
+	ALuint *map; /* map[index] = bid */
+} bpool_t;
+
+/*
+ * buffer pool stuff
+ *
+ * overcomplicated method of pooling buffers to avoid memory
+ * fragmentation.
+ */
+
+/*
+ * initializes buffer pool object (bpool).
+ */
+void bpool_init( bpool_t *bpool );
+
+/*
+ * allocates a buffer pool node from bpool, returns index or -1
+ * on error.
+ */
+int bpool_alloc( bpool_t *bpool );
+
+/*
+ * dealloc all buffer pool nodes in a buffer pool object, using freer_func to
+ * finalize each node.
+ */
+void bpool_free( bpool_t *bpool, void (*freer_func)(void *) );
+
+/*
+ * returns index of first unused buffer pool node in bpool.
+ */
+int bpool_first_free_index( bpool_t *bpool );
+
+/*
+ * finalizes a single buffer pool node, named by bid.  Returns AL_TRUE if the
+ * buffer pool node was valid, in use, and was finalized.  Returns AL_FALSE if
+ * the buffer pool node was invalid, not in use, or any other error occured.
+ */
+ALboolean bpool_dealloc( bpool_t *bpool, ALuint bid,
+				void (*freer_func)(void *) );
+
+/*
+ * increase size of buffer pool object (bpool) until it can contain up to
+ * newsize objects.  Return AL_TRUE if resize operation was successful,
+ * AL_FALSE otherwise.
+ */
+ALboolean bpool_resize( bpool_t *bpool, size_t newsize );
+
+/*
+ * retrieve a buffer pool node from a buffer pool ( bpool ), with index
+ * bindex.  Returns NULL if bindex is not a valid index into the bpool.
+ *
+ * NOTE: bindex is *not* a buffer name (bid).  It is a value returned from
+ * a successful call to bpool_alloc.
+ */
+AL_buffer *bpool_index( bpool_t *bpool, ALuint bindex );
+
+/*
+ * converts an AL_buffer name (bid) to buffer pool node index suitable
+ * for passing to bpool_index.  Returns -1 if bid does not name a buffer id
+ * within bpool.
+ */
+int bpool_bid_to_index( bpool_t *bpool, ALuint bid );
+
+/*
+ * return next suitable AL_buffer name (bid) suitable for using in
+ * al calls ( alBufferData( bid, ... ), etc ).  These should be sequential
+ * and unique.
+ */
+ALuint bpool_next_bid( void );
+
+#endif /* AL_BPOOL_H_ */
Index: /openal-0.0.8/src/al_buffer.c
===================================================================
--- /openal-0.0.8/src/al_buffer.c	(revision 17)
+++ /openal-0.0.8/src/al_buffer.c	(revision 17)
@@ -0,0 +1,1711 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_buffer.c
+ *
+ * Stuff related to the management and use of buffers.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+/* for alutLoadVorbis_LOKI and alBufferAppendData_LOKI */
+#include <AL/alext.h>
+
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "al_buffer.h"
+#include "al_bpool.h"
+#include "al_debug.h"
+#include "al_error.h"
+#include "al_main.h"
+#include "al_source.h"
+#include "al_types.h"
+#include "alc/alc_context.h"
+#include "alc/alc_speaker.h"
+
+#include "audioconvert/audioconvert.h"
+
+#include "al_threadlib.h"
+#include "al_mutexlib.h"
+
+#ifndef elementsof
+#define elementsof(a) ((sizeof(a)) / (sizeof *(a)))
+#endif
+
+/*
+ * buf_pool is a the bpool_t structure which we use to slab allocate
+ * AL_buffers.
+ */
+static bpool_t buf_pool;
+
+/*
+ * Mutex guarding buf_pool.
+ */
+static MutexID buf_mutex;
+
+/*
+ * _alDestroyBuffer(void *buf)
+ *
+ * _alDestroyBuffer is passed an AL_buffer pointer, masquerading as a void
+ * pointer, and frees the data structures internal to the AL_buffer, but
+ * not the buffer itself.
+ *
+ * This is called by bpool_dealloc.
+ */
+static void _alDestroyBuffer( void *buf );
+
+/*
+ * ALvoid *_alConvert( const ALvoid *data,
+ *			ALenum f_format, ALuint f_size, ALuint f_freq,
+ *			ALenum t_format, ALuint t_freq, ALuint *retsize,
+ *			ALenum should_use_passed_data);
+ *
+ * _alConvert takes the passed data and converts it from it's current
+ * format (f_format) to the desired format (t_format), etc, returning
+ * the converted data and setting retsize to the new size of the
+ * converted data.  The passed data must either be raw PCM data or
+ * must correspond with one of the headered extension formats.
+ *
+ * If should_use_passed_data is set to AL_TRUE, then _alConvert will
+ * attempt to do the conversion in place.  Otherwise, new data will
+ * be allocated for the purpose.
+ *
+ * Returns NULL on error.
+ */
+static ALvoid *_alConvert(const ALvoid *data,
+			ALenum f_format, ALuint f_size, ALuint f_freq,
+			ALenum t_format, ALuint t_freq, ALuint *retsize,
+			ALenum should_use_passed_data);
+
+/*
+ * _alBufferDestroyCallbackBuffer( AL_buffer *buf )
+ *
+ * Executes the buffer completion callback associated with buf, if there is
+ * one.
+ */
+static void _alBufferDestroyCallbackBuffer( AL_buffer *buf );
+
+/*
+ * buffer source state
+ */
+
+/*
+ * _alBufferAddQueueRef( AL_buffer *buf, ALuint sid )
+ *
+ * adds a queue reference to the AL_buffer *buf.  The queue reference
+ * refers to the source named by sid.
+ *
+ * If no current reference is added, and this queue reference is not deleted,
+ * _alGet{Bid,Buffer}State will return AL_PENDING.
+ *
+ */
+static void _alBufferAddQueueRef( AL_buffer *buf, ALuint sid );
+
+/*
+ * _alBufferRemoveQueueRef( AL_buffer *buf, ALuint sid )
+ *
+ * removes a queue reference to the AL_buffer *buf.  The first queue
+ * reference refering to sid will be removed.
+ */
+static void _alBufferRemoveQueueRef( AL_buffer *buf, ALuint sid );
+
+/*
+ * _alBufferAddCurrentRef( AL_buffer *buf, ALuint sid )
+ *
+ * adds a current reference to the AL_buffer *buf.  The reference refers
+ * to the source named by sid.
+ *
+ * If this reference is not removed, _alGet{Bid,Buffer}state will return
+ * AL_PROCESSED.
+ */
+static void _alBufferAddCurrentRef( AL_buffer *buf, ALuint sid );
+
+/*
+ * _alBufferRemoveCurrentRef( AL_buffer *buf, ALuint sid )
+ *
+ * removes a current reference to the AL_buffer *buf.  The first current
+ * reference refering to sid will be removed.
+ */
+static void _alBufferRemoveCurrentRef( AL_buffer *buf, ALuint sid );
+
+/*
+ * alGenBuffers( ALsizei n, ALuint *buffer )
+ *
+ * Perform full allocation of n-1 buffer ids.  Fails and nops
+ * if n-1 buffers could not be created.
+ *
+ * If n is 0, legal nop.  If n < 0, set INVALID_VALUE and nop.
+ */
+void alGenBuffers( ALsizei n, ALuint *buffer ) {
+	ALuint *temp;
+	int bindex;
+	int i;
+
+	if(n == 0) {
+		return; /* silently return */
+	}
+
+	if(n < 0) {
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+		      "alGenBuffers: invalid n %d\n", n);
+
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+		return;
+	}
+
+	temp = malloc(n * sizeof *temp);
+	if(temp == NULL) {
+		/*
+		 * Could not reserve memory for temporary
+		 * ALuint *buffer.
+		 */
+		_alcDCLockContext();
+		_alDCSetError( AL_OUT_OF_MEMORY );
+		_alcDCUnlockContext();
+		return;
+	}
+
+	_alLockBuffer();
+
+	for(i = 0; i < n; i++) {
+		bindex = bpool_alloc(&buf_pool);
+
+		if(bindex == -1) {
+			/*
+			 * Could not honor request in full.  We
+			 * unlock, dealloc, set error, return.
+			 *
+			 * FIXME: Should we have a non-locking
+			 * version of DeleteBuffers and maintain this
+			 * lock as long as possible?
+			 */
+			_alUnlockBuffer();
+
+			if(i > 0) {
+				/*
+				 * Only delete buffers that have
+				 * been created.
+				 */
+				alDeleteBuffers(i, temp);
+			}
+
+			_alcDCLockContext();
+			_alDCSetError(AL_OUT_OF_MEMORY);
+			_alcDCUnlockContext();
+
+			free( temp );
+
+			return;
+		}
+
+		temp[i] = bindex;
+	}
+
+	_alUnlockBuffer();
+
+	/*
+	 * temp[0..n-1] now populated with n valid buffer names,
+	 * so copy it.
+	 */
+	memcpy( buffer, temp, n * sizeof *buffer );
+
+	free( temp );
+
+	return;
+}
+
+/*
+ * alDeleteBuffers( ALsizei n, ALuint *buffers )
+ *
+ * Perform full deallocation of buffers[0..n-1].  If a member
+ * of buffers[0..n-1] is not a valid buffer id, set INVALID_NAME
+ * and return without deallocating any member.
+ *
+ * If n is 0, legal nop.  If n < 0, set INVALID_VALUE and nop.
+ *
+ * FIXME: not well tested
+ *
+ * Well, that's not totally true.  I've tested deleting
+ * buffers (obviously!) but there's a whole set of mojo where it
+ * becomes possible to delete buffers in playing sources, which
+ * is bad bad bad.
+ *
+ * The ref counting system is made to avoid that bad mojo by never
+ * deleting buffers associated with playing sources.  *That* is
+ * what is not well tested.
+ *
+ * Of course, the behaviour of deleting buffers which are currently
+ * associated with sources (especially playing sources!) needs to
+ * be specified.  It's not at-the-moment.
+ */
+void alDeleteBuffers( ALsizei n, const ALuint* buffers ) {
+	AL_buffer *buf;
+	ALenum bufstate;
+	int i;
+
+	if(n == 0) {
+		/* silently return */
+		return;
+	}
+
+	_alLockBuffer();
+
+	if(n < 0) {
+		_alUnlockBuffer();
+
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	/*
+	 * test each buffer to ensure we don't have any
+	 * invalid names in there.
+	 */
+	for(i = 0; i < n; i++) {
+		if(_alIsBuffer(buffers[i]) == AL_FALSE) {
+			/* not a buffer */
+			_alcDCLockContext();
+			_alDCSetError( AL_INVALID_NAME );
+			_alcDCUnlockContext();
+
+			_alUnlockBuffer();
+			return;
+		}
+	}
+
+	while(n--) {
+		bufstate = _alGetBidState( buffers[n] );
+
+		if(bufstate == AL_UNUSED) {
+			bpool_dealloc(&buf_pool, buffers[n],
+				_alDestroyBuffer);
+		} else {
+			buf = _alGetBuffer( buffers[n] );
+			if(buf == NULL) {
+				/* should never happen */
+				_alcDCLockContext();
+				_alDCSetError( AL_INVALID_NAME );
+				_alcDCUnlockContext();
+
+				continue;
+			}
+
+			/* still in use */
+			buf->flags |= ALB_PENDING_DELETE;
+		}
+	}
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ * alIsBuffer( ALuint bid )
+ *
+ * Returns AL_TRUE if bid is a valid buffer name, AL_FALSE otherwise.
+ *
+ */
+ALboolean alIsBuffer( ALuint bid ) {
+	ALboolean retval;
+
+	_alLockBuffer();
+
+	retval = _alIsBuffer( bid );
+
+	_alUnlockBuffer();
+
+	return retval;
+}
+
+/*
+ * alBufferData( ALuint  bid,
+ *               ALenum  format,
+ *               ALvoid  *data,
+ *               ALsizei size,
+ *               ALsizei freq );
+ *
+ * associates data with bid.
+ *
+ * If format is invalid, set AL_INVALID_ENUM.  If bid is not a valid buffer
+ * name, set AL_INVALID_NAME.  If not enough memory is available to make a
+ * copy of this data, set AL_OUT_OF_MEMORY.
+ */
+void alBufferData( ALuint  bid,
+		   ALenum  format,
+                   const ALvoid* data,
+		   ALsizei size,
+		   ALsizei freq ) {
+	AL_buffer *buf;
+	ALvoid *cdata;
+	ALuint i;
+	ALuint retsize;
+	ALenum tformat;
+	ALint tfreq;
+
+	if((data == NULL) || (size == 0))
+	{
+		_alcDCLockContext();
+		_alDCSetError(AL_INVALID_VALUE);
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	switch(format) {
+#ifdef ENABLE_EXTENSION_AL_EXT_VORBIS
+		/*
+		 * If compiled with the vorbis extension, and we get passed
+		 * vorbis data, then pass that to the correct extension.
+		 */
+		case AL_FORMAT_VORBIS_EXT:
+			if(alutLoadVorbis_LOKI(bid, data, size) == AL_FALSE) {
+				_alcDCLockContext();
+				_alDCSetError(AL_INVALID_OPERATION);
+				_alcDCUnlockContext();
+			}
+			return;
+			break;
+#endif /* ENABLE_EXTENSION_AL_EXT_VORBIS */
+		case AL_FORMAT_WAVE_EXT:
+		case AL_FORMAT_MONO8:
+		case AL_FORMAT_MONO16:
+		case AL_FORMAT_STEREO8:
+		case AL_FORMAT_STEREO16:
+		case AL_FORMAT_QUAD8_LOKI:
+		case AL_FORMAT_QUAD16_LOKI:
+		case AL_FORMAT_IMA_ADPCM_MONO16_EXT:
+		case AL_FORMAT_IMA_ADPCM_STEREO16_EXT:
+			break;
+		default:
+			_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+				"alBufferData: unknown format 0x%x", format);
+			_alcDCLockContext();
+			_alDCSetError(AL_INVALID_VALUE);
+			_alcDCUnlockContext();
+			return;
+			break;
+	}
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer(bid);
+	if(buf == NULL) {
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+		      "alBufferData: buffer id %d not valid",
+		      bid);
+
+		_alcDCLockContext();
+		_alDCSetError(AL_INVALID_NAME);
+		_alcDCUnlockContext();
+
+		_alUnlockBuffer();
+		return;
+	}
+
+	if(buf->flags & ALB_STREAMING) {
+		/* Streaming buffers cannot use alBufferData */
+		_alcDCLockContext();
+		_alDCSetError(AL_INVALID_OPERATION);
+		_alcDCUnlockContext();
+
+		_alUnlockBuffer();
+
+		return;
+	}
+
+	if(buf->flags & ALB_CALLBACK) {
+		/* If this was previously a callback buffer,
+		 * reset it.
+		 */
+		buf->flags &= ~ALB_CALLBACK;
+	}
+
+	tformat = buf->format;
+	tfreq   = buf->frequency;
+
+	_alUnlockBuffer();
+
+	cdata = _alBufferCanonizeData(format,
+				      data,
+				      size,
+				      freq,
+				      tformat,
+				      tfreq,
+				      &retsize,
+				      AL_FALSE);
+
+	if(cdata == NULL) {
+		/*  _alBufferCanonize Data should set error */
+		return;
+	}
+
+	/*
+	 * alter buffer's data.
+	 */
+	_alLockBuffer();
+
+	if(buf->size < retsize)
+	{
+		void *temp_copies[_ALC_MAX_CHANNELS] = { NULL };
+		ALboolean success = AL_TRUE;
+
+		/* don't use realloc */
+		_alBufferFreeOrigBuffers(buf);
+
+		for(i = 0; i < _alGetChannelsFromFormat(buf->format); i++)
+		{
+			temp_copies[i] = malloc(retsize);
+			success = (temp_copies[i] != NULL) ? AL_TRUE : AL_FALSE;
+		}
+
+		if(!success)
+		{
+			free(cdata);
+
+			for(i = 0; i < _alGetChannelsFromFormat(buf->format); i++)
+			{
+				free(temp_copies[i]);
+			}
+
+			/* JIV FIXME: lock context */
+			_alcDCLockContext();
+			_alDCSetError(AL_OUT_OF_MEMORY);
+			_alcDCUnlockContext();
+
+			_alUnlockBuffer();
+
+			return;
+		}
+
+		switch(_alGetChannelsFromFormat(buf->format))
+		{
+			case 1:
+			  for(i = 0; i < elementsof(buf->orig_buffers); i++)
+			  {
+				  buf->orig_buffers[i] = temp_copies[0];
+			  }
+
+			  break;
+			case 2:
+			  for(i = 0; i < elementsof(buf->orig_buffers); i += 2)
+			  {
+				  buf->orig_buffers[i]   = temp_copies[0];
+				  buf->orig_buffers[i+1] = temp_copies[1];
+			  }
+
+			  break;
+			case 4:
+			  assert(elementsof(buf->orig_buffers) >= 4);
+			  for(i = 0; i < elementsof(buf->orig_buffers); i += 4)
+			  {
+				  buf->orig_buffers[i]   = temp_copies[0];
+				  buf->orig_buffers[i+1] = temp_copies[1];
+				  buf->orig_buffers[i+2] = temp_copies[2];
+				  buf->orig_buffers[i+3] = temp_copies[3];
+			  }
+			  break;
+			case 6:
+			  assert(elementsof(buf->orig_buffers) >= 6);
+			  for(i = 0; i < elementsof(buf->orig_buffers); i += 6)
+			  {
+				  buf->orig_buffers[i]   = temp_copies[0];
+				  buf->orig_buffers[i+1] = temp_copies[1];
+				  buf->orig_buffers[i+2] = temp_copies[2];
+				  buf->orig_buffers[i+3] = temp_copies[3];
+				  buf->orig_buffers[i+4] = temp_copies[4];
+				  buf->orig_buffers[i+5] = temp_copies[5];
+			  }
+
+			  break;
+			default:
+			  /* well this is weird */
+			  assert(0);
+			  break;
+		}
+	}
+
+	_alMonoify((ALshort **) buf->orig_buffers,
+		   cdata,
+		   retsize / _alGetChannelsFromFormat(tformat),
+		   buf->num_buffers, _alGetChannelsFromFormat(tformat));
+
+	buf->size = retsize / _alGetChannelsFromFormat(tformat);
+
+	_alUnlockBuffer();
+
+	free(cdata);
+
+	return;
+}
+
+/*
+ * _alIsBuffer( ALuint bid )
+ *
+ * Non locking version of alIsBuffer.
+ *
+ * assumes locked buffers
+ */
+ALboolean _alIsBuffer( ALuint bid ) {
+	AL_buffer *buf;
+	ALboolean retval = AL_TRUE;
+
+	buf = _alGetBuffer( bid );
+	if ( !buf || (buf->flags & ALB_PENDING_DELETE) ) {
+		retval = AL_FALSE;
+	}
+
+	return retval;
+}
+
+/*
+ *_alGetBuffer( ALuint bid ).
+ *
+ * Returns pointer to the AL_buffer with buffer name bid, or NULL if bid in
+ * invalid.
+ *
+ * assumes that buffers are locked
+ */
+AL_buffer *_alGetBuffer( ALuint bid ) {
+	int bindex;
+
+	bindex = bpool_bid_to_index( &buf_pool, bid );
+	if(bindex < 0) {
+		/* invalid bid */
+		return NULL;
+	}
+
+	if(bindex >= (int) buf_pool.size) {
+		/* buffer id too big */
+		return NULL;
+	}
+
+	if(buf_pool.pool[bindex].inuse == AL_FALSE) {
+		return NULL;
+	}
+
+	return bpool_index(&buf_pool, bid);
+}
+
+/*
+ * _alInitBuffers( void )
+ *
+ * Performs global initialization of buffer specific data
+ * structures.
+ *
+ * Doesn't do much.  No default size, so we just initialize
+ * the mutex.
+ */
+ALboolean _alInitBuffers( void )
+{
+	buf_mutex = _alCreateMutex();
+
+	return AL_TRUE;
+}
+
+/*
+ * _alGetBufferFromSid( ALuint cid, ALuint sid )
+ *
+ * Retrieves a pointer to the AL_buffer (not the buffer id) associated with
+ * the source with name sid ( from context with name cid), or NULL if cid, sid
+ * are invalid or if sid does not have its buffer attribute set.
+ *
+ * assumes locked context
+ */
+AL_buffer *_alGetBufferFromSid( ALuint cid, ALuint sid ) {
+	AL_buffer *retval;
+	AL_source *src;
+	ALuint *buffid;
+
+	src = _alGetSource( cid, sid );
+	if(src == NULL) {
+		return NULL;
+	}
+
+	buffid = _alGetSourceParam( src, AL_BUFFER );
+	if( buffid == NULL ) {
+		return NULL;
+	}
+
+	_alLockBuffer();
+
+	retval = _alGetBuffer( *buffid );
+
+	_alUnlockBuffer();
+
+	return retval;
+}
+
+/*
+ * ALvoid *_alBufferCanonizeData( ALenum format,
+ *                              const ALvoid *data, ALuint size, ALuint freq,
+ *                              ALenum t_format, ALuint t_freq,
+ *                              ALuint *retsize,
+ *                              ALenum should_use_passed_data )
+ *
+ * Put data in canonical format, setting retsize and returning a newly
+ * alloced memory.
+ *
+ * If should_use_passed_data is set to AL_TRUE, the data will
+ * be converted (if possible) in place.
+ *
+ * Returns NULL on error.
+ *
+ * assumes locked buffers.
+ */
+ALvoid *_alBufferCanonizeData( ALenum format,
+			     const ALvoid *data, ALuint size, ALuint freq,
+			     ALenum t_format, ALuint t_freq,
+			     ALuint *retsize,
+			     ALenum should_use_passed_data ) {
+	if(format < 0) {
+		return NULL;
+	}
+
+	return _alConvert(data, format, size, freq, t_format, t_freq,
+			  retsize, should_use_passed_data);
+}
+
+/*
+ * _alDestroyBuffer( void *bufp )
+ *
+ * _alDestroyBuffer is passed an AL_buffer pointer, masquerading as a void
+ * pointer, and frees the data structures internal to the AL_buffer, but
+ * not the buffer itself.
+ *
+ * This is called by bpool_dealloc.  It shouldn't be called my anything else.
+ */
+static void _alDestroyBuffer( void *bufp ) {
+	AL_buffer *buf = (AL_buffer *) bufp;
+
+	if(_alBufferIsCallback( buf ) == AL_TRUE) {
+		/*
+	 	 * alut decoders need to be informed of
+	 	 * buffer destruction
+	 	 */
+		_alBufferDestroyCallbackBuffer(buf);
+		buf->destroy_buffer_callback = NULL;
+	}
+
+	_alBufferFreeOrigBuffers(buf);
+
+	free( buf->queue_list.sids );
+	free( buf->current_list.sids );
+
+	buf->queue_list.sids = NULL;
+	buf->current_list.sids = NULL;
+
+	buf->queue_list.size   = buf->queue_list.items = 0;
+	buf->current_list.size = buf->current_list.items = 0;
+
+	/* don't free bufp, let the caller do it if needed */
+
+	return;
+}
+
+/*
+ * _alDestroyBuffers( void )
+ *
+ *  Destroy all buffers, freeing all data associated with
+ *  each buffer.
+ */
+void _alDestroyBuffers( void ) {
+	bpool_free( &buf_pool, _alDestroyBuffer );
+	bpool_init( &buf_pool );
+
+	_alDestroyMutex( buf_mutex );
+
+	buf_mutex = NULL;
+
+	return;
+}
+
+/*
+ * FL_alLockBuffer(UNUSED(const char *fn), UNUSED(int ln))
+ *
+ * Locks the buffer mutex, passing fn and ln to _alLockPrintf for debugging
+ * purposes.
+ */
+ALboolean FL_alLockBuffer(UNUSED(const char *fn), UNUSED(int ln)) {
+	_alLockPrintf("_alLockBuffer", fn, ln);
+
+	if( buf_mutex == NULL ) {
+		return AL_FALSE;
+	}
+
+	_alLockMutex( buf_mutex );
+
+	return AL_TRUE;
+}
+
+/*
+ * FL_alUnlockBuffer(UNUSED(const char *fn), UNUSED(int ln))
+ *
+ * Unlocks the buffer mutex, passing fn and ln to _alLockPrintf for debugging
+ * purposes.
+ */
+ALboolean FL_alUnlockBuffer(UNUSED(const char *fn), UNUSED(int ln)) {
+	_alLockPrintf("_alUnlockBuffer", fn, ln);
+
+	if(buf_mutex == NULL) {
+		return AL_FALSE;
+	}
+
+	_alUnlockMutex(buf_mutex);
+
+	return AL_TRUE;
+}
+
+/*
+ * _alNumBufferHint( ALuint nb )
+ *
+ * Resize buf_pool to contain space for at least nb buffers.  A performance
+ * hint best excercised before creating buffers.
+ */
+void _alNumBufferHint( ALuint nb ) {
+	_alLockBuffer();
+
+	bpool_resize( &buf_pool, nb );
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ * _alBidIsStreaming( ALuint bid )
+ *
+ * Returns AL_TRUE if the buffer named by bid was generated by
+ * alGenStreamingBuffers_LOKI, AL_FALSE otherwise.
+ *
+ * assumes locked buffer
+ */
+ALboolean _alBidIsStreaming( ALuint bid ) {
+	AL_buffer *buf;
+	ALboolean retval = AL_FALSE;
+
+	buf = _alGetBuffer( bid );
+	if(buf != NULL) {
+		if(buf->flags & ALB_STREAMING) {
+			retval = AL_TRUE;
+		}
+	}
+
+	return retval;
+}
+
+/*
+ * _alBidIsCallback( ALuint bid )
+ *
+ * Returns AL_TRUE if the buffer named by bid has been used with
+ * alBufferDataWithCallback_LOKI, AL_FALSE if bid does not refer to a valid
+ * bid or has not been used with such a call.
+ *
+ * assumes locked buffer
+ */
+ALboolean _alBidIsCallback( ALuint bid ) {
+	AL_buffer *buf;
+
+	buf = _alGetBuffer(bid);
+
+	return _alBufferIsCallback(buf);
+}
+
+/*
+ * _alBufferIsCallback( AL_buffer *buf )
+ *
+ * Returns AL_TRUE if the AL_buffer *buf been used with
+ * alBufferDataWithCallback_LOKI, AL_FALSE otherwise.
+ *
+ * assumes locked buffer
+ */
+ALboolean _alBufferIsCallback( AL_buffer *buf ) {
+	ALboolean retval = AL_FALSE;
+
+	if(buf != NULL) {
+		if(buf->flags & ALB_CALLBACK) {
+			retval = AL_TRUE;
+		}
+	}
+
+	return retval;
+}
+
+/*
+ * _alBufferDataWithCallback_LOKI( ALuint bid,
+ *                                 int (*callback)( ALuint sid,
+ *                                                  ALuint bid,
+ *                                 ALshort *outdata,
+ *                                 ALenum format,
+ *                                 ALint freq,
+ *                                 ALint samples ),
+ *                                 DestroyCallback_LOKI d_sid,
+ *                                 DestroyCallback_LOKI d_bid )
+ *
+ * Associates the AL_buffer named by bid with a callback.  This is somewhat
+ * equivilant to calling alBufferData( bid, ... ), except that instead of
+ * getting all the data at once, whenever the buffer is required to provide
+ * data, it relies on the callback.
+ *
+ * The destroyer callbacks are used to update data structures.  They are not
+ * available publically, and are only used by internal functions ( in alut,
+ * mostly ).
+ */
+void _alBufferDataWithCallback_LOKI( ALuint bid,
+				     int (*callback)( ALuint sid,
+						      ALuint bid,
+						      ALshort *outdata,
+						      ALenum format,
+						      ALint freq,
+						      ALint samples ),
+				     DestroyCallback_LOKI d_sid,
+				     DestroyCallback_LOKI d_bid ) {
+	AL_buffer *buf;
+
+	_alLockBuffer();
+	buf = _alGetBuffer( bid );
+
+	if(buf == NULL) {
+		/* bid was invalid */
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+			"Invalid buffer id %d", bid);
+
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_NAME );
+		_alcDCUnlockContext();
+
+		_alUnlockBuffer();
+
+		return;
+	}
+
+	_alBufferFreeOrigBuffers(buf);
+
+
+	buf->size     = 0;
+	buf->callback = callback;
+	buf->flags    |= ALB_CALLBACK;
+
+	buf->destroy_buffer_callback = d_bid;
+	buf->destroy_source_callback = d_sid;
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ * _alBufferDestroyCallbackBuffer( AL_buffer *buf )
+ *
+ * Executes the buffer completion callback associated with buf, if there is
+ * one.
+ *
+ * assumes locked buffers
+ */
+static void _alBufferDestroyCallbackBuffer( AL_buffer *buf ) {
+	if(buf == NULL) {
+		return;
+	}
+
+	if(buf->destroy_buffer_callback != NULL) {
+		buf->destroy_buffer_callback(buf->bid);
+	}
+
+	return;
+}
+
+/*
+ * _alBidCallDestroyCallbackSource( ALuint sid )
+ *
+ * Executes the source completion callback from the buffer associated with
+ * sid, if there is one.
+ *
+ * assumes locked context
+ */
+void _alBidCallDestroyCallbackSource( ALuint sid ) {
+	AL_buffer *buf;
+	AL_source *src;
+	ALuint *bid;
+
+	src = _alDCGetSource( sid );
+	if(src == NULL) {
+		return;
+	}
+
+	bid = _alGetSourceParam( src, AL_BUFFER );
+	if(bid == NULL) {
+		return;
+	}
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer( *bid );
+	if(buf == NULL) {
+		_alUnlockBuffer();
+		return;
+	}
+
+	if(buf->destroy_source_callback != NULL) {
+		buf->destroy_source_callback( sid );
+	}
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ * ALvoid *_alConvert( const ALvoid *data,
+ *			ALenum f_format, ALuint f_size, ALuint f_freq,
+ *			ALenum t_format, ALuint t_freq, ALuint *retsize,
+ *			ALenum should_use_passed_data);
+ *
+ * _alConvert takes the passed data and converts it from it's current
+ * format (f_format) to the desired format (t_format), etc, returning
+ * the converted data and setting retsize to the new size of the
+ * converted data.  The passed data must either be raw PCM data or
+ * must correspond with one of the headered extension formats.
+ *
+ * If should_use_passed_data is set to AL_TRUE, then _alConvert will
+ * attempt to do the conversion in place.  Otherwise, new data will
+ * be allocated for the purpose.
+ *
+ * Returns NULL on error.
+ *
+ * assumes locked buffers
+ */
+static ALvoid *_alConvert( const ALvoid *data,
+			 ALenum f_format, ALuint f_size, ALuint f_freq,
+			 ALenum t_format, ALuint t_freq, ALuint *retsize,
+			 ALenum should_use_passed_data ) {
+	ALvoid *compressed = NULL;
+	ALvoid *retval = NULL;
+	acAudioCVT s16le;
+
+	if((f_format == t_format) && (f_freq == t_freq)) {
+		/*
+		 * no conversion needed.
+		 */
+		*retsize = f_size;
+
+		if( should_use_passed_data == AL_TRUE ) {
+			_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+				 "_alConvert: no conversion needed: %p", data);
+
+			return (ALvoid *)data;
+		}
+
+		retval = malloc( f_size );
+		if( retval == NULL ) {
+			_alcDCLockContext();
+			_alDCSetError( AL_OUT_OF_MEMORY );
+			_alcDCUnlockContext();
+
+			return NULL;
+		}
+
+		memcpy( retval, data, f_size );
+
+		return retval;
+	}
+
+	/*
+	 * Compressed auto formats like IMA_ADPCM get converted in
+	 * full here.
+	 */
+	if(_al_RAWFORMAT(f_format) == AL_FALSE) {
+		ALushort acfmt;
+		ALushort achan;
+		ALushort acfreq;
+
+		switch(f_format) {
+			case AL_FORMAT_IMA_ADPCM_MONO16_EXT:
+			case AL_FORMAT_IMA_ADPCM_STEREO16_EXT:
+			case AL_FORMAT_WAVE_EXT:
+				acLoadWAV(data, &f_size, &retval, &acfmt, &achan, &acfreq);
+
+				f_format = _al_AC2ALFMT(acfmt, achan);
+				f_freq   = acfreq;
+				break;
+			default:
+			break;
+		}
+
+		data = compressed = retval;
+	}
+
+	_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+		"_alConvert [f_size|f_channels|f_freq] [%d|%d|%d]",
+		f_size, _alGetChannelsFromFormat(f_format), f_freq);
+
+	if(_alGetChannelsFromFormat(f_format) != 0) {
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"_alConvert [t_channels|f_channels|t/f] [%d|%d|%d]",
+			_alGetChannelsFromFormat(t_format),
+			_alGetChannelsFromFormat(f_format),
+			_alGetChannelsFromFormat(t_format) /
+			_alGetChannelsFromFormat(f_format));
+	}
+
+	if(f_freq != 0) {
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"_alConvert [t_freq|f_freq|t/f] [%d|%d|%d]",
+			t_freq, f_freq, t_freq/f_freq);
+	}
+
+	if(f_format != 0) {
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"_alConvert [t_bits|f_bits|t/f] [%d|%d|%d]",
+			_alGetBitsFromFormat(t_format),
+			_alGetBitsFromFormat(f_format),
+			(_alGetBitsFromFormat(t_format) / _alGetBitsFromFormat(f_format)));
+	}
+
+	_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+		"_alConvert f|c|s [0x%x|%d|%d] -> [0x%x|%d|%d]",
+		/* from */
+		f_format, _alGetChannelsFromFormat(f_format), f_freq,
+		/* to */
+		t_format,
+		_alGetChannelsFromFormat(t_format),
+		t_freq);
+
+	if(acBuildAudioCVT(&s16le,
+		/* from */
+		_al_AL2ACFMT(f_format),
+		_alGetChannelsFromFormat(f_format),
+		f_freq,
+
+		/* to */
+		_al_AL2ACFMT(t_format),
+		_alGetChannelsFromFormat(t_format),
+		t_freq) < 0) {
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"Couldn't build audio convertion data structure.");
+
+		free(compressed);
+
+		return NULL;
+	}
+
+	_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+		"_alConvert [len|newlen] [%d|%d]",
+		f_size, f_size * s16le.len_mult);
+
+	if(should_use_passed_data == AL_TRUE) {
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"Converting with passed data = %p", data);
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"len_multi = %d", s16le.len_mult);
+
+		s16le.buf = retval = (ALvoid *)data;
+	} else {
+		/* alloc space for buffer if we aren't using the original */
+
+		s16le.buf = retval = malloc(f_size * s16le.len_mult);
+		if(retval == NULL) {
+			_alDCSetError(AL_OUT_OF_MEMORY);
+
+			free( compressed );
+			return NULL;
+		}
+		memcpy(retval, data, f_size);
+	}
+
+	s16le.len = f_size;
+
+	if(acConvertAudio(&s16le) < 0) {
+		_alDebug( ALD_CONVERT, __FILE__, __LINE__,
+			"Couldn't execute conversion into canon.");
+
+		free( compressed );
+
+		return NULL;
+	}
+
+	/* set return size */
+	*retsize = s16le.len_cvt;
+
+	if( s16le.buf != compressed ) {
+		/*
+		 * this comparison is false iff we are using a
+		 * compressed/headered format that requires us to allocate
+		 * a temporary buffer.
+		 */
+		free( compressed );
+	}
+
+	return s16le.buf;
+}
+
+/*
+ * _alBidRemoveQueueRef( ALuint bid, ALuint sid )
+ *
+ * removes a queue reference to the buffer named by bid.  The first queue
+ * reference refering to sid will be removed.
+ *
+ */
+void _alBidRemoveQueueRef( ALuint bid, ALuint sid ) {
+	AL_buffer *buf;
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer( bid );
+	if( buf == NULL ) {
+		/* invalid name */
+		_alUnlockBuffer();
+		return;
+	}
+
+	_alBufferRemoveQueueRef( buf, sid );
+
+	if( buf->flags & ALB_PENDING_DELETE ) {
+		/* do deffered deletion */
+		if( _alGetBidState(bid) == AL_UNUSED ) {
+			bpool_dealloc(&buf_pool, bid, _alDestroyBuffer);
+		}
+	}
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ * _alBidRemoveCurrentRef( ALuint bid, ALuint sid )
+ *
+ * removes a current reference to the buffer named by bid.  The first current
+ * reference refering to sid will be removed.
+ */
+void _alBidRemoveCurrentRef(ALuint bid, ALuint sid) {
+	AL_buffer *buf;
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer(bid);
+	if(buf == NULL) {
+		/* invalid name */
+		_alUnlockBuffer();
+		return;
+	}
+
+	_alBufferRemoveCurrentRef( buf, sid );
+
+	if( buf->flags & ALB_PENDING_DELETE ) {
+		/* do deffered deletion */
+		if( _alGetBidState(bid) == AL_UNUSED ) {
+			bpool_dealloc(&buf_pool, bid, _alDestroyBuffer);
+		}
+	}
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ * _alBidAddQueueRef( ALuint bid, ALuint sid )
+ *
+ * adds a queue reference to the buffer named by bid.  The queue reference
+ * refers to the source named by sid.
+ *
+ * If no current reference is added, and this queue reference is not deleted,
+ * _alGet{Bid,Buffer}State will return AL_PENDING.
+ *
+ */
+void _alBidAddQueueRef(ALuint bid, ALuint sid) {
+	AL_buffer *buf;
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer( bid );
+	if(buf == NULL) {
+		/* invalid name, set error elsewhere? */
+		_alUnlockBuffer();
+
+		return;
+	}
+
+	_alBufferAddQueueRef( buf, sid );
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ * _alBidAddCurrentRef( ALuint bid, ALuint sid )
+ *
+ * adds a current reference to the buffer named by bid.  The reference refers
+ * to the source named by sid.
+ *
+ * If this reference is not removed, _alGet{Bid,Buffer}state will return
+ * AL_PROCESSED.
+ */
+void _alBidAddCurrentRef( ALuint bid, ALuint sid ) {
+	AL_buffer *buf;
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer( bid );
+	if(buf == NULL) {
+		/* invalid name */
+		_alUnlockBuffer();
+		return;
+	}
+
+	_alBufferAddCurrentRef( buf, sid );
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ * _alBufferAddQueueRef( AL_buffer *buf, ALuint sid )
+ *
+ * adds a queue reference to the AL_buffer *buf.  The queue reference refers
+ * to the source named by sid.
+ *
+ * If no current reference is added, and this queue reference is not deleted,
+ * _alGet{Bid,Buffer}State will return AL_PENDING.
+ *
+ * assumes locked context, buffers
+ */
+static void _alBufferAddQueueRef( AL_buffer *buf, ALuint sid ) {
+	ALvoid *temp;
+	ALuint newsize = buf->queue_list.size;
+
+	if(buf->queue_list.size <= buf->queue_list.items) {
+		/* resize */
+		newsize *= 2;
+		newsize += 1;
+		temp = realloc(buf->queue_list.sids, newsize * sizeof *buf->queue_list.sids);
+		if(temp == NULL) {
+			/* well la-di-da */
+			return;
+		}
+
+		buf->queue_list.sids = temp;
+		buf->queue_list.size = newsize;
+	}
+
+	buf->queue_list.sids[buf->queue_list.items++] = sid;
+
+	return;
+}
+
+/*
+ * _alBufferAddCurrentRef( AL_buffer *buf, ALuint sid )
+ *
+ * adds a current reference to the AL_buffer *buf.  The current reference refers
+ * to the source named by sid.
+ *
+ * If this current reference is not removed, _alGet{Bid,Buffer}State will
+ * return AL_PENDING.
+ *
+ * assumes locked context, buffers
+ */
+static void _alBufferAddCurrentRef( AL_buffer *buf, ALuint sid ) {
+	ALvoid *temp;
+	ALuint newsize = buf->current_list.size;
+
+	if( buf->current_list.size <= buf->current_list.items ) {
+		/* resize */
+		newsize *= 2;
+		newsize += 1;
+
+		temp = realloc( buf->current_list.sids, newsize * sizeof *buf->current_list.sids );
+		if(temp == NULL) {
+			/* well la-di-da */
+			return;
+		}
+
+		buf->current_list.sids = temp;
+		buf->current_list.size = newsize;
+	}
+
+	buf->current_list.sids[buf->current_list.items++] = sid;
+
+	return;
+}
+
+/*
+ * _alBufferRemoveQueueRef( AL_buffer *buf, ALuint sid )
+ *
+ * removes the first queue reference from the AL_buffer *buf that refers to
+ * sid.
+ *
+ * assumes locked context, buffer
+ */
+static void _alBufferRemoveQueueRef( AL_buffer *buf, ALuint sid ) {
+	ALuint i;
+
+	for(i = 0; i < buf->queue_list.items; i++) {
+		if(buf->queue_list.sids[i] == sid) {
+			buf->queue_list.items--;
+			buf->queue_list.sids[i] = buf->queue_list.sids[buf->queue_list.items];
+
+			return;
+		}
+	}
+
+	return;
+}
+
+/*
+ * _alBufferRemoveCurrentRef( AL_buffer *buf, ALuint sid )
+ *
+ * removes the first current reference from the AL_buffer *buf that refers to
+ * sid.
+ *
+ * assumes locked context, buffers
+ */
+static void _alBufferRemoveCurrentRef( AL_buffer *buf, ALuint sid ) {
+	ALuint i;
+
+	for(i = 0; i < buf->current_list.items; i++) {
+		if(buf->current_list.sids[i] == sid) {
+			buf->current_list.items--;
+			buf->current_list.sids[i] = buf->current_list.sids[buf->current_list.items];
+
+			return;
+		}
+	}
+
+	return;
+}
+
+/*
+ * _alGetBidState( ALuint bid )
+ *
+ * Returns the state (one of AL_UNUSED, AL_PROCESSED, AL_PENDING) associated
+ * with a buffer.
+ *
+ * assumes locked buffers
+ */
+ALenum _alGetBidState( ALuint bid ) {
+	ALenum retval = AL_UNUSED;
+	AL_buffer *buf;
+
+	buf = _alGetBuffer( bid );
+	if(buf != NULL) {
+		retval = _alGetBufferState( buf );
+	}
+
+	return retval;
+}
+
+/*
+ * _alGetBufferState( AL_buffer *buffer )
+ *
+ * Returns the state associated with the AL_buffer *buffer.  If there is even
+ * one current ref, AL_PROCESED is returned.  If there are no current
+ * references and one queued ref, AL_PENDING is returned.  If there are no
+ * current or queued references, AL_UNUSED is returned.
+ *
+ * assumes locked buffers.
+ */
+ALenum _alGetBufferState( AL_buffer *buffer )
+{
+	if(buffer->current_list.items > 0)
+	{
+		return AL_PROCESSED;
+	}
+
+	if(buffer->queue_list.items > 0)
+	{
+		return AL_PENDING;
+	}
+
+	return AL_UNUSED;
+}
+
+
+void _alBufferFreeOrigBuffers(AL_buffer *buf)
+{
+	ALuint i, j;
+	ALvoid *temp;
+
+	/* sort */
+	for(i = 0; i < elementsof(buf->orig_buffers); i++)
+	{
+		for(j = i+1; j < elementsof(buf->orig_buffers); j++)
+		{
+			if(buf->orig_buffers[i] > buf->orig_buffers[j])
+			{
+				temp = buf->orig_buffers[i];
+				buf->orig_buffers[i] = buf->orig_buffers[j];
+				buf->orig_buffers[j] = temp;
+			}
+		}
+	}
+
+	/* uniq */
+	for(i = 0; i < elementsof(buf->orig_buffers) - 1; i++)
+	{
+		if(buf->orig_buffers[i] == buf->orig_buffers[i+1])
+		{
+			buf->orig_buffers[i] = NULL;
+		}
+	}
+
+
+	/* free */
+	for(i = 0; i < elementsof(buf->orig_buffers); i++)
+	{
+		free(buf->orig_buffers[i]);
+		buf->orig_buffers[i] = NULL;
+	}
+}
+
+/* binary compatibility function */
+ALsizei alBufferAppendData( ALuint   buffer,
+                            ALenum   format,
+                            void*    data,
+		            ALsizei  osamps,
+                            ALsizei  freq) {
+	return alBufferAppendData_LOKI(buffer, format, data, osamps, freq);
+}
+
+#define MAX_BUFFER_NUM_VALUES 1
+
+static ALint
+numValuesForAttribute( ALenum param )
+{
+	switch (param) {
+	case AL_FREQUENCY:
+	case AL_SIZE:
+	case AL_BITS:
+	case AL_CHANNELS:
+		return 1;
+	default:
+		return 0;
+	}
+}
+
+static void
+setBufferAttributef( ALuint bid, ALenum param, const ALfloat *values, ALint numValues)
+{
+	_alLockBuffer();
+
+	if (!alIsBuffer(bid)) {
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_NAME );
+		_alcDCUnlockContext();
+		_alUnlockBuffer();
+		return;
+	}
+
+	if (numValues != numValuesForAttribute(param)) {
+		_alcDCLockContext();
+		_alDCSetError(AL_INVALID_ENUM);
+		_alcDCUnlockContext();
+		_alUnlockBuffer();
+		return;
+	}
+
+	if( values == NULL ) {
+		_alcDCLockContext();
+		_alDCSetError(AL_INVALID_VALUE);
+		_alcDCUnlockContext();
+		_alUnlockBuffer();
+		return;
+	}
+
+	switch (param) {
+	default:
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_ENUM );
+		_alcDCUnlockContext();
+		break;
+	}
+
+	_alUnlockBuffer();
+}
+
+static void
+setBufferAttributei( ALuint bid, ALenum param, const ALint *intValues, ALint numValues)
+{
+	ALfloat floatValues[MAX_BUFFER_NUM_VALUES];
+	int i;
+	for (i = 0; i < numValues; i++) {
+		floatValues[i] = (ALfloat)intValues[i];
+	}
+	setBufferAttributef(bid, param, floatValues, numValues);
+}
+
+void
+alBufferf( ALuint bid, ALenum param, ALfloat value )
+{
+	setBufferAttributef(bid, param, &value, 1);
+}
+
+void
+alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 )
+{
+	ALfloat values[3];
+	values[0] = value1;
+	values[1] = value2;
+	values[2] = value3;
+	setBufferAttributef(bid, param, values, 3);
+}
+
+void
+alBufferfv( ALuint bid, ALenum param, const ALfloat *values )
+{
+	setBufferAttributef(bid, param, values, numValuesForAttribute(param));
+}
+
+void
+alBufferi( ALuint bid, ALenum param, ALint value )
+{
+	setBufferAttributei(bid, param, &value, 1);
+}
+
+void
+alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 )
+{
+	ALint values[3];
+	values[0] = value1;
+	values[1] = value2;
+	values[2] = value3;
+	setBufferAttributei(bid, param, values, 3);
+}
+
+void
+alBufferiv( ALuint bid, ALenum param, const ALint *values )
+{
+	setBufferAttributei(bid, param, values, numValuesForAttribute(param));
+}
+
+static ALboolean
+getBufferAttribute( ALuint bid, ALenum param, ALfloat *values, ALint numValues )
+{
+	ALboolean ok = AL_FALSE;
+	AL_buffer *buf;
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer(bid);
+	if (buf == NULL) {
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_NAME );
+		_alcDCUnlockContext();
+		_alUnlockBuffer();
+		return ok;
+	}
+
+	if (numValues != numValuesForAttribute(param)) {
+		_alcDCLockContext();
+		_alDCSetError(AL_INVALID_ENUM);
+		_alcDCUnlockContext();
+		_alUnlockBuffer();
+		return ok;
+	}
+
+	if( values == NULL ) {
+		_alcDCLockContext();
+		_alDCSetError(AL_INVALID_VALUE);
+		_alcDCUnlockContext();
+		_alUnlockBuffer();
+		return ok;
+	}
+
+	switch( param ) {
+
+	case AL_FREQUENCY:
+		values[0] = (ALfloat)buf->frequency;
+		ok = AL_TRUE;
+		break;
+
+	case AL_SIZE:
+		values[0] = (ALfloat)buf->size;
+		ok = AL_TRUE;
+		break;
+
+	case AL_BITS:
+		values[0] = _alGetBitsFromFormat( buf->format );
+		ok = AL_TRUE;
+		break;
+
+	case AL_CHANNELS:
+		values[0] = _alGetChannelsFromFormat( buf->format );
+		ok = AL_TRUE;
+		break;
+
+	default:
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_ENUM );
+		_alcDCUnlockContext();
+		break;
+	}
+
+	_alUnlockBuffer();
+	return ok;
+}
+
+void
+alGetBufferf( ALuint bid, ALenum param, ALfloat *value )
+{
+	getBufferAttribute(bid, param, value, 1);
+}
+
+void
+alGetBuffer3f( ALuint bid, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3)
+{
+	ALfloat floatValues[3];
+	if (getBufferAttribute(bid, param, floatValues, 3)) {
+		*value1 = floatValues[0];
+		*value2 = floatValues[1];
+		*value3 = floatValues[2];
+	}
+}
+
+void
+alGetBufferfv( ALuint bid, ALenum param, ALfloat *values )
+{
+	getBufferAttribute(bid, param, values, numValuesForAttribute(param));
+}
+
+void
+alGetBufferi( ALuint bid, ALenum param, ALint *value )
+{
+	ALfloat floatValues[1];
+	if (getBufferAttribute(bid, param, floatValues, 1)) {
+		*value = floatValues[0];
+	}
+}
+
+void
+alGetBuffer3i( ALuint bid, ALenum param, ALint *value1, ALint *value2, ALint *value3)
+{
+	ALfloat floatValues[3];
+	if (getBufferAttribute(bid, param, floatValues, 3)) {
+		*value1 = (ALint)floatValues[0];
+		*value2 = (ALint)floatValues[1];
+		*value3 = (ALint)floatValues[2];
+	}
+}
+
+void
+alGetBufferiv( ALuint bid, ALenum param, ALint *values )
+{
+	ALfloat floatValues[MAX_BUFFER_NUM_VALUES];
+	int i;
+	int n = numValuesForAttribute(param);
+	if (getBufferAttribute(bid, param, floatValues, n)) {
+		for (i = 0; i < n; i++) {
+			values[i] = (ALint)floatValues[i];
+		}
+	}
+}
Index: /openal-0.0.8/src/al_buffer.h
===================================================================
--- /openal-0.0.8/src/al_buffer.h	(revision 17)
+++ /openal-0.0.8/src/al_buffer.h	(revision 17)
@@ -0,0 +1,192 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_buffer.h
+ *
+ * Prototypes, macros and definitions related to the creation and
+ * management of buffers.
+ *
+ */
+#ifndef _AL_BUFFER_H_
+#define _AL_BUFFER_H_
+
+#include "al_types.h"
+
+/*
+ * Initialize data structures common to all buffers.  Returns AL_TRUE if
+ * initialization was successful, AL_FALSE otherwise.
+ */
+ALboolean _alInitBuffers( void );
+
+/*
+ * Destroys data structures created by _alInitBuffers, and any AL_buffer or
+ * bpool objects as well.
+ */
+void _alDestroyBuffers( void );
+
+/*
+ * Non locking version of alIsBuffer.
+ */
+ALboolean _alIsBuffer( ALuint bid );
+
+/*
+ * Returns a pointer to the AL_buffer object named by id.  If id does not name
+ * a buffer, NULL is returned.
+ */
+AL_buffer *_alGetBuffer( ALuint id );
+
+/*
+ * Returns a pointer to the AL_buffer object associated with the source named
+ * by sid from the context named by cid.  If sid in cid is not a valid source,
+ * or is a valid source but does not have its buffer attribute set, NULL is
+ * returned.
+ */
+AL_buffer *_alGetBufferFromSid( ALuint cid, ALuint sid );
+
+
+/**
+ * Buffer State functions
+ */
+
+/*
+ * Returns one member of the set AL_UNUSED, AL_PROCESSED, or AL_PENDING.  If the
+ * AL_buffer named by bid is not being used by a playing source, AL_UNUSED is
+ * returned.  If it is being used by a playing source, but is part of a queue
+ * and is not the current buffer being played, AL_PENDING is returned.
+ * Otherwise, AL_PROCESSED is returned.
+ */
+ALenum _alGetBidState( ALuint bid );
+
+/*
+ * Returns one member of the set AL_UNUSED, AL_PROCESSED, or AL_PENDING.  If the
+ * AL_buffer (buffer) is not being used by a playing source, AL_UNUSED is
+ * returned.  If it is being used by a playing source, but is part of a queue
+ * and is not the current buffer being played, AL_PENDING is returned.
+ * Otherwise, AL_PROCESSED is returned.
+ */
+ALenum _alGetBufferState( AL_buffer *buffer );
+
+/*
+ * adds a queue reference to the buffer named by bid.  The queue reference
+ * refers to the source named by sid.
+ *
+ * If no current reference is added, and this queue reference is not deleted,
+ * _alGet{Bid,Buffer}State will return AL_PENDING.
+ *
+ */
+void _alBidAddQueueRef( ALuint bid, ALuint sid );
+
+/*
+ * removes a queue reference to the buffer named by bid.  The first queue
+ * reference refering to sid will be removed.
+ */
+void _alBidRemoveQueueRef( ALuint bid, ALuint sid );
+
+/*
+ * adds a current reference to the buffer named by bid.  The reference refers
+ * to the source named by sid.
+ *
+ * If this reference is not removed, _alGet{Bid,Buffer}state will return
+ * AL_PROCESSED.
+ */
+void _alBidAddCurrentRef( ALuint bid, ALuint sid );
+
+/*
+ * removes a current reference to the buffer named by bid.  The first current
+ * reference refering to sid will be removed.
+ */
+void _alBidRemoveCurrentRef( ALuint bid, ALuint sid );
+
+/*
+ * Returns AL_TRUE if the AL_buffer named by bid is valid and is a streaming
+ * buffer ( created by alGenStreamingBuffer_LOKI ), AL_FALSE otherwise.
+ */
+ALboolean _alBidIsStreaming( ALuint bid );
+
+/*
+ * Returns AL_TRUE if the AL_buffer named by bid is valid and is a callback
+ * buffer ( has been used with the call alBufferDataWithCallback ), AL_FALSE
+ * otherwise.
+ */
+ALboolean _alBidIsCallback( ALuint bid );
+
+/*
+ * Returns AL_TRUE if the AL_buffer (buffer) is a callback buffer ( has been
+ * used with the call alBufferDataWithCallback ), AL_FALSE otherwise.
+ */
+ALboolean _alBufferIsCallback( AL_buffer *buffer );
+
+
+/*
+ * Free the orig_buffers of buf.  Don't just use free(buf->orig_buffer[n]
+ * because there are duplicates in there.
+ */
+void _alBufferFreeOrigBuffers(AL_buffer *buf);
+
+/*
+ * Reserves space for num_buffers AL_buffer objects.
+ */
+void _alNumBufferHint( ALuint num_buffers );
+
+/*
+ * Associates the AL_buffer named by bid with a callback.  This is somewhat
+ * equivilant to calling alBufferData( bid, ... ), except that instead of
+ * getting all the data at once, whenever the buffer is required to provide
+ * data, it relies on the callback.
+ *
+ * The destroyer callbacks are used to update data structures.  They are not
+ * available publically, and are only used by internal functions ( in alut,
+ * mostly ).
+ */
+void _alBufferDataWithCallback_LOKI( ALuint bid,
+					int (*callback)( ALuint sid,
+							 ALuint bid,
+							 ALshort *outdata,
+							 ALenum format,
+							 ALint freq,
+							 ALint samples ),
+					DestroyCallback_LOKI source_destroyer,
+					DestroyCallback_LOKI buffer_destroyer );
+
+/*
+ * Calls the source-callback-completion notification function for the
+ * buffer associated with the source named by sid.
+ */
+void _alBidCallDestroyCallbackSource( ALuint sid );
+
+/*
+ * Locks the buffer mutex.  fn and ln name the file and line that this call
+ * takes place in, for debugging purposes.
+ */
+ALboolean FL_alLockBuffer( const char *fn, int ln );
+
+/*
+ * Unlocks the buffer mutex.  fn and ln name the file and line that this call
+ * takes place in, for debugging purposes.
+ */
+ALboolean FL_alUnlockBuffer( const char *fn, int ln );
+
+/*
+ * convert data passed from the format specified by the tuple format and
+ * ffreq, into the format specified by tformat and tfreq.  *retsize is set to
+ * the resulting size.
+ *
+ * If should_use_passed_data is AL_TRUE, then the conversion happens
+ * in-place, and the return value is equal to data.  Otherwise, a
+ * new memory region is alloced, and it is the responsibility of the
+ * caller to free it.
+ *
+ * If no conversion is possible, NULL is returned.
+ */
+ALvoid *_alBufferCanonizeData( ALenum format, const ALvoid *data, ALuint size, ALuint freq,
+			     ALenum tformat, ALuint tfreq, ALuint *retsize,
+			     ALenum should_use_passed_data );
+
+/* macros */
+#define _alLockBuffer()       FL_alLockBuffer(__FILE__, __LINE__)
+#define _alUnlockBuffer()     FL_alUnlockBuffer(__FILE__, __LINE__)
+
+#define _alDCGetBufferFromSid(x)                                    \
+	_alGetBufferFromSid((ALuint) _alcCCId, x)
+
+#endif
Index: /openal-0.0.8/src/al_config.c
===================================================================
--- /openal-0.0.8/src/al_config.c	(revision 17)
+++ /openal-0.0.8/src/al_config.c	(revision 17)
@@ -0,0 +1,1430 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_config.c
+ *
+ * Handling of the configuration file and alrc configuration variables.
+ *
+ * FIXME: make thread safe
+ *        needs to be more robust.
+ *        leaks memory
+ *        needs gc
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <ctype.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "al_main.h"
+#include "al_ext.h"
+#include "al_config.h"
+#include "al_error.h"
+#include "al_debug.h"
+
+#ifndef __MORPHOS__
+#define _AL_FNAME "openalrc"
+#else
+#define _AL_FNAME "OpenAL.prefs"
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+#define alrc_cadr(ls) alrc_car(alrc_cdr(ls))
+
+/*
+ * our symbol table definition.  Simple binary tree.
+ */
+typedef struct _AL_SymTab {
+	char str[ALRC_MAXSTRLEN + 1];
+	AL_rctree *datum;
+
+	struct _AL_SymTab *left;
+	struct _AL_SymTab *right;
+} AL_SymTab;
+
+/*
+ * root is our scratch space for evaluating expressions.
+ */
+static AL_rctree *root = NULL;
+
+/*
+ * symbols with global scope.
+ */
+static AL_SymTab *glsyms;
+
+/*
+ * _alOpenRcFile( void );
+ *
+ * Opens any openalrc file and returns its contents.
+ */
+static char *_alOpenRcFile( void );
+
+/*
+ * _alEval( AL_rctree *head )
+ *
+ * Evaluate an expression in AL_rctree form.
+ */
+static AL_rctree *_alEval( AL_rctree *head );
+
+/*
+ * _alSymbolTableAlloc( void )
+ *
+ * Allocate and return a new symbol table object.
+ */
+static AL_SymTab *_alSymbolTableAlloc( void );
+
+/*
+ * _alSymbolTableAdd( AL_SymTab *table,
+ *                    const char *symname,
+ *                    AL_rctree *datum )
+ *
+ * Adds binding for symbol named by str to table, returning the table.
+ */
+static AL_SymTab *_alSymbolTableAdd( AL_SymTab *table,
+					  const char *symname,
+					  AL_rctree *datum );
+
+/*
+ * _alSymbolTableRemove( AL_SymTab *table, const char *sym )
+ *
+ * Removes binding for symbol named by sym from table.
+ */
+static AL_SymTab *_alSymbolTableRemove( AL_SymTab *table, const char *sym );
+
+/*
+ * _alSymbolTableGet( AL_SymTab *head, const char *str )
+ *
+ * Returns the definition associated with the symbol named by str, or NULL if
+ * no such definition exists.
+ */
+static AL_rctree *_alSymbolTableGet( AL_SymTab *head, const char *str );
+
+/*
+ * _alSymbolTableDestroy( AL_SymTab *head )
+ *
+ * Destroys the symbol table head.
+ */
+static void _alSymbolTableDestroy( AL_SymTab *head );
+
+/*
+ * is_string( const char *tokenname )
+ *
+ * Returns AL_TRUE if tokenname describes a string, AL_FALSE otherwise.  A
+ * string in this context means any data contained between two quotation
+ * marks.
+ */
+static ALboolean is_string( const char *tokenname );
+
+/*
+ * is_int( const char *tokenname )
+ *
+ * Returns AL_TRUE if tokenname describes an integer (either base 10 or 16),
+ * AL_FALSE otherwise.
+ */
+static ALboolean is_int( const char *tokenname );
+
+/*
+ * is_float( const char *tokenname )
+ *
+ * Returns AL_TRUE if tokenname describes a float, AL_FALSE otherwise.
+ */
+static ALboolean is_float( const char *tokenname );
+
+/*
+ * is_lispchar( int ch )
+ *
+ * Returns AL_TRUE if ch is ( or ), AL_FALSE otherwise.
+ */
+static ALboolean is_lispchar( int ch );
+
+/*
+ * is_whitespace( int ch )
+ *
+ * Returns AL_TRUE if ch is any form of whitespace, AL_FALSE otherwise.
+ */
+static ALboolean is_whitespace( int ch );
+
+/*
+ * AL_rctree_copy( AL_rctree *src )
+ *
+ * Returns a copy of src, including car and cdr sections.
+ */
+static AL_rctree *AL_rctree_copy( AL_rctree *src );
+
+/*
+ * buildExp( const char *tokenstr, unsigned int *offset )
+ *
+ * Builds an AL_rctree representation of the alrc expression in
+ * tokenstr[*offset], setting *offset to the last scanned position, or NULL if
+ * tokenstr[*offset...] does not describe a valid alrc expression.
+ */
+static AL_rctree *buildExp( const char *tokenstr, unsigned int *offset );
+
+/*
+ * getTokenStr( const char *data, char *retbuf,
+ *              ALuint *offset, ALuint size )
+ *
+ * copies the next alrc token from data[*offset] to retbuf, not exceeding
+ * size ( size is the length of retbuf ), and returning the length of the
+ * token.  -1 is returned on error.
+ *
+ */
+static int getTokenStr( const char *data, char *retbuf,
+			ALuint *offset, ALuint size );
+
+/*
+ * literalExp( const char *foo )
+ *
+ * Creates and returns an AL_rctree * with the value described by foo.  Let's
+ * just say that foo had better describe self-evaluating.
+ */
+static AL_rctree *literalExp( const char *foo );
+
+/*
+ * selfEvaluating( AL_rctree *head )
+ *
+ * Return AL_TRUE if the alrc token head is self-evaluating ( integer, float,
+ * string, bool, or primitive ), AL_FALSE otherwise.
+ */
+static ALboolean selfEvaluating( AL_rctree *head );
+
+/*
+ * apply( AL_rctree *proc, AL_rctree *args )
+ *
+ * Calls procedure proc with arguments args, returning return.
+ */
+static AL_rctree *apply( AL_rctree *proc, AL_rctree *args );
+
+/*
+ * length( AL_rctree *ls )
+ *
+ * Returns length of list ls, or 0 if ls is not a cons cell.
+ */
+static ALuint length( AL_rctree *ls );
+
+/**
+ * primitives
+ */
+
+/*
+ * and_prim( AL_rctree *env, AL_rctree *args )
+ *
+ * Evaluates each car in the list args, returning NULL if any evaluation is
+ * NULL or #f, something else otherwise.
+ */
+static AL_rctree *and_prim( AL_rctree *env, AL_rctree *args );
+
+/*
+ * define_prim( AL_rctree *env, AL_rctree *args )
+ *
+ * Defines the car of args to be the evaluation of the cadr of args,
+ * returning said evaluation.
+ */
+static AL_rctree *define_prim( AL_rctree *env, AL_rctree *args );
+
+/*
+ * load_ext_prim( AL_rctree *env, AL_rctree *args );
+ *
+ * Loads an extension library named by ( eval ( car args ) ).
+ */
+static AL_rctree *load_ext_prim( AL_rctree *env, AL_rctree *args );
+
+/*
+ * quote_prim( AL_rctree *env, AL_rctree *args )
+ *
+ * Evaluates to args.
+ */
+static AL_rctree *quote_prim( AL_rctree *env, AL_rctree *args );
+
+/* symbols to be defined as primitives */
+static struct _global_table {
+	const char *symname;
+	alrc_prim datum;
+} global_primitive_table[] = {
+	{ "and",             and_prim      },
+	{ "define",          define_prim   },
+	{ "load-extension",  load_ext_prim },
+	{ "quote",           quote_prim    },
+	{  NULL,  NULL }
+};
+
+/* string defining the default environment */
+static const char *default_environment =
+	"(define speaker-num 2)"
+	"(define display-banner #t)"
+	"(define source-gain 1.0)";
+
+/* FIXME: get rid of this */
+const AL_rctree scmtrue = { ALRC_BOOL, { 1 } };
+
+/*
+ * _alParseConfig( void )
+ *
+ * Parse the openalrc config file, if any.  Returns AL_TRUE if one was found
+ * and contained valid openalrc syntax, AL_FALSE otherwise.
+ *
+ * FIXME: clean this up.
+ */
+ALboolean _alParseConfig( void ) {
+	AL_rctree *temp;
+	ALboolean retval;
+	char *rcbuf;
+	int i;
+
+	if(root != NULL) {
+		/* already been here */
+		return AL_TRUE;
+	}
+
+	for(i = 0; global_primitive_table[i].symname != NULL; i++) {
+		temp = _alRcTreeAlloc();
+
+		temp->type = ALRC_PRIMITIVE;
+		temp->data.proc = global_primitive_table[i].datum;
+
+		glsyms = _alSymbolTableAdd( glsyms,
+				   global_primitive_table[i].symname,
+				   temp );
+	}
+
+	/* now, evaluate our default environment */
+	root = _alEvalStr( default_environment );
+	if(root == NULL) {
+		_alDebug(ALD_CONFIG, __FILE__, __LINE__, "Invalid default");
+		return AL_FALSE;
+	}
+
+	_alRcTreeFree( root );
+	root = NULL;
+
+	/* now, parse user's config */
+	rcbuf = _alOpenRcFile();
+	if(rcbuf == NULL) {
+		return AL_FALSE;
+	}
+
+	root = _alEvalStr( rcbuf );
+
+	retval = AL_TRUE;
+	if(root == NULL) {
+		retval = AL_FALSE;
+	}
+
+	_alRcTreeFree( root );
+	root = NULL;
+
+	free( rcbuf );
+
+	return retval;
+}
+
+/*
+ * _alOpenRcFile( void );
+ *
+ * Opens any openalrc file and returns its contents.
+ */
+static char *_alOpenRcFile( void ) {
+	FILE *fh = NULL;
+	struct stat buf;
+	static char pathname[PATH_MAX];
+	char *retval = NULL;
+	unsigned long filelen = 0;
+	int i;
+
+#ifndef __MORPHOS__
+	/*
+	 * try home dir
+	 */
+	snprintf(pathname, sizeof(pathname), "%s/.%s", getenv("HOME"), _AL_FNAME);
+#else
+	snprintf(pathname, sizeof(pathname), "ENV:%s", _AL_FNAME);
+#endif
+	if(stat(pathname, &buf) != -1) {
+		fh = fopen(pathname, "rb");
+
+		/* for later malloc, get size */
+		filelen = buf.st_size;
+	} else {
+		/* try system wide OpenAL config file */
+		snprintf(pathname, sizeof(pathname), "/etc/%s", _AL_FNAME);
+		if(stat(pathname, &buf) != -1) {
+			fh = fopen(pathname, "rb");
+
+			/* for later malloc, get size */
+			filelen = buf.st_size;
+		}
+	}
+
+	if( fh == NULL ) {
+		return NULL;
+	}
+
+	retval = malloc(filelen + 1);
+	if(retval == NULL) {
+		return NULL;
+	}
+
+	fread(retval, filelen, 1, fh);
+	retval[filelen] = '\0';
+
+	fclose( fh );
+
+	i = strlen( retval );
+
+	/* trim newlines */
+	while(retval[--i] == '\n') {
+		retval[i] = '\0';
+	}
+
+	return retval;
+}
+
+/*
+ * is_float( const char *tokenname )
+ *
+ * Returns AL_TRUE if tokenname describes a float, AL_FALSE otherwise.
+ */
+static ALboolean is_float( const char *tokenname ) {
+	int i = strlen( tokenname );
+	int c;
+
+	while(i--) {
+		c = tokenname[i];
+
+		if((isdigit(c) == 0) &&
+			(c != '-')   &&
+			(c != '.')) {
+			return AL_FALSE;
+		}
+	}
+
+	return AL_TRUE;
+}
+
+/*
+ * is_int( const char *tokenname )
+ *
+ * Returns AL_TRUE if tokenname describes an integer (either base 10 or 16),
+ * AL_FALSE otherwise.
+ */
+ALboolean is_int( const char *tokenname ) {
+	int i = strlen(tokenname);
+	int c;
+
+	while(i--) {
+		c = tokenname[i];
+
+		if(isdigit(c) == 0) {
+			return AL_FALSE;
+		}
+	}
+
+	return AL_TRUE;
+}
+
+/*
+ * is_string( const char *tokenname )
+ *
+ * Returns AL_TRUE if tokenname describes a string, AL_FALSE otherwise.  A
+ * string in this context means any data contained between two quotation
+ * marks.
+ */
+ALboolean is_string( const char *tokenname ) {
+	int i = strlen( tokenname );
+	int c;
+
+	if(tokenname[0] != '"') {
+		return AL_FALSE;
+	}
+
+	while(i--) {
+		c = tokenname[i];
+
+		if((isgraph(c) == 0) &&
+		   (isspace(c) == 0)) {
+			_alDebug(ALD_CONFIG, __FILE__, __LINE__,
+				"tokenname %s failed at %d '%c'",
+				tokenname, i, tokenname[i]);
+
+			return AL_FALSE;
+		}
+	}
+
+	return AL_TRUE;
+}
+
+/*
+ * is_lispchar( int ch )
+ *
+ * Returns AL_TRUE if ch is ( or ), AL_FALSE otherwise.
+ */
+static ALboolean is_lispchar( int ch ) {
+	switch(ch) {
+		case ')':
+		case '(':
+			return AL_TRUE;
+		default:
+			break;
+	}
+
+	return AL_FALSE;
+}
+
+/*
+ * is_whitespace( int ch )
+ *
+ * Returns AL_TRUE if ch is any form of whitespace, AL_FALSE otherwise.
+ */
+static ALboolean is_whitespace( int ch ) {
+	switch(ch) {
+		case ' ':
+		case '\t':
+		case '\n':
+		case '\r':
+			return AL_TRUE;
+		default:
+			break;
+	}
+
+	return AL_FALSE;
+}
+
+/*
+ * Returns AL_TRUE if foo[offset...] describes a float.  Instead of simply
+ * being limited to the NUL character, any form of whitespace or moving into
+ * foo[len] is also a terminating condition.
+ */
+static int is_floatWS( const char *foo, ALuint offset, size_t len ) {
+	int decimalPoints = 0;
+	ALuint i = offset;
+
+	if ( offset >= len ) {
+		return -1;
+	}
+
+	if( foo[i] == '-' ) {
+		i++;
+	}
+
+	while( foo[i] && !is_whitespace( foo[i] ) && ( i < len ) ) {
+		if(!isdigit( (int) foo[i] )) {
+			if( foo[i] == '.' ) {
+				if( decimalPoints > 1 ) {
+					return -1;
+				}
+
+				decimalPoints++;
+			} else {
+				return -1;
+			}
+		}
+
+		i++;
+	}
+
+	return i - offset;
+}
+
+/*
+ * _alGlobalBinding( const char *str )
+ *
+ * If str names an existing alrc symbol, return a pointer to the value
+ * associated with that symbol.  Otherwise, return NULL.
+ *
+ */
+AL_rctree *_alGlobalBinding( const char *str ) {
+	AL_rctree *retval;
+
+	retval =  _alSymbolTableGet( glsyms, str );
+
+	if( retval == NULL ) {
+		_alDebug( ALD_CONFIG, __FILE__, __LINE__,
+			  "could not resolve %s", str );
+	}
+
+	return retval;
+}
+
+/*
+ * _alSymbolTableGet( AL_SymTab *head, const char *str )
+ *
+ * Returns the definition associated with the symbol named by str, or NULL if
+ * no such definition exists.
+ */
+static AL_rctree *_alSymbolTableGet( AL_SymTab *head, const char *str ) {
+	int i;
+
+	if(head == NULL) {
+		return NULL;
+	}
+
+	i = strncmp(head->str, str, ALRC_MAXSTRLEN);
+
+	if(i < 0) {
+		return _alSymbolTableGet(head->left, str);
+	} else if (i == 0) {
+		return head->datum;
+	} else if (i > 0) {
+		return _alSymbolTableGet(head->right, str);
+	}
+
+	return NULL;
+}
+
+/*
+ * _alSymbolTableAdd( AL_SymTab *table, const char *sym, AL_rctree *datum )
+ *
+ * Adds binding for symbol named by sym to table, returning the table.
+ *
+ * Since AL_SymTab is a simple binary tree, this is a simple recursive
+ * function.
+ */
+static AL_SymTab *_alSymbolTableAdd( AL_SymTab *head, const char *sym,
+				     AL_rctree *datum ) {
+	int i;
+
+	if(head == NULL) {
+		head = _alSymbolTableAlloc();
+
+		strncpy( head->str, sym, ALRC_MAXSTRLEN );
+
+		head->datum = AL_rctree_copy( datum );
+
+		return head;
+	}
+
+	i = strncmp(head->str, sym, ALRC_MAXSTRLEN);
+
+	if(i < 0) {
+		head->left = _alSymbolTableAdd( head->left, sym, datum);
+
+		return head;
+	}
+
+	if(i == 0) {
+		strncpy(head->str, sym, ALRC_MAXSTRLEN);
+
+		head->datum = AL_rctree_copy( datum );
+
+		return head;
+	}
+
+	if(i > 0) {
+		head->right = _alSymbolTableAdd( head->right, sym, datum );
+		return head;
+	}
+
+	return NULL;
+}
+
+/*
+ * _alSymbolTableAlloc( void )
+ *
+ * Allocate and return a new symbol table object.
+ */
+AL_SymTab *_alSymbolTableAlloc( void ) {
+	AL_SymTab *retval;
+
+	retval = malloc( sizeof *retval );
+	if(retval == NULL) {
+		return NULL;
+	}
+
+	memset( retval->str, 0, ALRC_MAXSTRLEN + 1 );
+
+	retval->datum = NULL;
+	retval->left  = NULL;
+	retval->right = NULL;
+
+	return retval;
+}
+
+/*
+ * define_prim( AL_rctree *env, AL_rctree *args )
+ *
+ * Defines the car of args to be the evaluation of the cadr of args,
+ * returning said evaluation.
+ */
+static AL_rctree *define_prim( UNUSED(AL_rctree *env), AL_rctree *args ) {
+	AL_rctree *symbol;
+	AL_rctree *retval;
+
+	symbol = alrc_car( args );
+	retval = _alEval( alrc_cadr( args ) );
+
+	if((symbol == NULL) || (retval == NULL)) {
+		_alDebug(ALD_CONFIG, __FILE__, __LINE__,
+			"define_prim fail" );
+
+		return NULL;
+	}
+
+	glsyms = _alSymbolTableAdd( glsyms,
+				symbol->data.str.c_str,
+				retval );
+
+	_alDebug( ALD_CONFIG, __FILE__, __LINE__,
+			"define %s", symbol->data.str.c_str );
+
+	return retval;
+}
+
+/*
+ * and_prim( AL_rctree *env, AL_rctree *args )
+ *
+ * Evaluates each car in the list args, returning NULL if any evaluation is
+ * NULL or #f, something else otherwise.
+ */
+static AL_rctree *and_prim( UNUSED(AL_rctree *env), AL_rctree *args ) {
+	AL_rctree *result = NULL;
+	AL_rctree *itr;
+	AL_rctree *temp;
+	ALboolean keepgoing = AL_TRUE;
+
+	itr = args;
+	while(itr && (keepgoing == AL_TRUE)) {
+		temp = alrc_cdr( itr );
+
+		result = _alEval( alrc_car( itr ) );
+
+		if( result == NULL ) {
+			result         = _alRcTreeAlloc();
+			result->type   = ALRC_BOOL;
+			result->data.i = AL_FALSE;
+
+			_alDebug( ALD_CONFIG, __FILE__, __LINE__,
+				"and_prim false" );
+
+			return result;
+		}
+
+		itr = temp;
+
+	}
+
+	result         = _alRcTreeAlloc();
+	result->type   = ALRC_BOOL;
+	result->data.i = AL_TRUE;
+
+	return result;
+}
+
+
+/*
+ * _alDestroyConfig( void )
+ *
+ * Deallocate the memory reserved in the call to _alParseConfig, as well as
+ * any alrc objects that have been created since that point.
+ */
+void _alDestroyConfig( void ) {
+	_alSymbolTableDestroy( glsyms );
+	glsyms = NULL;
+
+	_alRcTreeDestroyAll(); /* gc replacement.  sigh */
+
+	return;
+}
+
+/*
+ * _alSymbolTableDestroy( AL_SymTab *head )
+ *
+ * Destroys the symbol table head.
+ */
+static void _alSymbolTableDestroy( AL_SymTab *head ) {
+	if( head == NULL ) {
+		return;
+	}
+
+	if( head->left ) {
+		_alSymbolTableDestroy( head->left );
+	}
+	if( head->right ) {
+		_alSymbolTableDestroy( head->right );
+	}
+
+	free( head );
+
+	return;
+}
+
+
+
+/*
+ * load_ext_prim( AL_rctree *env, AL_rctree *args );
+ *
+ * Loads an extension library named by ( eval ( car args ) ).
+ *
+ * FIXME: return #t or something?
+ */
+static AL_rctree *load_ext_prim(UNUSED(AL_rctree *env), AL_rctree *args) {
+	AL_rctree *retval;
+	static char fname[128]; /* FIXME */
+	char *symname;
+	size_t len;
+
+	if(args->type != ALRC_STRING) {
+		_alDebug(ALD_CONFIG, __FILE__, __LINE__,
+			"syntax error: load_ext_prim passed type is 0x%x",
+			args->type);
+
+		return NULL;
+	}
+
+	/* skip first and last quote */
+	symname = args->data.str.c_str;
+	len     = args->data.str.len;
+
+	/* copy data */
+	memcpy(fname, symname, len);
+	fname[len] = '\0';
+
+	/* prepare retval */
+
+	retval         = _alRcTreeAlloc();
+	retval->type   = ALRC_BOOL;
+	retval->data.i = AL_TRUE;
+
+	if(_alLoadDL(fname) == AL_FALSE)
+	{
+		_alDebug(ALD_CONFIG, __FILE__, __LINE__,
+			 "Couldn't load %s", fname);
+
+		retval->data.i = AL_FALSE;
+	}
+
+	return retval;
+}
+
+/*
+ * quote_prim( AL_rctree *env, AL_rctree *args )
+ *
+ * Evaluates to args.
+ */
+static AL_rctree *quote_prim(UNUSED(AL_rctree *env), AL_rctree *args) {
+	return args;
+}
+
+/*
+ * _alGetGlobalScalar( const char *str, ALRcEnum type, ALvoid *retref )
+ *
+ * If str names an existing alrc symbol, and type matches the type of that
+ * symbol, *retref is populated with the value of that symbol and this call
+ * returns AL_TRUE.  Otherwise, AL_FALSE is returned.
+ *
+ * NOTE: future revisions should replace this with a call to rc_lookup.
+ *
+ * FIXME: fill out literal support
+ */
+ALboolean _alGetGlobalScalar( const char *str, ALRcEnum type, ALvoid *retref ) {
+	AL_rctree *sym;
+	ALfloat *fvp;
+	ALint   *ivp;
+
+	if(retref == NULL) {
+		return AL_FALSE;
+	}
+
+	/* [fi]vp, the dereference helper */
+	fvp = retref;
+	ivp = retref;
+
+	sym = _alGlobalBinding(str);
+	if(sym == NULL) {
+		return AL_FALSE;
+	}
+
+	switch(sym->type) {
+		case ALRC_INTEGER:
+		case ALRC_BOOL:
+			switch(type) {
+				case ALRC_INTEGER:
+				case ALRC_BOOL:
+					*ivp = sym->data.i;
+					return AL_TRUE;
+				case ALRC_FLOAT:
+					*fvp = sym->data.i;
+					return AL_TRUE;
+				default:
+					return AL_FALSE;
+			}
+		case ALRC_FLOAT:
+			switch(type) {
+				case ALRC_INTEGER:
+				case ALRC_BOOL:
+					*ivp = sym->data.f;
+					return AL_TRUE;
+				case ALRC_FLOAT:
+					*fvp = sym->data.f;
+					return AL_TRUE;
+				default:
+					return AL_FALSE;
+			}
+		default:
+			return AL_FALSE;
+	}
+}
+
+/*
+ * _alDefine( const char *symname, AL_rctree *value )
+ *
+ * Bind a symbol, named by symname, to the evaluation of value.
+ */
+AL_rctree *_alDefine( const char *symname, AL_rctree *value ) {
+	glsyms = _alSymbolTableAdd( glsyms, symname, _alEval( value ));
+
+	_alDebug( ALD_CONFIG, __FILE__, __LINE__, "defining %s", symname );
+
+	return value;
+}
+
+/*
+ * selfEvaluating( AL_rctree *head )
+ *
+ * Return AL_TRUE if the alrc token head is self-evaluating ( integer, float,
+ * string, bool, or primitive ), AL_FALSE otherwise.
+ */
+static ALboolean selfEvaluating( AL_rctree *head ) {
+	switch( head->type ) {
+		case ALRC_INVALID:
+		case ALRC_INTEGER:
+		case ALRC_FLOAT:
+		case ALRC_STRING:
+		case ALRC_BOOL:
+		case ALRC_PRIMITIVE:
+			return AL_TRUE;
+			break;
+		case ALRC_SYMBOL:
+		case ALRC_CONSCELL:
+		default:
+			break;
+	}
+
+	return AL_FALSE;
+}
+
+/*
+ * alrc_cons( AL_rctree *ls1, AL_rctree *ls2 )
+ *
+ * Create and return a cons cell, with the car section pointing to ls1 and the
+ * cdr section pointing to ls2.
+ */
+AL_rctree *alrc_cons( AL_rctree *ls1, AL_rctree *ls2 ) {
+	AL_rctree *newc;
+
+	assert( ls1->type == ALRC_CONSCELL );
+
+	if( ls1->data.ccell.cdr == NULL ) {
+		newc = ls1->data.ccell.cdr = _alRcTreeAlloc();
+		newc->type = ALRC_CONSCELL;
+
+		newc->data.ccell.car = ls2;
+
+		return newc;
+	}
+
+	alrc_cons( alrc_cdr(ls1), ls2 );
+
+	return ls1;
+}
+
+/*
+ * alrc_car( AL_rctree *ls )
+ *
+ * Return the car section of the cons cell named by ls, or NULL if ls is not a
+ * cons cell.
+ */
+AL_rctree *alrc_car( AL_rctree *ls ) {
+	assert( ls->type == ALRC_CONSCELL );
+
+	return ls->data.ccell.car;
+}
+
+/*
+ * alrc_cdr( AL_rctree *ls )
+ *
+ * Return the cdr section of the cons cell named by ls, or NULL if ls is not a
+ * cons cell.
+ */
+AL_rctree *alrc_cdr( AL_rctree *ls ) {
+	assert( ls->type == ALRC_CONSCELL );
+
+	return ls->data.ccell.cdr;
+}
+
+/*
+ * apply( AL_rctree *proc, AL_rctree *args )
+ *
+ * Calls procedure proc with arguments args, returning return.
+ */
+AL_rctree *apply( AL_rctree *procobj, AL_rctree *args ) {
+	AL_rctree *lobj;
+	AL_rctree *prototype;
+	AL_rctree *body;
+	AL_rctree *retval;
+	int i;
+
+	if( procobj->type == ALRC_PRIMITIVE ) {
+		alrc_prim proc = procobj->data.proc;
+
+		return proc(root, args);
+	}
+
+	if( procobj->type != ALRC_CONSCELL) {
+		assert(0);
+
+		return NULL;
+	}
+
+	lobj      = alrc_cdr( procobj );
+
+	prototype = alrc_car( lobj );
+	body      = alrc_cadr( lobj );
+
+	/* lambda expression */
+	assert(length(prototype) == length(args));
+
+	/* build bindings */
+	i = length( prototype );
+	while(i--) {
+		glsyms = _alSymbolTableAdd(glsyms,
+			alrc_car(prototype)->data.str.c_str,
+			_alEval( alrc_car( args )));
+
+
+		prototype = alrc_cdr(prototype);
+		args = alrc_cdr(args);
+	}
+
+	retval = _alEval( body );
+
+	/* remove bindings */
+	prototype = alrc_car( lobj );
+	i = length( prototype );
+	while(i--) {
+		glsyms = _alSymbolTableRemove( glsyms,
+				   alrc_car( prototype )->data.str.c_str );
+
+		prototype = alrc_cdr( prototype );
+	}
+
+	return retval;
+}
+
+/*
+ * length( AL_rctree *ls )
+ *
+ * Returns length of list ls, or 0 if ls is not a cons cell.
+ */
+static ALuint
+length( AL_rctree *ls )
+{
+	return ( ls == NULL || ls->type != ALRC_CONSCELL ) ?
+		0 :
+		( 1 + length( alrc_cdr( ls ) ));
+}
+
+/*
+ * _alSymbolTableRemove( AL_SymTab *table, const char *sym )
+ *
+ * Removes binding for symbol named by sym from table.
+ */
+AL_SymTab *_alSymbolTableRemove( AL_SymTab *head, const char *sym ) {
+	int i;
+
+	if(head == NULL) {
+		return NULL;
+	}
+
+	i = strncmp( head->str, sym, ALRC_MAXSTRLEN );
+	if(i < 0) {
+		head->left = _alSymbolTableRemove( head->left, sym );
+		return head;
+	}
+	if(i == 0) {
+		free( head );
+
+		return NULL;
+	}
+	if(i > 0) {
+		head->right = _alSymbolTableRemove( head->right, sym );
+		return head;
+	}
+
+	return head;
+}
+
+/*
+ * AL_rctree_copy( AL_rctree *src )
+ *
+ * Returns a copy of src, including car and cdr sections.
+ */
+static AL_rctree *AL_rctree_copy( AL_rctree *src ) {
+	AL_rctree *retval;
+
+	if( src == NULL ) {
+		return NULL;
+	}
+
+	retval = _alRcTreeAlloc();
+
+	if( src->type == ALRC_CONSCELL ) {
+		retval->type = ALRC_CONSCELL;
+
+		retval->data.ccell.car = AL_rctree_copy( src->data.ccell.car );
+		retval->data.ccell.cdr = AL_rctree_copy( src->data.ccell.cdr );
+
+		return retval;
+	}
+
+	*retval = *src;
+
+	return retval;
+}
+
+/*
+ * buildExp( const char *tokenstr, unsigned int *offset )
+ *
+ * Builds an AL_rctree representation of the alrc expression in
+ * tokenstr[*offset], setting *offset to the last scanned position, or NULL if
+ * tokenstr[*offset...] does not describe a valid alrc expression.
+ */
+static AL_rctree *buildExp( const char *tokenstr, unsigned int *offset ) {
+	AL_rctree *retval = NULL;
+	unsigned int len = strlen(tokenstr);
+	char *buffer;
+
+	while(is_whitespace(tokenstr[*offset]) && (*offset < len)) {
+		(*offset)++;
+	}
+
+	/* skip comments */
+	while(tokenstr[*offset] == ';') {
+		/* FIXME: do dos crlf as well */
+		while((tokenstr[*offset] != '\n') && (*offset < len))
+		{
+			(*offset)++;
+		}
+
+		while(is_whitespace(tokenstr[*offset]) && (*offset < len)) {
+			(*offset)++;
+		}
+	}
+
+	if((len == 0) || (*offset >= len)) {
+		_alDebug( ALD_CONFIG, __FILE__, __LINE__, "NULL here");
+
+		return NULL;
+	}
+
+	if(tokenstr[*offset] == '\'') {
+		/* quoted */
+		(*offset)++;
+
+		retval = _alRcTreeAlloc();
+		retval->type = ALRC_CONSCELL;
+
+		retval->data.ccell.car = _alRcTreeAlloc();
+		retval->data.ccell.car->type = ALRC_SYMBOL;
+		snprintf(retval->data.ccell.car->data.str.c_str, ALRC_MAXSTRLEN,
+			"quote");
+		retval->data.ccell.car->data.str.len = 5;
+
+		retval->data.ccell.cdr = buildExp( tokenstr, offset );
+
+		return retval;
+	}
+
+	if(tokenstr[*offset] == '(') {
+		/* it's a list */
+		AL_rctree *foo = NULL;
+		AL_rctree *lp  = NULL;
+		AL_rctree *rp  = NULL;
+
+		(*offset)++;
+
+		retval = rp = _alRcTreeAlloc();
+		retval->type = ALRC_CONSCELL;
+
+		/* cdr */
+		while((foo = buildExp(tokenstr, offset)) != NULL) {
+			/*car(rp, foo); */
+			rp->data.ccell.car = foo;
+
+			/* cdr(rp, l_conscell_alloc(NULL, NULL));*/
+			rp->data.ccell.cdr = _alRcTreeAlloc();
+			rp->data.ccell.cdr->type = ALRC_CONSCELL;
+
+			lp = rp;
+			rp = rp->data.ccell.cdr;
+		}
+
+		if( lp != NULL ) {
+			_alRcTreeFree( lp->data.ccell.cdr );
+			lp->data.ccell.cdr = NULL;
+		}
+
+		return (AL_rctree *) retval;
+	}
+
+	if(tokenstr[*offset] == ')') {
+		(*offset)++;
+
+		return NULL;
+	}
+
+	buffer = malloc( len + 1 );
+
+	getTokenStr(tokenstr, buffer, offset, len);
+
+	retval = literalExp( buffer );
+
+	free( buffer );
+
+	return retval;
+}
+
+/*
+ * literalExp( const char *foo )
+ *
+ * Creates and returns an AL_rctree * with the value described by foo.  Let's
+ * just say that foo had better describe self-evaluating.
+ */
+static AL_rctree *literalExp( const char *foo ) {
+	AL_rctree *retval = _alRcTreeAlloc();
+
+	assert(foo[0] != '(');
+	assert(foo[0] != '\'');
+	assert(foo[0] != '(');
+
+	if ((foo[0] == '#') && (foo[1] == 'p'))
+        {
+		long foop = strtol( &foo[2], NULL, 0 );
+
+		retval->type = ALRC_POINTER;
+		retval->data.p = (void *) foop;
+	}
+	else if ((foo[0] == '#') && ((foo[1] == 't') || (foo[1] == 'f')))
+	{
+		switch(foo[1]) {
+			case 'f':
+				retval->data.b = AL_FALSE;
+				break;
+			case 't':
+				retval->data.b = AL_TRUE;
+				break;
+			default:
+				assert( 0 );
+				_alRcTreeFree( retval );
+
+				return NULL;
+		}
+
+		retval->type = ALRC_BOOL;
+	}
+        else if (is_int(foo))
+        {
+		retval->type = ALRC_INTEGER;
+		retval->data.i = atoi( foo );
+	}
+        else if (is_float( foo ))
+        {
+		retval->type = ALRC_FLOAT;
+		retval->data.f = atof( foo );
+	}
+        else if (is_string(foo))
+        {
+		retval->type = ALRC_STRING;
+		snprintf( retval->data.str.c_str, ALRC_MAXSTRLEN, &foo[1] );
+
+		retval->data.str.len = strlen( foo ) - 2;
+	}
+        else
+        {
+		retval->type = ALRC_SYMBOL;
+		snprintf( retval->data.str.c_str, ALRC_MAXSTRLEN, foo );
+
+		retval->data.str.len = strlen( foo );
+	}
+
+	return retval;
+}
+
+/*
+ * _alEval( AL_rctree *head )
+ *
+ * Evaluate an expression in AL_rctree form.
+ */
+static AL_rctree *_alEval( AL_rctree *head ) {
+	AL_rctree *retval;
+
+	if(head == NULL) {
+		return NULL;
+	}
+
+	if( selfEvaluating( head ) == AL_TRUE ) {
+		return head;
+	}
+
+	if( head->type == ALRC_CONSCELL ) {
+		AL_rctree *procsym = alrc_car( head );
+		AL_rctree *args;
+		AL_rctree *proc;
+
+		if( procsym == NULL ) {
+			_alDebug( ALD_CONFIG, __FILE__, __LINE__,
+				"trouble" );
+
+			return NULL;
+		}
+
+		proc =  _alGlobalBinding( procsym->data.str.c_str );
+		args =  alrc_cdr(head);
+
+		if( proc == NULL ) {
+			_alDebug( ALD_CONFIG, __FILE__, __LINE__,
+				"could not apply %s",
+				alrc_car(head)->data.str.c_str );
+
+			return NULL;
+		}
+
+		return apply( proc, args );
+	} else {
+		/* symbols are resolved */
+		retval = _alGlobalBinding( head->data.str.c_str );
+		if(retval == NULL) {
+			_alDebug( ALD_CONFIG, __FILE__, __LINE__,
+				"invalid symbol %s", head->data.str.c_str );
+		}
+
+		return retval;
+	}
+}
+
+/*
+ * getTokenStr( const char *data, char *retbuf,
+ *              ALuint *offset, ALuint size )
+ *
+ * copies the next alrc token from data[*offset] to retbuf, not exceeding
+ * size ( size is the length of retbuf ), and returning the length of the
+ * token.  -1 is returned on error.
+ *
+ */
+static int getTokenStr( const char *data, char *outp,
+		 ALuint *offsetp, ALuint size ) {
+	ALuint offset = *offsetp;
+	int start  = 0;
+	int end    = 0;
+	int tokenlen = 0;
+	size_t retlen = 0;
+
+	while(is_whitespace(data[offset]) && (offset < size)) {
+		offset++;
+	}
+
+	if((data[offset] == '\'') ||
+	   (data[offset] == '(')  ||
+	   (data[offset] == ')'))
+	{
+		start = offset++;
+		end = offset;
+
+	} else if((data[offset] == '#') && (data[offset+1] == 'p')) {
+		/* pointer value */
+		start = offset;
+
+		offset += 2;
+
+		if((data[offset] == '0') && (data[offset+1] == 'x')) {
+			/* in hex */
+			offset += 2;
+		}
+
+		while( isxdigit( (int) data[offset]) && (offset < size))
+		{
+			offset++;
+		}
+	} else if((data[offset] == '#') && ((data[offset+1] == 'f') || (data[offset+1] == 't'))) {
+		/* boolean */
+		start = offset;
+
+		offset += 2;
+	} else if((data[offset] == '0') && (data[offset+1] == 'x')) {
+		/* hex numbers */
+		start = offset;
+
+		while(isdigit( (int) data[offset]) && (offset < size)) {
+			offset++;
+		}
+	} else if((tokenlen = is_floatWS( data, offset, size )) > 0)  {
+		/* float */
+		start = offset;
+		offset += tokenlen;
+
+	} else if(data[offset] == '"') {
+		/* it's a string */
+		start = offset;
+
+		offset++;
+
+		while((data[offset] != '"') && (offset < size)) {
+			offset++;
+		}
+
+		offset++; /* get last one too */
+	} else {
+		start = offset;
+
+		while(!is_whitespace(data[offset]) &&
+		      !is_lispchar(data[offset])   &&
+		      (offset < size)) {
+			offset++;
+		}
+
+	}
+
+	if(offset > size) {
+		*offsetp = size;
+
+		/* invalid expression */
+		return 0;
+	}
+
+	end = offset;
+
+	retlen = end - start;
+
+	memcpy(outp, &data[start], retlen);
+
+	outp[retlen] = '\0';
+
+	*offsetp = offset;
+
+	return strlen( outp );
+}
+
+/*
+ * _alEvalStr( const char *expression )
+ *
+ * Evaluate an alrc expression (expression), returning result.
+ */
+AL_rctree *_alEvalStr( const char *expression ) {
+	ALuint offset = 0;
+	ALuint len = strlen( expression );
+	AL_rctree *retval = NULL;
+
+	while( offset < len ) {
+		retval = _alEval( buildExp( expression, &offset ) );
+	}
+
+	return retval;
+}
Index: /openal-0.0.8/src/al_config.h
===================================================================
--- /openal-0.0.8/src/al_config.h	(revision 17)
+++ /openal-0.0.8/src/al_config.h	(revision 17)
@@ -0,0 +1,82 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_config.h
+ *
+ * Prototypes, macros and definitions related to the input and parsing of
+ * config state.
+ *
+ */
+#ifndef AL_CONFIG_H_
+#define AL_CONFIG_H_
+
+#include <AL/al.h>
+
+#include "al_rctree.h"
+#include "al_rcvar.h"
+
+/*
+ * Parse the openalrc config file, if any.  Returns AL_TRUE if one was found
+ * and contained valid openalrc syntax, AL_FALSE otherwise.
+ */
+ALboolean _alParseConfig( void );
+
+/*
+ * Deallocate the memory reserved in the call to _alParseConfig, as well as
+ * any alrc objects that have been created since that point.
+ */
+void _alDestroyConfig( void );
+
+/*
+ * If str names an existing alrc symbol, and type matches the type of that
+ * symbol, *retref is populated with the value of that symbol and this call
+ * returns AL_TRUE.  Otherwise, AL_FALSE is returned.
+ *
+ * NOTE: future revisions should replace this with a call to rc_lookup.
+ */
+ALboolean _alGetGlobalScalar( const char *str,
+			      ALRcEnum type,
+			      void *retref );
+
+/*
+ * If str names an existing alrc symbol, return a pointer to the value
+ * associated with that symbol.  Otherwise, return NULL.
+ *
+ */
+AL_rctree *_alGlobalBinding( const char *str );
+
+/*
+ * Evaluate an alrc expression (expression), returning result.
+ */
+AL_rctree *_alEvalStr( const char *expression );
+
+/*
+ * Bind a symbol, named by symname, to the evaluation of value.
+ */
+AL_rctree *_alDefine( const char *symname, AL_rctree *value );
+
+/*
+ * Create and return a cons cell, with the car section pointing to ls1 and the
+ * cdr section pointing to ls2.
+ */
+AL_rctree *alrc_cons( AL_rctree *ls1, AL_rctree *ls2 );
+
+/*
+ * Return the car section of the cons cell named by ls, or NULL if ls is not a
+ * cons cell.
+ */
+AL_rctree *alrc_car( AL_rctree *ls );
+
+/*
+ * Return the cdr section of the cons cell named by ls, or NULL if ls is not a
+ * cons cell.
+ */
+AL_rctree *alrc_cdr( AL_rctree *ls );
+
+/*
+ * scmtrue is returned by some of the rc_ functions.  It is probably advised
+ * to remove it.
+ */
+extern const AL_rctree scmtrue;
+
+#endif /* AL_CONFIG_H_ */
Index: /openal-0.0.8/src/al_cpu_caps.h
===================================================================
--- /openal-0.0.8/src/al_cpu_caps.h	(revision 17)
+++ /openal-0.0.8/src/al_cpu_caps.h	(revision 17)
@@ -0,0 +1,10 @@
+#ifndef AL_CPU_CAPS_H
+#define AL_CPU_CAPS_H
+
+void _alDetectCPUCaps(void);
+
+#if defined(__i386__) || defined(__x86_64__)
+#include "arch/i386/x86_cpu_caps_prk.h"
+#endif
+
+#endif /* AL_CPU_CAPS_H */
Index: /openal-0.0.8/src/al_debug.c
===================================================================
--- /openal-0.0.8/src/al_debug.c	(revision 17)
+++ /openal-0.0.8/src/al_debug.c	(revision 17)
@@ -0,0 +1,136 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_debug.c
+ *
+ * openal custom debug messages.
+ */
+#define _GNU_SOURCE
+
+#include "al_siteconfig.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "al_debug.h"
+
+#ifdef NEED_DEBUG
+/*
+ * ald2str( aldEnum type )
+ *
+ * Returns a const char * string giving a readable representation of the debug
+ * type, or NULL if type is not a valid debug message type.  This string does
+ * not need to be free'd.
+ */
+static const char *ald2str( aldEnum l ) {
+	switch( l ) {
+		case ALD_INVALID:   return "INVALID";
+		case ALD_CONVERT:   return "CONVERT";
+		case ALD_CONFIG:    return "CONFIG";
+		case ALD_SOURCE:    return "SOURCE";
+		case ALD_LOOP:      return "LOOP";
+		case ALD_STUB:      return "STUB";
+		case ALD_CONTEXT:   return "CONTEXT";
+		case ALD_MATH:      return "MATH";
+		case ALD_MIXER:     return "MIXER";
+		case ALD_ERROR:     return "ERROR";
+		case ALD_EXT:       return "EXT";
+		case ALD_LOCK:      return "LOCK";
+		case ALD_MAXIMUS:   return "MAXIMUS";
+		case ALD_STREAMING: return "STREAM";
+		case ALD_MEM:       return "MEM";
+		case ALD_QUEUE:     return "QUEUE";
+		case ALD_FILTER:     return "FILTER";
+		default: break;
+	}
+
+	return NULL;
+}
+#endif
+
+/*
+ * _alDebug( aldEnum level, const char *fn, int ln, const char *format, ... )
+ *
+ * If debugging messages for the type level are enabled, print the debugging
+ * message specified by format, ... ( printf format ).  Otherwise, return.
+ *
+ */
+int _alDebug( aldEnum level, const char *fn, int ln, const char *format, ... )
+{
+#ifndef NEED_DEBUG
+	(void)level; (void)fn; (void)ln; (void)format;
+	return 0;
+#else
+	static char formatbuf[256];
+	int count;
+	va_list ap;
+#ifndef DEBUG_MAXIMUS /* DEBUG_MAXIMUS enables all debugging */
+
+#ifndef DEBUG_LOOP
+	if(level == ALD_LOOP) return 0;
+#endif
+#ifndef DEBUG_STUB
+	if(level == ALD_STUB) return 0;
+#endif
+#ifndef DEBUG_CONVERT
+	if(level == ALD_CONVERT) return 0;
+#endif
+#ifndef DEBUG_CONFIG
+	if(level == ALD_CONFIG) return 0;
+#endif
+#ifndef DEBUG_MATH
+	if(level == ALD_MATH) return 0;
+#endif
+#ifndef DEBUG_EXT
+	if(level == ALD_EXT) return 0;
+#endif
+#ifndef DEBUG_CONTEXT
+	if(level == ALD_CONTEXT) return 0;
+#endif
+#ifndef DEBUG_SOURCE
+	if(level == ALD_SOURCE) return 0;
+#endif
+#ifndef DEBUG_LOCK
+	if(level == ALD_LOCK) return 0;
+#endif
+#ifndef DEBUG_MAXIMUS
+	if(level == ALD_MAXIMUS) return 0;
+#endif
+#ifndef DEBUG_STREAMING
+	if(level == ALD_STREAMING) return 0;
+#endif
+#ifndef DEBUG_MEM
+	if(level == ALD_MEM) return 0;
+#endif
+#ifndef DEBUG_BUFFER
+	if(level == ALD_BUFFER) return 0;
+#endif
+#ifndef DEBUG_LISTENER
+	if(level == ALD_LISTENER) return 0;
+#endif
+#ifndef DEBUG_QUEUE
+	if(level == ALD_QUEUE) return 0;
+#endif
+#ifndef DEBUG_FILTER
+	if(level == ALD_FILTER) return 0;
+#endif
+#ifndef DEBUG_MIXER
+	if(level == ALD_MIXER) return 0;
+#endif
+
+#endif /* DEBUG_MAXIMUS */
+
+	count = snprintf(formatbuf, sizeof(formatbuf), "%s\t[%s:%d] ", ald2str(level), fn, ln);
+	if(count < 0)
+	{
+		return count;
+	}
+
+	va_start(ap, format);
+	vsnprintf(formatbuf, sizeof formatbuf, format, ap);
+	va_end(ap);
+
+	return fprintf(stderr, "%s\t[%s:%d] %s\n",
+		       ald2str(level), fn, ln, formatbuf );
+#endif /* NEED_DEBUG */
+}
Index: /openal-0.0.8/src/al_debug.h
===================================================================
--- /openal-0.0.8/src/al_debug.h	(revision 17)
+++ /openal-0.0.8/src/al_debug.h	(revision 17)
@@ -0,0 +1,71 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_debug.h
+ *
+ * Prototypes, macros and definitions related to the printing debugging
+ * messages.
+ *
+ * The debugging facility relies heavily on defines provided by
+ * al_siteconfig.h.  One future optimization could rely on the varadic macro
+ * facilities in ISO99 C.
+ *
+ */
+#ifndef AL_DEBUG_H_
+#define AL_DEBUG_H_
+
+#include "al_siteconfig.h"
+
+#include <assert.h>
+
+#if defined(DEBUG)        || defined(DEBUG_LOOP) || defined(DEBUG_STUB)    || \
+    defined(DEBUG_CONFIG) || defined(DEBUG_LOCK) || defined(DEBUG_CONVERT) || \
+    defined(DEBUG_EXT)    || defined(DEBUG_SOURCE) || defined(DEBUG_STREAMING)\
+    || defined(DEBUG_MATH) || defined(DEBUG_MEM) || defined(DEBUG_CONTEXT)    \
+    || defined(DEBUG_MAXIMUS) || defined(DEBUG_BUFFER)                        \
+    || defined(DEBUG_LISTENER) || defined(DEBUG_QUEUE) || defined(DEBUG_FILTER)
+
+#define NEED_DEBUG
+#endif /* debug stuff */
+
+#ifdef DEBUG_MAXIMUS
+#define DEBUG
+#endif /* DEBUG_MAXIMUS */
+
+/*
+ * aldEnum is an enum which enumerates each type of debug type.  There isn't
+ * any rule to which message should be associated with which debug type, but
+ * the general idea is that if the user configures openal with
+ * --enable-debug-foo, only debug messages relavant to foo should be printed.
+ */
+typedef enum _aldEnum
+{
+	ALD_INVALID,
+	ALD_CONVERT,
+	ALD_CONFIG,
+	ALD_SOURCE,
+	ALD_LOOP,
+	ALD_STUB,
+	ALD_CONTEXT,
+	ALD_MATH,
+	ALD_MIXER,
+	ALD_ERROR,
+	ALD_EXT,
+	ALD_LOCK,
+	ALD_STREAMING,
+	ALD_MEM,
+	ALD_MAXIMUS,
+	ALD_BUFFER,
+	ALD_LISTENER,
+	ALD_QUEUE,
+	ALD_FILTER,
+	ALD_MAXMAXMAX = 0x7fffffff
+} aldEnum;
+
+/*
+ * If debugging messages for the type level are enabled, print the debugging
+ * message specified by format, ... ( printf format ).  Otherwise, return.
+ */
+int _alDebug( aldEnum level, const char *fn, int ln, const char *format, ... )
+	AL_ATTRIBUTE_FORMAT_PRINTF_(4,5);
+#endif
Index: /openal-0.0.8/src/al_distance.c
===================================================================
--- /openal-0.0.8/src/al_distance.c	(revision 17)
+++ /openal-0.0.8/src/al_distance.c	(revision 17)
@@ -0,0 +1,197 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_distance.c
+ *
+ * Implementation of distance models.
+ */
+#include "al_siteconfig.h"
+
+#include <math.h>
+
+#include "al_distance.h"
+#include "al_main.h"
+
+/*
+ * No distance attenuation.  Which means we return 1.0 for all values.
+ */
+static ALfloat
+noAttenuation( UNUSED(ALfloat distance),
+	       UNUSED(ALfloat rolloffFactor),
+	       UNUSED(ALfloat referenceDistance),
+	       UNUSED(ALfloat maxDistance))
+{
+	return 1.0f;
+}
+
+static ALfloat
+inverseDistance( ALfloat distance,
+		 ALfloat rolloffFactor,
+		 ALfloat referenceDistance,
+		 UNUSED(ALfloat maxDistance))
+{
+	/*
+	 * At this distance, the gain formula has a singularity and smaller
+	 * distances would result in a negative gain. In these cases, the spec
+	 * explicitly requires "no attenuation".
+	 */
+	ALfloat critDist = referenceDistance + (rolloffFactor * (distance - referenceDistance));
+	if (critDist <= 0.0f) {
+		return 1.0f;
+	}
+
+	return referenceDistance / critDist;
+}
+
+static ALfloat
+inverseDistanceClamped( ALfloat distance,
+			ALfloat rolloffFactor,
+			ALfloat referenceDistance,
+			ALfloat maxDistance )
+{
+	ALfloat critDist;
+
+	if (maxDistance <= referenceDistance) {
+		return 1.0;
+	}
+
+	/* distance = MAX( distance, referenceDistance ) */
+	if( distance < referenceDistance ) {
+		distance = referenceDistance;
+	}
+
+	/* distance = MIN( distance, maxDistance ) */
+	if( distance > maxDistance ) {
+		distance = maxDistance;
+	}
+
+	/*
+	 * At this distance, the gain formula has a singularity and smaller
+	 * distances would result in a negative gain. In these cases, the spec
+	 * explicitly requires "no attenuation".
+	 */
+	critDist = referenceDistance + (rolloffFactor * (distance - referenceDistance));
+	if (critDist <= 0.0f) {
+		return 1.0f;
+	}
+
+	return referenceDistance / critDist;
+}
+
+static ALfloat
+linearDistance( ALfloat distance,
+		ALfloat rolloffFactor,
+		ALfloat referenceDistance,
+		ALfloat maxDistance)
+{
+	if (maxDistance <= referenceDistance) {
+		return 1.0f;
+	}
+
+	return 1.0f - rolloffFactor * (distance - referenceDistance) / (maxDistance - referenceDistance);
+}
+
+static ALfloat
+linearDistanceClamped( ALfloat distance,
+		       ALfloat rolloffFactor,
+		       ALfloat referenceDistance,
+		       ALfloat maxDistance)
+{
+	if (maxDistance <= referenceDistance) {
+		return 1.0f;
+	}
+
+	/* distance = MAX( distance, referenceDistance ) */
+	if( distance < referenceDistance ) {
+		distance = referenceDistance;
+	}
+
+	/* distance = MIN( distance, maxDistance ) */
+	if( distance > maxDistance ) {
+		distance = maxDistance;
+	}
+
+	return 1.0f - rolloffFactor * (distance - referenceDistance) / (maxDistance - referenceDistance);
+}
+
+static ALfloat
+exponentDistance( ALfloat distance,
+		  ALfloat rolloffFactor,
+		  ALfloat referenceDistance,
+		  UNUSED(ALfloat maxDistance))
+{
+	ALfloat quotient;
+
+	if (referenceDistance == 0.0f) {
+		return 1.0f;
+	}
+
+	quotient = distance / referenceDistance;
+	if (quotient == 0.0f) {
+		return 1.0f;
+	}
+
+	return (ALfloat)pow(quotient, -rolloffFactor);
+}
+
+static ALfloat
+exponentDistanceClamped( ALfloat distance,
+			 ALfloat rolloffFactor,
+			 ALfloat referenceDistance,
+			 ALfloat maxDistance)
+{
+	ALfloat quotient;
+
+	if ((maxDistance <= referenceDistance) || (referenceDistance == 0.0f)) {
+		return 1.0f;
+	}
+
+	/* distance = MAX( distance, referenceDistance ) */
+	if( distance < referenceDistance ) {
+		distance = referenceDistance;
+	}
+
+	/* distance = MIN( distance, maxDistance ) */
+	if( distance > maxDistance ) {
+		distance = maxDistance;
+	}
+
+	quotient = distance / referenceDistance;
+	if (quotient == 0.0f) {
+		return 1.0f;
+	}
+
+	return (ALfloat)pow(quotient, -rolloffFactor);
+}
+
+void
+_alUpdateDistanceModel( AL_context *cc )
+{
+	switch( cc->distance_model) {
+	case AL_NONE:
+		cc->distance_func = noAttenuation;
+		break;
+	case AL_INVERSE_DISTANCE:
+		cc->distance_func = inverseDistance;
+		break;
+	case AL_INVERSE_DISTANCE_CLAMPED:
+		cc->distance_func = inverseDistanceClamped;
+		break;
+	case AL_LINEAR_DISTANCE:
+		cc->distance_func = linearDistance;
+		break;
+	case AL_LINEAR_DISTANCE_CLAMPED:
+		cc->distance_func = linearDistanceClamped;
+		break;
+	case AL_EXPONENT_DISTANCE:
+		cc->distance_func = exponentDistance;
+		break;
+	case AL_EXPONENT_DISTANCE_CLAMPED:
+		cc->distance_func = exponentDistanceClamped;
+		break;
+	default:
+		/* should never happen, just to be safe */
+		cc->distance_func = inverseDistanceClamped;
+		break;
+	}
+}
Index: /openal-0.0.8/src/al_distance.h
===================================================================
--- /openal-0.0.8/src/al_distance.h	(revision 17)
+++ /openal-0.0.8/src/al_distance.h	(revision 17)
@@ -0,0 +1,16 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_distance.h
+ *
+ * Prototypes related to the distance model.
+ *
+ */
+#ifndef AL_DISTANCE_H_
+#define AL_DISTANCE_H_
+
+#include "al_types.h"
+
+void _alUpdateDistanceModel( AL_context *cc );
+
+#endif /* AL_DISTANCE_H_ */
Index: /openal-0.0.8/src/al_error.c
===================================================================
--- /openal-0.0.8/src/al_error.c	(revision 17)
+++ /openal-0.0.8/src/al_error.c	(revision 17)
@@ -0,0 +1,159 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_error.c
+ *
+ * openal error reporting.
+ *
+ */
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <signal.h>
+#include <stdio.h>
+
+#include "al_debug.h"
+#include "al_types.h"
+#include "al_error.h"
+#include "alc/alc_context.h"
+
+/*
+ * _alShouldBombOnError_LOKI controls whether or not _alSetError should
+ * abort when setting an error.  This allows applications to get immediate
+ * error reporting.
+ */
+ALboolean _alShouldBombOnError_LOKI = AL_FALSE;
+
+/*
+ * index2ErrorNo( int index )
+ *
+ * Returns an al error from a simple index.
+ */
+static ALenum index2ErrorNo( int index );
+
+/*
+ * ErrorNo2index( ALenum error_number )
+ *
+ * Returns a simple index from an al error.
+ */
+static int ErrorNo2index( ALenum error_number );
+
+/**
+ * Error support.
+ */
+
+/*
+ * alGetError( void )
+ *
+ * Returns the most recent error generated in the AL state machine.
+ */
+ALenum alGetError( void ) {
+	AL_context *cc;
+	int index;
+
+	_alcDCLockContext();
+
+	cc = _alcDCGetContext();
+
+	if(cc == NULL)
+	{
+		_alcDCUnlockContext();
+		return 0;
+	}
+
+	index = index2ErrorNo(cc->alErrorIndex);
+
+	/*
+	 * In deference to the new spec, GetError clears the error
+	 * after reading it.
+	 */
+	cc->alErrorIndex = 0;
+
+	_alcDCUnlockContext();
+
+	return index;
+}
+
+/*
+ * ErrorNo2index( ALenum error_number )
+ *
+ * Returns a simple index from an al error.
+ */
+static int ErrorNo2index( ALenum error_number ) {
+	switch( error_number ) {
+		case AL_NO_ERROR:
+			return 0;
+		case AL_INVALID_NAME:
+			return 1;
+		case AL_INVALID_ENUM:
+			return 2;
+		case AL_INVALID_VALUE:
+			return 3;
+		case AL_INVALID_OPERATION:
+			return 4;
+		case AL_OUT_OF_MEMORY:
+			return 5;
+		default:
+			_alDebug( ALD_ERROR, __FILE__, __LINE__,
+				"Unknown error condition: 0x%x", error_number );
+			return -1;
+	}
+}
+
+/*
+ * index2ErrorNo( int index )
+ *
+ * Returns an al error from a simple index.
+ */
+static ALenum index2ErrorNo( int index ) {
+	switch( index ) {
+ 		case 0:
+			return AL_NO_ERROR;
+		case 1:
+			return AL_INVALID_NAME;
+		case 2:
+			return AL_INVALID_ENUM;
+		case 3:
+			return AL_INVALID_VALUE;
+		case 4:
+			return AL_INVALID_OPERATION;
+		case 5:
+			return AL_OUT_OF_MEMORY;
+		default:
+			_alDebug( ALD_ERROR, __FILE__, __LINE__,
+				"Unknown index : %d", index );
+			return -1;
+	}
+}
+
+/*
+ * _alSetError( ALuint cid, ALenum param )
+ *
+ * Sets the error for the context with name cid to param.
+ *
+ * assumes locked context
+ */
+void _alSetError( ALuint cid, ALenum param ) {
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		/* No default context, no error set. */
+		return;
+	}
+
+	if( cc->alErrorIndex == 0 ) {
+		/*
+		 * Only set error if no previous error has been recorded.
+		 */
+
+		cc->alErrorIndex = ErrorNo2index(param);
+	}
+
+	if(_alShouldBombOnError_LOKI == AL_TRUE) {
+		raise(SIGABRT);
+	}
+
+	return;
+}
Index: /openal-0.0.8/src/al_error.h
===================================================================
--- /openal-0.0.8/src/al_error.h	(revision 17)
+++ /openal-0.0.8/src/al_error.h	(revision 17)
@@ -0,0 +1,30 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_error.h
+ *
+ * openal error reporting.
+ */
+#ifndef _AL_ERROR_H_
+#define _AL_ERROR_H_
+
+#include <AL/al.h>
+#include "alc/alc_context.h"
+
+/*
+ * Sets the context specific error for the context specified by cid to the
+ * value param.
+ */
+void _alSetError( ALuint cid, ALenum param );
+
+/*
+ * _alShouldBombOnError_LOKI is a variable that, when set to AL_TRUE, will
+ * cause alSetError to abort when setting an error.  Default is AL_FALSE.
+ */
+extern ALboolean _alShouldBombOnError_LOKI;
+
+/* Macros to handle default context */
+
+#define _alDCSetError(p) _alSetError(_alcCCId, p)
+
+#endif /* _AL_ERROR_H_ */
Index: /openal-0.0.8/src/al_ext.c
===================================================================
--- /openal-0.0.8/src/al_ext.c	(revision 17)
+++ /openal-0.0.8/src/al_ext.c	(revision 17)
@@ -0,0 +1,901 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext.c
+ *
+ * Defines the mojo for built-in or dlopened extensions.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <AL/alext.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "al_main.h"
+#include "al_types.h"
+#include "al_ext.h"
+#include "al_error.h"
+#include "al_debug.h"
+
+#include "al_mutexlib.h"
+
+#ifndef NODLOPEN
+#include <dlfcn.h>
+#endif
+
+/*
+ * Maximum length of an extension function name.
+ */
+#define _AL_EXT_NAMELEN 240
+
+/*
+ * Maximum number of plugins supported
+ */
+#define MAX_EXT_LIBS 64
+
+/* locking macros */
+#define _alUnlockExtension() FL_alUnlockExtension(__FILE__, __LINE__)
+#define _alLockExtension()   FL_alLockExtension(__FILE__, __LINE__)
+
+/*
+ * FL_alLockExtension( const char *fn, int ln )
+ *
+ * Lock mutex guarding extension data structures, passing fn and ln to
+ * _alLockPrintf.
+ */
+static void FL_alLockExtension( const char *fn, int ln );
+
+/*
+ * FL_alUnlockExtension( const char *fn, int ln )
+ *
+ * Unlock mutex guarding extension data structures, passing fn and ln to
+ * _alLockPrintf.
+ */
+static void FL_alUnlockExtension( const char *fn, int ln );
+
+/* data structure storing extension library fini functions */
+static struct {
+	void (*pool[MAX_EXT_LIBS])(void);
+	int index;
+} FiniFunc;
+
+/* data structure storing extension functions.  Simple binary tree. */
+typedef struct _enode_t {
+	ALubyte name[ _AL_EXT_NAMELEN + 1 ];
+	AL_funcPtr addr;
+
+	struct _enode_t *left;
+	struct _enode_t *right;
+} enode_t;
+
+/*
+ * etree is the base for our function registry.
+ */
+static enode_t *etree    = NULL;
+
+/*
+ * ext_mutex is the mutex guarding extension data structures.
+ */
+static MutexID ext_mutex = NULL;
+
+/*
+ * Adds a new node to treenode, with name name and address addr.  Returns
+ * treenode.
+ */
+static enode_t *add_node( enode_t *treenode, const ALubyte *name, AL_funcPtr addr );
+
+/*
+ * Returns the node that exists in treenode with a matching name, or NULL if
+ * no such node exists.
+ */
+static enode_t *get_node( enode_t *treenode, const ALchar *name );
+
+/*
+ * _alDestroyExtension( void *extp )
+ *
+ * Finalizes a enode_t, but not it's children.
+ */
+static void _alDestroyExtension( void *extp );
+
+/*
+ * tree_free( enode_t *treehead, void (*ff)(void *) )
+ *
+ * Finalize an entire enode tree.
+ */
+static void tree_free( enode_t *treehead, void (*ff)(void *) );
+
+/*
+ * Allocate and return a new extension node.
+ */
+static enode_t *new_ext( const ALubyte *name, AL_funcPtr addr );
+
+#ifndef NODLOPEN
+/* following functions unneeded in we don't have dlopen */
+
+/*
+ * _alExtPushFiniFunc( void (*func)(void) )
+ *
+ * Pushes a func on the fini stack, so that fini functions can be called on
+ * exit or unload.
+ */
+static void _alExtPushFiniFunc( void (*func)(void) );
+
+#endif /* NODLOPEN */
+
+/*
+ * On the level of the specification, "Extension" is a
+ * group of functions and/or tokens that express a particular
+ * extended functionality of the API.
+ *
+ * In terms of this implementation 'Extension' refers
+ * to particular function that is registered in the
+ * dictionary for fast GetProcAddress(). A simple dlsym()
+ * is not possible because of the Linux implementation's
+ * dynamic plugin system.
+ *
+ * Also in terms of the implementation, 'Extension Group'
+ * refers to an extension in the specification sense--a name
+ * that surrounds a group of functions and/or tokens. It
+ * is possible to use a simple linked list for this, and
+ * IsExtensionPresent() simply traverses this list.
+ */
+
+#define _AL_EXT_GROUPLEN 256
+
+typedef struct _egroup_node_t {
+	ALubyte name[_AL_EXT_GROUPLEN+1];
+	struct _egroup_node_t* next;
+} egroup_node_t;
+
+/* linked list of exciting extension group names */
+static egroup_node_t* egroup_list = NULL;
+
+/*
+ * Returns TRUE is gname is a supported extension, FALSE otherwise.
+ */
+ALboolean alIsExtensionPresent( const ALchar* gname ) {
+	egroup_node_t* group = egroup_list;
+
+	while( group ) {
+
+		if( strncmp( (const char*) group->name,
+			     (const char*) gname,
+			     _AL_EXT_GROUPLEN ) == 0 ) {
+			return AL_TRUE;
+		}
+
+		group = group->next;
+	}
+
+	return AL_FALSE;
+}
+
+/*
+ * Populate buffer, up to size-1, with a string representation of the
+ * extension strings.  Returns AL_TRUE if size was greater or equal to 1,
+ * AL_FALSE otherwise.
+ */
+ALboolean _alGetExtensionStrings( ALchar* buffer, size_t size ) {
+	egroup_node_t *group = egroup_list;
+
+	if( size < 1 ) {
+		return AL_FALSE;
+	}
+
+	buffer[0] = '\0';
+
+	while( group ) {
+		size_t length = strlen( (char *) group->name ) + 1;
+
+		if( length < size ) {
+			strncat( (char *) buffer, (char *) group->name, size );
+			strncat( (char *) buffer, " ", size - length + 1 );
+		} else {
+			break;
+		}
+
+		size -= length;
+		group = group->next;
+	}
+
+	return AL_TRUE;
+}
+
+/*
+ * Add an extension group (see above) to the current list of extensions,
+ * returning AL_TRUE.  AL_FALSE is returned on error.
+ */
+ALboolean _alRegisterExtensionGroup( const ALubyte* gname ) {
+	egroup_node_t* group;
+
+	if( gname == NULL ) {
+		return AL_FALSE;
+	}
+
+	group = (egroup_node_t*) malloc( sizeof( *group ) );
+
+	if( group == NULL ) {
+		return AL_FALSE;
+	}
+
+	strncpy( (char*) group->name, (const char*) gname, _AL_EXT_GROUPLEN );
+	group->next = egroup_list;
+	egroup_list = group;
+
+	return AL_TRUE;
+}
+
+/*
+ * _alDestroyExtensionGroups( void )
+ *
+ * Finalize the extension group data structures.
+ */
+void _alDestroyExtensionGroups( void ) {
+	egroup_node_t *group = egroup_list;
+
+	while( group ) {
+		egroup_node_t *temp = group->next;
+		free( group );
+		group = temp;
+	}
+
+	egroup_list = NULL;
+
+	return;
+}
+
+/**
+ * Extension support.
+ */
+
+#define DEFINE_AL_PROC(p) { #p, (AL_funcPtr)p }
+
+typedef struct
+{
+	const ALchar *name;
+	AL_funcPtr value;
+} funcNameAddressPair;
+
+funcNameAddressPair alProcs[] = {
+	/* this has to be sorted! */
+	DEFINE_AL_PROC(alBuffer3f),
+	DEFINE_AL_PROC(alBuffer3i),
+	DEFINE_AL_PROC(alBufferData),
+	DEFINE_AL_PROC(alBufferf),
+	DEFINE_AL_PROC(alBufferfv),
+	DEFINE_AL_PROC(alBufferi),
+	DEFINE_AL_PROC(alBufferiv),
+	DEFINE_AL_PROC(alDeleteBuffers),
+	DEFINE_AL_PROC(alDeleteSources),
+	DEFINE_AL_PROC(alDisable),
+	DEFINE_AL_PROC(alDistanceModel),
+	DEFINE_AL_PROC(alDopplerFactor),
+	DEFINE_AL_PROC(alDopplerVelocity),
+	DEFINE_AL_PROC(alEnable),
+	DEFINE_AL_PROC(alGenBuffers),
+	DEFINE_AL_PROC(alGenSources),
+	DEFINE_AL_PROC(alGetBoolean),
+	DEFINE_AL_PROC(alGetBooleanv),
+	DEFINE_AL_PROC(alGetBuffer3f),
+	DEFINE_AL_PROC(alGetBuffer3i),
+	DEFINE_AL_PROC(alGetBufferf),
+	DEFINE_AL_PROC(alGetBufferfv),
+	DEFINE_AL_PROC(alGetBufferi),
+	DEFINE_AL_PROC(alGetBufferiv),
+	DEFINE_AL_PROC(alGetDouble),
+	DEFINE_AL_PROC(alGetDoublev),
+	DEFINE_AL_PROC(alGetEnumValue),
+	DEFINE_AL_PROC(alGetError),
+	DEFINE_AL_PROC(alGetFloat),
+	DEFINE_AL_PROC(alGetFloatv),
+	DEFINE_AL_PROC(alGetInteger),
+	DEFINE_AL_PROC(alGetIntegerv),
+	DEFINE_AL_PROC(alGetListener3f),
+	DEFINE_AL_PROC(alGetListener3i),
+	DEFINE_AL_PROC(alGetListenerf),
+	DEFINE_AL_PROC(alGetListenerfv),
+	DEFINE_AL_PROC(alGetListeneri),
+	DEFINE_AL_PROC(alGetListeneriv),
+	DEFINE_AL_PROC(alGetProcAddress),
+	DEFINE_AL_PROC(alGetSource3f),
+	/* DEFINE_AL_PROC(alGetSource3i), TODO: NOT YET IMPLEMENTED!!! */
+	DEFINE_AL_PROC(alGetSourcef),
+	DEFINE_AL_PROC(alGetSourcefv),
+	DEFINE_AL_PROC(alGetSourcei),
+	DEFINE_AL_PROC(alGetSourceiv),
+	DEFINE_AL_PROC(alGetString),
+	DEFINE_AL_PROC(alIsBuffer),
+	DEFINE_AL_PROC(alIsEnabled),
+	DEFINE_AL_PROC(alIsExtensionPresent),
+	DEFINE_AL_PROC(alIsSource),
+	DEFINE_AL_PROC(alListener3f),
+	DEFINE_AL_PROC(alListener3i),
+	DEFINE_AL_PROC(alListenerf),
+	DEFINE_AL_PROC(alListenerfv),
+	DEFINE_AL_PROC(alListeneri),
+	DEFINE_AL_PROC(alListeneriv),
+	DEFINE_AL_PROC(alSource3f),
+	/* DEFINE_AL_PROC(alSource3i), TODO: NOT YET IMPLEMENTED!!! */
+	DEFINE_AL_PROC(alSourcePause),
+	DEFINE_AL_PROC(alSourcePausev),
+	DEFINE_AL_PROC(alSourcePlay),
+	DEFINE_AL_PROC(alSourcePlayv),
+	DEFINE_AL_PROC(alSourceQueueBuffers),
+	DEFINE_AL_PROC(alSourceRewind),
+	DEFINE_AL_PROC(alSourceRewindv),
+	DEFINE_AL_PROC(alSourceStop),
+	DEFINE_AL_PROC(alSourceStopv),
+	DEFINE_AL_PROC(alSourceUnqueueBuffers),
+	DEFINE_AL_PROC(alSourcef),
+	DEFINE_AL_PROC(alSourcefv),
+	DEFINE_AL_PROC(alSourcei),
+	/* DEFINE_AL_PROC(alSourceiv), TODO: NOT YET IMPLEMENTED!!! */
+	DEFINE_AL_PROC(alSpeedOfSound)
+};
+
+#undef DEFINE_AL_PROC
+
+static int
+compareFuncNameAddressPairs(const void *s1, const void *s2)
+{
+	const funcNameAddressPair *p1 = (const funcNameAddressPair*)s1;
+	const funcNameAddressPair *p2 = (const funcNameAddressPair*)s2;
+	return strcmp((const char*)(p1->name), (const char*)(p2->name));
+}
+
+static ALboolean
+getStandardProcAddress(AL_funcPtr *value, const ALchar *funcName)
+{
+	funcNameAddressPair key;
+	funcNameAddressPair *p;
+	key.name = funcName;
+	p = bsearch(&key, alProcs,
+		    sizeof(alProcs) / sizeof(alProcs[0]),
+		    sizeof(alProcs[0]),
+		    compareFuncNameAddressPairs);
+	if (p == NULL) {
+		return AL_FALSE;
+	}
+	*value = p->value;
+	return AL_TRUE;
+}
+
+/* TODO: exporting this is a HACK */
+ALboolean
+_alGetExtensionProcAddress( AL_funcPtr *procAddress, const ALchar *funcName )
+{
+	enode_t *retpair;
+	retpair = get_node( etree, funcName );
+	if(retpair == NULL) {
+		return AL_FALSE;
+	}
+	*procAddress = retpair->addr;
+	return AL_TRUE;
+}
+
+/*
+ * alGetProcAddress( const ALubyte *fname )
+ *
+ * Obtain the address of a function (usually an extension) with the name
+ * fname. All addresses are context-independent.
+ */
+void *
+alGetProcAddress( const ALchar *funcName )
+{
+	AL_funcPtr value = NULL;
+	if (getStandardProcAddress(&value, funcName) == AL_TRUE) {
+		return (void *)value; /* NOTE: The cast is not valid ISO C! */
+	}
+	if (_alGetExtensionProcAddress(&value, funcName) == AL_TRUE) {
+		return (void *)value; /* NOTE: The cast is not valid ISO C! */
+	}
+	_alDCSetError( AL_INVALID_VALUE );
+	return (void *)value; /* NOTE: The cast is not valid ISO C! */
+}
+
+
+/*
+ * _alRegisterExtension is called to register an extension in our tree.
+ * extensions are not via GetProcAddress until they have been registered.
+ *
+ * Returns AL_TRUE if the name/addr pair was added, AL_FALSE otherwise.
+ */
+ALboolean _alRegisterExtension( const ALubyte *name, AL_funcPtr addr ) {
+	enode_t *temp;
+
+	_alLockExtension();
+
+	temp = add_node( etree, name, addr );
+	if(temp == NULL) {
+		_alUnlockExtension();
+		_alDebug(ALD_EXT, __FILE__, __LINE__,
+			"could not add extension %s", name);
+		return AL_FALSE;
+	}
+
+	_alUnlockExtension();
+	etree = temp;
+
+	_alDebug(ALD_EXT, __FILE__, __LINE__,
+		 "registered %s at %p", name, (void*)addr);
+
+	return AL_TRUE;
+}
+
+/*
+ * _alDestroyExtension( void *extp )
+ *
+ * Finalizes a enode_t, but not it's children.
+ */
+static void _alDestroyExtension(void *extp) {
+	free( extp );
+
+	return;
+}
+
+/*
+ * _alInitExtensions( void )
+ *
+ * Initializes extension bookkeeping data structures.
+ *
+ * Not much to do here, since the structures are built via the register calls.
+ * So just init the mutex.  Return AL_TRUE unless the mutex could not be
+ * initialized.
+ */
+ALboolean _alInitExtensions( void ) {
+	if(ext_mutex == NULL) {
+		ext_mutex = _alCreateMutex();
+		if(ext_mutex == NULL) {
+			return AL_FALSE;
+		}
+	}
+
+	return AL_TRUE;
+}
+
+/*
+ * _alDestroyExtensions( void )
+ *
+ * Destroy extension book keeping structures.
+ */
+void _alDestroyExtensions( void ) {
+	int i;
+
+	tree_free( etree, _alDestroyExtension );
+	_alDestroyMutex( ext_mutex );
+
+	etree     = NULL;
+	ext_mutex = NULL;
+
+	for(i = FiniFunc.index - 1; i >= 0; i--) {
+		FiniFunc.pool[i](); /* call fini funcs */
+		FiniFunc.index--;
+	}
+
+	return;
+}
+
+/*
+ * Adds a function with name "name" and address "addr" to the tree with root
+ * at treehead.
+ *
+ * assumes locked extensions
+ */
+static enode_t *add_node( enode_t *treehead, const ALubyte *name, AL_funcPtr addr ) {
+	int i;
+	enode_t *retval;
+
+	if((addr == NULL) || (name == NULL)) {
+		return NULL;
+	}
+
+	if(treehead == NULL) {
+		retval = new_ext( name, addr );
+		if(retval == NULL) {
+			return NULL;
+		}
+
+		return retval;
+	}
+
+	i = ustrncmp( name, treehead->name, _AL_EXT_NAMELEN );
+
+	if(i < 0) {
+		treehead->left = add_node( treehead->left, name, addr );
+	}
+	if(i == 0) {
+		return treehead;
+	}
+	if(i > 0) {
+		treehead->right = add_node( treehead->right, name, addr );
+	}
+
+	return treehead;
+}
+
+/*
+ * Returns a new extension node, using name and addr as initializers, or NULL
+ * if resources were not available.
+ */
+static enode_t *new_ext( const ALubyte *name, AL_funcPtr addr ) {
+	enode_t *retval = malloc( sizeof *retval );
+	if(retval == NULL) {
+		return NULL;
+	}
+
+	ustrncpy( retval->name, name, _AL_EXT_NAMELEN );
+	retval->addr  = addr;
+	retval->left  = NULL;
+	retval->right = NULL;
+
+	return retval;
+}
+
+/*
+ * tree_free( enode_t *treehead, void (*ff)(void *) )
+ *
+ * Destroy the tree with root at treehead, calling ff on each data item.
+ */
+static void tree_free( enode_t *treehead, void (*ff)(void *) ) {
+	enode_t *temp;
+
+	if(treehead == NULL) {
+		return;
+	}
+
+	if(treehead->left) {
+		tree_free( treehead->left, ff );
+	}
+
+	temp = treehead->right;
+	free( treehead );
+
+	tree_free( temp, ff );
+
+	return;
+}
+
+/*
+ * Retrieve enode_t pointer for extension with name "name" from
+ * tree with root "treehead", or NULL if not found.
+ */
+static enode_t *get_node( enode_t *treehead, const ALchar *name ) {
+	int i;
+
+	if((name == NULL) || (treehead == NULL)) {
+		return NULL;
+	}
+
+	i = ustrncmp(name, treehead->name, _AL_EXT_NAMELEN);
+	if(i < 0) {
+		return get_node(treehead->left, name);
+	}
+	if(i > 0) {
+		return get_node(treehead->right, name);
+	}
+
+	return treehead;
+}
+
+#ifdef NODLOPEN
+
+ALboolean _alLoadDL(UNUSED(const char *fname)) {
+	return AL_FALSE;
+}
+
+#else
+
+/*
+ * _alLoadDL( const char *fname )
+ *
+ * Load the plugin named by fname, returning AL_TRUE on sucess, AL_FALSE on
+ * error.
+ *
+ *  FIXME: some sort of locking is in order.
+ *
+ *  FIXME: stick the fini_func function somewhere so we
+ *         can actually call it.
+ */
+ALboolean _alLoadDL( const char *fname ) {
+	void *handle;
+	AL_extension *ext_table;
+	static void (*init_func)( void );
+	static void (*fini_func)( void );
+	int i;
+
+	handle = dlopen( fname, RTLD_GLOBAL | RTLD_NOW );
+	if(handle == NULL) {
+		_alDebug(ALD_EXT, __FILE__, __LINE__,
+			"Could not load %s:\n\t%s", fname, dlerror());
+		return AL_FALSE;
+	}
+
+	ext_table = dlsym(handle, LAL_EXT_TABLE_STR);
+	if(ext_table == NULL) {
+		_alDebug(ALD_EXT, __FILE__, __LINE__,
+			"%s has no extension table.", fname);
+		return AL_FALSE;
+	}
+
+	init_func = (void (*)(void)) dlsym(handle, LAL_EXT_INIT_STR);
+	fini_func = (void (*)(void)) dlsym(handle, LAL_EXT_FINI_STR);
+
+	for( i = 0; (ext_table[i].name != NULL) &&
+		    (ext_table[i].addr != NULL); i++) {
+		_alRegisterExtension( ext_table[i].name, ext_table[i].addr );
+	}
+
+	if(init_func != NULL) {
+		/* initialize library */
+		init_func();
+	}
+
+	if(fini_func != NULL) {
+		_alExtPushFiniFunc( fini_func );
+	}
+
+	return AL_TRUE;
+}
+#endif
+
+/*
+ * lal_addTimeFilter( const char *name, time_filter *addr )
+ *
+ * Adds or replaces a time filter in the filter pipeline.  Returns AL_TRUE on
+ * success, AL_FALSE on error.
+ *
+ *  Not super-well tested.
+ *
+ *  FIXME: set error?  Probably not.
+ */
+ALboolean lal_addTimeFilter( const char *name, time_filter *addr ) {
+	AL_context *cc;
+	time_filter_set *tfs;
+	int i;
+	int scmp;
+
+	/* check args */
+	if((name == NULL) || (addr == NULL)) {
+		return AL_FALSE;
+	}
+
+	_alcDCLockContext();
+
+	cc = _alcDCGetContext();
+	if(cc == NULL) {
+		_alcDCUnlockContext();
+		return AL_FALSE;
+	}
+
+	tfs = cc->time_filters;
+
+	for(i = 0; (i < _ALC_MAX_FILTERS) && (tfs->filter != NULL); i++) {
+		scmp = strncmp(tfs[i].name, name, _ALF_MAX_NAME);
+		if(scmp == 0) {
+			/* overwrite existing filter */
+			tfs[i].filter = addr;
+
+			_alcDCUnlockContext();
+			return AL_TRUE;
+		}
+	}
+
+	if(i == _ALC_MAX_FILTERS) {
+		/* no room for new filter */
+		_alcDCUnlockContext();
+
+		return AL_FALSE;
+	}
+
+	/* add new filter */
+	strncpy(tfs[i].name, name, _ALF_MAX_NAME);
+	tfs[i].filter = addr;
+
+	_alcDCUnlockContext();
+
+	return AL_TRUE;
+}
+
+/*
+ * FL_alLockExtension( const char *fn, int ln )
+ *
+ * Lock mutex guarding extension data structures, passing fn and ln to
+ * _alLockPrintf.
+ */
+static void FL_alLockExtension(UNUSED(const char *fn), UNUSED(int ln)) {
+	_alLockPrintf("_alLockExtension", fn, ln);
+
+	if(ext_mutex == NULL) {
+		/*
+		 * Sigh.  Extensions are loaded from config, so they
+		 * need to have locks even before _alMain is called,
+		 * so InitExtension may not be called at this point.
+		 */
+		ext_mutex = _alCreateMutex();
+	}
+
+	_alLockMutex( ext_mutex );
+
+	return;
+}
+
+/*
+ * FL_alUnlockExtension( const char *fn, int ln )
+ *
+ * Unlock mutex guarding extension data structures, passing fn and ln to
+ * _alLockPrintf.
+ */
+static void FL_alUnlockExtension(UNUSED(const char *fn), UNUSED(int ln)) {
+	_alLockPrintf("_alUnlockExtension", fn, ln);
+
+	_alUnlockMutex( ext_mutex );
+
+	return;
+}
+
+
+#ifndef NODLOPEN
+/* avoid errors on platforms that don't support dlopen */
+
+/*
+ * _alExtPushFiniFunc( void (*func)(void) )
+ *
+ * Saves fini func to call on dlclose time.
+ */
+static void _alExtPushFiniFunc( void (*func)(void) ) {
+	if(FiniFunc.index >= MAX_EXT_LIBS) {
+		return;
+	}
+
+	FiniFunc.pool[FiniFunc.index] = func;
+	FiniFunc.index++;
+
+	return;
+}
+#endif /* NODLOPEN */
+
+#define DEFINE_AL_ENUM(e) { #e, e }
+
+typedef struct
+{
+	const ALchar *name;
+	ALenum value;
+} enumNameValuePair;
+
+enumNameValuePair alEnums[] = {
+	/* this has to be sorted! */
+	DEFINE_AL_ENUM(AL_BITS),
+	DEFINE_AL_ENUM(AL_BUFFER),
+	DEFINE_AL_ENUM(AL_BUFFERS_PROCESSED),
+	DEFINE_AL_ENUM(AL_BUFFERS_QUEUED),
+	DEFINE_AL_ENUM(AL_BYTE_OFFSET),
+	DEFINE_AL_ENUM(AL_CHANNELS),
+	DEFINE_AL_ENUM(AL_CONE_INNER_ANGLE),
+	DEFINE_AL_ENUM(AL_CONE_OUTER_ANGLE),
+	DEFINE_AL_ENUM(AL_CONE_OUTER_GAIN),
+	DEFINE_AL_ENUM(AL_DIRECTION),
+	DEFINE_AL_ENUM(AL_DISTANCE_MODEL),
+	DEFINE_AL_ENUM(AL_DOPPLER_FACTOR),
+	DEFINE_AL_ENUM(AL_DOPPLER_VELOCITY),
+	DEFINE_AL_ENUM(AL_EXPONENT_DISTANCE),
+	DEFINE_AL_ENUM(AL_EXPONENT_DISTANCE_CLAMPED),
+	DEFINE_AL_ENUM(AL_EXTENSIONS),
+	DEFINE_AL_ENUM(AL_FALSE),
+	DEFINE_AL_ENUM(AL_FORMAT_MONO16),
+	DEFINE_AL_ENUM(AL_FORMAT_MONO8),
+	DEFINE_AL_ENUM(AL_FORMAT_STEREO16),
+	DEFINE_AL_ENUM(AL_FORMAT_STEREO8),
+	DEFINE_AL_ENUM(AL_FREQUENCY),
+	DEFINE_AL_ENUM(AL_GAIN),
+	DEFINE_AL_ENUM(AL_INITIAL),
+	DEFINE_AL_ENUM(AL_INVALID_ENUM),
+	DEFINE_AL_ENUM(AL_INVALID_NAME),
+	DEFINE_AL_ENUM(AL_INVALID_OPERATION),
+	DEFINE_AL_ENUM(AL_INVALID_VALUE),
+	DEFINE_AL_ENUM(AL_INVERSE_DISTANCE),
+	DEFINE_AL_ENUM(AL_INVERSE_DISTANCE_CLAMPED),
+	DEFINE_AL_ENUM(AL_LINEAR_DISTANCE),
+	DEFINE_AL_ENUM(AL_LINEAR_DISTANCE_CLAMPED),
+	DEFINE_AL_ENUM(AL_LOOPING),
+	DEFINE_AL_ENUM(AL_MAX_DISTANCE),
+	DEFINE_AL_ENUM(AL_MAX_GAIN),
+	DEFINE_AL_ENUM(AL_MIN_GAIN),
+	DEFINE_AL_ENUM(AL_NONE),
+	DEFINE_AL_ENUM(AL_NO_ERROR),
+	DEFINE_AL_ENUM(AL_ORIENTATION),
+	DEFINE_AL_ENUM(AL_OUT_OF_MEMORY),
+	DEFINE_AL_ENUM(AL_PAUSED),
+	DEFINE_AL_ENUM(AL_PENDING),
+	DEFINE_AL_ENUM(AL_PITCH),
+	DEFINE_AL_ENUM(AL_PLAYING),
+	DEFINE_AL_ENUM(AL_POSITION),
+	DEFINE_AL_ENUM(AL_PROCESSED),
+	DEFINE_AL_ENUM(AL_REFERENCE_DISTANCE),
+	DEFINE_AL_ENUM(AL_RENDERER),
+	DEFINE_AL_ENUM(AL_ROLLOFF_FACTOR),
+	DEFINE_AL_ENUM(AL_SAMPLE_OFFSET),
+	DEFINE_AL_ENUM(AL_SEC_OFFSET),
+	DEFINE_AL_ENUM(AL_SIZE),
+	DEFINE_AL_ENUM(AL_SOURCE_RELATIVE),
+	DEFINE_AL_ENUM(AL_SOURCE_STATE),
+	DEFINE_AL_ENUM(AL_SOURCE_TYPE),
+	DEFINE_AL_ENUM(AL_SPEED_OF_SOUND),
+	DEFINE_AL_ENUM(AL_STATIC),
+	DEFINE_AL_ENUM(AL_STOPPED),
+	DEFINE_AL_ENUM(AL_STREAMING),
+	DEFINE_AL_ENUM(AL_TRUE),
+	DEFINE_AL_ENUM(AL_UNDETERMINED),
+	DEFINE_AL_ENUM(AL_UNUSED),
+	DEFINE_AL_ENUM(AL_VELOCITY),
+	DEFINE_AL_ENUM(AL_VENDOR),
+	DEFINE_AL_ENUM(AL_VERSION)
+};
+
+#undef DEFINE_AL_ENUM
+
+static int
+compareEnumNameValuePairs(const void *s1, const void *s2)
+{
+	const enumNameValuePair *p1 = (const enumNameValuePair*)s1;
+	const enumNameValuePair *p2 = (const enumNameValuePair*)s2;
+	return strcmp((const char*)(p1->name), (const char*)(p2->name));
+}
+
+static ALboolean
+getStandardEnumValue(ALenum *value, const ALchar *enumName)
+{
+	enumNameValuePair key;
+	enumNameValuePair *p;
+	key.name = enumName;
+	p = bsearch(&key, alEnums,
+		    sizeof(alEnums) / sizeof(alEnums[0]),
+		    sizeof(alEnums[0]),
+		    compareEnumNameValuePairs);
+	if (p == NULL) {
+		return AL_FALSE;
+	}
+	*value = p->value;
+	return AL_TRUE;
+}
+
+static ALboolean
+getExtensionEnumValue( ALenum *value, const ALchar *enumName )
+{
+	/* ToDo: Hook in our extension loader somehow */
+	const char *name = (const char*)enumName;
+	if (strcmp(name, "AL_BYTE_LOKI") == 0) {
+		*value = AL_BYTE_LOKI;
+		return AL_TRUE;
+	} else if (strcmp(name, "AL_FORMAT_QUAD16_LOKI") == 0) {
+		*value = AL_FORMAT_QUAD16_LOKI;
+		return AL_TRUE;
+	} else if (strcmp(name, "AL_FORMAT_QUAD8_LOKI") == 0) {
+		*value = AL_FORMAT_QUAD8_LOKI;
+		return AL_TRUE;
+	} else {
+		return AL_FALSE;
+	}
+}
+
+/*
+ * alGetEnumValue( const ALubyte *enumName )
+ *
+ * Returns the integer value of an enumeration (usually an extension)
+ * with the name ename.
+ */
+ALenum
+alGetEnumValue( const ALchar *enumName )
+{
+	ALenum value = 0;
+	if (getStandardEnumValue(&value, enumName) == AL_TRUE) {
+		return value;
+	}
+	if (getExtensionEnumValue(&value, enumName) == AL_TRUE) {
+		return value;
+	}
+	_alDCSetError( AL_INVALID_VALUE );
+	return value;
+}
Index: /openal-0.0.8/src/al_ext.h
===================================================================
--- /openal-0.0.8/src/al_ext.h	(revision 17)
+++ /openal-0.0.8/src/al_ext.h	(revision 17)
@@ -0,0 +1,123 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext.h
+ *
+ * Extension handling.
+ */
+#ifndef _AL_EXT_H_
+#define _AL_EXT_H_
+
+#include "al_siteconfig.h"
+
+#include "al_types.h"
+#include "al_filter.h"
+#include "al_config.h"
+
+/*
+ * the LAL... defines are used in conjunction with plugins, to determine the
+ * symbols defined in each at runtime.
+ */
+
+#define LAL_EXT_SUFFIX		03282000
+#define LAL_EXT_TABLE		alExtension
+#define LAL_EXT_INIT		alExtInit
+#define LAL_EXT_FINI		alExtFini
+
+#define LAL_EXT_TABLE_STR	PASTE(LAL_EXT_TABLE, LAL_EXT_SUFFIX)
+#define LAL_EXT_INIT_STR	PASTE(LAL_EXT_INIT, LAL_EXT_SUFFIX)
+#define LAL_EXT_FINI_STR	PASTE(LAL_EXT_FINI, LAL_EXT_SUFFIX)
+
+#define PASTE__(a1)             #a1
+#define PASTE_(a1, a2)          PASTE__(a1 ## _ ## a2)
+#define PASTE(a1, a2)           PASTE_(a1, a2)
+
+
+/* stuff that was in the standard 1.0 headers, but shouldn't have been... */
+#ifndef AL_BYTE_LOKI
+#define AL_BYTE_LOKI                              0x100C
+#endif
+
+
+/* bookkeeping stuff */
+
+/*
+ * Initialize data structures neccesary for the registration and management of
+ * extension groups and extension functions.  Return AL_TRUE if successful,
+ * AL_FALSE otherwise.
+ */
+ALboolean _alInitExtensions( void );
+
+/*
+ * Deallocs the data structures allocated in _alInitExtensions.
+ */
+void _alDestroyExtensions( void );
+
+/*
+ * Registers an extension group.  Before registration, queries of
+ * alIsExtensionPresent( extGroup) will return AL_FALSE, after will
+ * return AL_TRUE.
+ *
+ * Returns AL_TRUE if registration was successful, AL_FALSE otherwise.
+ */
+ALboolean _alRegisterExtensionGroup( const ALubyte *extGroup );
+
+/*
+ * Destroy data structures needed to hold extension group information.
+ */
+void _alDestroyExtensionGroups( void );
+
+/*
+ * Gets a list of extension groups registered, populating buffer up to size.
+ *
+ * Returns AL_FALSE if size < 1, AL_TRUE otherwise.
+ */
+ALboolean _alGetExtensionStrings( ALchar *buffer, size_t size );
+
+/* TODO: exporting this is a HACK */
+ALboolean _alGetExtensionProcAddress( AL_funcPtr *procAddress, const ALchar *funcName );
+
+/*
+ * Adds a function to the available extension registry.  Before registration,
+ * queries of alGetProcAddress( name ) will return NULL.  After, they will
+ * return addr.
+ *
+ * Returns AL_FALSE if name has already been registered, AL_TRUE otherwise.
+ */
+ALboolean _alRegisterExtension( const ALubyte *name, AL_funcPtr addr );
+
+/*
+ * dlopens a shared object, gets the extension table from it, and
+ * the runs _alRegisterExtension on each extension pair in it.
+ *
+ * Returns AL_TRUE if fname refers to a valid plugin, AL_FALSE otherwise.
+ */
+ALboolean _alLoadDL( const char *fname );
+
+/*
+ *  Functions that extensions can call to add functionality.
+ */
+
+/*
+ * add a filter by name, replacing if already there.  Returns
+ * AL_TRUE if function was added or replaced, AL_FALSE if that
+ * wasn't possible.
+ */
+ALboolean lal_addTimeFilter( const char *name, time_filter *addr );
+
+/*
+ * alLokiTest( void *dummy )
+ *
+ * For testing purposes
+ */
+void alLokiTest( void *dummy );
+
+/*
+ * look up bindings for symbols.
+ *
+ * FIXME: should replace with rc_lookup functions.
+ */
+#define lal_GetGlobalScalar(s,t,r)   _alGetGlobalScalar(s,t,r)
+#define lal_GetGlobalVector(s,t,n,r) _alGetGlobalScalar(s,t,n,r)
+
+#endif /* _AL_EXT_H_ */
Index: /openal-0.0.8/src/al_filter.c
===================================================================
--- /openal-0.0.8/src/al_filter.c	(revision 17)
+++ /openal-0.0.8/src/al_filter.c	(revision 17)
@@ -0,0 +1,1778 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_filter.c
+ *
+ * Contains filters.
+ *
+ *
+ * Short guide to filters:
+ *
+ * Filters all have the prefix alf_<something>.  Each filter
+ * defined in software_time_filters or software_frequency_filters
+ * is applied to each source that finds its way into the mixer.
+ *
+ * ApplyFilters takes a chunk of data from the original buffer
+ * associated with the passed source.
+ *
+ * This chunk is understood to be that block of data samp->_orig_buffer
+ * offset src->soundpos to src->soundpos + bufsiz, where src is the
+ * passed AL_source, samp is the AL_buffer associated with src, and
+ * bufsiz is the length of the chunk of data that we want.  It is usually
+ * set to _AL_DEF_BUFSIZE, unless specified by ALC_BUFFERSIZE in the
+ * application.
+ *
+ * Applying filters to a source does not (should not) change the original
+ * pcm data.  ApplyFilters will split the original pcm data prior to
+ * calling each filter, and filters should restrict themselves to
+ * manipulating the passed data.
+ *
+ * time domain filters (those defines in software_time_filters) are
+ * passed:
+ *	ALuint cid
+ *		identifier for the context that this source belongs to
+ *	AL_source *src
+ *		source that the filter should be applied to
+ *	AL_buffer *samp
+ *		buffer that the source is associated with
+ *	ALshort **buffers
+ *		arrays of points to PCM data, one element per
+ *		channel(left/right/etc)
+ *	ALuint nc
+ *		number of elements in buffers
+ *	ALuint len
+ *		byte length of each element in buffers
+ *
+ * Filters are expected to alter buffers[0..nc-1] in place.  After
+ * the ApplyFilter iteration is over, the resulting data is mixed into
+ * the main mix buffer and forgotten.  The data altered is cumulative,
+ * that is to say, if two filters alf_f and alf_g occur in sequential
+ * order, alf_g will see the pcm data after alf_f has altered it.
+ *
+ * FINER POINTS:
+ *
+ * A lot of the filters make effects by modulating amplitude and delay.
+ * Because these changes are cumulative, we can reduce the application
+ * of amplitude and delay changes to one operation.  This is the point
+ * of SourceParamApply --- filters can make changes to srcParams.gain
+ * and srcParams.delay in a source and have those changes applied at
+ * the end of the ApplyFilters call for the source.  These values are
+ * reset to their defaults at the top of the ApplyFilters call.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/alext.h>
+
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#include <float.h>
+
+#include "al_buffer.h"
+#include "al_debug.h"
+#include "al_error.h"
+#include "al_filter.h"
+#include "al_listen.h"
+#include "al_main.h"
+#include "al_mixer.h"
+#include "al_source.h"
+#include "al_queue.h"
+#include "al_vector.h"
+
+#include "alc/alc_context.h"
+#include "alc/alc_speaker.h"
+
+#define MIN(a,b) (((a) < (b)) ? (a) : (b))
+#define MAX(a,b) (((a) < (b)) ? (b) : (a))
+
+#define MIN_PITCH 0.25f
+
+#define USE_TPITCH_LOOKUP 1 /* icculus change here JIV FIXME */
+
+/*
+ * _AL_CUTTOFF_ATTENUATION is the value below which, sounds are not further
+ * distance attenuated.  The purpose of this culling is to avoid pop-off
+ * artifacts.
+ *
+ * Elias: This has been found to cause insufficient distance attenuation
+ * and has therefore been effectively disabled by setting it to 0. If no
+ * problems show up, the value should be completely removed.
+ * The original was value 0.01
+ */
+#define _AL_CUTTOFF_ATTENUATION 0.00
+
+/*
+ * TPITCH_MAX sets the number of discrete values for AL_PITCH we can have.
+ * You can set AL_PITCH to anything, but integer rounding will ensure that
+ * it will fall beween MIN_SCALE and 2.0.
+ *
+ * 2.0 is an arbitrary constant, and likely to be changed.
+ */
+#define TPITCH_MAX       256
+
+/*
+ * The default software time domain filters.
+ *
+ * I wish I could say that the order of these does not matter,
+ * but it does.  Namely, tdoppler and tpitch must occur in that
+ * order, and they must occur before any other filter.  listenergain must
+ * occur last.
+ */
+static time_filter_set software_time_filters[] = {
+	{ "tdoppler",      alf_tdoppler }, /* time-domain doppler filter */
+	{ "tpitch",        alf_tpitch   }, /* time-domain pitch filter */
+	{ "da",            alf_da },
+	{ "reverb",        alf_reverb },
+	{ "coning",        alf_coning },
+	{ "panning",       alf_panning },
+	{ "minmax",        alf_minmax },
+	{ "listenergain",  alf_listenergain },
+	{ { 0 },     NULL }
+};
+
+/*
+ * compute_sa( ALfloat *source_pos, ALfloat source_max,
+ *             ALfloat source_ref, ALfloat source_gain,
+ *             ALfloat source_rolloff,
+ *             ALfloat *speaker_pos,
+ *             ALfloat (*df)( ALfloat dist, ALfloat rolloff,
+ *                            ALfloat ref, ALfloat max))
+ *
+ * computes distance attenuation with respect to a speaker position.
+ *
+ * This is some normalized value which gets expotenially closer to 1.0
+ * as the source approaches the listener.  The minimum attenuation is
+ * AL_CUTTOFF_ATTENUATION, which approached when the source approaches
+ * the max distance.
+ *
+ * source_pos = source position   [x/y/z]
+ * source_max = source specific max distance
+ * speaker_pos = speaker position [x/y/z]
+ * ref        = source's reference distance
+ * df         = distance model function
+ * max        = maximum distance, beyond which everything is clamped at
+ *              some small value near, but not equal to, zero.
+ */
+static ALfloat compute_sa( ALfloat *source_pos, ALfloat source_max,
+			   ALfloat source_ref, ALfloat source_gain,
+			   ALfloat source_rolloff,
+			   ALfloat *speaker_pos,
+			   ALfloat df( ALfloat dist, ALfloat rolloff, ALfloat ref, ALfloat max ));
+
+#if USE_TPITCH_LOOKUP
+/*
+ * our quick lookup table for our time domain pitch filter.
+ *
+ *
+ * We initialize each element in offsets to be a set of offsets,
+ * such that
+ *
+ * 	offset[x][y]     = int portion of y * pitch
+ *      fractinoal[x][y] = fractional portion of y * pitch
+ *
+ * 	Where x is the discrete integer value of pitch, and y is
+ * 	any value between 0 and the length of a buffer.
+ *
+ * What's the point?  To save the pain of float->int conversion at
+ * runtime, which is needed to map the original PCM data to a
+ * "pitch modified" mapping of the same data.
+ *
+ */
+static struct {
+	int *offsets[TPITCH_MAX]; /* use int instead of ALint because
+				   * these are array indexes
+				   */
+	float *fractionals[TPITCH_MAX];
+	ALuint max;
+	ALuint middle; /* the index which pitch == 1.0 corresponds to */
+	ALuint len; /* length of offsets[0...TPITCH_MAX] in samples */
+} tpitch_lookup = { { NULL }, { NULL }, 0, 0, 0 };
+
+/* func associated with our tpitch lookup */
+static void init_tpitch_lookup(ALuint len);
+#endif
+
+static ALfloat compute_doppler_pitch(ALfloat *object1, ALfloat *o1_vel,
+			       ALfloat *object2, ALfloat *o2_vel,
+			       ALfloat factor, ALfloat speed);
+
+/*
+ * _alInitTimeFilters( time_filter_set *tf_ptr_ref )
+ *
+ * Initializes tf_ptr_ref to the current set of time filters, and initialize
+ * tpitch_lookup_max if it hasn't been initialized before.
+ */
+void _alInitTimeFilters( time_filter_set *tf_ptr_ref ) {
+	ALuint i = 0;
+
+	do {
+		tf_ptr_ref[i] = software_time_filters[i];
+	} while(software_time_filters[i++].filter != NULL);
+
+#if USE_TPITCH_LOOKUP
+	/*
+	 * init tpitch_loopup only if it hasn't been initialized
+	 * yet.
+	 */
+	if(tpitch_lookup.max != TPITCH_MAX) {
+		tpitch_lookup.max    = TPITCH_MAX;
+		tpitch_lookup.middle = TPITCH_MAX / 2;
+
+		for(i = 0; i < tpitch_lookup.max; i++)
+		{
+			free(tpitch_lookup.offsets[i]);
+			free(tpitch_lookup.fractionals[i]);
+			tpitch_lookup.offsets[i] = 0;
+			tpitch_lookup.fractionals[i] = 0;
+		}
+	}
+#endif
+
+	return;
+}
+
+/*
+ * _alDestroyFilters( void )
+ *
+ * Deallocates data structures used by the filters and helper functions.
+ */
+void _alDestroyFilters( void ) {
+#if USE_TPITCH_LOOKUP
+	ALuint i;
+
+	for(i = 0; i < TPITCH_MAX; i++)
+	{
+		free(tpitch_lookup.offsets[i]);
+		free(tpitch_lookup.fractionals[i]);
+
+		tpitch_lookup.offsets[i] = 0;
+		tpitch_lookup.fractionals[i] = 0;
+	}
+	tpitch_lookup.len = 0;
+#endif
+
+	return;
+}
+
+/*
+ * _alApplyFilters( ALuint cid, ALuint sid )
+ *
+ * _alApplyFilters is called from the mixing function, and is passed
+ * a source id and the context where this sourceid has meaning.
+ *
+ * The filters that are applied to the source are determined by the
+ * context.  Each context is initialized such that it contains a table
+ * of the software filters.  Extensions and plugins can be later loaded
+ * to override the default functionality.  The point being, each context's
+ * filter "signature" may be different.
+ *
+ * assumes locked source sid
+ */
+void _alApplyFilters( ALuint cid, ALuint sid ) {
+	AL_source *src;
+	AL_buffer *samp;
+	time_filter_set *cc_tfilters;
+	time_filter *tf;
+	ALuint mixbuflen; /* byte size of total data to compose (all channels) */
+	ALint len;        /* byte size of one channel's worth of data to compose */
+	ALint filterlen;  /* filterlen is adjusted below to take into account looping, etc */
+	int ic;           /* internal (canon) chans   */
+	int mc;           /* mixer chans (==speakers) */
+	ALboolean *boolp;	/* for determining bool flags */
+	int i;
+
+	/* initialize */
+	ic = _alGetChannelsFromFormat( _ALC_CANON_FMT );
+
+	_alcLockContext( cid );
+
+	mc = _alcGetNumSpeakers( cid );
+	mixbuflen = _alcGetWriteBufsiz( cid );
+
+	samp = _alGetBufferFromSid( cid, sid );
+	if(samp == NULL) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"_alFilter: null samp, sid == %d", sid);
+
+		_alcUnlockContext( cid );
+		return;
+	}
+
+	_alcUnlockContext( cid );
+
+	len = mixbuflen * ((float) ic / mc);
+	filterlen = len;
+
+	/*
+	 * Allocate scratch space to hold enough data for the source
+	 * about to be split.  We allocate more space in case of a
+	 * multichannel source.
+	 */
+	if(f_buffers.len < len / sizeof (ALshort))
+	{
+		void *temp;
+		ALuint newlen = len * _alGetChannelsFromFormat(samp->format);
+
+		for(i = 0; i < mc; i++)
+		{
+			temp = realloc(f_buffers.data[i], newlen);
+			if(temp == NULL) {
+				/* FIXME: do something */
+			}
+
+			f_buffers.data[i] = temp;
+		}
+
+		f_buffers.len = newlen;
+	}
+
+#if USE_TPITCH_LOOKUP
+	if(tpitch_lookup.len < (ALuint) len)
+	{
+		init_tpitch_lookup(len);
+	}
+#endif
+
+	src  = _alGetSource(cid, sid);
+	if(src == NULL) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"_alFilter: null src, sid == %d", sid);
+		return;
+	}
+
+	/* streaming buffer?  set soundpos */
+	if(samp->flags & ALB_STREAMING) {
+		src->srcParams.soundpos = samp->streampos;
+
+		if(samp->streampos > samp->size) {
+			memset(src->srcParams.outbuf, 0, len);
+
+#ifdef DEBUG_MAXIMUS
+			fprintf(stderr, "underflow!!!!!!!!!!!!!!!!\n");
+#endif
+			return; /* underflow */
+		}
+	}
+
+	_alSourceParamReset(src); /* reset srcParam settings */
+
+	_alSplitSources(cid, sid, mc, len, samp, (ALshort **) f_buffers.data);
+
+	/*
+	 * translate head relative sources
+	 */
+	boolp = _alGetSourceParam(src, AL_SOURCE_RELATIVE);
+
+	if(boolp != NULL) {
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		"_alApplyFilters: sid %d relative boolp = %d", sid, *boolp );
+
+		if(*boolp == AL_TRUE) {
+			/* This is a RELATIVE source, which means we must
+			 * translate it before applying any sort of positional
+			 * filter to it.
+			 */
+			AL_context *cc;
+
+			_alcLockContext( cid );
+
+			cc = _alcGetContext(cid);
+			if(cc != NULL) {
+				_alSourceTranslate(src, cc->listener.position );
+			}
+
+			_alcUnlockContext( cid );
+		}
+	}
+
+	/*
+	 * adjust len to account for end of sample, looping, etc
+	 */
+	if(filterlen > _alSourceBytesLeft(src, samp))
+	{
+		/* John Quigley's patch, check it out -- jiv */
+               if((_alSourceIsLooping( src ) == AL_FALSE)
+                        && (src->srcParams.new_readindex == -1))
+		{
+			/* Non looping source */
+			filterlen = _alSourceBytesLeft(src, samp);
+		}
+	}
+
+	if(filterlen > 0)
+	{
+		cc_tfilters = _alcGetTimeFilters(cid);
+
+		/* apply time domain filters */
+		for(i = 0; cc_tfilters[i].filter != NULL; i++)
+		{
+			tf = cc_tfilters[i].filter;
+
+			tf(cid, src, samp, (ALshort **) f_buffers.data,
+			   mc, filterlen);
+		}
+
+		/*
+		 *  Apply gain and delay for filters that don't actually touch
+		 *  the data ( alf_da).
+		 */
+		_alSourceParamApply(src, mc, filterlen,
+				    (ALshort **) f_buffers.data);
+	}
+
+
+	/*
+	 * Take the resulting pcm data in f_buffers, and mix these into
+	 * the source's temporary output buffer.
+	 */
+	_alCollapseSource(cid, sid, mc, mixbuflen, (ALshort **) f_buffers.data);
+
+	/*
+	 * head RELATIVE sources need to be untranslated, lest their
+	 * position become weird.
+	 */
+	if((boolp != NULL) && (*boolp == AL_TRUE)) {
+		AL_context *cc;
+		ALfloat ipos[3]; /* inverse listener position */
+
+		_alcLockContext( cid );
+
+		cc = _alcGetContext(cid);
+
+		if(cc != NULL) {
+			_alVectorInverse(ipos, cc->listener.position);
+			_alSourceTranslate(src, ipos);
+		}
+
+		_alcUnlockContext( cid );
+	}
+
+	return;
+}
+
+/*
+ * alf_coning
+ *
+ * Implements the coning filter, which is used when CONE_INNER_ANGLE
+ * or CONE_OUTER_ANGLE is set.  This is used for directional sounds.
+ *
+ * The spec is vague as to the actual requirements of directional sounds,
+ * and Carlo has suggested that we maintain the DirectSound meaning for
+ * directional sounds, namely (in my interpretation):
+ *
+ *    The inner, outer cone define three zones: inside inner cone
+ *    (INSIDE), between inner and outer cone (BETWEEN, outside outer cone,
+ *    (OUTSIDE).
+ *
+ *    In INSIDE, the gain of the sound is attenuated as a normal
+ *    positional source.
+ *
+ *    In OUTSIDE, the gain is set to some value specified by the user.
+ *
+ *    In BETWEEN, the gain is transitionally set to some value between
+ *    what it would be in INSIDE and OUTSIDE.
+ *
+ * This requires an additional source paramter, like CONE_OUTSIDE_ATTENUATION,
+ * and quite frankly seems goofy.  This implementation implements the
+ * following convention:
+ *
+ *    In INSIDE, the gain of the sound is attenuated as a normal
+ *    positional source.
+ *
+ *    In OUTSIDE, the gain is set to _AL_CUTTOFF_ATTENUATION
+ *
+ *    In BETWEEN, the gain is transitionally set to some value between
+ *    what it would be in INSIDE and OUTSIDE.
+ *
+ * Well, okay that's still pretty goofy.  Folks who want to set a
+ * minimum attenuation can stil do so using AL_SOURCE_ATTENUATION_MIN.
+ *
+ * IMPLEMENTATION:
+ * okay, we check the angle between the speaker position and
+ * the source's direction vector, using the source's position
+ * as the origin.  This angle we call theta.
+ *
+ * Then, we compare theta with the outer cone angle.  If it's greater,
+ * we use the min attenuation.  If it's less, we compare theta with
+ * the inner cone angle.  If it's greater, we attenuate as normal.
+ * Otherwise, we don't attenuate at all (full volume, pitch etc).
+ *
+ * assumes locked source
+ *
+ * FIXME: please check my math.
+ *	  - with an AL_NONE distance model, should this do anything
+ *	    at all?
+ */
+void alf_coning( ALuint cid,
+		 AL_source *src,
+		 UNUSED(AL_buffer *samp),
+		 UNUSED(ALshort **buffers),
+		 ALuint nc,
+		 UNUSED(ALuint len)) {
+	AL_context *cc;
+	ALfloat sa;  /* speaker attenuation */
+	ALfloat *sp; /* source position  */
+	ALfloat *sd; /* source direction */
+	ALfloat lp[3]; /* listener position */
+	ALfloat theta; /* angle between listener and source's direction
+			* vector, with the source's position as origin.
+			*/
+	ALfloat srcDir[3];
+	ALfloat icone;      /* inner cone angle. */
+	ALfloat ocone;      /* outer cone angle.  */
+	ALfloat (*df)( ALfloat dist, ALfloat rolloff, ALfloat ref, ALfloat max ); /* distance model func */
+	ALfloat smax;       /* source specific max distance */
+	ALfloat ref;        /* source specific reference distance */
+	ALfloat gain;       /* source specific gain */
+	ALfloat outergain;  /* source specific outer gain */
+	ALfloat rolloff;    /* source specific rolloff factor */
+	void *temp;
+	ALuint i;
+
+	_alcLockContext( cid );
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		/* ugh.  bad context id */
+
+		_alcUnlockContext( cid );
+		return;
+	}
+
+	/*
+	 * The source specific max is set to max at this point, but may be
+	 * altered below of the application has set it.
+	 */
+	smax = FLT_MAX;
+	df = cc->distance_func;
+
+	_alcUnlockContext( cid );
+
+	alGetListenerfv(AL_POSITION, lp);
+
+	/* If no direction set, return */
+	sd = _alGetSourceParam( src, AL_DIRECTION );
+	if(sd == NULL) {
+		/*
+		 * source has no direction (normal).  leave it for alf_da
+		 */
+		return;
+	}
+
+	sp = _alGetSourceParam( src, AL_POSITION );
+	if(sp == NULL) {
+		/* If no position set, return */
+
+		return;
+	}
+
+	/* get source specific ref distance */
+	temp = _alGetSourceParam( src, AL_REFERENCE_DISTANCE );
+	if( temp != NULL ) {
+		ref = * (ALfloat *) temp;
+	} else {
+		_alSourceGetParamDefault( AL_REFERENCE_DISTANCE, &ref );
+	}
+
+	/* get source specific gain */
+	temp = _alGetSourceParam( src, AL_GAIN );
+	if( temp != NULL ) {
+		gain =  * (ALfloat *) temp;
+	} else {
+		_alSourceGetParamDefault( AL_GAIN, &gain );
+	}
+
+	/* get source specific max distance */
+	temp = _alGetSourceParam( src, AL_MAX_DISTANCE );
+	if( temp != NULL ) {
+		smax =  * (ALfloat *) temp;
+	} else {
+		_alSourceGetParamDefault( AL_MAX_DISTANCE, &smax );
+	}
+
+	/* get source specific rolloff factor */
+	temp = _alGetSourceParam( src, AL_ROLLOFF_FACTOR );
+	if( temp != NULL ) {
+		rolloff =  * (ALfloat *) temp;
+	} else {
+		_alSourceGetParamDefault( AL_ROLLOFF_FACTOR, &rolloff );
+	}
+
+	srcDir[0] = sp[0] + sd[0];
+	srcDir[1] = sp[1] + sd[1];
+	srcDir[2] = sp[2] + sd[2];
+
+	/*
+	 * Get CONE settings.
+	 *
+	 * If unset, use 360.0 degrees
+	 */
+	temp = _alGetSourceParam( src, AL_CONE_INNER_ANGLE );
+	if(temp != NULL) {
+		icone = _alDegreeToRadian(* (ALfloat *) temp);
+	} else {
+		_alSourceGetParamDefault( AL_CONE_INNER_ANGLE, &icone );
+	}
+
+	temp = _alGetSourceParam( src, AL_CONE_OUTER_ANGLE );
+	if(temp != NULL) {
+		ocone = _alDegreeToRadian(* (ALfloat *) temp);
+	} else {
+		_alSourceGetParamDefault( AL_CONE_OUTER_ANGLE, &ocone );
+	}
+
+	temp = _alGetSourceParam( src, AL_CONE_OUTER_GAIN );
+	if(temp != NULL) {
+		outergain = * (ALfloat *) temp;
+	} else {
+		_alSourceGetParamDefault( AL_CONE_OUTER_GAIN, &outergain );
+	}
+
+	_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		"alf_coning: sid %d icone %f ocone %f", src->sid, icone, ocone );
+
+	theta = _alVectorAngleBetween(sp, lp, srcDir);
+
+	if( theta <= (icone / 2.0f) ) {
+		/*
+		 * INSIDE:
+		 *
+		 * attenuate normally
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alf_coning: sid %d theta %f INSIDE",
+			src->sid, theta );
+
+		/*
+		 * speaker[i] is in inner cone, don't do
+		 * anything.
+		 */
+		sa = compute_sa( sp, smax, ref, gain, rolloff, lp, df );
+	} else if( theta <= ( ocone / 2.0f) ) {
+		/*
+		 * BETWEEN:
+		 *
+		 * kind of cheesy, but we average the INSIDE
+		 * and OUTSIDE attenuation.
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alf_coning: sid %d theta %f BETWEEN",
+			src->sid, theta);
+
+		sa = compute_sa( sp, smax, ref, gain, rolloff, lp, df );
+
+		sa += _AL_CUTTOFF_ATTENUATION;
+		sa /= 2;
+	} else {
+		/*
+		 * OUTSIDE:
+		 *
+		 * Set to attenuation_min
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alf_coning: sid %d theta %f OUTSIDE",
+			src->sid, theta );
+
+		if( outergain < _AL_CUTTOFF_ATTENUATION ) {
+			sa = _AL_CUTTOFF_ATTENUATION;
+		} else {
+			sa = outergain;
+		}
+	}
+
+	for(i = 0; i < nc; i++) {
+		/* set gain, to be applied in SourceParamApply */
+		src->srcParams.gain[i] *= sa;
+	}
+
+	return;
+}
+
+/*
+ * alf_reverb
+ *
+ * As far as reverb implementations go, this sucks.  Should be
+ * frequency based?
+ *
+ * Should be able to be applied in sequence for second order
+ * approximations.
+ *
+ * FIXME: this is so ugly!  And consumes a ton of memory.
+ */
+void alf_reverb( UNUSED(ALuint cid),
+		 AL_source *src,
+		 AL_buffer *samp,
+		 ALshort **buffers,
+		 ALuint nc,
+		 ALuint len ) {
+	ALshort *bpt; /* pointer to passed buffers */
+	ALshort *rpt; /* pointer to reverb buffers */
+	ALuint i;
+	ALfloat scale = src->reverb_scale;
+	ALuint delay  = src->reverb_delay;
+	ALuint k;
+	int sample;
+
+	/* with a delay of 0.0, no reverb possible or needed */
+	if(!(src->flags & ALS_REVERB)) {
+		return;
+	}
+
+	/*
+	 * initialize persistent reverb buffers if they haven't been
+	 * done before
+	 */
+	for(i = 0; i < nc; i++) {
+		if(src->reverb_buf[i] == NULL) {
+			src->reverb_buf[i] = malloc(samp->size);
+			memset(src->reverb_buf[i], 0, samp->size);
+		}
+	}
+
+	if(src->srcParams.soundpos > delay) {
+		int revoffset = ((src->srcParams.soundpos - delay) / sizeof(ALshort));
+
+		for(i = 0; i < nc; i++) {
+			bpt  = buffers[i];
+			rpt  = src->reverb_buf[i];
+			rpt += revoffset;
+
+			for(k = 0; k < len / sizeof(ALshort); k++) {
+				sample = bpt[k] + rpt[k] * scale;
+
+				if(sample > canon_max) {
+					sample = canon_max;
+				} else if (sample < canon_min) {
+					sample = canon_min;
+				}
+
+				bpt[k] = sample;
+			}
+		}
+	}
+
+	_alBuffersAppend(src->reverb_buf,
+			(void **) buffers, len, src->reverbpos, nc);
+
+	src->reverbpos += len;
+
+	return;
+}
+
+/*
+ * alf_da
+ *
+ * alf_da implements distance attenuation.  We call compute_sa to get the
+ * per-speaker attenuation for each channel, and manipulate the srcParam gain
+ * settings to effect that computation.
+ *
+ * alf_da returns early if we discover that the source has
+ * either CONE_INNER_ANGLE or CONE_OUTER_ANGLE set (ie, is a
+ * directional source).  In those cases, alf_coning should do
+ * the distance attenuation.
+ *
+ * assumes locked source
+ *
+ * FIXME:
+ *    Remind me to clean this up.
+ */
+void alf_da( ALuint cid,
+	     AL_source *src,
+	     UNUSED(AL_buffer *samp),
+	     UNUSED(ALshort **buffers),
+	     ALuint nc,
+	     UNUSED(ALuint len)) {
+	AL_context *cc;
+	ALfloat *sp; /* source position */
+	ALfloat sa;  /* speaker attenuation */
+	ALfloat listener_position[3];
+	ALfloat *temp;
+	ALuint i;
+	ALfloat (*df)( ALfloat dist, ALfloat rolloff, ALfloat ref, ALfloat max ); /* distance model func */
+	ALfloat gain; /* source specific gain */
+	ALfloat ref;  /* source specific ref distance */
+	ALfloat smax;        /* source specific max distance */
+	ALfloat rolloff; /* source specific rolloff factor */
+
+	/* get distance scale */
+	_alcLockContext( cid );
+	cc = _alcGetContext(cid);
+	if(cc == NULL) {
+		_alcUnlockContext( cid );
+
+		/* ugh.  bad context id */
+		return;
+	}
+
+	df = cc->distance_func;
+
+	_alcUnlockContext( cid );
+
+	/*
+	 *
+	 * The source specific max is set to max at this point, but may be
+	 * altered below of the application has set it.
+	 */
+	smax = FLT_MAX;
+
+	/*
+	 * if coning is enabled for this source, then we want to
+	 * let the coning filter take care of attenuating since
+	 * it has more information then we do.
+	 *
+	 * We check the direction flag because coning may not
+	 * be set (ie, they use defaults)
+	 */
+	temp = _alGetSourceParam(src, AL_DIRECTION);
+	if(temp != NULL) {
+		/*
+		 * This sound has it's direction set, so leave it
+		 * to the coning filter.
+		 */
+		_alDebug( ALD_SOURCE, __FILE__, __LINE__,
+			"Directional sound, probably not right" );
+
+		return;
+	}
+
+	/* ambient near listener */
+	alGetListenerfv(AL_POSITION, listener_position);
+
+	sp = _alGetSourceParam( src, AL_POSITION );
+	if(sp == NULL) {
+		/*
+		 * As an optimization, don't do any attenuation if
+		 * the source is relative and there's no position.
+		 */
+		ALboolean *isrel;
+
+		isrel = _alGetSourceParam( src, AL_SOURCE_RELATIVE );
+		if ( isrel && *isrel ) {
+			ALfloat *gp = _alGetSourceParam(src, AL_GAIN);
+
+			if(gp)
+			{
+				for(i = 0; i < _ALC_MAX_CHANNELS; i++)
+				{
+					src->srcParams.gain[i] *= *gp;
+				}
+			}
+
+			return;
+		}
+
+		/*
+		 * no position set, so set it to the listener
+		 * postition.  We should probably set it to
+		 * 0.0, 0.0, 0.0 instead.
+		 *
+		 * We fall through to get the MIN/MAX
+		 */
+		sp = listener_position;
+
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alf_da: setting to listener pos, probably not right");
+	}
+
+	/* set reference distance */
+	temp = _alGetSourceParam( src, AL_REFERENCE_DISTANCE );
+	if( temp != NULL ) {
+		ref = * (ALfloat *) temp;
+	} else {
+		_alSourceGetParamDefault( AL_REFERENCE_DISTANCE, &ref );
+	}
+
+	/* set source specific gain */
+	temp = _alGetSourceParam( src, AL_GAIN );
+	if( temp != NULL ) {
+		gain = * (ALfloat *) temp;
+	} else {
+		_alSourceGetParamDefault( AL_GAIN, &gain );
+	}
+
+	/* set source specific max distance */
+	temp = _alGetSourceParam( src, AL_MAX_DISTANCE );
+	if( temp != NULL ) {
+		smax =  * (ALfloat *) temp;
+	} else {
+		_alSourceGetParamDefault( AL_MAX_DISTANCE, &smax );
+	}
+
+	/* get source specific rolloff factor */
+	temp = _alGetSourceParam( src, AL_ROLLOFF_FACTOR );
+	if( temp != NULL ) {
+		rolloff =  * (ALfloat *) temp;
+	} else {
+		_alSourceGetParamDefault( AL_ROLLOFF_FACTOR, &rolloff );
+	}
+
+	sa = compute_sa( sp, smax, ref, gain, rolloff,
+			 listener_position, df );
+
+	for(i = 0; i < nc; i++) {
+		src->srcParams.gain[i] *= sa;
+	}
+
+	return;
+}
+
+#if USE_TPITCH_LOOKUP
+/*
+ * init_tpitch_lookup( ALuint len )
+ *
+ * Initializes the tpitch lookup table.  See declaration of tpitch_lookup for
+ * information on the layout and meaning of tpitch_lookup_init.
+ */
+static void init_tpitch_lookup( ALuint len ) {
+	ALfloat scale;
+	ALuint i;
+
+	if(tpitch_lookup.len >= len) {
+		/* We only go through the main loop if we
+		 * haven't been initialized, or have been
+		 * initialized with less memory than needed.
+		 */
+		return;
+	}
+	tpitch_lookup.len = len;
+
+	/*
+	 * initialize time domain pitch filter lookup table
+	 */
+
+	/*
+	 * For pitch < 1.0, we lower the frequency such that a pitch of
+	 * 0.5 corresponds to 1 octave drop.  Is this just a linear
+	 * application of the step?
+	 */
+	for(i = 0; i < tpitch_lookup.max; i++) {
+		ALfloat pitch;
+		ALuint j;
+
+		/* set offset part */
+		free(tpitch_lookup.offsets[i]);
+		tpitch_lookup.offsets[i] = malloc(sizeof *tpitch_lookup.offsets * len);
+		/* set fractional part */
+		free(tpitch_lookup.fractionals[i]);
+		tpitch_lookup.fractionals[i] = malloc(sizeof *tpitch_lookup.fractionals * len);
+
+		/* set iterate pitch */
+		pitch = 2.0 * ((float)i / (float)tpitch_lookup.max);
+
+		/* initialize offset table */
+		scale = 0.0f;
+
+		for(j = 0; j < len; j++)
+		{
+			float foffset = j * pitch;
+			ALuint offset = (int) foffset;
+			float frac = foffset - offset;
+
+			tpitch_lookup.offsets[i][j] = offset;
+			tpitch_lookup.fractionals[i][j] = frac;
+		}
+	}
+
+	return;
+}
+#endif
+
+/*
+ * alf_tdoppler
+ *
+ * This filter acts out the doppler effects, in the time domain as
+ * opposed to frequency domain.  This filter works by computing the pitch
+ * required to represent the doppler shift, and setting the AL_PITCH attribute
+ * of the source directly.
+ *
+ * FIXME:
+ *    It's not a good idea to mess with src's pitch.  Some method of
+ *    expressing this computation without changing the source's attributes
+ *    should be used.
+ *
+ */
+void alf_tdoppler( ALuint cid,
+		   AL_source *src,
+		   UNUSED(AL_buffer *samp),
+		   UNUSED(ALshort **buffers),
+		   UNUSED(ALuint nc),
+		   UNUSED(ALuint len) ) {
+	AL_context *cc;
+	ALfloat *sv; /* source velocity */
+	ALfloat *sp; /* source position */
+	ALfloat lv[3]; /* listener velocity */
+	ALfloat lp[3]; /* listener position */
+	ALfloat relative_velocity;  /* speed of source wrt listener */
+#if 0
+	ALfloat zeros[] = { 0.0, 0.0, 0.0 };
+#endif
+	AL_sourcestate *srcstate;
+	ALfloat doppler_factor;
+	ALfloat doppler_velocity;
+	ALfloat doppler_pitch;
+
+	/* initialize the mixrate */
+	if(src->pitch.isset == AL_TRUE)
+	{
+		src->mixrate = src->pitch.data;
+	}
+	else
+	{
+		src->mixrate = 1.0;
+	}
+
+	/* lock context, get context specific stuff */
+	_alcLockContext( cid );
+
+	cc = _alcGetContext(cid);
+	if( cc == NULL ) {
+		/* cid is an invalid context id. */
+		_alcUnlockContext( cid );
+
+		return;
+	}
+
+	doppler_factor   = cc->doppler_factor;
+	doppler_velocity = cc->doppler_velocity;
+
+	_alcUnlockContext( cid );
+
+	alGetListenerfv(AL_VELOCITY, lv);
+	alGetListenerfv(AL_POSITION, lp);
+
+	sp = _alGetSourceParam(src, AL_POSITION );
+	sv = _alGetSourceParam(src, AL_VELOCITY );
+
+	if(sp == NULL) {
+		return;
+	}
+
+	if(sv == NULL) {
+		/* no velocity set, no doppler effect */
+		return;
+	}
+
+        if (fabs(doppler_factor) < 1.0E-6f) {
+                /* doppler factor set to zero, no doppler effect */
+                return;
+        }
+
+#if 0
+	/* ToDo: duplicate test */
+	if(sv == NULL) {
+		/*
+		 * if unset, set to the velocity to the
+		 * zero vector.
+		 */
+		sv = zeros;
+	}
+#endif
+
+	relative_velocity = _alVectorMagnitude(sv, lv);
+	if(relative_velocity == 0.0) {
+		/*
+		 * no relative velocity, no doppler
+		 *
+		 * FIXME: use epsilon
+		 */
+
+		return;
+	}
+
+
+	srcstate = _alSourceQueueGetCurrentState(src);
+	if(srcstate == NULL) {
+		fprintf(stderr, "weird\n");
+	}
+
+	doppler_pitch = compute_doppler_pitch(lp, lv, sp, sv,
+					doppler_factor, doppler_velocity);
+
+	src->mixrate *= doppler_pitch;
+
+#ifdef DEBUG
+	if(src->mixrate < MIN_PITCH)
+	{
+		_alDebug(ALD_FILTER, __FILE__, __LINE__,
+			 "Clamping src->mixrate %f\n",
+			 src->mixrate);
+	}
+#endif
+
+	src->mixrate = MAX(src->mixrate, MIN_PITCH);
+	src->mixrate = MIN(src->mixrate, 2.0f);
+
+	return;
+}
+
+/*
+ * alf_minmax
+ *
+ * Implements min/max gain.  First min is applied, then max.
+ */
+void alf_minmax( UNUSED(ALuint cid),
+		 AL_source *src,
+		 UNUSED(AL_buffer *samp),
+		 UNUSED(ALshort **buffers),
+		 ALuint nc,
+		 UNUSED(ALuint len) ) {
+	ALfloat *amaxp = _alGetSourceParam( src, AL_MAX_GAIN );
+	ALfloat *aminp = _alGetSourceParam( src, AL_MIN_GAIN );
+	ALfloat attenuation_min;
+	ALfloat attenuation_max;
+	ALuint i;
+
+	/*
+	 * if min or max are set, use them.  Otherwise, keep defaults
+	 */
+	if(aminp != NULL) {
+		attenuation_min = *aminp;
+	} else {
+		_alSourceGetParamDefault( AL_MIN_GAIN, &attenuation_min );
+	}
+
+	if(amaxp != NULL) {
+		attenuation_max = *amaxp;
+	} else {
+		_alSourceGetParamDefault( AL_MAX_GAIN, &attenuation_max );
+	}
+
+	for(i = 0; i < nc; i++) {
+		if( src->srcParams.gain[i] > attenuation_max ) {
+			src->srcParams.gain[i] = attenuation_max;
+		} else if( src->srcParams.gain[i] < attenuation_min ) {
+			src->srcParams.gain[i] = attenuation_min;
+		}
+	}
+
+	return;
+}
+
+/*
+ * alf_listenergain
+ *
+ * Implements listener gain.
+ */
+void
+alf_listenergain( UNUSED(ALuint cid),
+		  AL_source *src,
+		  UNUSED(AL_buffer *samp),
+		  UNUSED(ALshort **buffers),
+		  ALuint nc,
+		  UNUSED(ALuint len) )
+{
+	ALfloat gain;
+	ALuint i;
+	alGetListenerfv(AL_GAIN, &gain);
+	for(i = 0; i < nc; i++) {
+		src->srcParams.gain[i] *= gain;
+	}
+}
+
+/*
+ * compute_doppler_pitch( ALfloat *object1, ALfloat *o1_vel,
+ *                        ALfloat *object2, ALfloat *o2_vel,
+ *                        ALfloat factor,
+ *                        ALfloat speed )
+ *
+ * compute_doppler_pitch is meant to return a value spanning 0.5 to 1.5,
+ * which is meant to simulate the frequency shift undergone by sources
+ * in relative movement wrt the listener.
+ */
+static ALfloat compute_doppler_pitch( ALfloat *object1, ALfloat *o1_vel,
+				      ALfloat *object2, ALfloat *o2_vel,
+				      ALfloat factor,  /* doppler_factor */
+				      ALfloat speed ) { /* propagation_speed */
+        ALfloat between[3];       /* Unit vector pointing in the direction
+                                   * from one object to the other
+                                   */
+        ALfloat obj1V, obj2V;     /* Relative scalar velocity components */
+        ALfloat ratio;            /* Ratio of relative velocities */
+	ALfloat retval;           /* final doppler shift */
+
+        /*
+         * Set up the "between" vector which points from one object to the
+         * other
+         */
+        between[0] = object2[0] - object1[0];
+        between[1] = object2[1] - object1[1];
+        between[2] = object2[2] - object1[2];
+
+        _alVectorNormalize( between, between );
+
+        /*
+         * Compute the dot product of the velocity vector and the "between"
+         * vector.
+         *
+         * The _alVectorDotp function is not set up for computing dot products
+         * for actual vectors (it works for three points that define two
+         * vectors from a common origin), so I'll do it here.
+         */
+        obj1V  = o1_vel[0] * between[0];
+        obj1V += o1_vel[1] * between[1];
+        obj1V += o1_vel[2] * between[2];
+
+        /* Now compute the dot product for the second object */
+        obj2V  = o2_vel[0] * between[0];
+        obj2V += o2_vel[1] * between[1];
+        obj2V += o2_vel[2] * between[2];
+
+        /*
+         * Apply the Doppler factor by modifying the source and listener
+         * velocities.  This will exaggerate or reduce the Doppler
+         * effect as expected.
+         */
+        obj1V *= factor;
+        obj2V *= factor;
+
+        /*
+         * Now compute the obj1/obj2 velocity ratio, taking into account
+         * the propagation speed.  This formula is straight from the spec.
+         */
+        obj1V = speed - obj1V;
+        obj2V = speed + obj2V;
+        ratio = obj1V / obj2V;
+
+        /* Finally, return the ratio */
+	retval = ratio;
+
+	return retval;
+}
+
+#if USE_TPITCH_LOOKUP
+/*
+ * alf_tpitch
+ *
+ * this filter acts out AL_PITCH.
+ *
+ * This filter is implements AL_PITCH, but - oh-ho! - in the
+ * time domain.  All that good fft mojo going to waste.
+ */
+void alf_tpitch( UNUSED(ALuint cid),
+		 AL_source *src,
+		 AL_buffer *samp,
+		 ALshort **buffers,
+		 ALuint nc,
+		 ALuint len ) {
+	ALshort *obufptr = NULL; /* pointer to unmolested buffer data */
+	ALshort *bufptr  = NULL;  /* pointer to buffers[0..nc-1] */
+	ALuint l_index;   /* index into lookup table */
+	ALint ipos = 0;   /* used to store offsets temporarily */
+	ALuint i;
+	int *offsets;        /* pointer to set of offsets in lookup table */
+	float *fractionals;  /* pointer to set of fractionals in lookup table */
+	int bufchans;
+	ALfloat pitch;
+
+	pitch = src->mixrate;
+	
+	if (pitch == 1.0 && !(src->flags & ALS_NEEDPITCH)) {
+		/*
+		 * mixrate is at the default, so changing pitch is unnecessary.
+		 */
+		return;
+	}
+
+	bufchans = _alGetChannelsFromFormat(samp->format); /* we need bufchans to
+						      * scale our increment
+						      * of the soundpos,
+						      * because of
+						      * multichannel format
+						      * buffers.
+						      */
+	/*
+	 * if pitch is out of range, return.
+	 */
+	if(pitch <= 0.0f)
+	{
+		_alDebug(ALD_FILTER, __FILE__, __LINE__,
+ 			"pitch out of range: %f, clamping", pitch);
+		pitch = 0.05f;
+	}
+	else if (pitch > 2.0f)
+	{
+		_alDebug(ALD_FILTER, __FILE__, __LINE__,
+ 			"pitch out of range: %f, clamping", pitch);
+		pitch = 2.0f;
+	}
+
+	if(_alBufferIsCallback(samp) == AL_TRUE) {
+		/* just debugging here, remove this block */
+
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+		      "No tpitch support for callbacks yet");
+
+		/* _alSetError(cid, AL_INVALID_OPERATION); */
+		return;
+	}
+
+	/*
+	 *  We need len in samples, not bytes.
+	 */
+	len /= sizeof(ALshort);
+
+	/* convert pitch into index in our lookup table */
+	l_index = (pitch / 2.0) * tpitch_lookup.max;
+
+	/*
+	 * sanity check.
+	 */
+	if(l_index >= tpitch_lookup.max) {
+		l_index = tpitch_lookup.max - 1;
+	}
+
+	_alDebug(ALD_FILTER, __FILE__, __LINE__,
+	      "pitch %f l_index %d", pitch, l_index);
+
+	/*
+	 * offsets is our set of pitch-scaled offsets, 0...pitch * len.
+	 *
+	 * Well, sort of.  0...pitch * len, but with len scaled such
+	 * that we don't suffer a overrun if the buffer's original
+	 * data is too short.
+	 */
+	offsets = tpitch_lookup.offsets[ l_index ];
+
+#ifdef DEBUG_MEM
+	assert(l_index < TPITCH_MAX);
+#endif
+
+	/*
+	 * Iterate over each buffers[0..nc-1]
+	 */
+	for(i = 0; i < nc; i++) {
+		ALint clen = len;
+		int j;
+
+		/*
+		 * Kind of breaking convention here and actually using
+		 * the original buffer data instead of just resampling
+		 * inside the passed buffer data.  This is because we
+		 * won't have enough data to resample pitch > 1.0.
+		 *
+		 * We offset our original buffer pointer by the source's
+		 * current position, but in samples, not in bytes
+		 * (which is what src->srcParams.soundpos is in).
+		 */
+		obufptr  = samp->orig_buffers[i];
+		obufptr += src->srcParams.soundpos / sizeof *obufptr;
+
+#ifdef DEBUG_MEM
+		assert(samp->orig_buffers[i]);
+		assert(src->srcParams.soundpos < samp->size);
+#endif
+
+		if(l_index == tpitch_lookup.middle ) {
+			/* when this predicate is true, the pitch is
+			 * equal to 1, which means there is no change.
+			 * Therefore, we short circuit.
+			 *
+			 * Because we're incrementing the soundpos here,
+			 * we can't just return.
+			 */
+
+			continue;
+		}
+
+		/*
+		 * set bufptr to the pcm channel that we
+		 * are about to change in-place.
+		 */
+		bufptr = buffers[i];
+
+		/*
+		 * We mess with offsets in the loop below, so reset it
+		 * after each iteration.
+		 */
+		offsets = tpitch_lookup.offsets[ l_index ];
+		fractionals = tpitch_lookup.fractionals[ l_index ];
+
+		/* don't run past end */
+		if(((clen + 1) * pitch * sizeof(ALshort)) >=
+		   (samp->size - src->srcParams.soundpos))
+		{
+			clen = samp->size - src->srcParams.soundpos;
+			clen /= pitch;
+			clen /= sizeof(ALshort);
+			clen -= 1;
+		}
+
+		/*
+		 * this is where the "resampling" takes place.  We do a
+		 * very little bit on unrolling here, and it shouldn't
+		 * be necessary, but seems to improve performance quite
+		 * a bit.
+		 */
+		for(j = 0; j < clen; j++)
+		{
+#if USE_LRINT
+			{
+				int offset = offsets[j];
+				int nextoffset = offsets[j+1];
+				float frac = fractionals[j];
+				float firstsample = obufptr[offset];
+				float nextsample = obufptr[nextoffset];
+				int finalsample;
+
+				/* do a little interpolation */
+				finalsample = lrintf(firstsample +
+				            frac * (nextsample - firstsample));
+
+				finalsample = MIN(finalsample, canon_max);
+				bufptr[j] =   MAX(finalsample, canon_min);
+			}
+#else
+			{
+				int offset = offsets[j];
+				int nextoffset = offsets[j+1];
+				float frac = fractionals[j];
+				int firstsample = obufptr[offset];
+				int nextsample = obufptr[nextoffset];
+				int finalsample;
+
+				/* do a little interpolation */
+				finalsample = firstsample +
+				            frac * (nextsample - firstsample);
+
+				finalsample = MIN(finalsample, canon_max);
+				bufptr[j] =   MAX(finalsample, canon_min);
+			}
+#endif
+		}
+
+		/* zero off end */
+		memset(&bufptr[j], 0, (len-j)*sizeof *bufptr);
+	}
+
+	/*
+	 *  Set offsets to a known good state.
+	 */
+	offsets = tpitch_lookup.offsets[l_index];
+
+	/*
+	 *  AL_PITCH (well, alf_tpitch actually) require that the
+	 *  main mixer func does not increment the source's soundpos,
+	 *  so we must increment it here.  If we detect an overrun, we
+	 *  must reset the src's soundpos to something reasonable.
+	 */
+	ipos = (int) (len * pitch);
+	src->srcParams.soundpos += bufchans * ipos * sizeof(ALshort);
+
+	if(src->srcParams.soundpos > samp->size)
+	{
+		/*
+		 * we've reached the end of this sample.
+		 *
+		 * Since we're handling the soundpos incrementing for
+		 * this source (usually done in _alMixSources), we have
+		 * to handle all the special cases here instead of
+		 * delegating them.
+		 *
+		 * These include callback, looping, and streaming
+		 * sources.  For now, we just handle looping and
+		 * normal sources, as callback sources will probably
+		 * require added some special case logic to _alSplitSources
+		 * to give up a little more breathing room.
+		 */
+		if( _alSourceIsLooping( src ) == AL_TRUE ) {
+			/*
+			 * looping source
+			 *
+			 * FIXME:
+			 * 	This isn't right.  soundpos should be set to
+			 * 	something different, and we may need to carry
+			 * 	over info so that the sound loops properly.
+			 */
+
+			/* FIXME: kind of kludgy */
+			src->srcParams.soundpos = 0;
+		} else {
+			/*
+			 * let _alMixSources know it's time for this source
+			 * to die.
+			 */
+			_alDebug(ALD_FILTER, __FILE__, __LINE__,
+				 "tpitch: source ending");
+			src->srcParams.soundpos = samp->size;
+		}
+	}
+
+	return;
+}
+#else
+/*
+ * alf_tpitch
+ *
+ * this filter acts out AL_PITCH.
+ *
+ * This filter is implements AL_PITCH, but - oh-ho! - in the
+ * time domain.  All that good fft mojo going to waste.
+ */
+void alf_tpitch( UNUSED(ALuint cid),
+		 AL_source *src,
+		 AL_buffer *samp,
+		 ALshort **buffers,
+		 ALuint nc,
+		 ALuint len )
+{
+	ALshort *obufptr = NULL; /* pointer to unmolested buffer data */
+	ALshort *bufptr  = NULL;  /* pointer to buffers[0..nc-1] */
+	ALint ipos = 0;   /* used to store offsets temporarily */
+	ALuint i;
+	ALuint clen;
+	int bufchans;
+	ALfloat pitch;
+
+	pitch = src->mixrate;
+	
+	if (pitch == 1.0 && !(src->flags & ALS_NEEDPITCH)) {
+		/*
+		 * mixrate is at the default, so changing pitch is unnecessary.
+		 */
+		return;
+	}
+
+	bufchans = _alGetChannelsFromFormat(samp->format); /* we need bufchans to
+						      * scale our increment
+						      * of the soundpos,
+						      * because of
+						      * multichannel format
+						      * buffers.
+						      */
+	/*
+	 * if pitch is out of range, clamp.
+	 */
+	pitch = MIN(pitch, 2.0f);
+	pitch = MAX(pitch, MIN_PITCH);
+
+	/*
+	 *  We need len in samples, not bytes.
+	 */
+	len /= sizeof(ALshort);
+
+	_alDebug(ALD_FILTER, __FILE__, __LINE__, "pitch %f", pitch);
+
+	/*
+	 * Iterate over each buffers[0..nc-1]
+	 */
+	for(i = 0; i < nc; i++) {
+		ALuint j;
+
+		if(pitch == 1.0f)
+		{
+			continue;
+		}
+
+		/*
+		 * Kind of breaking convention here and actually using
+		 * the original buffer data instead of just resampling
+		 * inside the passed buffer data.  This is because we
+		 * won't have enough data to resample pitch > 1.0.
+		 *
+		 * We offset our original buffer pointer by the source's
+		 * current position, but in samples, not in bytes
+		 * (which is what src->srcParams.soundpos is in).
+		 */
+		obufptr  = samp->orig_buffers[i];
+		obufptr += src->srcParams.soundpos / sizeof *obufptr;
+
+		/*
+		 * set bufptr to the pcm channel that we
+		 * are about to change in-place.
+		 */
+		bufptr = buffers[i];
+
+		clen = len;
+
+		/* don't run past end */
+		if(((clen + 1) * pitch * sizeof(ALshort)) >=
+		   (samp->size - src->srcParams.soundpos))
+		{
+			clen = samp->size - src->srcParams.soundpos;
+			clen /= pitch;
+			clen /= sizeof(ALshort);
+			clen -= 1;
+		}
+
+		/*
+		 * this is where the "resampling" takes place.  We do a
+		 * very little bit on unrolling here, and it shouldn't
+		 * be necessary, but seems to improve performance quite
+		 * a bit.
+		 */
+		for(j = 0; j < clen; j++)
+		{
+			/* make sure we don't go past end of last source */
+#ifdef DEBUG_FILTER
+			assert(((j+1)*pitch)*2 <
+				samp->size - src->srcParams.soundpos);
+#endif
+			{
+				float foffset = j * pitch;
+				int offset = (int) foffset;
+				float frac = foffset - offset;
+				int firstsample = obufptr[(int) (j * pitch)];
+				int nextsample = obufptr[(int)((j+1) * pitch)];
+				int finalsample;
+
+				/* do a little interpolation */
+				finalsample = firstsample +
+				            frac * (nextsample - firstsample);
+
+				finalsample = MIN(finalsample, canon_max);
+				bufptr[j] =   MAX(finalsample, canon_min);
+			}
+		}
+
+		/* JIV FIXME: use memset */
+		for( ; j < len; j++)
+		{
+			bufptr[j] = 0;
+		}
+	}
+
+	/*
+	 *  AL_PITCH (well, alf_tpitch actually) require that the
+	 *  main mixer func does not increment the source's soundpos,
+	 *  so we must increment it here.  If we detect an overrun, we
+	 *  must reset the src's soundpos to something reasonable.
+	 */
+	ipos = (int) (len * pitch);
+	src->srcParams.soundpos += bufchans * ipos * sizeof(ALshort);
+
+	if(src->srcParams.soundpos > samp->size)
+	{
+		/*
+		 * we've reached the end of this sample.
+		 *
+		 * Since we're handling the soundpos incrementing for
+		 * this source (usually done in _alMixSources), we have
+		 * to handle all the special cases here instead of
+		 * delegating them.
+		 *
+		 * These include callback, looping, and streaming
+		 * sources.  For now, we just handle looping and
+		 * normal sources, as callback sources will probably
+		 * require added some special case logic to _alSplitSources
+		 * to give up a little more breathing room.
+		 */
+		if( _alSourceIsLooping( src ) == AL_TRUE ) {
+			/*
+			 * looping source
+			 *
+			 * FIXME:
+			 * 	This isn't right.  soundpos should be set to
+			 * 	something different, and we may need to carry
+			 * 	over info so that the sound loops properly.
+			 */
+
+			/* FIXME: kind of kludgy */
+			src->srcParams.soundpos = 0;
+		} else {
+			/*
+			 * let _alMixSources know it's time for this source
+			 * to die.
+			 */
+			_alDebug(ALD_FILTER, __FILE__, __LINE__,
+				 "tpitch: source ending");
+
+			src->srcParams.soundpos = samp->size;
+		}
+	}
+
+	return;
+}
+#endif
+
+
+/*
+ * compute_sa( ALfloat *source_pos, ALfloat source_max,
+ *             ALfloat source_ref, ALfloat source_gain,
+ *             ALfloat source_rolloff,
+ *             ALfloat *speaker_pos,
+ *             ALfloat (*df)( ALfloat dist, ALfloat rolloff,
+ *                            ALfloat ref, ALfloat max))
+ *
+ * computes distance attenuation with respect to a speaker position.
+ *
+ * This is some normalized value which gets expotenially closer to 1.0
+ * as the source approaches the listener.  The minimum attenuation is
+ * AL_CUTTOFF_ATTENUATION, which approached when the source approaches
+ * the max distance.
+ *
+ * source_pos = source position   [x/y/z]
+ * source_max = source specific max distance
+ * speaker_pos = speaker position [x/y/z]
+ * ref        = source's reference distance
+ * df         = distance model function
+ * max        = maximum distance, beyond which everything is clamped at
+ *              some small value near, but not equal to, zero.
+ */
+static ALfloat
+compute_sa( ALfloat *source_pos, ALfloat source_max,
+	    ALfloat source_ref, ALfloat source_gain,
+	    ALfloat source_rolloff,
+	    ALfloat *speaker_pos,
+	    ALfloat (*df)( ALfloat dist, ALfloat rolloff, ALfloat ref, ALfloat max))
+{
+	ALfloat retval;
+
+	/* "Optimize" for rolloff == 0.0 */
+	if (source_rolloff > 0.0) {
+		ALfloat distance;
+		distance = _alVectorMagnitude( source_pos, speaker_pos );
+		retval = source_gain * df( distance, source_rolloff, source_ref, source_max );
+	} else {
+		retval = source_gain;
+	}
+
+	if( retval > 1.0 ) {
+		return 1.0;
+	}
+
+	if(retval < _AL_CUTTOFF_ATTENUATION) {
+		return _AL_CUTTOFF_ATTENUATION;
+	}
+
+	return retval;
+}
+
+/*
+ * alf_panning
+ *
+ */
+
+void alf_panning( ALuint cid,
+                 AL_source *src,
+                 UNUSED(AL_buffer *samp),
+                 UNUSED(ALshort **buffers),
+                 ALuint nc,
+                 UNUSED(ALuint len) ) {
+	ALfloat lp[3]; /* listener position */
+	ALfloat *sp; /* source position */
+	ALfloat *sd; /* speaker position */
+	ALfloat m;
+	ALfloat sa;
+	ALuint i;
+
+	alGetListenerfv(AL_POSITION, lp);
+	sp = _alGetSourceParam(src, AL_POSITION );
+
+	if ((sp == NULL) || (lp == NULL)) {
+		return;
+	}
+
+	m = _alVectorMagnitude(lp, sp);
+	if (m == 0) {
+		/* should this use epsilon? */
+		return;
+	}
+
+	for (i = 0; i < nc; i++) {
+		sd = _alcGetSpeakerPosition(cid, i);
+		sa = _alVectorDotp(lp, sp, sd) / m;
+		sa += 1.0;
+
+		src->srcParams.gain[i] *= sa;
+	}
+}
Index: /openal-0.0.8/src/al_filter.h
===================================================================
--- /openal-0.0.8/src/al_filter.h	(revision 17)
+++ /openal-0.0.8/src/al_filter.h	(revision 17)
@@ -0,0 +1,87 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_filter.h
+ *
+ * Prototypes, macros and definitions related to the application of filters.
+ *
+ */
+#ifndef _AL_FILTER_H_
+#define _AL_FILTER_H_
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+#include "al_types.h"
+
+/*
+ * Initialize data structures needed for the management of time-domain
+ * filters.
+ */
+void _alInitTimeFilters( time_filter_set *tf_ptr_ref );
+
+/*
+ * Apply all filters for the source specified by sid in the context specified
+ * by cid.
+ */
+void _alApplyFilters( ALuint cid, ALuint sid );
+
+/*
+ * Destroy all filter data structures allocated.
+ */
+void _alDestroyFilters( void );
+
+/*
+ * time domain filters
+ */
+
+/*
+ * Reverb filter.  Not well defined.
+ */
+time_filter alf_reverb;
+
+/*
+ * Coning filter.  Carries out the coning attenuation specified by
+ * AL_CONE_INNER_ANGLE, AL_CONE_OUTER_ANGLE, and AL_CONE_OUTER_GAIN.  Closely
+ * related to alf_da ( the distance attenuation filter ), but they are
+ * mutually exclusive.
+ */
+time_filter alf_coning;
+
+/*
+ * Distance attenuation filter.  Applies distance-model specific attenuation
+ * to a source.
+ */
+time_filter alf_da;
+
+/*
+ * Pitch filter.  Applies a pitch shift ( in the time domain ) to a source.
+ */
+time_filter alf_tpitch;
+
+/*
+ * Doppler filter.  Applies a doppler shift ( in the time domain ) to a source.
+ */
+time_filter alf_tdoppler;
+
+/*
+ * Clamps a source at its min/max gain settings, specified by AL_MIN_GAIN and
+ * AL_MAX_GAIN.
+ */
+time_filter alf_minmax;
+
+/*
+ * Panning filter.
+ */
+time_filter alf_panning;
+
+/*
+ * Applies the listener gain to a source.
+ */
+time_filter alf_listenergain;
+
+/* macros */
+#define _alDCApplyFilters(s) 	_alApplyFilters(_alcCCId, s)
+
+#endif /* AL_FILTER_H_ */
Index: /openal-0.0.8/src/al_listen.c
===================================================================
--- /openal-0.0.8/src/al_listen.c	(revision 17)
+++ /openal-0.0.8/src/al_listen.c	(revision 17)
@@ -0,0 +1,323 @@
+
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_listen.c
+ *
+ * Functions related to management and use of listeners.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alext.h>
+#include <stdlib.h>
+
+#include "al_error.h"
+#include "al_listen.h"
+#include "al_main.h"
+#include "alc/alc_speaker.h"
+
+#define MAX_LISTENER_NUM_VALUES 6
+
+static ALint
+numValuesForAttribute( ALenum param )
+{
+	switch (param) {
+	case AL_POSITION:
+	case AL_VELOCITY:
+		return 3;
+	case AL_GAIN:
+	case AL_GAIN_LINEAR_LOKI:
+		return 1;
+	case AL_ORIENTATION:
+		return 6;
+		break;
+	default:
+		return 0;
+	}
+}
+
+static void
+setListenerAttributef( ALenum param, const ALfloat *values, ALint numValues)
+{
+	/* TODO: As usual, we should better have a getter for a *locked* context */
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError(AL_INVALID_OPERATION);
+		return;
+	}
+	_alcDCLockContext();
+
+	if (numValues != numValuesForAttribute(param)) {
+		_alDCSetError(AL_INVALID_ENUM);
+		_alcDCUnlockContext();
+		return;
+	}
+	if( values == NULL ) {
+		_alDCSetError(AL_INVALID_VALUE);
+		_alcDCUnlockContext();
+		return;
+	}
+
+	switch( param ) {
+	case AL_POSITION:
+		if ((cc->listener.position[0] == values[0]) &&
+		    (cc->listener.position[1] == values[1]) &&
+		    (cc->listener.position[2] == values[2])) {
+			break;
+		}
+		cc->listener.position[0] = values[0];
+		cc->listener.position[1] = values[1];
+		cc->listener.position[2] = values[2];
+		_alcDCSpeakerMove();
+		break;
+
+	case AL_VELOCITY:
+		cc->listener.velocity[0] = values[0];
+		cc->listener.velocity[1] = values[1];
+		cc->listener.velocity[2] = values[2];
+		break;
+
+	case AL_GAIN:
+	case AL_GAIN_LINEAR_LOKI:
+		if (values[0] < 0.0f) {
+			_alDCSetError(AL_INVALID_VALUE);
+			break;
+		}
+		cc->listener.gain = values[0];
+		break;
+
+	case AL_ORIENTATION:
+		if ((cc->listener.orientation[0] == values[0]) &&
+		    (cc->listener.orientation[1] == values[1]) &&
+		    (cc->listener.orientation[2] == values[2]) &&
+		    (cc->listener.orientation[3] == values[3]) &&
+		    (cc->listener.orientation[4] == values[4]) &&
+		    (cc->listener.orientation[5] == values[5])) {
+			break;
+		}
+		cc->listener.orientation[0] = values[0]; /* at */
+		cc->listener.orientation[1] = values[1];
+		cc->listener.orientation[2] = values[2];
+		cc->listener.orientation[3] = values[3]; /* up */
+		cc->listener.orientation[4] = values[4];
+		cc->listener.orientation[5] = values[5];
+		_alcDCSpeakerMove();
+		break;
+
+	default:
+		_alDCSetError( AL_INVALID_ENUM );
+		break;
+	}
+
+	_alcDCUnlockContext();
+}
+
+static void
+setListenerAttributei( ALenum param, const ALint *intValues, ALint numValues)
+{
+	ALfloat floatValues[MAX_LISTENER_NUM_VALUES];
+	int i;
+	for (i = 0; i < numValues; i++) {
+		floatValues[i] = (ALfloat)intValues[i];
+	}
+	setListenerAttributef(param, floatValues, numValues);
+}
+
+void
+alListenerf( ALenum param, ALfloat value )
+{
+	setListenerAttributef(param, &value, 1);
+}
+
+void
+alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 )
+{
+	ALfloat values[3];
+	values[0] = value1;
+	values[1] = value2;
+	values[2] = value3;
+	setListenerAttributef(param, values, 3);
+}
+
+void
+alListenerfv( ALenum param, const ALfloat *values )
+{
+	setListenerAttributef(param, values, numValuesForAttribute(param));
+}
+ 
+void
+alListeneri( ALenum param, ALint value )
+{
+	setListenerAttributei(param, &value, 1);
+}
+
+void
+alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 )
+{
+	ALint values[3];
+	values[0] = value1;
+	values[1] = value2;
+	values[2] = value3;
+	setListenerAttributei(param, values, 3);
+}
+
+void
+alListeneriv( ALenum param, const ALint *values )
+{
+	setListenerAttributei(param, values, numValuesForAttribute(param));
+}
+
+static ALboolean
+getListenerAttribute( ALenum param, ALfloat *values, ALint numValues )
+{
+	ALboolean ok = AL_FALSE;
+	/* TODO: As usual, we should better have a getter for a *locked* context */
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError(AL_INVALID_OPERATION);
+		return ok;
+	}
+	_alcDCLockContext();
+
+	if (numValues != numValuesForAttribute(param)) {
+		_alDCSetError(AL_INVALID_ENUM);
+		_alcDCUnlockContext();
+		return ok;
+	}
+	if( values == NULL ) {
+		_alDCSetError(AL_INVALID_VALUE);
+		_alcDCUnlockContext();
+		return ok;
+	}
+
+	switch( param ) {
+	case AL_POSITION:
+		values[0] = cc->listener.position[0];
+		values[1] = cc->listener.position[1];
+		values[2] = cc->listener.position[2];
+		ok = AL_TRUE;
+		break;
+
+	case AL_VELOCITY:
+		values[0] = cc->listener.velocity[0];
+		values[1] = cc->listener.velocity[1];
+		values[2] = cc->listener.velocity[2];
+		ok = AL_TRUE;
+		break;
+
+	case AL_GAIN:
+	case AL_GAIN_LINEAR_LOKI:
+		values[0] = cc->listener.gain;
+		ok = AL_TRUE;
+		break;
+
+	case AL_ORIENTATION:
+		values[0] = cc->listener.orientation[0]; /* at */
+		values[1] = cc->listener.orientation[1];
+		values[2] = cc->listener.orientation[2];
+		values[3] = cc->listener.orientation[3]; /* up */
+		values[4] = cc->listener.orientation[4];
+		values[5] = cc->listener.orientation[5];
+		ok = AL_TRUE;
+		break;
+
+	default:
+		_alDCSetError( AL_INVALID_ENUM );
+		break;
+	}
+
+	_alcDCUnlockContext();
+	return ok;
+}
+
+void
+alGetListenerf( ALenum param, ALfloat *value )
+{
+	getListenerAttribute(param, value, 1);
+}
+
+void
+alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 )
+{
+	ALfloat floatValues[3];
+	if (getListenerAttribute(param, floatValues, 3)) {
+		*value1 = floatValues[0];
+		*value2 = floatValues[1];
+		*value3 = floatValues[2];
+	}
+}
+
+void
+alGetListenerfv( ALenum param, ALfloat *values )
+{
+	getListenerAttribute(param, values, numValuesForAttribute(param));
+}
+
+void
+alGetListeneri( ALenum param, ALint *value )
+{
+	ALfloat floatValues[1];
+	if (getListenerAttribute(param, floatValues, 1)) {
+		*value = floatValues[0];
+	}
+}
+
+void
+alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 )
+{
+	ALfloat floatValues[3];
+	if (getListenerAttribute(param, floatValues, 3)) {
+		*value1 = (ALint)floatValues[0];
+		*value2 = (ALint)floatValues[1];
+		*value3 = (ALint)floatValues[2];
+	}
+}
+
+void
+alGetListeneriv( ALenum param, ALint *values )
+{
+	ALfloat floatValues[MAX_LISTENER_NUM_VALUES];
+	int i;
+	int n = numValuesForAttribute(param);
+	if (getListenerAttribute(param, floatValues, n)) {
+		for (i = 0; i < n; i++) {
+			values[i] = (ALint)floatValues[i];
+		}
+	}
+}
+
+/*
+ * Initializes already allocated listener.
+ */
+void
+_alInitListener( AL_listener *listener )
+{
+	listener->position[0] = 0.0f;
+	listener->position[1] = 0.0f;
+	listener->position[2] = 0.0f;
+
+	listener->velocity[0] = 0.0f;
+	listener->velocity[1] = 0.0f;
+	listener->velocity[2] = 0.0f;
+
+	listener->gain = 1.0f;
+
+	/* at */
+	listener->orientation[0] = 0.0f;
+	listener->orientation[1] = 0.0f;
+	listener->orientation[2] = -1.0f;
+
+	/* up */
+	listener->orientation[3] = 0.0f;
+	listener->orientation[4] = 1.0f;
+	listener->orientation[5] = 0.0f;
+}
+
+/*
+ * Doesn't do anything.
+ */
+void
+_alDestroyListener(UNUSED(AL_listener *ls))
+{
+}
Index: /openal-0.0.8/src/al_listen.h
===================================================================
--- /openal-0.0.8/src/al_listen.h	(revision 17)
+++ /openal-0.0.8/src/al_listen.h	(revision 17)
@@ -0,0 +1,24 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_listen.h
+ *
+ * Prototypes, macros and definitions related to the management of listeners.
+ *
+ */
+#ifndef _AL_LISTENER_H_
+#define _AL_LISTENER_H_
+
+#include "al_types.h"
+
+/*
+ * Initializes a listener to the default values for all its elements.
+ */
+void _alInitListener( AL_listener *listener );
+
+/*
+ * Performs any needed finalization on a listener.
+ */
+void _alDestroyListener( AL_listener *listener );
+
+#endif /* _AL_LISTENER_H_ */
Index: /openal-0.0.8/src/al_main.c
===================================================================
--- /openal-0.0.8/src/al_main.c	(revision 17)
+++ /openal-0.0.8/src/al_main.c	(revision 17)
@@ -0,0 +1,802 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_main.c
+ *
+ * stuff that doesn't fit anywhere else.  Also, global initialization/
+ * finitization.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <AL/alext.h>
+#include <math.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "al_debug.h"
+#include "al_types.h"
+#include "al_main.h"
+#include "al_buffer.h"
+#include "al_source.h"
+#include "al_mixer.h"
+#include "al_ext.h"
+#include "al_config.h"
+#include "al_vector.h"
+#include "alc/alc_context.h"
+
+#include "al_threadlib.h"
+
+#include "audioconvert/audioconvert.h"
+
+/* standard extensions
+ *
+ * To avoid having these built in (ie, using the plugin arch), don't
+ * include these headers and move the files from EXT_OBJS to EXT_DLL_OBJS.
+ */
+#include "extensions/al_ext_loki.h"
+#include "extensions/al_ext_mp3.h"
+#include "extensions/al_ext_vorbis.h"
+#include "extensions/al_ext_capture.h"
+
+#ifndef M_PI
+#define M_PI		3.14159265358979323846	/* pi */
+#endif /* M_PI */
+
+/*
+ * mixer thread's ID, if it needs one
+ */
+extern ThreadID mixthread;
+
+/*
+ * pcm buffers that filters act on
+ */
+_alDecodeScratch f_buffers;
+
+/*
+ * Our extension functions
+ */
+static AL_extension exts[] = {
+#ifdef BUILTIN_EXT_LOKI
+	BUILTIN_EXT_LOKI,
+#endif /* BUILDIN_EXT_LOKI */
+#ifdef BUILTIN_EXT_MP3
+	BUILTIN_EXT_MP3,
+#endif /* BUILDIN_EXT_MP3 */
+#ifdef BUILTIN_EXT_VORBIS
+	BUILTIN_EXT_VORBIS,
+#endif /* BUILDIN_EXT_VORBIS */
+#ifdef BUILTIN_EXT_CAPTURE
+	BUILTIN_EXT_CAPTURE,
+#endif
+	{ NULL, NULL }
+};
+
+/*
+ * _alInit( void )
+ *
+ * _alInit is called when the "first" context is created.  If all
+ * contexts are deleted, and then one is created, it is called again.
+ *
+ * Returns AL_TRUE unless some weird sort of memory allocation problem occurs,
+ * in which case AL_FALSE is returned.
+ */
+ALboolean _alInit( void ) {
+	ALboolean err;
+	ALuint i;
+
+	for(i = 0; i < _ALC_MAX_CHANNELS; i++) {
+		f_buffers.data[i]   = NULL;
+	}
+
+	f_buffers.len = 0;
+
+	/* buffer initializations */
+	err = _alInitBuffers();
+	if(err == AL_FALSE) {
+		return AL_FALSE;
+	}
+
+	/* extension initilizations */
+	err = _alInitExtensions();
+	if(err == AL_FALSE) {
+		_alDestroyBuffers();
+
+		return AL_FALSE;
+	}
+
+#ifdef BUILTIN_EXT_LOKI
+	/* FIXME: dynamic-ify this */
+	/* register extension groups */
+	_alRegisterExtensionGroup( (const ALubyte*) "ALC_LOKI_audio_channel" );
+	_alRegisterExtensionGroup( (const ALubyte*) "AL_LOKI_buffer_data_callback" );
+	_alRegisterExtensionGroup( (const ALubyte*) "AL_LOKI_IMA_ADPCM_format" );
+	_alRegisterExtensionGroup( (const ALubyte*) "AL_LOKI_WAVE_format" );
+	_alRegisterExtensionGroup( (const ALubyte*) "AL_LOKI_play_position" );
+	_alRegisterExtensionGroup( (const ALubyte*) "AL_LOKI_quadriphonic" );
+
+#ifdef ENABLE_EXTENSION_AL_EXT_MP3
+	 _alRegisterExtensionGroup( (const ALubyte*) "AL_EXT_MP3" );
+#endif /* ENABLE_EXTENSION_AL_EXT_MP3 */
+
+#ifdef ENABLE_EXTENSION_AL_EXT_VORBIS
+	_alRegisterExtensionGroup( (const ALubyte*) "AL_EXT_vorbis" );
+#endif /* ENABLE_EXTENSION_AL_EXT_VORBIS */
+
+#endif /* BUILTIN_EXT_LOKI */
+
+	_alRegisterExtensionGroup( (const ALubyte*) "AL_EXT_capture" );
+	_alRegisterExtensionGroup( (const ALubyte*) "ALC_EXT_capture" );
+
+	for(i = 0; exts[i].addr != NULL; i++) {
+		_alRegisterExtension(exts[i].name, exts[i].addr);
+	}
+
+	/* do builtin extensions initialization */
+	BUILTIN_EXT_LOKI_INIT;
+	BUILTIN_EXT_CAPTURE_INIT;
+	BUILTIN_EXT_MP3_INIT;
+	BUILTIN_EXT_VORBIS_INIT;
+
+	return AL_TRUE;
+}
+
+/*
+ * _alExit( void )
+ *
+ * Finalizes things when the last context is deleted.
+ *
+ * FIXME: we can probably clean a lot of this up now that we have
+ * alc{Open,Close}Device.
+ */
+void _alExit( void ) {
+	int i;
+
+#ifndef NO_THREADING
+	/* we could be sync, so we check mixthread for a valid ID */
+	if(mixthread != NULL) {
+		time_for_mixer_to_die = AL_TRUE;
+
+		_alWaitThread( mixthread );
+
+		while( time_for_mixer_to_die == AL_TRUE ) {
+			_alMicroSleep(100000);
+		}
+	}
+#endif /* NO_THREADING */
+
+	for(i = 0; i < _ALC_MAX_CHANNELS; i++) {
+		if(f_buffers.data[i] != NULL) {
+			free( f_buffers.data[i] );
+			f_buffers.data[i] = NULL;
+		}
+	}
+
+	f_buffers.len = 0;
+
+	_alDestroyConfig();
+
+	_alDestroyExtensions();
+	_alDestroyExtensionGroups( );
+	_alDestroyMixer();
+	_alDestroyFilters();
+
+	_alcDestroyAll();
+
+	_alDestroyBuffers(); /* buffers after mixer and alc destroy */
+
+	/* do builtin extensions destruction */
+	BUILTIN_EXT_LOKI_FINI;
+	BUILTIN_EXT_CAPTURE_FINI;
+	BUILTIN_EXT_MP3_FINI;
+	BUILTIN_EXT_VORBIS_FINI;
+
+	return;
+}
+
+/*
+ * _alStub( const char *str )
+ *
+ * If DEBUG_STUB is defined, _alStub prints out a warning message.  If not, no
+ * action is taken.
+ *
+ */
+#ifdef DEBUG_STUB
+void _alStub( const char *str ) {
+	fprintf(stderr, "%s stub function\n", str);
+
+	return;
+}
+#endif
+
+/*
+ * _alLockPrintf( const char *str, const char *fn, int line );
+ *
+ * _alLockPrintf is used for debugging purposes.  If DEBUG_LOCK is defined,
+ * calls to _alLockPrintf generate a print to stderr.  If not, these calls are
+ * optimized away.
+ */
+#ifdef DEBUG_LOCK
+int _alLockPrintf( const char *msg, const char *fn, int ln ) {
+	static char threadstr[2048];
+	char blanks[] = "                             ";
+	int maxlen = 18 - (strlen(fn) + log10(ln));
+
+	blanks[maxlen] = '\0';
+
+	snprintf(threadstr, sizeof(threadstr), "%s[%u]", blanks, _alSelfThread());
+
+	return _alDebug(ALD_LOCK, fn, ln, "%s %s", threadstr, msg);
+}
+#endif
+
+/*
+ * _al_AC2ALFMT( ALuint acformat, ALuint channels )
+ *
+ * Returns the openal format equivilant to the audioconvert format acformat,
+ * with the number of channels specified by channels.
+ */
+ALenum _al_AC2ALFMT( ALuint acformat, ALuint channels ) {
+	switch( acformat ) {
+		case AUDIO_U8:
+			if(channels == 4) {
+				return AL_FORMAT_QUAD8_LOKI;
+			}
+			if(channels == 2) {
+				return AL_FORMAT_STEREO8;
+			}
+			if(channels == 1) {
+				return AL_FORMAT_MONO8;
+			}
+			break;
+		case AUDIO_S16LSB:
+		case AUDIO_S16MSB:
+			if(channels == 4) {
+				return AL_FORMAT_QUAD16_LOKI;
+			}
+			if(channels == 2) {
+				return AL_FORMAT_STEREO16;
+			}
+			if(channels == 1) {
+				return AL_FORMAT_MONO16;
+			}
+			break;
+	}
+
+#ifdef DEBUG_CONVERT
+	fprintf( stderr, "AC2ALFMT: wtf? format = 0x%x\n", acformat );
+#endif
+
+	return -1;
+}
+
+/*
+ * _al_AL2ACFMT( ALenum alfmt )
+ *
+ * Returns the equivilant (sort of) audioconvert format specified by alfmt.
+ * audioconvert formats do not have channel information, so this should be
+ * combined with _alGetChannelsFromFormat.
+ */
+ALushort _al_AL2ACFMT( ALenum alformat ) {
+	switch( alformat ) {
+		case AL_FORMAT_QUAD8_LOKI:
+		case AL_FORMAT_STEREO8:
+		case AL_FORMAT_MONO8:
+			return AUDIO_U8;
+		case AL_FORMAT_QUAD16_LOKI:
+		case AL_FORMAT_STEREO16:
+		case AL_FORMAT_MONO16:
+			return AUDIO_S16;
+		default:
+			break;
+	}
+
+#ifdef DEBUG_CONVERT
+	fprintf(stderr, "AL2ACFMT: wtf? format = 0x%x\n", alformat);
+#endif
+
+	return 0;
+}
+
+/*
+ * _alGetChannelsFromFormat(fmt)
+ *
+ * evaluates to the number of channels in an openal format.
+ */
+ALubyte _alGetChannelsFromFormat(ALenum alformat)
+{
+	switch( alformat ) {
+		case AL_FORMAT_MONO8:
+		case AL_FORMAT_MONO16:
+			return 1;
+		case AL_FORMAT_STEREO8:
+		case AL_FORMAT_STEREO16:
+			return 2;
+		case AL_FORMAT_QUAD8_LOKI:
+		case AL_FORMAT_QUAD16_LOKI:
+			return 4;
+		default:
+			break;
+	}
+
+#ifdef DEBUG_CONVERT
+	fprintf(stderr, "ALCHANNELS: wtf? format = 0x%x\n", alformat);
+#endif
+	return 0;
+}
+
+/*
+ * _al_formatscale( ALenum format, ALuint new_channel_num )
+ *
+ * Returns the openal format that is identical to format, but with sufficient
+ * channel width to accomedate new_channel_num channels.
+ */
+ALenum _al_formatscale(ALenum format, ALuint new_channel_num) {
+	int fmt_bits = _alGetBitsFromFormat(format);
+
+	switch(new_channel_num) {
+		case 1:
+		  switch(fmt_bits) {
+			  case 8: return AL_FORMAT_MONO8; break;
+			  case 16: return AL_FORMAT_MONO16; break;
+			  default: return -1;
+		  }
+		  break;
+		case 2:
+		  switch(fmt_bits) {
+			  case 8: return AL_FORMAT_STEREO8; break;
+			  case 16: return AL_FORMAT_STEREO16; break;
+			  default: return -1;
+		  }
+		  break;
+		case 4:
+		  switch(fmt_bits) {
+			  case 8: return AL_FORMAT_QUAD8_LOKI; break;
+			  case 16: return AL_FORMAT_QUAD16_LOKI; break;
+			  default: return -1;
+		  }
+		  break;
+		default:
+#ifdef DEBUG_CONVERT
+		  fprintf(stderr,
+		  	"No support for %d channel AL format, sorry\n",
+			new_channel_num);
+#endif /* DEBUG_CONVERT */
+		  break;
+	}
+
+	return -1;
+}
+
+/*
+ * _alBuffersAppend( void **dsts, void **srcs, int len, int offset, int nc )
+ *
+ * Copies srcs[0..nc-1][0..(len/2)-1] to
+ * dsts[0..nc-1][offset/2..((offset + len)/2)-1].
+ */
+void _alBuffersAppend(void **dsts, void **srcs, int len, int offset, int nc) {
+	char *dstp;
+	char *srcp;
+	int i;
+	int k;
+
+	for(i = 0; i < nc; i++) {
+		dstp = dsts[i];
+		srcp = srcs[i];
+
+		dstp += offset;
+
+		for(k = 0; k < len; k++) {
+			dstp[k] = srcp[k];
+		}
+	}
+
+	return;
+}
+
+/*
+ * _alRotatePointAboutAxis( const ALfloat angle, ALfloat *point,
+ *                          const ALfloat *axis )
+ *
+ * Rotates point angle radians about axis.
+ *
+ * angle  - in radians
+ * point  - x/y/z
+ * axis   - x/y/z (unit vector)
+ *
+ * FIXME: check my math
+ * FIXME: needs to check args
+ */
+#if 0
+void _alRotatePointAboutAxis( const ALfloat angle, ALfloat *point,
+                              const ALfloat *axis ) {
+	ALmatrix *m;
+	ALmatrix *pm;
+	ALmatrix *rm;
+
+	float s;
+	float c;
+	float t;
+
+	float x = axis[0];
+	float y = axis[1];
+	float z = axis[2];
+	int i;
+
+	if(angle == 0.0) {
+		/* FIXME: use epsilon? */
+		return;
+	}
+
+	s = sin( angle );
+	c = cos( angle );
+	t = 1.0 - c;
+
+	m  = _alMatrixAlloc(3, 3);
+	pm = _alMatrixAlloc(1, 3);
+	rm = _alMatrixAlloc(1, 3);
+
+#if 1
+	m->data[0][0] = t * x * x + c;
+	m->data[0][1] = t * x * y - s * z;
+	m->data[0][2] = t * x * z + s * y;
+
+	m->data[1][0] = t * x * y + s * z;
+	m->data[1][1] = t * y * y + c;
+	m->data[1][2] = t * y * z - s * x;
+
+	m->data[2][0] = t * x * z - s * y;
+	m->data[2][1] = t * y * z + s * x;
+	m->data[2][2] = t * z * z + c;
+#else
+	m->data[0][0] = t * x * x + c;
+	m->data[1][0] = t * x * y - s * z;
+	m->data[2][0] = t * x * z + s * y;
+
+	m->data[0][1] = t * x * y + s * z;
+	m->data[1][1] = t * y * y + c;
+	m->data[2][1] = t * y * z - s * x;
+
+	m->data[0][2] = t * x * z - s * y;
+	m->data[1][2] = t * y * z + s * x;
+	m->data[2][2] = t * z * z + c;
+#endif
+
+	for(i = 0; i < 3; i++) {
+		pm->data[0][i] = point[i];
+		rm->data[0][i] = 0;
+	}
+
+	/*
+	 * rm = pm * m
+	 */
+	_alMatrixMul(rm, pm, m);
+
+	for(i = 0; i < 3; i++) {
+		point[i] = rm->data[0][i];
+	}
+
+	_alMatrixFree(m);
+	_alMatrixFree(pm);
+	_alMatrixFree(rm);
+
+	return;
+}
+#endif
+
+/*
+ * _alSlurp( const char *fname, void **buffer )
+ *
+ * slurp file named by fname to into *buffer, mallocing memory.
+ */
+int _alSlurp(const char *fname, void **buffer) {
+	struct stat buf;
+	FILE *fh;
+	size_t len;
+
+	if((fname == NULL) || (buffer == NULL)) {
+		return -1;
+	}
+
+	if(stat(fname, &buf) == -1) {
+		/* couldn't stat file */
+		return -1;
+	}
+
+	len = buf.st_size;
+	if(len <= 0) {
+		return -1;
+	}
+
+	fh = fopen(fname, "rb");
+	if(fh == NULL) {
+		/* couldn't open file */
+		return -1;
+	}
+
+	*buffer = malloc(len);
+	if(*buffer == NULL) {
+		return -1;
+	}
+
+	if(fread(*buffer, len, 1, fh) < 1) {
+		free(*buffer);
+
+		return -1;
+	}
+
+	fclose( fh );
+
+	return len;
+}
+
+/*
+ * _al_PCMRatioify( ALuint ffreq, ALuint tfreq,
+ *                  ALenum ffmt, ALenum tfmt,
+ *                  ALuint samples )
+ *
+ * Returns the number of byte necessary to contain samples worth of data, if
+ * the data undergoes a conversion from ffreq to tfreq in the sampling-rate
+ * and from ffmt to tfmt in terms of format.
+ */
+ALuint _al_PCMRatioify( ALuint ffreq, ALuint tfreq,
+			ALenum ffmt, ALenum tfmt,
+			ALuint samples ) {
+	ALuint ret = samples;
+
+	ret *= ((float) tfreq / (float) ffreq);
+
+	ret *= (_alGetBitsFromFormat( ffmt ) / 8 );
+	ret /= (_alGetBitsFromFormat( tfmt ) / 8 );
+
+	return ret;
+}
+
+/*
+ * _al_AL2FMT( ALuint channels, ALuint bits )
+ *
+ * Returns the openal format that has the number of channels channels and the
+ * bit depth bits.
+ */
+ALenum _al_AL2FMT(ALuint channels, ALuint bits) {
+	switch(channels) {
+		case 1:
+			if(bits == 8) return AL_FORMAT_MONO8;
+			if(bits == 16) return AL_FORMAT_MONO16;
+			break;
+		case 2:
+			if(bits == 8) return AL_FORMAT_STEREO8;
+			if(bits == 16) return AL_FORMAT_STEREO16;
+			break;
+		case 4:
+			if(bits == 8) return AL_FORMAT_QUAD8_LOKI;
+			if(bits == 16) return AL_FORMAT_QUAD16_LOKI;
+			break;
+	}
+
+	return -1;
+}
+
+#ifdef _WIN32
+/* sleep for n microseconds
+ *
+ * Well, not really.  For Windows, we divide
+ * by 10 and sleep for milliseconds
+ */
+void _alMicroSleep(unsigned int n) {
+	Sleep(n / 1000);
+
+	return;
+}
+
+#elif defined(__MORPHOS__)
+
+#include <clib/amiga_protos.h>
+
+void _alMicroSleep(unsigned int n) {
+	TimeDelay(UNIT_MICROHZ, n / 1000000, n % 1000000);
+
+	return;
+}
+
+#elif defined(__sgi)
+
+void _alMicroSleep(unsigned int n) {
+	usleep (n);
+	return;
+}
+
+#else
+
+/* sleep for n microseconds */
+void _alMicroSleep(unsigned int n) {
+	struct timeval tv;
+
+	tv.tv_sec = 0;
+	tv.tv_usec = n;
+
+	select(0, NULL, NULL, NULL, &tv);
+
+	return;
+}
+
+#endif /* _WIN32 */
+
+/*
+ * _alDegreeToRadian( ALfloat degree )
+ *
+ * Returns radian equilvilant of degree.
+ *
+ */
+ALfloat _alDegreeToRadian( ALfloat degree ) {
+	return degree * (M_PI / 180.0f);
+}
+
+/*
+ * _alCheckRangef( ALfloat val, ALfloat min, ALfloat max )
+ *
+ * Returns AL_TRUE if val is between min and max, inclusive.
+ */
+ALboolean _alCheckRangef(ALfloat val, ALfloat min, ALfloat max) {
+	ALboolean retval = AL_TRUE;
+
+#ifdef DEBUG
+	if( _alIsFinite(val) == 0 ) {
+		retval = AL_FALSE;
+	}
+#endif
+
+	if(val < min) {
+		retval = AL_FALSE;
+	}
+	if(val > max) {
+		retval = AL_FALSE;
+	}
+
+	return retval;
+}
+
+/*
+ * _alCheckRangeb( ALfloat val )
+ *
+ * Returns AL_TRUE if val is either AL_TRUE or AL_FALSE.
+ */
+ALboolean _alCheckRangeb(ALboolean b) {
+	switch(b) {
+		case AL_TRUE:
+		case AL_FALSE:
+			return AL_TRUE;
+		default:
+			break;
+	}
+
+	return AL_FALSE;
+}
+
+/*
+ * ALboolean _alIsZeroVector( const ALfloat *fv1 )
+ *
+ * Returns true if fv1 == { 0.0f, 0.0f, 0.0f }
+ */
+ALboolean _alIsZeroVector(const ALfloat *fv)
+{
+	if(fv[0] != 0.0f) {
+		return AL_FALSE;
+	}
+
+	if(fv[1] != 0.0f) {
+		return AL_FALSE;
+	}
+
+	if(fv[2] != 0.0f) {
+		return AL_FALSE;
+	}
+
+	return AL_TRUE;
+}
+
+/*
+ *  _al_RAWFORMAT( ALenum format )
+ *
+ *  Returns AL_TRUE if format is an openal format specifying raw pcm data,
+ *  AL_FALSE otherwise.
+ */
+ALboolean _al_RAWFORMAT(ALenum format)
+{
+	switch(format) {
+		case AL_FORMAT_MONO16:
+		case AL_FORMAT_MONO8:
+		case AL_FORMAT_STEREO16:
+		case AL_FORMAT_STEREO8:
+		case AL_FORMAT_QUAD16_LOKI:
+		case AL_FORMAT_QUAD8_LOKI:
+			return AL_TRUE;
+		default:
+			break;
+	}
+
+	return AL_FALSE;
+}
+
+/*
+ * _alGetBitsFromFormat( ALenum format )
+ *
+ * Returns the number of bits per sample for the given format.
+ */
+ALbyte _alGetBitsFromFormat(ALenum format)
+{
+	switch(format) {
+		case AL_FORMAT_MONO16:
+		case AL_FORMAT_STEREO16:
+		case AL_FORMAT_QUAD16_LOKI:
+		case AL_FORMAT_IMA_ADPCM_MONO16_EXT:
+		case AL_FORMAT_IMA_ADPCM_STEREO16_EXT:
+			return 16;
+			break;
+		case AL_FORMAT_MONO8:
+		case AL_FORMAT_STEREO8:
+		case AL_FORMAT_QUAD8_LOKI:
+			return 8;
+			break;
+	}
+
+	assert(0);
+
+	return -1;
+}
+
+/*
+ * _alSmallestPowerOfTwo( ALuint num )
+ *
+ * Returns smallest power of two large that meets or exceeds num.
+ */
+ALuint _alSmallestPowerOfTwo( ALuint num )
+{
+	ALuint retval = 1;
+
+	while( retval < num ) {
+		retval <<= 1;
+	}
+
+	return retval;
+}
+
+/*
+ * _alIsFinite( ALfloat v )
+ *
+ * Returns AL_TRUE if v is a finite, non NaN value, AL_FALSE otherwise.
+ */
+ALboolean _alIsFinite( ALfloat v )
+{
+	/* skip infinite test for now */
+	if(v == v) {
+		return AL_TRUE;
+	}
+
+	return AL_FALSE;
+}
+
+
+/*
+ * Returns smallest power of two that meets or exceeds num.
+ */
+ALuint
+_alSpot( ALuint num )
+{
+	ALuint retval = 0;
+	num >>= 1;
+	while(num) {
+		retval++;
+		num >>= 1;
+	}
+	return retval;
+}
Index: /openal-0.0.8/src/al_main.h
===================================================================
--- /openal-0.0.8/src/al_main.h	(revision 17)
+++ /openal-0.0.8/src/al_main.h	(revision 17)
@@ -0,0 +1,212 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_main.h
+ *
+ * Miscellanous prototypes, macros and definitions
+ */
+#ifndef _AL_MAIN_H_
+#define _AL_MAIN_H_
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+#include "alc/alc_context.h"
+
+/*
+ * _alLockPrintf is used for debugging purposes.  If DEBUG_LOCK is defined,
+ * calls to _alLockPrintf generate a print to stderr.  If not, these calls are
+ * optimized away.
+ */
+#ifndef DEBUG_LOCK
+#define _alLockPrintf(x, f, l)
+#else
+int _alLockPrintf( const char *str, const char *fn, int line );
+#endif /* DEBUG_LOCK */
+
+/*
+ * evaluates to the depth of the passed audioconvert format, in bits.
+ */
+#define _al_ACformatbits(fmt) (fmt & 0x00FF)
+
+/*
+ * These macros are make calls to the associated regular-library str calls,
+ * but cast their arguments to const char * before doing so.  This is to aid
+ * the manipulate of const ALubyte * strings.
+ */
+#define ustrcmp(s1, s2)     strcmp((const char *) s1, (const char *) s2)
+#define ustrncmp(s1, s2, n) strncmp((const char *) s1, \
+				    (const char *) s2, \
+				    n)
+#define ustrncpy(s1, s2, n) strncpy((char *) s1, \
+				    (const char *) s2, \
+				    n)
+
+/*
+ * Like memcpy, but copies to dst + offset instead of to dst.
+ */
+#define offset_memcpy(d,o,s,l) memcpy(((char *)d) + o, s, l)
+
+/*
+ * Like memcpy, but copies from src + offset instead of from src.
+ */
+#define memcpy_offset(d,s,o,l) memcpy(d, (char *) s + o, l)
+
+/*
+ * If DEBUG_STUB is defined, _alStub prints out a warning message.  If not, no
+ * action is taken.
+ *
+ */
+#ifdef DEBUG_STUB
+void _alStub( const char *str );
+#else
+#define _alStub( s )
+#endif /* DEBUG_STUB */
+
+/*
+ * Does misc. initialization for the library.
+ */
+ALboolean _alInit( void );
+
+/*
+ * Deallocates the data structures created by _alInit.
+ */
+void _alExit( void );
+
+/*
+ * Returns the openal format that has the number of channels channels and the
+ * bit depth bits.
+ */
+ALenum _al_AL2FMT( ALuint channels, ALuint bits );
+
+/*
+ * Returns the openal format equivilant to the audioconvert format acformat,
+ * with the number of channels specified by channels.
+ */
+ALenum _al_AC2ALFMT( ALuint acformat, ALuint channels );
+
+/*
+ * Returns the equivilant (sort of) audioconvert format specified by alfmt.
+ * audioconvert formats do not have channel information, so this should be
+ * combined with _alGetChannelsFromFormat.
+ */
+ALushort _al_AL2ACFMT( ALenum alfmt );
+
+/*
+ * evaluates to the number of channels in an openal format.
+ */
+ALubyte  _alGetChannelsFromFormat(ALenum alformat);
+
+/*
+ * Returns the number of bits per sample for the given format.
+ */
+ALbyte _alGetBitsFromFormat( ALenum format );
+
+/*
+ * Returns the openal format that is identical to format, but with sufficient
+ * channel width to accomedate new_channel_num channels.
+ */
+ALenum _al_formatscale( ALenum format, ALuint new_channel_num );
+
+/*
+ * Returns the number of byte necessary to contain samples worth of data, if
+ * the data undergoes a conversion from ffreq to tfreq in the sampling-rate
+ * and from ffmt to tfmt in terms of format.
+ */
+ALuint _al_PCMRatioify( ALuint ffreq, ALuint tfreq,
+			ALenum ffmt, ALenum tfmt,
+			ALuint samples );
+
+/*
+ *  Returns AL_TRUE if format is an openal format specifying raw pcm data,
+ *  AL_FALSE otherwise.
+ */
+ALboolean _al_RAWFORMAT( ALenum format );
+
+/*
+ * Multiplies each ALshort in bpt (len bytes long) by sa, clamped above
+ * by 32767 and below by -32768.  Only appropriate for 0.0 <= sa <= 1.0.
+ */
+void _alFloatMul( ALshort *bpt, ALfloat sa, ALuint len );
+
+/*
+ * Starts the mixer thread.
+ */
+void _alStartMixerThread( void );
+
+/*
+ * Waits for the mixer thread to die.  This call does not kill the mixer
+ * thread, it just hangs around poking the body.
+ */
+void _alWaitForMixerThreadToDie( void );
+
+/*
+ * Copies srcs[0..nc-1][0..(len/2)-1] to
+ * dsts[0..nc-1][offset/2..((offset + len)/2)-1].
+ */
+void _alBuffersAppend( void **dsts, void **srcs, int len, int offset, int nc );
+
+/*
+ * slurp file named by fname to into *buffer, mallocing memory.
+ */
+int _alSlurp( const char *fname, void **buffer );
+
+/*
+ * sleep for n microseconds
+ */
+void _alMicroSleep( unsigned int n );
+
+/*
+ * Convert degree argument to radians
+ */
+ALfloat _alDegreeToRadian( ALfloat degree );
+
+/*
+ * Functions for verifying values fall between min and max,
+ * inclusive.
+ */
+
+/*
+ * Returns AL_TRUE if val is between min and max, inclusive.
+ */
+ALboolean _alCheckRangef( ALfloat val, ALfloat min, ALfloat max );
+
+/*
+ * Returns AL_TRUE if val is either AL_TRUE or AL_FALSE.
+ */
+ALboolean _alCheckRangeb( ALboolean val );
+
+/*
+ * Returns true if fv1 == { 0.0f, 0.0f, 0.0f }
+ */
+ALboolean _alIsZeroVector( const ALfloat *fv1 );
+
+/*
+ * the buffers that sources are split into in SplitSources and
+ * Collapsed from in CollapseSources.  Filters work on these
+ * intermediate buffers, each of which contains one mono channel of
+ * the source data.
+ *
+ * f_buffers contain PCM data
+ */
+
+extern _alDecodeScratch f_buffers;
+
+/*
+ * Returns smallest power of two large that meets or exceeds num.
+ */
+ALuint _alSmallestPowerOfTwo( ALuint num );
+
+/*
+ * Returns AL_TRUE if v is a finite, non NaN value, AL_FALSE otherwise.
+ */
+ALboolean _alIsFinite( ALfloat v );
+
+
+/*
+ * Returns smallest power of two that meets or exceeds num.
+ */
+ALuint _alSpot( ALuint num );
+
+#endif
Index: /openal-0.0.8/src/al_matrix.c
===================================================================
--- /openal-0.0.8/src/al_matrix.c	(revision 17)
+++ /openal-0.0.8/src/al_matrix.c	(revision 17)
@@ -0,0 +1,96 @@
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <math.h>
+#include <stdlib.h>
+
+#include "al_debug.h"
+#include "al_types.h"
+#include "al_main.h"
+#include "al_matrix.h"
+
+/*
+ * _alMatrixMul( ALmatrix *result, ALmatrix *m1, ALmatrix *m2 )
+ *
+ * Multiplies m1 by m2, populating result.
+ *
+ *  FIXME: please check my math
+ */
+void _alMatrixMul( ALmatrix *result, ALmatrix *m1, ALmatrix *m2 ) {
+	int m2cols = m2->cols;
+	int m1rows = m1->rows;
+	int m1cols = m1->cols;
+	int i;
+	int j;
+	int k;
+
+	ALfloat sum;
+
+	for(i = 0; i < m2cols; i++) {
+		for(j = 0; j < m1rows; j++) {
+			sum = 0.0f;
+
+			for(k = 0; k < m1cols; k++) {
+				sum += m1->data[j][k] * m2->data[k][i];
+			}
+
+			result->data[j][i] = sum;
+		}
+	}
+
+	return;
+}
+
+/*
+ * _alMatrixAlloc( int rows, int cols )
+ *
+ * Allocates, initializes, and returns a matrix with the dimensions matching
+ * the passed arguments, or NULL on error.
+ */
+ALmatrix *_alMatrixAlloc(int rows, int cols) {
+	ALmatrix *retval;
+	int i;
+
+	retval = malloc(sizeof *retval);
+	if(retval == NULL) {
+		return NULL;
+	}
+
+	retval->data = malloc(rows * sizeof *retval->data);
+	if(retval->data == NULL) {
+		return NULL;
+	}
+
+	for(i = 0; i < rows; i++) {
+		/* FIXME: clean return on error */
+		retval->data[i] = malloc(cols * sizeof *retval->data[i]);
+	}
+
+	retval->rows = rows;
+	retval->cols = cols;
+
+	return retval;
+}
+
+/*
+ * _alMatrixFree( ALmatrix *m )
+ *
+ * Frees a matrix allocated with _alMatrixAlloc.
+ */
+void _alMatrixFree(ALmatrix *m) {
+	int i;
+
+	if(m == NULL) {
+		return;
+	}
+
+	for(i = 0; i < m->rows; i++) {
+		free( m->data[i] );
+	}
+
+	free(m->data);
+	free(m);
+
+	return;
+}
+
Index: /openal-0.0.8/src/al_matrix.h
===================================================================
--- /openal-0.0.8/src/al_matrix.h	(revision 17)
+++ /openal-0.0.8/src/al_matrix.h	(revision 17)
@@ -0,0 +1,28 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_vector.h
+ *
+ * matrix math stuff
+ */
+
+#ifndef AL_MATRIX_H_
+#define AL_MATRIX_H_
+
+/*
+ * Allocates, initializes, and returns a matrix with the dimensions matching
+ * the passed arguments, or NULL on error.
+ */
+ALmatrix *_alMatrixAlloc( int rows, int cols );
+
+/*
+ * Frees a matrix allocated with _alMatrixAlloc.
+ */
+void _alMatrixFree( ALmatrix *m );
+
+/*
+ * Multiplies two matrices and places the result in result.
+ */
+void _alMatrixMul( ALmatrix *result, ALmatrix *m1, ALmatrix *m2 );
+
+#endif /* AL_MATRIX_H_ */
Index: /openal-0.0.8/src/al_mixer.c
===================================================================
--- /openal-0.0.8/src/al_mixer.c	(revision 17)
+++ /openal-0.0.8/src/al_mixer.c	(revision 17)
@@ -0,0 +1,1382 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_mixer.c
+ *
+ * Place where most stuff happens.  The main mixer iteration function
+ * is defined here.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "al_debug.h"
+#include "al_error.h"
+#include "al_types.h"
+#include "al_main.h"
+#include "al_buffer.h"
+#include "al_filter.h"
+#include "al_mixer.h"
+#include "al_mixmanager.h"
+#include "al_source.h"
+#include "al_mspool.h"
+#include "mixaudio16.h"
+
+#include "alc/alc_context.h"
+#include "alc/alc_device.h"
+#include "alc/alc_speaker.h"
+
+#include "audioconvert/audioconvert.h"
+
+#include "al_threadlib.h"
+#include "al_mutexlib.h"
+
+#include "backends/alc_backend.h"
+
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+
+/*
+ * The mixing function checks this variable for equality with AL_TRUE.  When
+ * this is the case, it exits.  The default is AL_FALSE.
+ */
+ALboolean volatile time_for_mixer_to_die = AL_FALSE;
+
+/* our thread ID, if async */
+ThreadID mixthread = NULL;
+
+/*
+ * MixManager is the ALMixManager we use, in conjunction with MixFunc, to
+ * dispatch mixing functions for combining streams of PCM data.
+ */
+static ALMixManager MixManager;
+
+/*
+ * MixFunc is the ALMixFunc we use, in conjunction with MixManager, to
+ * dispatch mixing functions for combining streams of PCM data.
+ */
+static ALMixFunc MixFunc;
+
+/*
+ * mspool is our pool of mspool nodes.
+ */
+static _alMixPool mspool;
+
+/*
+ * s16le is the data structure we use to convert data from the canonical
+ * format into the external format.
+ */
+static acAudioCVT s16le;
+
+/*
+ * mix_mutex is the guard around mspool.
+ */
+static MutexID mix_mutex   = NULL;
+
+/*
+ * pause_mutex is an aid to mixer pausing.
+ */
+static MutexID pause_mutex = NULL;
+
+/*
+ * Size of how much data we should mix at a time for each source.
+ */
+static ALuint bufsiz = 0;
+
+static struct {
+	void *data;
+	ALuint length;
+} mixbuf = { NULL, 0 };
+
+/* streaming buffer array */
+static struct {
+	ALuint *streaming_buffers;
+	ALuint size;
+	ALuint items;
+} sbufs = { NULL, 0, 0 };
+
+/*
+ * sync_mixer_iterate( void *dummy )
+ *
+ * Non-threaded top level mixing logic.
+ */
+int sync_mixer_iterate( void *dummy );
+
+/*
+ * async_mixer_iterate( void *dummy )
+ *
+ * Threaded top level mixing logic.
+ */
+int async_mixer_iterate( void *dummy )AL_ATTRIBUTE_NORETURN_;
+
+/*
+ * Pointer to either sync or async_mixer_iterate.
+ */
+int (*mixer_iterate)( void *dummy ) = NULL;
+
+/*
+ * _alAddDataToMixer( void *dataptr, ALuint bytes_to_write )
+ *
+ * Mixes bytes_to_write data from dataptr to the system buffer.  If
+ * bytes_to_write exceeds the system buffer size, it is truncated and returns
+ * the maximum it could write.
+ */
+static ALuint _alAddDataToMixer( void *dataptr, ALuint bytes_to_write );
+
+/*
+ * _alProcessFlags( void )
+ *
+ * Processes flags set by the top-level mixing function.  These flags control
+ * things like deletion.
+ */
+static void _alProcessFlags( void );
+
+/*
+ * _alDestroyMixSource( void *ms )
+ *
+ * Finalize a _alMixSource object.
+ */
+static void _alDestroyMixSource( void *ms );
+
+/*
+ * _alAddBufferToStreamingList( ALuint bid )
+ *
+ * AL_buffers generated using alGenStreamingBuffers_LOKI need to be handled in
+ * a special way.  This function does that special handling.
+ */
+static void _alAddBufferToStreamingList( ALuint bid );
+
+/*
+ * _alTryLockMixerPause( void )
+ *
+ * Try to lock the mix_pause mutex.  Return AL_TRUE if lock suceeded, AL_FALSE
+ * otherwise.
+ */
+static ALboolean _alTryLockMixerPause( void );
+
+/*
+ * _alMixSources
+ *
+ * This is the where most of the action is directed.
+ *
+ * assumes locked mixbuf
+ */
+static void _alMixSources( void )
+{
+	AL_buffer *samp;
+	AL_source *src;
+	int *sampid;
+	_alMixSource *itr = NULL;
+	ALboolean islooping   = AL_FALSE;
+	ALboolean isstreaming = AL_FALSE;
+	ALboolean iscallback  = AL_FALSE;
+	ALboolean isinqueue   = AL_FALSE;
+	ALuint pitr; /* pool iterator */
+	ALuint nc = _alcDCGetNumSpeakers();
+
+	for(pitr = 0; pitr < mspool.size; pitr++)
+	{
+		if(mspool.pool[pitr].inuse == AL_FALSE)
+		{
+			/* if not in use, can't be played anyway */
+			continue;
+		}
+
+		itr = _alMixPoolIndex( &mspool, pitr );
+		assert(itr);
+
+		if(!(itr->flags & ALM_PLAY_ME))
+		{
+			/*
+			 * current mix source on the way out, so
+			 * ignore it
+			 */
+			_alDebug(ALD_MIXER, __FILE__, __LINE__,
+				"_alMixSources: %d is on the out",
+				itr->sid);
+			continue;
+		}
+
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"_alMixSources: currently on source id %d",
+			itr->sid);
+
+		/* check for paused context. */
+		if( _alcIsContextSuspended( itr->context_id ) == AL_TRUE )
+		{
+			continue;
+		}
+
+		_alLockSource( itr->context_id, itr->sid );
+
+		src = _alGetSource(itr->context_id, itr->sid);
+		if(src == NULL)
+		{
+			/* not a valid src */
+			itr->flags = ALM_DESTROY_ME;
+
+			_alUnlockSource( itr->context_id, itr->sid );
+
+			continue;
+		}
+
+		if(src->state == AL_PAUSED)
+		{
+			/* Paused sources don't get mixed */
+			_alUnlockSource( itr->context_id, itr->sid );
+			continue;
+		}
+
+		sampid = _alGetSourceParam(src, AL_BUFFER);
+		if(sampid == NULL)
+		{
+			/* source added with no buffer associated */
+			itr->flags = ALM_DESTROY_ME;
+
+			_alDebug(ALD_MIXER, __FILE__, __LINE__,
+				"No bid associated with sid %d", itr->sid);
+
+			_alUnlockSource( itr->context_id, itr->sid );
+
+			continue;
+		}
+
+ 		samp = _alGetBuffer(*sampid);
+		if(samp == NULL)
+		{
+			/* source added with no valid buffer associated */
+			_alDebug(ALD_MIXER, __FILE__, __LINE__,
+				"no such bid [sid|bid] [%d|%d]",
+				itr->sid, *sampid);
+
+			itr->flags = ALM_DESTROY_ME;
+
+			_alUnlockSource( itr->context_id, itr->sid );
+
+			continue;
+		}
+
+		/* get special needs */
+		islooping   = _alSourceIsLooping( src );
+		isinqueue   = _alSourceGetPendingBids( src ) > 0;
+		isstreaming = _alBidIsStreaming( *sampid );
+		iscallback  = _alBidIsCallback( *sampid );
+
+		/* apply each filter to sourceid sid */
+		_alApplyFilters(itr->context_id, itr->sid);
+
+		_alAddDataToMixer(src->srcParams.outbuf, bufsiz);
+
+		if(_alSourceShouldIncrement(src) == AL_TRUE)
+		{
+			/*
+			 * soundpos is an offset into the original buffer
+			 * data, which is most likely mono.  We use nc (the
+			 * number of channels in mixer's format) to scale
+			 * soundpos.
+			 *
+			 * John Quigley noticed a bug resulting from the
+			 * mix manager getting unequal amounts of data.
+			 * so we always add the same amount of data to
+			 * the mixer, because we should be memsetting it
+			 * to 0 when we're applying the filters.
+			 */
+			_alSourceIncrement(src, bufsiz / nc);
+		}
+
+		if((isinqueue == AL_TRUE) &&
+		   (src->srcParams.new_readindex >= 0))
+		{
+			/*
+			 * If new_readindex is set, so should be
+			 * new_soundpos.
+			 */
+			assert(src->srcParams.new_soundpos >= 0);
+
+			src->bid_queue.read_index =src->srcParams.new_readindex;
+			src->srcParams.soundpos =  src->srcParams.new_soundpos;
+
+			/*
+			 * Sanity check so that we don't read past the size
+ 			 * of the next buffer in the queue.
+ 			 */
+
+#ifdef DEBUG_QUEUE
+			if(src->bid_queue.read_index < src->bid_queue.size)
+			{
+				ALint ri = src->bid_queue.read_index;
+				ALint bid = src->bid_queue.queue[ri];
+				AL_buffer *samp = _alGetBuffer(bid);
+
+				assert(samp);
+				assert(src->srcParams.soundpos < samp->size);
+			}
+#endif
+
+			/*
+			 * Flag so that we don't do this again
+			 * until the next SplitSourceQueue.
+			 */
+			src->srcParams.new_readindex = -1;
+			src->srcParams.new_soundpos = -1;
+		}
+		else if(_alSourceBytesLeft(src, samp) <= 0)
+		{
+			/*
+			 * end of sound.  streaming & looping are special
+			 * cases.
+			 */
+			if(islooping == AL_TRUE && _alSourceIsQueue( src ) == AL_FALSE )
+			{
+				if(iscallback == AL_TRUE)
+				{
+					_alDebug(ALD_LOOP, __FILE__, __LINE__,
+					"%d callback loop reset ", itr->sid);
+
+					src->srcParams.soundpos = 0;
+
+					/*
+					 * we've actually been fudging the
+					 * size
+					 */
+					samp->size /= nc;
+				} else {
+					_alDebug(ALD_LOOP, __FILE__, __LINE__,
+					"%d loop reset", itr->sid);
+
+					/*
+					 * Looping buffers are prefed via
+					 * SplitSources, so soundpos is
+					 * actually bigger than the buffer
+					 * size (because they wrap around).
+					 */
+					src->srcParams.soundpos %= samp->size;
+				}
+			}
+			else if(!isstreaming && !isinqueue)
+			{
+			    if ( _alSourceIsQueue( src ) )
+			     {
+			      _alDebug(ALD_QUEUE, __FILE__, __LINE__,
+			      "%d queue loop reset",src->sid );
+			      src->srcParams.new_readindex = 0;
+			      src->srcParams.new_soundpos = 0;
+                	      src->bid_queue.read_index =src->srcParams.new_readindex;
+			      src->srcParams.soundpos =  src->srcParams.new_soundpos;
+			      itr->flags = ALM_PLAY_ME;
+			     } else
+				{
+				    _alDebug(ALD_LOOP, __FILE__, __LINE__,
+				    "%d loop destroy",itr->sid);
+				    /* This buffer is solo */
+				    itr->flags = ALM_DESTROY_ME;
+				}
+			}
+		}
+
+		if(isinqueue && (_alSourceGetPendingBids(src) < 0))
+		{
+			/*
+			 * the read index might have been incremented
+			 * past our tolerance
+			 */
+			itr->flags = ALM_DESTROY_ME;
+		}
+
+		_alUnlockSource( itr->context_id, itr->sid );
+	}
+
+	return;
+}
+
+/*
+ * _alAddDataToMixer( void *dataptr, ALuint bytes_to_write )
+ *
+ *
+ * Mixes bytes_to_write data from dataptr to the system buffer.  If
+ * bytes_to_write exceeds the system buffer size, it is truncated and returns
+ * the maximum it could write.
+ *
+ * assumes that mixer and default context are locked
+ */
+static ALuint _alAddDataToMixer( void *dataptr, ALuint bytes_to_write )
+{
+	if((dataptr == NULL) || (bytes_to_write == 0))
+	{
+		/* Most likely, thread is waiting to die */
+		return 0;
+	}
+
+	if(bytes_to_write > bufsiz)
+	{
+		bytes_to_write = bufsiz;
+	}
+
+	/* add entry to mix manager */
+	_alMixManagerAdd( &MixManager, dataptr, bytes_to_write );
+
+	return bytes_to_write;
+}
+
+/*
+ * void _alDestroyMixer( void )
+ *
+ * Deallocate data allocated in _alInitMixer.
+ */
+void _alDestroyMixer( void )
+{
+	if( mix_mutex != NULL )
+	{
+		_alDestroyMutex( mix_mutex );
+		mix_mutex = NULL;
+	}
+
+	_alMixPoolFree( &mspool, _alDestroyMixSource );
+	mspool.size = 0;
+
+	mixthread = NULL;
+
+	_alMixFuncDestroy(&MixFunc);
+	_alMixManagerDestroy(&MixManager);
+
+	free(mixbuf.data);
+	mixbuf.data   = NULL;
+	mixbuf.length = 0;
+
+	if( pause_mutex != NULL )
+	{
+		/* we may we destroyed while paused, which is bad, but
+		 * not horrible.  Try to lock it.  If sucessful, then
+		 * we weren't locked before, so we unlock and Destroy.
+		 * Otherwise, just unlock and destroy, since we aren't
+		 * going to be need async_mixer_iterate services anytime
+		 * soon anyway.
+		 */
+		_alTryLockMixerPause();
+		_alUnlockMixerPause(); /* at this point, we are either locked by
+					  the context or by our own doing, so it's
+					  okay to unlock.
+					*/
+
+		_alDestroyMutex( pause_mutex );
+		pause_mutex = NULL;
+	}
+
+
+	return;
+}
+
+/*
+ * _alDestroyMixSource( void *ms )
+ *
+ * Finalize a _alMixSource object.
+ */
+static void _alDestroyMixSource( void *ms )
+{
+	_alMixSource *msrc = (_alMixSource *) ms;
+	ALuint sid = msrc->sid;
+	ALuint cid = msrc->context_id;
+	AL_source *src;
+	ALuint *bid;
+	ALuint i;
+
+	_alLockSource( cid, sid );
+
+	src = _alGetSource( cid, sid );
+	if(src == NULL) {
+		/*
+		 * source got nuked somewhere, or context was
+		 * destroyed while paused.
+		 */
+
+		_alDebug(ALD_MIXER, __FILE__, __LINE__,
+			"_alDestroyMixSource: source id %d is not valid",
+			msrc->sid);
+
+		_alUnlockSource( cid, sid );
+
+		return;
+	}
+
+	/*
+	 * state should always be set to stopped by this point.
+	 */
+	src->state = AL_STOPPED;
+
+	/* clear sid */
+	msrc->sid = 0;
+
+	/*
+	 * Update buffer state
+	 */
+	bid = _alGetSourceParam(src, AL_BUFFER);
+
+	if(_alSourceQueuedBuffers(src) > 1)
+	{
+		int ri;
+
+		ri = MIN(src->bid_queue.read_index, src->bid_queue.size - 1);
+
+		assert( ri >= 0 );
+		assert( ri < src->bid_queue.size );
+
+		bid = &src->bid_queue.queue[ri];
+	}
+	else if(bid == NULL)
+	{
+		/*
+		 * This shouldn't happend:  The buffer param of this
+		 * source is now invalid, but we're stopping it.  This
+		 * really is an ugly error: it most likely means that
+		 * there's a bug in the refcounting stuff somewhere.
+		 *
+		 * Actually, there's an exception to this.  For queued
+		 * sources, there will most likely be no buffer queued
+		 * at the end of the run.  So we have to special case
+		 * that.
+		 */
+		_alDebug(ALD_MIXER, __FILE__, __LINE__,
+		      "_alDestroyMixSource: no bid for source id %d",
+		      src->sid);
+
+		_alUnlockSource( cid, sid );
+
+		_alDCSetError( AL_INVALID_OPERATION );
+
+		return;
+	}
+
+	_alBidRemoveCurrentRef(*bid, src->sid);
+
+	if(src->bid_queue.size != 1)
+	{
+		/*
+		 * This is the last entry in the queue (or the source
+		 * was stopped) so we want to change the current state
+		 * for this bid/sid to queue.
+		 */
+		_alBidAddQueueRef(*bid, src->sid);
+	}
+
+	/*
+	 * if we have a callback buffer, call the
+	 * destructor on the source (because the source
+	 * is over.
+	 */
+	if(_alBidIsCallback(*bid) == AL_TRUE)
+	{
+		_alBidCallDestroyCallbackSource(src->sid);
+	}
+
+	/* streaming sources */
+	if(_alBidIsStreaming(*bid) == AL_TRUE)
+	{
+		for(i = 0; i < sbufs.size; i++)
+		{
+			if(sbufs.streaming_buffers[i] == *bid)
+			{
+				sbufs.streaming_buffers[i] = 0;
+				sbufs.items--;
+			}
+		}
+	}
+
+	/*
+	 * reset read index
+         * according to spec, a STOPPED source should
+         * have all of its buffers processed, so read_index
+         * should be the size of the queue.
+	 *
+	 * Hmmm, this is tricky, because many setter functions work of the
+	 * assumptions that read_index points to something valid!  Okay, we're
+	 * making the queue sourcestate getter ( used to access a lot of
+	 * stuff ) return NULL, or assert or whatever, should catch these
+	 * quick.
+	 */
+	src->bid_queue.read_index = src->bid_queue.size;
+
+	_alUnlockSource( cid, sid );
+
+	return;
+}
+
+/*
+ * _alInitMixer( void )
+ *
+ * Create and initialize data structures needed by the mixing function.
+ */
+ALboolean _alInitMixer( void )
+{
+	bufsiz = _alcDCGetWriteBufsiz();
+
+	mix_mutex = _alCreateMutex();
+	if(mix_mutex == NULL)
+	{
+		return AL_FALSE;
+	}
+
+	pause_mutex = _alCreateMutex();
+	if(pause_mutex == NULL)
+	{
+		_alDestroyMutex( mix_mutex );
+		mix_mutex = NULL;
+
+		return AL_FALSE;
+	}
+
+	/* init Mixer funcs */
+	if( _alMixFuncInit(&MixFunc, MAXMIXSOURCES ) == AL_FALSE)
+	{
+		_alDestroyMutex( mix_mutex );
+		_alDestroyMutex( pause_mutex );
+		mix_mutex = NULL;
+		pause_mutex = NULL;
+
+		return AL_FALSE;
+	}
+
+	/* init MixManager */
+	if(_alMixManagerInit(&MixManager, MAXMIXSOURCES) == AL_FALSE)
+	{
+		_alDestroyMutex(mix_mutex);
+		_alDestroyMutex(pause_mutex);
+		mix_mutex = NULL;
+		pause_mutex = NULL;
+
+		_alMixFuncDestroy( &MixFunc );
+
+		return AL_FALSE;
+	}
+
+	mspool.size = 0;
+
+	return AL_TRUE;
+}
+
+/*
+ * _alSetMixer( ALboolean synchronous )
+ *
+ * Sets mixer to match the current context.  If synchronous is AL_FALSE, a
+ * seperate thread is launched.
+ *
+ * assumes locked context
+ */
+void _alSetMixer( ALboolean synchronous )
+{
+	AL_context *dc;
+	ALuint ex_format;
+	ALuint ex_speed;
+
+	dc =  _alcDCGetContext();
+	if(dc == NULL) {
+		_alDebug(ALD_MIXER, __FILE__, __LINE__,
+			"_alSetMixer with no default context?  weird");
+		return;
+	}
+
+	if ( dc->write_device ) {
+		ex_format   = _alcDCGetWriteFormat();
+		ex_speed    = _alcDCGetWriteSpeed();
+		bufsiz      = _alcDCGetWriteBufsiz();
+	} else {
+		ex_format   = _alcDCGetReadFormat();
+		ex_speed    = _alcDCGetReadSpeed();
+		bufsiz      = _alcDCGetReadBufsiz();
+	}
+
+	_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+		"_alSetMixer f|c|s [0x%x|%d|%d] -> [0x%x|%d|%d]",
+		/* from */
+		canon_format,
+		_alGetChannelsFromFormat( ex_format ), /* ignore channel settings.  We handle this */
+		canon_speed,
+		/* to */
+		ex_format,
+		_alGetChannelsFromFormat( ex_format ),
+		ex_speed);
+
+	if(acBuildAudioCVT(&s16le,
+		/* from */
+		_al_AL2ACFMT( canon_format ),
+		_alGetChannelsFromFormat( ex_format ), /* ignore channel settings.  We handle this */
+		canon_speed,
+
+		/* to */
+		_al_AL2ACFMT(ex_format),
+		_alGetChannelsFromFormat(ex_format),/* ignore channel settings.  We handle this */
+		ex_speed) < 0)
+	{
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"Couldn't build audio convertion data structure.");
+	}
+
+	if( s16le.len_mult > 1.0 )
+	{
+		/*
+		 * we always alloc the larger value, because
+		 * we need the extra space
+		 */
+		mixbuf.length = bufsiz * s16le.len_mult;
+	} else {
+		mixbuf.length = bufsiz;
+	}
+
+	free(mixbuf.data);
+	mixbuf.data = malloc(mixbuf.length);
+	assert(mixbuf.data);
+
+	s16le.buf     = mixbuf.data;
+	s16le.len     = bufsiz;
+
+	if(synchronous == AL_TRUE) {
+		mixer_iterate = sync_mixer_iterate;
+	} else {
+            mixer_iterate = async_mixer_iterate;
+#ifndef USE_BACKEND_NATIVE_DARWIN
+/*Since the new darwin backend uses a core audio thread, we don't need the mixing thread anymore and use the sync mixer */
+		if(mixthread == NULL) {
+			mixthread = _alCreateThread(mixer_iterate);
+		}
+#endif
+	}
+
+	return;
+}
+
+/*
+ * _alAllocMixSource( ALuint sid )
+ *
+ * Reserve an _alMixSource, associate it with the source named sid.  Returns
+ * AL_TRUE if reservation was true, AL_FALSE if sid is invalid or allocation
+ * was not possible.
+ *
+ * If sid is not a valid source, AL_INVALID_NAME is set.
+ *
+ * Assumes locked context
+ */
+static ALboolean _alAllocMixSource( ALuint sid )
+{
+	AL_source *src;
+	ALuint *bid;
+	_alMixSource *msrc;
+	ALuint context_id = _alcCCId; /* current context id */
+	int msindex;
+
+	src = _alGetSource( context_id, sid );
+	if( src == NULL ) {
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "_alAllocMixSource: source id %d is not valid", sid);
+
+		_alSetError( context_id, AL_INVALID_NAME );
+
+		return AL_FALSE;
+	}
+
+	/*
+	 *  Make sure that the source isn't already playing.
+	 */
+	if( src->state == AL_PLAYING ) {
+		/*
+		 * The source in question is already playing.
+		 *
+		 * Legal NOP
+		 */
+		_alDebug(ALD_MIXER, __FILE__, __LINE__,
+			"_alAllocMixSource: source id %d already playing", sid);
+
+		return AL_FALSE;
+	}
+
+	if ( src->state == AL_STOPPED ) {
+		/*
+		 *  The source in question has been stopped.  Promote to
+		 *  initial and play.
+		 */
+
+		src->srcParams.soundpos = 0;
+		src->bid_queue.read_index = 0;
+		src->state = AL_INITIAL;
+	}
+
+	/*
+	 *  Add reference for buffer
+	 */
+	_alLockBuffer();
+
+	bid = _alGetSourceParam( src, AL_BUFFER );
+	if(bid == NULL) {
+		_alUnlockBuffer();
+
+		/*
+		 * The source in question does not have the BUFFER
+		 * attribute set.
+		 */
+		_alDebug(ALD_MIXER, __FILE__, __LINE__,
+			"_alAllocMixSource: source id %d has BUFFER unset",sid);
+
+		_alSetError(context_id, AL_INVALID_OPERATION);
+
+		return AL_FALSE;
+	}
+
+	if( _alIsBuffer(*bid) == AL_FALSE ) {
+		/*
+		 * The source in question has a buffer id, but it is not
+		 * valid.
+		 */
+		_alUnlockBuffer();
+
+		_alDebug(ALD_MIXER, __FILE__, __LINE__,
+			"_alAllocMixSource: source %d has invalid BUFFER %d:%d",
+			sid, src->bid_queue.read_index, *bid);
+
+		_alSetError(context_id, AL_INVALID_NAME);
+
+		return AL_FALSE;
+	}
+
+	_alUnlockBuffer();
+
+	/* streaming buffers added to increment list */
+	if( _alBidIsStreaming(*bid) == AL_TRUE ) {
+		_alAddBufferToStreamingList(*bid);
+	}
+
+	if( src->bid_queue.read_index < src->bid_queue.size - 1 )
+	{
+		_alBidRemoveQueueRef(*bid, sid);
+	}
+
+	_alBidAddCurrentRef(*bid,  sid);
+
+	/*
+	 *  Allocate space.
+	 */
+	msindex = _alMixPoolAlloc( &mspool );
+	if(msindex == -1) {
+		return AL_FALSE;
+	}
+
+	/*
+	 *  Initialization mojo.
+	 *
+	 *  set sid to source's id, flags to ALM_PLAY_ME, and
+	 *  set the source's flags so that we know it's playing,
+	 *  and reset soundpos.
+	 */
+	msrc = _alMixPoolIndex( &mspool, msindex );
+
+	/* set mixsource information */
+	msrc->context_id    = context_id;
+	msrc->sid           = sid;
+	msrc->flags         = ALM_PLAY_ME;
+
+	/* set source information */
+	if(src->state != AL_PAUSED)
+	{
+		src->srcParams.soundpos = 0;
+		src->bid_queue.read_index     = 0;
+	}
+
+	src->state		      = AL_PLAYING;
+
+	return AL_TRUE;
+}
+
+/*
+ * _alRemoveSourceFromMixer( ALuint sid )
+ *
+ * Removes the source named sid from the mixer queue.
+ */
+ALboolean _alRemoveSourceFromMixer( ALuint sid ) {
+	AL_source *src;
+	ALuint i;
+
+	src = _alDCGetSource( sid );
+	if(src == NULL) {
+		_alDebug( ALD_MIXER, __FILE__, __LINE__,
+			  "_alRemoveSourceFromMixer: %d is an invalid source id",
+			  sid );
+
+		_alDCSetError( AL_INVALID_NAME );
+
+		return AL_FALSE;
+	}
+
+	/*
+	 *	We are stopping now.	Which means we set the state:
+	 *
+	 *	active	-> stopped
+	 *	paused	-> stopped
+	 *	initial -> NOP
+	 *	stopped -> NOP
+	 *
+	 */
+	switch(src->state) {
+		case AL_INITIAL:
+		case AL_STOPPED:
+			/* Stop on a non active source is a legal NOP */
+			_alDebug( ALD_MIXER, __FILE__, __LINE__,
+				  "_alRemoveSourceFromMixer(%d): source is not playing",
+				  sid );
+
+			return AL_FALSE;
+			break;
+		default:
+			/* We're okay, otherwise */
+			break;
+	}
+
+	for(i = 0; i < mspool.size; i++) {
+		if((mspool.pool[i].data.sid == sid) &&
+			 (mspool.pool[i].inuse == AL_TRUE)) {
+			_alMixPoolDealloc( &mspool, i, _alDestroyMixSource );
+
+			_alDebug( ALD_MIXER, __FILE__, __LINE__,
+					"_alRemoveSourceFromMixer: removed sid %d",
+					sid );
+
+			return AL_TRUE;
+		}
+	}
+
+	/*
+	 * We really shouldn't end up here.  It means that the ->flags
+	 * attribute got weird somewhere.
+	 */
+	_alDebug(ALD_MIXER, __FILE__, __LINE__,
+		"_alRemoveSourceFromMixer(%d): Could not remove source",
+		sid);
+
+	return AL_FALSE;
+}
+
+/*
+ * _alAddSourceToMixer( ALuint sid )
+ *
+ * Adds the source named sid to the mixing queue.  Sets AL_INVALID_NAME if sid
+ * is invalid.
+ *
+ * assumes that context is locked
+ * assumes that mixbuf is locked
+ */
+void _alAddSourceToMixer( ALuint sid )
+{
+	AL_source *src;
+
+	src = _alDCGetSource( sid );
+	if(src == NULL) {
+		/* invalid name */
+		_alDebug( ALD_MIXER, __FILE__, __LINE__,
+			  "_alAddSourceToMixer: source id %d is not valid",
+			  sid );
+
+		_alDCSetError( AL_INVALID_NAME );
+		return;
+	}
+
+	/*
+	 * Now, we are going to set the state:
+	 *
+	 * initial -> active
+	 * paused  -> active
+	 * stopped -> active
+	 * active  -> active, but reset
+	 *
+	 * Paused sources are already in the mixer, but being
+	 * ignored, so we just "turn them on." initial and stopped
+	 * sources need to have new mixsources alloced for them.
+	 */
+	switch(src->state) {
+		case AL_PAUSED:
+			/* Paused sources, when played again, resume
+			 * at their old location.  We don't need to
+			 * alloc a new mixsource.
+			 */
+			src->state = AL_PLAYING;
+			return;
+		case AL_PLAYING:
+			/* This source is already playing.
+			 *
+			 * No state change, but reset.
+			 */
+			src->srcParams.soundpos = 0;
+
+			return;
+		default:
+			/* alloc a mix source */
+			break;
+	}
+
+	if(_alAllocMixSource( sid ) == AL_FALSE) {
+		/* most likely, the buffer associated with the
+		 * source in question has been deleted.  Return
+		 * asap.
+		 *
+		 * We shouldn't set the error because _alAllocMixSource
+		 * will actually be better aware of what the problem is,
+		 * and so will set the error accordingly.
+		 */
+		_alDebug( ALD_MIXER, __FILE__, __LINE__,
+			   "_alAddSourceToMixer: Could not add source sid %d",
+			  sid );
+
+		return;
+	}
+
+	_alDebug(ALD_MIXER, __FILE__, __LINE__,
+		"_alAddSourceToMixer: added sid %d", sid);
+
+	return;
+}
+
+/*
+ * FL_alLockMixBuf(UNUSED(const char *fn), UNUSED(int ln))
+ *
+ * Locks the mutex guarding mixer data structures.
+ */
+void FL_alLockMixBuf( UNUSED(const char *fn), UNUSED(int ln) ) {
+	_alLockPrintf("_alLockMixbuf", fn, ln);
+
+	_alLockMutex( mix_mutex );
+
+	return;
+}
+
+/*
+ * FL_alUnlockMixBuf(UNUSED(const char *fn), UNUSED(int ln))
+ *
+ * Unlocks the mutex guarding mixer data structures.
+ */
+void FL_alUnlockMixBuf(UNUSED(const char *fn), UNUSED(int ln)) {
+	_alLockPrintf("_alUnlockMixbuf", fn, ln);
+
+	_alUnlockMutex( mix_mutex );
+
+	return;
+}
+
+/*
+ * async_mixer_iterate(UNUSED(void *dummy))
+ *
+ * threaded version of top level mixing function.  Doesn't end until the last
+ * context is deleted.
+ */
+int async_mixer_iterate(UNUSED(void *dummy)) {
+	ALuint bytes_to_write = 0;
+
+	/* clear buffer */
+	memset(mixbuf.data, 0, mixbuf.length);
+
+	do {
+		if(_alTryLockMixerPause() == AL_TRUE)
+		{
+			_alLockMixBuf();
+
+			_alMixSources();
+
+			_alProcessFlags();
+
+			_alUnlockMixBuf();
+
+			/* we've accumulated sources, now mix */
+			_alMixManagerMix( &MixManager, &MixFunc, mixbuf.data );
+
+			if(acConvertAudio(&s16le) < 0)
+			{
+				_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"Couldn't execute conversion from canon.");
+				/*
+				 * most likely we're just early.
+				 * Don't sweat it.
+				 */
+				continue;
+			}
+
+			bytes_to_write = s16le.len_cvt;
+
+			if(bytes_to_write)
+			{
+				_alcDCDeviceWrite(mixbuf.data, bytes_to_write);
+			}
+
+			/* clear buffer */
+			memset(mixbuf.data, 0, mixbuf.length);
+
+			_alUnlockMixerPause();
+		}
+		/* give other threads a chance to acquire the mixer lock */
+		_alMicroSleep(1);
+	} while(time_for_mixer_to_die == AL_FALSE);
+
+	time_for_mixer_to_die = AL_FALSE;
+
+	_alExitThread();
+#ifndef HAVE___ATTRIBUTE__
+	return 0;
+#endif
+}
+
+/*
+ * _alAddBufferToStreamingList( ALuint bid )
+ *
+ * Adds a buffer name to the streaming list, for special handling.
+ *
+ *  FIXME: need to free sbufs.stremaing_buffers on exit.
+ */
+static void _alAddBufferToStreamingList( ALuint bid ) {
+	void *temp;
+	int offset;
+	ALuint newsize;
+	ALuint i;
+
+	if(sbufs.items >= sbufs.size) {
+		/* realloc */
+		newsize = sbufs.size + 1;
+
+		temp = realloc(sbufs.streaming_buffers,
+				newsize * sizeof *sbufs.streaming_buffers);
+		if(temp == NULL) {
+			/* what a bummer */
+			return;
+		}
+		sbufs.streaming_buffers = temp;
+
+		for(i = sbufs.size; i < newsize; i++) {
+			sbufs.streaming_buffers[i] = 0;
+		}
+
+		sbufs.size = newsize;
+	}
+
+	/* add bid to streaming list */
+	for(i = 0, offset = sbufs.items; i < sbufs.size; i++) {
+		offset = (offset + 1) % sbufs.size;
+
+		if(sbufs.streaming_buffers[offset] == 0) {
+			sbufs.streaming_buffers[offset] = bid;
+
+			sbufs.items++;
+
+			return;
+		}
+	}
+
+	return;
+}
+
+/*
+ * _alTryLockMixerPause( void )
+ *
+ * The function that alcMakeContextCurrent calls to pause
+ * asynchronous mixers.  Return AL_TRUE if the pause mutex was locked,
+ * AL_FALSE otherwise.
+ */
+static ALboolean _alTryLockMixerPause( void ) {
+	if(_alTryLockMutex( pause_mutex ) == 0) {
+		return AL_TRUE;
+	}
+
+	return AL_FALSE;
+}
+
+/*
+ * _alLockMixerPause( void )
+ *
+ * The function that alcMakeContextCurrent calls to pause
+ * asynchronous mixers
+ */
+void _alLockMixerPause( void ) {
+	_alLockMutex( pause_mutex );
+
+	return;
+}
+
+/*
+ * _alUnlockMixerPause( void )
+ *
+ * The function that alcMakeContextCurrent calls to resume
+ * asynchronous mixers
+ */
+void _alUnlockMixerPause( void ) {
+	_alUnlockMutex( pause_mutex );
+
+	return;
+}
+
+
+/*
+ * _alProcessFlags( void )
+ *
+ * The mixing function (_alMixSources), in the course of its job marks the
+ * mixsource nodes with commands that need to be executed after the completion
+ * of the mixsource's iteration through the loop.  This is the function where
+ * such things are done.
+ *
+ * Also, we process streaming buffers here because they need to be visited
+ * once per call to _alMixSources, but the presence of multiple sources
+ * refering to the same buffer precludes us from doing the processing in
+ * _alMixSources.
+ *
+ * assumes locked mixbuf
+ */
+void _alProcessFlags( void ) {
+	_alMixSource *itr = NULL;
+	AL_buffer *bitr; /* buffer iterator */
+	ALuint i;
+	ALuint k;
+
+	for(i = 0; i < mspool.size; i++) {
+		if(mspool.pool[i].inuse == AL_FALSE) {
+			/* skip mixsources not in use */
+			continue;
+		}
+
+		itr = _alMixPoolIndex(&mspool, i);
+		if(itr == NULL)
+		{
+			/* shouldn't happen */
+			continue;
+		}
+
+		if(itr->flags & ALM_DESTROY_ME)
+		{
+			/* this source associated with this mixsource
+			 * has expired (either because it has been stopped
+			 * or just run out.  Remove it.
+			 */
+			if( alIsSource(itr->sid) == AL_FALSE )
+			{
+				/* sanity check */
+				continue;
+			}
+
+			/* deallocated mixsource */
+			_alMixPoolDealloc( &mspool, i, _alDestroyMixSource );
+		}
+	}
+
+	_alLockBuffer();
+
+	/* process streaming buffers */
+	i = sbufs.items;
+	k = sbufs.size - 1;
+
+	while(i--) {
+		int nc;
+
+		while(sbufs.streaming_buffers[k] == 0) {
+			/*
+			 * We don't worry about underflow because
+			 * we are keying off of the number of sbuf
+			 * items.
+			 */
+			k--;
+		}
+
+		bitr = _alGetBuffer(sbufs.streaming_buffers[k]);
+		if(bitr == NULL) {
+			_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+				"invalid buffer id %d",
+				sbufs.streaming_buffers[k]);
+
+			/* invalid buffer
+			 *
+			 * Most likely, the buffer got deleted at some
+			 * point.  We remove here, decrement the items
+			 * count and get on with life.
+			 */
+			sbufs.streaming_buffers[k] = 0;
+			sbufs.items--;
+
+			continue;
+		}
+
+		/* get the buffer's number of channels, so multichannel
+		 * streaming sounds work properly.
+		 */
+		nc = _alcDCGetNumSpeakers();
+
+		if(nc <= 0) {
+			nc = 1;
+		}
+
+		if(_alGetBufferState(bitr) == AL_UNUSED) {
+			/* refcount 0?  Don't bother. */
+			sbufs.streaming_buffers[k] = 0;
+			sbufs.items--;
+
+			continue;
+		}
+
+		bitr->streampos += bufsiz/nc;
+
+		if(bitr->streampos >= bitr->size) {
+			if(bitr->flags & ALB_STREAMING_WRAP) {
+				/* If we have the wrap flag, wrap.
+				 * Otherwise, what?  End the source?
+				 * Loop forever?
+				 */
+
+				_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+					"Wrapping\n");
+
+				bitr->streampos = 0;
+				bitr->flags &= ~ALB_STREAMING_WRAP;
+			}
+		}
+	}
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ * sync_mixer_iterate(UNUSED(void *dummy))
+ *
+ * non-threaded version of top level mixing function.  Called many times.
+ */
+int sync_mixer_iterate(UNUSED(void *dummy))
+{
+	ALshort *dataptr = mixbuf.data;
+	int bytes_to_write = 0;
+
+	/* clear buffer */
+	if(dataptr)
+	{
+		memset( dataptr, 0, bufsiz );
+	}
+
+	_alLockMixBuf();
+	_alMixSources();
+	_alProcessFlags();
+	_alUnlockMixBuf();
+
+	/* we've accumulated sources, now mix */
+	_alMixManagerMix(&MixManager, &MixFunc, mixbuf.data);
+
+	if(acConvertAudio(&s16le) < 0)
+	{
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"Couldn't execute conversion from canon.");
+		return -1;
+	}
+
+	bytes_to_write = s16le.len_cvt;
+
+	if(dataptr)
+	{
+		_alcDCDeviceWrite( dataptr, bytes_to_write );
+	}
+
+	return 0;
+}
Index: /openal-0.0.8/src/al_mixer.h
===================================================================
--- /openal-0.0.8/src/al_mixer.h	(revision 17)
+++ /openal-0.0.8/src/al_mixer.h	(revision 17)
@@ -0,0 +1,124 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_mixer.h
+ *
+ * Prototypes, macros and definitions related to the control and
+ * execution of the mixing "thread".
+ *
+ * The mixing "thread" is responsible for managing playing sources,
+ * applying the requisite filters, mixing in audio data from said sources,
+ * etc.
+ *
+ */
+#ifndef _AL_MIXER_H_
+#define _AL_MIXER_H_
+
+#include <AL/al.h>
+#include "al_siteconfig.h"
+
+/*
+ * Number of sources for which optimized mixing functions exist.
+ */
+#ifdef USE_LIGHT_GEN_MIXING
+#define GENMIXSOURCES 8
+#else
+#define GENMIXSOURCES 64
+#endif /* USE_LIGHT_GEN_MIXING */
+
+#ifdef __MMX__
+#define MMXMIXSOURCES 32
+#else
+#define MMXMIXSOURCES 0
+#endif /* __MMX__ */
+
+/* set MAXMIXSOURCES to MAX */
+#if GENMIXSOURCES<MMXMIXSOURCES
+#define MAXMIXSOURCES MMXMIXSOURCES
+#else
+#define MAXMIXSOURCES GENMIXSOURCES
+#endif
+
+
+/*
+ * our main mixing function.
+ */
+extern int (*mixer_iterate)( void *dummy );
+
+/*
+ * The mixing function checks this variable for equality with AL_TRUE.  When
+ * this is the case, it exits.  The default is AL_FALSE.
+ */
+extern volatile ALboolean time_for_mixer_to_die;
+
+/*
+ * Create and initialize data structures needed by the mixing function.
+ */
+ALboolean _alInitMixer( void );
+
+/*
+ * Inform the mixer that settings may have changed.  Data structures can
+ * be/are updated to reflect new settings in the current context.
+ *
+ * Synchronous, if AL_FALSE, causes a new thread to be launched.
+ */
+void _alSetMixer( ALboolean synchronous );
+
+/*
+ * Deallocate data allocated in _alInitMixer.
+ */
+void _alDestroyMixer( void );
+
+/*
+ * "play" the source named by sid.  If sid does not refer to a valid source,
+ * AL_INVALID_NAME is set.
+ */
+void _alAddSourceToMixer( ALuint sid );
+
+/*
+ * "stop" the source named by sid.  If sid does not refer to a valid source,
+ * AL_INVALID_NAME is set.
+ */
+ALboolean _alRemoveSourceFromMixer( ALuint sid );
+
+/*
+ * "start" the capture named by cpid.  If cpid does not refer to a valid
+ * capture, AL_INVALID_NAME is set.
+ */
+void _alAddCaptureToMixer( ALuint cpid );
+
+/*
+ * "stop" the capture named by cpid.  If cpid does not refer to a valid
+ * capture, AL_INVALID_NAME is set.
+ */
+void _alRemoveCaptureFromMixer( ALuint cpid );
+
+/*
+ * Lock the mixer mutex, handing fn and ln to _alLockPrintf
+ */
+void FL_alLockMixBuf( const char *fn, int ln );
+
+/*
+ * Unlock the mixer mutex, handing fn and ln to _alLockPrintf
+ */
+void FL_alUnlockMixBuf( const char *fn, int ln );
+
+/*
+ * functions to pause async mixer.  Oy Vey
+ */
+
+/*
+ * Lock the MixerPause mutex, which is use to "pause" the mixer.
+ */
+void _alLockMixerPause( void );
+
+/*
+ * Unlock the MixerPause mutex, which is use to "resume" the mixer.
+ */
+void _alUnlockMixerPause( void );
+
+/* macro madness */
+#define _alLockMixBuf()   FL_alLockMixBuf(__FILE__, __LINE__)
+#define _alUnlockMixBuf() FL_alUnlockMixBuf(__FILE__, __LINE__)
+
+#endif
Index: /openal-0.0.8/src/al_mixfunc.c
===================================================================
--- /openal-0.0.8/src/al_mixfunc.c	(revision 17)
+++ /openal-0.0.8/src/al_mixfunc.c	(revision 17)
@@ -0,0 +1,177 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_mixfunc.c
+ *
+ * Handling of the ALMixFunc datatype, which abstract the use of
+ * specialzed mixing functions.  Mixing functions are specialized
+ * on the bases of how many seperate source streams are contained
+ * in an ALMixManager object, which determines a dispatch function.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <stdio.h>
+
+#include "al_main.h"
+#include "al_mixfunc.h"
+#include "al_types.h"
+#include "al_cpu_caps.h"
+#include "mixaudio16.h"
+
+/*
+ * _alMixFuncInit( ALMixFunc *mf, ALuint size )
+ *
+ * _alMixFuncInit initializes the already allocated ALMixFunc object (mf) to
+ * contain at least size mixing functions.
+ */
+ALboolean _alMixFuncInit( ALMixFunc *mf, ALuint size ) {
+	if(mf == NULL) {
+		return AL_FALSE;
+	}
+
+	if(size == 0) {
+		return AL_FALSE;
+	}
+
+	if(size > MAXMIXSOURCES) {
+		return AL_FALSE;
+	}
+
+#ifdef __MMX__
+	if (_alHaveMMX()) {
+		/* FIXME: we really ignore size. */
+		mf->max      = MMXMIXSOURCES;
+		mf->funcs[0] = MixAudio16_MMX_0;
+		mf->funcs[1] = MixAudio16_MMX_1;
+		mf->funcs[2] = MixAudio16_MMX_2;
+		mf->funcs[3] = MixAudio16_MMX_3;
+		mf->funcs[4] = MixAudio16_MMX_4;
+		mf->funcs[5] = MixAudio16_MMX_5;
+		mf->funcs[6] = MixAudio16_MMX_6;
+		mf->funcs[7] = MixAudio16_MMX_7;
+		mf->funcs[8] = MixAudio16_MMX_8;
+		mf->funcs[9] = MixAudio16_MMX_9;
+		
+		mf->funcs[10] = MixAudio16_MMX_10;
+		mf->funcs[11] = MixAudio16_MMX_11;
+		mf->funcs[12] = MixAudio16_MMX_12;
+		mf->funcs[13] = MixAudio16_MMX_13;
+		mf->funcs[14] = MixAudio16_MMX_14;
+		mf->funcs[15] = MixAudio16_MMX_15;
+		mf->funcs[16] = MixAudio16_MMX_16;
+		mf->funcs[17] = MixAudio16_MMX_17;
+		mf->funcs[18] = MixAudio16_MMX_18;
+		mf->funcs[19] = MixAudio16_MMX_19;
+		
+		mf->funcs[20] = MixAudio16_MMX_20;
+		mf->funcs[21] = MixAudio16_MMX_21;
+		mf->funcs[22] = MixAudio16_MMX_22;
+		mf->funcs[23] = MixAudio16_MMX_23;
+		mf->funcs[24] = MixAudio16_MMX_24;
+		mf->funcs[25] = MixAudio16_MMX_25;
+		mf->funcs[26] = MixAudio16_MMX_26;
+		mf->funcs[27] = MixAudio16_MMX_27;
+		mf->funcs[28] = MixAudio16_MMX_28;
+		mf->funcs[29] = MixAudio16_MMX_29;
+		
+		mf->funcs[30] = MixAudio16_MMX_30;
+		mf->funcs[31] = MixAudio16_MMX_31;
+		mf->funcs[32] = MixAudio16_MMX_32;
+	
+		mf->func_n = MixAudio16_MMX_n;
+	
+		return AL_TRUE;
+	}
+#endif /* __MMX__ */
+
+	/* FIXME: we really ignore size. */
+	mf->max      = GENMIXSOURCES;
+	mf->funcs[0] = MixAudio16_0;
+	mf->funcs[1] = MixAudio16_1;
+	mf->funcs[2] = MixAudio16_2;
+	mf->funcs[3] = MixAudio16_3;
+	mf->funcs[4] = MixAudio16_4;
+	mf->funcs[5] = MixAudio16_5;
+	mf->funcs[6] = MixAudio16_6;
+	mf->funcs[7] = MixAudio16_7;
+	mf->funcs[8] = MixAudio16_8;
+#ifndef USE_LIGHT_GEN_MIXING
+	mf->funcs[9] = MixAudio16_9;
+
+	mf->funcs[10] = MixAudio16_10;
+	mf->funcs[11] = MixAudio16_11;
+	mf->funcs[12] = MixAudio16_12;
+	mf->funcs[13] = MixAudio16_13;
+	mf->funcs[14] = MixAudio16_14;
+	mf->funcs[15] = MixAudio16_15;
+	mf->funcs[16] = MixAudio16_16;
+	mf->funcs[17] = MixAudio16_17;
+	mf->funcs[18] = MixAudio16_18;
+	mf->funcs[19] = MixAudio16_19;
+
+	mf->funcs[20] = MixAudio16_20;
+	mf->funcs[21] = MixAudio16_21;
+	mf->funcs[22] = MixAudio16_22;
+	mf->funcs[23] = MixAudio16_23;
+	mf->funcs[24] = MixAudio16_24;
+	mf->funcs[25] = MixAudio16_25;
+	mf->funcs[26] = MixAudio16_26;
+	mf->funcs[27] = MixAudio16_27;
+	mf->funcs[28] = MixAudio16_28;
+	mf->funcs[29] = MixAudio16_29;
+	
+	mf->funcs[30] = MixAudio16_30;
+	mf->funcs[31] = MixAudio16_31;
+	mf->funcs[32] = MixAudio16_32;
+	mf->funcs[33] = MixAudio16_33;
+	mf->funcs[34] = MixAudio16_34;
+	mf->funcs[35] = MixAudio16_35;
+	mf->funcs[36] = MixAudio16_36;
+	mf->funcs[37] = MixAudio16_37;
+	mf->funcs[38] = MixAudio16_38;
+	mf->funcs[39] = MixAudio16_39;
+	mf->funcs[40] = MixAudio16_40;
+
+	mf->funcs[41] = MixAudio16_41;
+	mf->funcs[42] = MixAudio16_42;
+	mf->funcs[43] = MixAudio16_43;
+	mf->funcs[44] = MixAudio16_44;
+	mf->funcs[45] = MixAudio16_45;
+	mf->funcs[46] = MixAudio16_46;
+	mf->funcs[47] = MixAudio16_47;
+	mf->funcs[48] = MixAudio16_48;
+	mf->funcs[49] = MixAudio16_49;
+	
+	mf->funcs[50] = MixAudio16_50;
+	mf->funcs[51] = MixAudio16_51;
+	mf->funcs[52] = MixAudio16_52;
+	mf->funcs[53] = MixAudio16_53;
+	mf->funcs[54] = MixAudio16_54;
+	mf->funcs[55] = MixAudio16_55;
+	mf->funcs[56] = MixAudio16_56;
+	mf->funcs[57] = MixAudio16_57;
+	mf->funcs[58] = MixAudio16_58;
+	mf->funcs[59] = MixAudio16_59;
+	
+	mf->funcs[60] = MixAudio16_60;
+	mf->funcs[61] = MixAudio16_61;
+	mf->funcs[62] = MixAudio16_62;
+	mf->funcs[63] = MixAudio16_63;
+	mf->funcs[64] = MixAudio16_64;
+#endif /* !USE_LIGHT_GEN_MIXING */
+	mf->func_n = MixAudio16_n;
+
+	return AL_TRUE;
+}
+
+/*
+ * _alMixFuncDestroy( ALMixFunc *mf );
+ *
+ * _alMixFuncDestroy performs any needed finalization on the ALMixFunc object
+ * mf.
+ */
+void _alMixFuncDestroy( UNUSED(ALMixFunc *mf) ) {
+
+	return;
+}
Index: /openal-0.0.8/src/al_mixfunc.h
===================================================================
--- /openal-0.0.8/src/al_mixfunc.h	(revision 17)
+++ /openal-0.0.8/src/al_mixfunc.h	(revision 17)
@@ -0,0 +1,39 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_mixfunc.h
+ *
+ * Mixfuncs --- specialized mixing functions --- are unrolled, hopefully
+ * easily optimizable mixing functions that take advantage of knowing the
+ * number of mixing streams passed to them.  Used in conjunction with the
+ * mixmanager, this provides an interface for the library to plug in well
+ * optimized mixing functions.
+ */
+#ifndef _AL_MIXFUNC_H_
+#define _AL_MIXFUNC_H_
+
+#include "al_types.h"
+#include "al_mixer.h"
+
+typedef struct _AL_MixFunc {
+	void ( *funcs[ MAXMIXSOURCES + 1 ] )( ALshort *dst,
+					      alMixEntry *entries );
+	void ( *func_n )( ALshort *dst,
+	                  alMixEntry *entries,
+	                  ALuint numents );
+	ALuint max;
+} ALMixFunc;
+
+/*
+ * _alMixFuncInit initializes the already allocated ALMixFunc object (mf) to
+ * contain at least size mixing functions.
+ */
+ALboolean _alMixFuncInit( ALMixFunc *mf, ALuint size );
+
+/*
+ * _alMixFuncDestroy performs any needed finalization on the ALMixFunc object
+ * mf.
+ */
+void _alMixFuncDestroy( ALMixFunc *mf );
+
+#endif /* _AL_MIXFUNC_H_ */
Index: /openal-0.0.8/src/al_mixmanager.c
===================================================================
--- /openal-0.0.8/src/al_mixmanager.c	(revision 17)
+++ /openal-0.0.8/src/al_mixmanager.c	(revision 17)
@@ -0,0 +1,139 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_mixmanager.c
+ *
+ * Definition and manipulated of ALMixManager objects.
+ */
+#include "al_siteconfig.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "al_debug.h"
+#include "al_types.h"
+#include "al_mixmanager.h"
+
+#include "mixaudio16.h"
+
+/*
+ * _alMixManagerInit( ALMixManager *mixman, ALuint size )
+ *
+ * Initializes the already allocated ALMixManager object *mixman, to
+ * accomodate at least size entries.
+ */
+ALboolean _alMixManagerInit( ALMixManager *mixman, ALuint size ) {
+	void *temp;
+
+	if(size == 0) {
+		return AL_FALSE;
+	}
+
+	if(size > MAXMIXSOURCES) {
+		return AL_FALSE;
+	}
+
+	mixman->size = size;
+	mixman->index = 0;
+
+	temp = realloc(mixman->pool, size * sizeof *mixman->pool);
+	if(temp == NULL) {
+		perror("malloc");
+		return AL_FALSE;
+	}
+	mixman->pool = temp;
+
+	memset(mixman->pool, 0, size * sizeof *mixman->pool);
+
+	return AL_TRUE;
+}
+
+/*
+ * _alMixManagerDestroy( ALMixManager *mixman )
+ *
+ * Performs finalization on the ALMixManager object *mixman.
+ */
+void _alMixManagerDestroy( ALMixManager *mixman ) {
+	free( mixman->pool );
+	mixman->pool = NULL;
+
+	mixman->index = 0;
+	mixman->size  = 0;
+
+	/* let caller free mixman, if needed */
+
+	return;
+}
+
+
+/*
+ * _alMixManagerAdd( ALMixManager *mixman, ALvoid *dataptr, int bytes_to_write )
+ *
+ * Adds an entry to the ALMixManager object *mixman, with data dataptr of
+ * length bytes_to_write in bytes.
+ *
+ * assumes locked mixer
+ *
+ * FIXME: sort by bytes?
+ */
+void _alMixManagerAdd( ALMixManager *mixman, void *dataptr, int bytes_to_write ) {
+	void *temp;
+
+	if(mixman->index >= mixman->size) {
+		/* time to resize */
+		int newsize = mixman->size * 2;
+
+		temp = realloc(mixman->pool, newsize * sizeof *mixman->pool);
+		if(temp == NULL) {
+			/* oh dear */
+			return;
+		}
+
+		mixman->pool = temp;
+		mixman->size = newsize;
+	}
+
+	mixman->pool[mixman->index].data  = dataptr;
+	mixman->pool[mixman->index].bytes = bytes_to_write;
+
+	mixman->index++;
+
+	return;
+}
+
+
+/*
+ * _alMixManagerMix( ALMixManager *mixman, ALMixFunc *mf, ALvoid *dataptr )
+ *
+ * Mixes each entry in ALMixManager *mixman, using mixing functions from
+ * ALMixFunc, populating dataptr.
+ *
+ *  assumes locked mixer
+ */
+void _alMixManagerMix( ALMixManager *mixman, ALMixFunc *mf, ALvoid *dataptr ) {
+	if( mixman == NULL ) {
+		return;
+	}
+
+	if( mf == NULL ) {
+		return;
+	}
+
+	if(mixman->index > mf->max) {
+		/* bite the bullet and do it the long way */
+		mf->func_n(dataptr, mixman->pool, mixman->index);
+	} else {
+		/* do the mixing */
+		mf->funcs[mixman->index](dataptr, mixman->pool);
+	}
+
+	while(mixman->index--) {
+		mixman->pool[mixman->index].data = NULL;
+	}
+
+	/* reset index */
+	mixman->index = 0;
+
+	return;
+}
Index: /openal-0.0.8/src/al_mixmanager.h
===================================================================
--- /openal-0.0.8/src/al_mixmanager.h	(revision 17)
+++ /openal-0.0.8/src/al_mixmanager.h	(revision 17)
@@ -0,0 +1,61 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_mixmanager.h
+ *
+ * Interface to the mixmanager.  The mix manager is an abstraction such
+ * that repeated calls to mix audio data can be collected into one set,
+ * so that optimizations can be performed based on the number of data
+ * streams that need to be mixed simultaneously.
+ *
+ */
+#ifndef _AL_MIXMANAGER_H_
+#define _AL_MIXMANAGER_H_
+
+#include "al_types.h"
+#include "al_mixfunc.h"
+
+/*
+ * Our mix manager.
+ *
+ * By using a mix manager, I hope to pool together the calls to
+ * mix audio, in essence loop unrolling on the fly.  Instead of
+ * mixing each source's outdata directly onto the mix buffer, we
+ * add an entry to the MixManager, which after it has collected
+ * all sources for the mixer_iteration interval uses a MixAudio
+ * call optimized for the number of sources present.
+ *
+ * Used in conjunction with MixFuncs
+ */
+typedef struct _AL_MixManager {
+	alMixEntry *pool;
+	ALuint size;
+	ALuint index;
+} ALMixManager;
+
+/* Mix manager funcs */
+
+/*
+ * Initializes the already allocated ALMixManager object *mixman, to
+ * accomodate at least size entries.
+ */
+ALboolean _alMixManagerInit( ALMixManager *mixman, ALuint size );
+
+/*
+ * Performs finalization on the ALMixManager object *mixman.
+ */
+void _alMixManagerDestroy( ALMixManager *mixman );
+
+/*
+ * Adds an entry to the ALMixManager object *mixman, with data dataptr of
+ * length bytes_to_write in bytes.
+ */
+void _alMixManagerAdd( ALMixManager *mixman, ALvoid *dataptr, int bytes_to_write );
+
+/*
+ * Mixes each entry in ALMixManager *mixman, using mixing functions from
+ * ALMixFunc, populating dataptr.
+ */
+void _alMixManagerMix( ALMixManager *mixman, ALMixFunc *mf, ALvoid *dataptr );
+
+#endif /* _AL_MIXMANAGER_H_ */
Index: /openal-0.0.8/src/al_mspool.c
===================================================================
--- /openal-0.0.8/src/al_mspool.c	(revision 17)
+++ /openal-0.0.8/src/al_mspool.c	(revision 17)
@@ -0,0 +1,187 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_mspool.c
+ *
+ * Prototypes, macros and definitions related to the management of mspool
+ * objects.  mspool objects are objects which ease the slab allocation of
+ * _alMixSource objects.
+ */
+#include "al_debug.h"
+#include "al_mspool.h"
+
+#include <stdlib.h>
+
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+
+/*
+ * _alMixPoolResize( _alMixPool *mspool, size_t newsize )
+ *
+ * Initializes an already allocated _alMixPool object.  Returns AL_TRUE,
+ * inless initialization failed for some reason, in which case AL_FALSE is
+ * returned.
+ *
+ * After a successful initialization, mspool will have the capacity for at
+ * least newsize _alMixPoolNodes.
+ */
+ALboolean _alMixPoolResize(_alMixPool *spool, size_t newsize)
+{
+	_alMixPoolNode *temp;
+	unsigned int i;
+
+	newsize = MAX( newsize, 1 );
+
+	if(spool->size >= newsize)
+	{
+		return AL_TRUE; /* no resize needed */
+	}
+
+	if(spool->pool == NULL)
+	{
+		spool->pool = malloc(newsize * sizeof *spool->pool);
+	}
+	else
+	{
+		temp = realloc(spool->pool, newsize * sizeof(_alMixPoolNode));
+		if(temp == NULL)
+		{
+			return AL_FALSE; /* could not realloc */
+		}
+
+		spool->pool = temp;
+	}
+
+	for(i = spool->size; i < newsize; i++)
+	{
+		spool->pool[i].inuse = AL_FALSE;
+	}
+
+	spool->size = newsize;
+
+	return AL_TRUE;
+}
+
+/*
+ * _alMixPoolAlloc( _alMixPool *mspool )
+ *
+ * Initializes an already allocated _alMixPool object.  Returns index suitable
+ * for calls which expect an index, or -1 on error.
+ */
+int _alMixPoolAlloc( _alMixPool *spool )
+{
+	int msindex;
+
+	msindex = _alMixPoolFirstFreeIndex(spool);
+	if(msindex == -1)
+	{
+		if(_alMixPoolResize(spool, spool->size * 2) == AL_FALSE)
+		{
+			return -1;
+		}
+
+		msindex = _alMixPoolFirstFreeIndex(spool);
+	}
+
+	spool->pool[msindex].inuse = AL_TRUE;
+
+	return msindex;
+}
+
+/*
+ * _alMixPoolIndex( _alMixPool *mspool, int msindex )
+ *
+ * Return _alMixSource from mspool using simple index, or NULL if msindex is
+ * not a valid index or has not been flagged for use.
+ */
+_alMixSource *_alMixPoolIndex(_alMixPool *spool, int msindex)
+{
+	if( msindex > (int) spool->size )
+	{
+		return NULL;
+	}
+
+	if(spool->pool[msindex].inuse == AL_FALSE)
+	{
+		return NULL;
+	}
+
+	return &spool->pool[msindex].data;
+}
+
+/*
+ * _alMixPoolFirstFreeIndex( _alMixPool *mspool )
+ *
+ * Returns first available index in mspool, or -1 if nothing is available.
+ */
+int _alMixPoolFirstFreeIndex(_alMixPool *spool)
+{
+	ALuint i;
+
+	for(i = 0; i < spool->size; i++)
+	{
+		if(spool->pool[i].inuse == AL_FALSE)
+		{
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+/*
+ * _alMixPoolDealloc( _alMixPool *mspool, int msindex,
+ *                   void (*freer_func)(void *))
+ *
+ * Finalize a _alMixSource, indexed by msindex, using freer_func,
+ * from mspool, marking is as not in use.
+ */
+ALboolean _alMixPoolDealloc( _alMixPool *spool, int msindex,
+			     void (*freer_func)(void *) ) {
+	_alMixSource *src;
+
+	if( msindex < 0 ) {
+		return AL_FALSE;
+	}
+
+	src = _alMixPoolIndex( spool, msindex );
+	if(src == NULL) {
+		_alDebug(ALD_MIXER, __FILE__, __LINE__,
+			"%d is a bad index", msindex);
+
+		return AL_FALSE;
+	}
+
+	spool->pool[msindex].inuse = AL_FALSE;
+
+	freer_func(src);
+
+	return AL_TRUE;
+}
+
+/*
+ * _alMixPoolFree( _alMixPool *mspool, void (*freer_func)(void *) )
+ *
+ * Finalizes each _alMixSource in the _alMixPool object, using freer_func.
+ */
+void _alMixPoolFree(_alMixPool *spool, void (*freer_func)(void *))
+{
+	unsigned int i;
+
+	for(i = 0; i < spool->size; i++)
+	{
+		if(spool->pool[i].inuse == AL_TRUE)
+		{
+			_alMixPoolDealloc( spool, i, freer_func );
+		}
+	}
+
+	free( spool->pool );
+	spool->pool = NULL;
+
+	spool->size = 0;
+
+	/* let the caller free spool itself */
+
+	return;
+}
Index: /openal-0.0.8/src/al_mspool.h
===================================================================
--- /openal-0.0.8/src/al_mspool.h	(revision 17)
+++ /openal-0.0.8/src/al_mspool.h	(revision 17)
@@ -0,0 +1,93 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_mspool.h
+ *
+ * Prototypes, macros and definitions related to the management of mspool
+ * objects.  mspool objects are objects which ease the slab allocation of
+ * _alMixSource objects.
+ */
+#ifndef AL_MSPOOL_H_
+#define AL_MSPOOL_H_
+
+#include <AL/al.h>
+#include <stdlib.h>
+
+/*
+ *  MixSource state info.
+ */
+typedef enum _alMixSourceEnum
+{
+	ALM_PLAY_ME        = (1<<0),
+	ALM_DESTROY_ME     = (1<<1),
+	ALM_STREAMING	   = (1<<2)
+} _alMixSourceEnum;
+
+/*
+ * _alMixSource is the data structure that contains an entry in the mixing
+ * queue.  Entries have a context id and source id, as well as some processing
+ * flags.
+ */
+typedef struct _alMixSource
+{
+	ALuint context_id;
+	ALuint sid;
+	_alMixSourceEnum flags;
+} _alMixSource;
+
+/*
+ * The _alMixPool is a type used to facilitate slab allocation of _alMixSource
+ * entries.
+ */
+typedef struct _alMixPoolNode
+{
+	_alMixSource data;
+	ALboolean inuse;
+} _alMixPoolNode;
+
+/*
+ * The _alMixPool is a type which contains _alMixPoolNode, in order to
+ * facilitate slab allocation.
+ */
+typedef struct _alMixPool
+{
+	_alMixPoolNode *pool;
+	ALuint size;
+} _alMixPool;
+
+/*
+ * Initializes an already allocated _alMixPool object.
+ */
+int _alMixPoolAlloc( _alMixPool *mspool );
+
+/*
+ * Initializes an already allocated _alMixPool object.  Returns AL_TRUE,
+ * inless initialization failed for some reason, in which case AL_FALSE is
+ * returned.
+ */
+ALboolean _alMixPoolResize( _alMixPool *mspool, size_t newsize );
+
+/*
+ * Finalize a _alMixSource, indexed by msindex, using freer_func,
+ * from mspool.
+ */
+ALboolean _alMixPoolDealloc( _alMixPool *mspool, int msindex,
+			     void (*freer_func)(void *));
+
+/*
+ * Return _alMixSource from mspool using simple index, or NULL if msindex is
+ * not a valid index.
+ */
+_alMixSource *_alMixPoolIndex( _alMixPool *mspool, int msindex );
+
+/*
+ * Returns first available index in mspool, or -1 if nothing is available.
+ */
+int _alMixPoolFirstFreeIndex( _alMixPool *mspool );
+
+/*
+ * Finalizes each _alMixSource in the _alMixPool object, using freer_func.
+ */
+void _alMixPoolFree( _alMixPool *mspool, void (*freer_func)(void *) );
+
+#endif /* AL_MSPOOL_H_ */
Index: /openal-0.0.8/src/al_mutexlib.c
===================================================================
--- /openal-0.0.8/src/al_mutexlib.c	(revision 17)
+++ /openal-0.0.8/src/al_mutexlib.c	(revision 17)
@@ -0,0 +1,116 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * mutexlib.c
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "al_mutexlib.h"
+
+#if defined(USE_POSIXTHREADING)
+
+MutexID _alCreateMutex( void )
+{
+	MutexID mutex = ( MutexID ) malloc( sizeof( *mutex ) );
+	if( mutex == NULL ) {
+		return NULL;
+	}
+	if( pthread_mutex_init( mutex, NULL ) != 0 ) {
+		free( mutex );
+		return NULL;
+	}
+	return mutex;
+}
+
+void _alDestroyMutex( MutexID mutex )
+{
+	if( pthread_mutex_destroy( mutex ) != 0 ) {
+		fprintf( stderr, "mutex %p busy\n", ( void * ) mutex );
+		return;
+	}
+	free( mutex );
+}
+
+void _alLockMutex( MutexID mutex )
+{
+	pthread_mutex_lock( mutex );
+}
+
+int _alTryLockMutex( MutexID mutex )
+{
+	return ( pthread_mutex_trylock( mutex ) == 0 ) ? 0 : -1;
+}
+
+void _alUnlockMutex( MutexID mutex )
+{
+	pthread_mutex_unlock( mutex );
+}
+
+#elif defined(USE_WINDOWSTHREADING)
+
+MutexID _alCreateMutex( void )
+{
+	MutexID mutex = ( MutexID ) malloc( sizeof( *mutex ) );
+	if( mutex == NULL ) {
+		return NULL;
+	}
+	InitializeCriticalSection( mutex );
+	return mutex;
+}
+
+void _alDestroyMutex( MutexID mutex )
+{
+	DeleteCriticalSection( mutex );
+}
+
+void _alLockMutex( MutexID mutex )
+{
+	EnterCriticalSection( mutex );
+}
+
+int _alTryLockMutex( MutexID mutex )
+{
+	return ( TryEnterCriticalSection( mutex ) != 0 ) ? 0 : -1;
+}
+
+void _alUnlockMutex( MutexID mutex )
+{
+	LeaveCriticalSection( mutex );
+}
+
+#elif defined(USE_MORPHOSTHREADING)
+
+#include <proto/exec.h>
+
+MutexID _alCreateMutex( void )
+{
+	MutexID mutex = ( MutexID ) AllocVec( sizeof( *mutex ), MEMF_PUBLIC );
+	if( mutex == NULL ) {
+		return NULL;
+	}
+	InitSemaphore( mutex );
+	return mutex;
+}
+
+void _alDestroyMutex( MutexID mutex )
+{
+	FreeVec( mutex );
+}
+
+void _alLockMutex( MutexID mutex )
+{
+	ObtainSemaphore( mutex );
+}
+
+int _alTryLockMutex( MutexID mutex )
+{
+	return ( AttemptSemaphore( mutex ) != 0 ) ? 0 : -1;
+}
+
+void _alUnlockMutex( MutexID mutex )
+{
+	ReleaseSemaphore( mutex );
+}
+
+#endif
Index: /openal-0.0.8/src/al_mutexlib.h
===================================================================
--- /openal-0.0.8/src/al_mutexlib.h	(revision 17)
+++ /openal-0.0.8/src/al_mutexlib.h	(revision 17)
@@ -0,0 +1,62 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * mutexlib.h
+ *
+ * Include that sorts out which mutex library we're using.
+ */
+#ifndef MUTEXLIB_H_
+#define MUTEXLIB_H_
+
+#include "al_siteconfig.h"
+
+#if defined(USE_EMPTY_LOCKS)
+
+#define _alCreateMutex()
+#define _alDestroyMutex(m)
+#define _alLockMutex(m)
+#define _alTryLockMutex(m)
+#define _alUnlockMutex(m)
+
+#else
+
+#if defined(USE_POSIXTHREADING)
+
+#include <pthread.h>
+typedef pthread_mutex_t *MutexID;
+
+#elif defined(USE_WINDOWSTHREADING)
+
+#include <windows.h>
+typedef LPCRITICAL_SECTION MutexID;
+
+#elif defined(USE_MORPHOSTHREADING)
+
+#include <exec/semaphores.h>
+typedef struct SignalSemaphore *MutexID;
+
+#else
+
+#error "No mutex package"
+
+#endif
+
+/* Creates a new mutex. Returns NULL on error. */
+extern MutexID _alCreateMutex( void );
+
+/* Destroys the given mutex, which must be unlocked. */
+extern void _alDestroyMutex( MutexID mutex );
+
+/* Locks the given mutex, blocking if it is already locked. */
+extern void _alLockMutex( MutexID mutex );
+
+/* Try to lock the given mutex, returning zero if it succeeded, non-zero
+   otherwise. Non-blocking. */
+extern int _alTryLockMutex( MutexID mutex );
+
+/* Unlocks the given mutex, which must be locked by the same thread. */
+extern void _alUnlockMutex( MutexID mutex );
+
+#endif				/* USE_EMPTY_LOCKS */
+
+#endif				/* MUTEXLIB_H_ */
Index: /openal-0.0.8/src/al_queue.c
===================================================================
--- /openal-0.0.8/src/al_queue.c	(revision 17)
+++ /openal-0.0.8/src/al_queue.c	(revision 17)
@@ -0,0 +1,422 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_queue.c
+ *
+ * Stuff related to the management and use of buffer queue.
+ *
+ * FIXME: clean this mess up
+ */
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "al_config.h"
+#include "al_buffer.h"
+#include "al_debug.h"
+#include "al_error.h"
+#include "al_main.h"
+#include "al_source.h"
+#include "al_queue.h"
+#include "al_types.h"
+#include "al_mixer.h"
+
+#include "alc/alc_context.h"
+
+/*
+ * alSourceQueueBuffers( ALuint sid, ALsizei numBuffers, ALuint *bids )
+ *
+ * Queue bids[0..numBuffers-1] to the source named sid, setting
+ * AL_INVALID_VALUE if numBuffers < 0, or AL_INVALID_NAME if either sid or and
+ * bid in bids[0..numBuffers-1] is not a valid buffer.
+ */
+void alSourceQueueBuffers( ALuint sid, ALsizei numBuffers, const ALuint *bids ) {
+	AL_source *src;
+	ALsizei i;
+
+	if( numBuffers == 0) {
+		/* with n == 0, we NOP */
+		return;
+	}
+
+	if( numBuffers < 0) {
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "alSourceQueueBuffers: illegal n value %d\n", numBuffers );
+
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	_alLockMixBuf();
+	SOURCELOCK();
+
+	src = _alDCGetSource( sid );
+	if( src == NULL ) {
+		_alDCSetError( AL_INVALID_NAME );
+
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "alSourceQueueBuffers: invalid sid %d\n", sid );
+
+		SOURCEUNLOCK();
+		_alUnlockMixBuf();
+
+		return;
+	}
+
+	_alLockBuffer();
+
+	/* make sure that bids are valid */
+	for( i = 0; i < numBuffers; i++ ) {
+		if( _alIsBuffer( bids[i] ) == AL_FALSE ) {
+			/*
+			 * we have an invalid bid.  bid 0 is okay but the
+			 * rest are not.
+			 */
+			if( bids[i] != 0 ) {
+				_alUnlockBuffer();
+
+				_alDCSetError( AL_INVALID_NAME );
+
+				SOURCEUNLOCK();
+				_alUnlockMixBuf();
+
+				return;
+			}
+		}
+	}
+
+	/* now, append the bids */
+	for( i = 0; i < numBuffers; i++ ) {
+		if( bids[i] != 0 ) {
+			/*
+			 * only append non-0 bids, because we don't
+			 * need them anyway.
+			 */
+		  	_alSourceQueueAppend( src, bids[i] );
+		}
+	}
+
+	/* we're done */
+
+	_alUnlockBuffer();
+	SOURCEUNLOCK();
+	_alUnlockMixBuf();
+
+	return;
+}
+
+/*
+ * _alSourceQueueGetCurrentState( AL_source *src )
+ *
+ * Returns the current AL_sourcestate of the current queue entry for AL_source
+ * *src.
+ *
+ * assumes locked sources
+ */
+AL_sourcestate *_alSourceQueueGetCurrentState( AL_source *src )
+{
+	int rind = src->bid_queue.read_index;
+
+	/*
+	 * This assert means we're querying a value with the read
+	 * index beyond our size.
+	 *
+	 * Well, like a dumbass I made looping source queue specific.  Now I'm
+	 * paying the price.  Okay, return return return.
+	 */
+	/* assert( rind < src->bid_queue.size ); */
+
+	if(rind >= src->bid_queue.size)
+	{
+		return NULL;
+	}
+
+	return &src->bid_queue.queuestate[rind];
+}
+
+/*
+ * _alSourceQueueInit( AL_source *src )
+ *
+ * Initialize an AL_source queue.
+ *
+ * assumes locked context
+ */
+void _alSourceQueueInit( AL_source *src ) {
+	src->bid_queue.queue       = NULL;
+	src->bid_queue.queuestate  = NULL;
+	src->bid_queue.size        = 0;
+
+	_alSourceQueueClear( src );
+
+	return;
+}
+
+/*
+ * _alSourceQueueClear( AL_source *src )
+ *
+ * Clears a source's queue, removing all entries.
+ *
+ * assumes locked context
+ */
+void _alSourceQueueClear( AL_source *src ) {
+	ALuint bid;
+	int i;
+
+	for(i = 0; i < src->bid_queue.size; i++) {
+		bid = src->bid_queue.queue[i];
+
+		if(bid != 0) {
+			/* bid 0 is a special name */
+			_alBidRemoveQueueRef(bid, src->sid);
+		}
+	}
+
+	src->bid_queue.read_index  = 0;
+	src->bid_queue.write_index = 0;
+	src->bid_queue.size        = 0;
+
+	_alSourceQueueAppend(src, 0);
+
+	return;
+}
+
+/*
+ * _alSourceQueueAppend( AL_source *src, ALuint bid )
+ *
+ * Append bid to source's queue.
+ *
+ * assumes locked context
+ */
+void _alSourceQueueAppend( AL_source *src, ALuint bid ) {
+	int size    = src->bid_queue.size;
+	int newsize = size + 1;
+	int windex  = src->bid_queue.write_index;
+	void *temp;
+
+	if(src->bid_queue.size > 0) {
+		if(src->bid_queue.queue[windex] == 0) {
+			/*
+			 * special case.  bid == 0 is the "no bid"
+			 * bid, which means that it's just a place
+			 * holder to allow buffer specific source
+			 * parameters to be set.
+			 *
+			 * Don't bother to resize, just overwrite.
+			 */
+			src->bid_queue.queue[windex] = bid;
+
+			return;
+		}
+	}
+
+	temp = realloc(src->bid_queue.queue,
+		       newsize * sizeof *src->bid_queue.queue);
+	if(temp == NULL) {
+		return;
+	}
+	src->bid_queue.queue = temp;
+	src->bid_queue.queue[size] = 0;
+
+	temp = realloc(src->bid_queue.queuestate,
+		       newsize * sizeof *src->bid_queue.queuestate);
+	if(temp == NULL) {
+		return;
+	}
+	src->bid_queue.queuestate = temp;
+
+	/*
+	 * If this is a "real" append operation, ie not bid == NONE,
+	 * then increment the write index so that buffer specific
+	 * source setting operations take place.
+	 */
+	if(bid != 0) {
+		windex++;
+		src->bid_queue.write_index++;
+	}
+
+	/*
+	 * Initialize sourcestate flags.
+	 */
+	_alSourceStateInit(&src->bid_queue.queuestate[windex]);
+
+	/*
+	 * Set bid and new size.
+	 */
+	src->bid_queue.queue[windex] = bid;
+	src->bid_queue.size = newsize;
+
+
+	return;
+}
+
+
+/*
+ * _alSourceQueueHead( AL_source *src, ALuint bid )
+ *
+ * Truncates a source's queue with a single entry of bid.
+ *
+ * assumes locked context
+ */
+void _alSourceQueueHead( AL_source *src, ALuint bid ) {
+	_alSourceQueueClear( src );
+
+	src->bid_queue.queue[0]    = bid;
+	src->bid_queue.write_index = 0;
+	src->bid_queue.read_index  = 0;
+	src->bid_queue.size        = 1;
+
+	return;
+}
+
+/*
+ * alSourceUnqueueBuffers( ALuint sid, ALsizei n, ALuint *bids )
+ *
+ * Unqueues first occurance of each bid in bids[0..n-1] from source named sid.
+ */
+void alSourceUnqueueBuffers( ALuint sid, ALsizei n, ALuint *bids ) {
+	_alLockMixBuf();
+	_alcDCLockContext();
+
+	_alSourceUnqueueBuffers( sid, n, bids );
+
+	_alcDCUnlockContext();
+	_alUnlockMixBuf();
+
+	return;
+}
+
+/*
+ * _alSourceStateInit( AL_sourcestate *srcstate )
+ *
+ * Initialize an AL_sourcestate object to the default settings.
+ */
+void _alSourceStateInit( AL_sourcestate *srcstate ) {
+	srcstate->flags = ALQ_NONE;
+
+	return;
+}
+
+/*
+ * _alSourceUnqueueBuffers( ALuint sid, ALsizei n, ALuint *bids )
+ *
+ * Non locking version of alSourceUnqueueBuffers.
+ *
+ * assumes locked context
+ */
+void _alSourceUnqueueBuffers(ALuint sid, ALsizei n, ALuint *bids ) {
+	AL_source *src;
+	ALuint *tempqueue;
+	AL_sourcestate *tempstate;
+	int newsize;
+	int i;
+
+	if(n == 0) {
+		/* legal nop */
+		return;
+	}
+
+	if(n < 0) {
+		/* bad n */
+		_alDCSetError( AL_INVALID_VALUE );
+
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alSourceUnqueueBuffers: invalid numBuffers %d", n );
+
+		return;
+	}
+
+	src = _alDCGetSource( sid );
+	if(src == NULL) {
+		_alDCSetError(AL_INVALID_NAME);
+		return;
+	}
+
+	if(n > src->bid_queue.read_index) {
+		/* User has requested too many buffers unqueued */
+		_alDCSetError( AL_INVALID_VALUE );
+
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alSourceUnqueueBuffers: invalid numBuffers %d", n );
+
+		return;
+	}
+
+	/* make sure queue is valid */
+	for( i = 0; i < n; i++ )
+	{
+		if(!_alIsBuffer(src->bid_queue.queue[i]))
+		{
+			_alDCSetError( AL_INVALID_NAME );
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+				"alSourceUnqueueBuffers: invalid buffer name %d",
+				n );
+
+			return;
+		}
+	}
+
+	/* copy queue into bids */
+	newsize = src->bid_queue.size - n;
+
+	for( i = 0; i < n; i++ )
+	{
+		_alBidRemoveQueueRef( src->bid_queue.queue[i], src->sid );
+		_alBidRemoveCurrentRef( src->bid_queue.queue[i], src->sid );
+	}
+
+	/* resize */
+	tempqueue = malloc(newsize * sizeof *tempqueue);
+	tempstate = malloc(newsize * sizeof *tempstate);
+
+	assert( tempqueue );
+	assert( tempstate );
+
+	if((tempqueue == NULL) || (tempstate == NULL))
+	{
+		/*
+		 * since newsize is less than our current size,
+		 * we really shouldn't bomb out here, but should
+		 * instead just set the deleted bids to 0 or something[
+		 */
+		_alDCSetError(AL_OUT_OF_MEMORY);
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alSourceUnqueueBuffers: unable to allocate memory" );
+
+		return;
+	}
+
+	/* okay, we've succedded, so copy the bids for return */
+	memcpy( bids, src->bid_queue.queue, n * sizeof *bids );
+
+	/* copy the new queue and state */
+	memcpy( tempqueue,
+		&src->bid_queue.queue[n], newsize * sizeof *tempqueue );
+	memcpy( tempstate,
+		&src->bid_queue.queuestate[n], newsize * sizeof *tempstate );
+
+	/*
+	 * read_index now points to the wrong bid, so subtract by
+	 * old size - newsize.
+	 */
+	src->bid_queue.read_index -= (src->bid_queue.size - newsize);
+
+	/*
+	 * write_indesx too
+	 */
+	src->bid_queue.write_index -= (src->bid_queue.size - newsize);
+
+	free( src->bid_queue.queue );
+	free( src->bid_queue.queuestate );
+
+	src->bid_queue.queue      = tempqueue;
+	src->bid_queue.queuestate = tempstate;
+	src->bid_queue.size       = newsize;
+
+	return;
+}
Index: /openal-0.0.8/src/al_queue.h
===================================================================
--- /openal-0.0.8/src/al_queue.h	(revision 17)
+++ /openal-0.0.8/src/al_queue.h	(revision 17)
@@ -0,0 +1,48 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_queue.h
+ *
+ * Stuff related to the alQueue.
+ */
+#ifndef AL_QUEUE_H_
+
+#include "al_types.h"
+
+/*
+ * Initialize an AL_sourcestate object to the default settings.
+ */
+void _alSourceStateInit( AL_sourcestate *srcstate );
+
+/*
+ * Returns the current AL_sourcestate of the source src, or NULL on
+ * error.
+ */
+AL_sourcestate *_alSourceQueueGetCurrentState( AL_source *src );
+
+/*
+ * Truncates a source's queue with a single entry of bid.
+ */
+void _alSourceQueueHead( AL_source *src, ALuint bid );
+
+/*
+ * Initializes a source's queue.
+ */
+void _alSourceQueueInit( AL_source *src );
+
+/*
+ * Clears a source's queue, removing all entries.
+ */
+void _alSourceQueueClear( AL_source *src );
+
+/*
+ * Append bid to source's queue.
+ */
+void _alSourceQueueAppend( AL_source *src, ALuint bid );
+
+/*
+ * Non locking version of alSourceUnqueueBuffers.
+ */
+void _alSourceUnqueueBuffers( ALuint sid, ALsizei n, ALuint *bids );
+
+#endif /* AL_QUEUE_H_ */
Index: /openal-0.0.8/src/al_rctree.c
===================================================================
--- /openal-0.0.8/src/al_rctree.c	(revision 17)
+++ /openal-0.0.8/src/al_rctree.c	(revision 17)
@@ -0,0 +1,204 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_rctree.h
+ *
+ * Stuff related to the rctree data structure.
+ */
+#include "al_debug.h"
+#include "al_config.h"
+#include "al_rctree.h"
+#include "al_siteconfig.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/*
+ * AL_RcTreeNodes are used to help manage AL_rctrees.
+ */
+typedef struct _AL_RcTreeNode {
+	ALuint size;
+	ALuint freeslots;
+	AL_rctree **data;
+} AL_RcTreeNode;
+
+/*
+ * rlist is the data structure we use to manage AL_rcTreeNodes.
+ */
+static AL_RcTreeNode rlist = { 0, 0, NULL };
+
+/*
+ * rlist_add_rctree( AL_rctree *node )
+ *
+ * Adds a reference to node to the rlist.
+ */
+static void rlist_add_rctree(AL_rctree *node);
+
+/*
+ * rlist_delete_rctree( AL_rctree *node )
+ *
+ * Removes a reference to node from the rlist.
+ */
+static void rlist_delete_rctree( AL_rctree *node );
+
+/*
+ * rlist_realloc( void )
+ *
+ * Increases the size of rlist.
+ */
+static void rlist_realloc( void );
+
+/*
+ * _alRcTreeAlloc( void )
+ *
+ * Creates, initializes and returns an AL_rctree.
+ */
+AL_rctree *_alRcTreeAlloc( void ) {
+	AL_rctree *retval;
+
+	retval = malloc( sizeof *retval );
+	if(retval == NULL) {
+		/* _alDCSetError(AL_NO_MEMORY); */
+		return NULL;
+	}
+
+	memset(retval, 0, sizeof *retval);
+
+	rlist_add_rctree( retval );
+
+	retval->type      = ALRC_INVALID;
+
+	retval->data.proc = 0;
+	retval->data.ccell.car = NULL;
+	retval->data.ccell.cdr = NULL;
+
+	return retval;
+}
+
+/*
+ * _alRcTreeFree( AL_rctree *node )
+ *
+ * Finalizes and deallocates an AL_rctree node, removing the rlist reference
+ * at the same time.
+ */
+void _alRcTreeFree( AL_rctree *node ) {
+	if(node == NULL) {
+		return;
+	}
+
+	if( node->type == ALRC_CONSCELL ) {
+		_alRcTreeFree( node->data.ccell.car );
+		_alRcTreeFree( node->data.ccell.cdr );
+	}
+
+	/* remove reference from our list */
+	rlist_delete_rctree( node );
+
+	free( node );
+
+	return;
+}
+
+/*
+ * _alRcTreeDestroyAll( void )
+ *
+ * Deallocates any and all AL_rctree objects creates thus far.
+ */
+void _alRcTreeDestroyAll( void ) {
+	ALuint i;
+
+	for(i = 0; i < rlist.size; i++) {
+		if(rlist.data[i] == NULL) {
+			continue;
+		}
+
+		free(rlist.data[i]);
+	}
+
+	free(rlist.data);
+
+	rlist.data      = NULL;
+	rlist.size      = 0;
+	rlist.freeslots = 0;
+
+	return;
+}
+
+/*
+ * rlist_add_rctree( AL_rctree *node )
+ *
+ * Adds a reference to node to the rlist.
+ */
+static void rlist_add_rctree( AL_rctree *node ) {
+	ALuint i;
+
+	if(rlist.freeslots <= 0) {
+		rlist_realloc();
+	}
+
+	for(i = 0; i < rlist.size; i++) {
+		if(rlist.data[i] == NULL) {
+			rlist.freeslots--;
+			rlist.data[i] = node;
+
+			return;
+		}
+	}
+
+	/* weird.  Do something here. */
+	assert(0);
+
+	return;
+}
+
+/*
+ * rlist_add_rctree( AL_rctree *node )
+ *
+ * Adds a reference to node to the rlist.
+ */
+static void rlist_delete_rctree( AL_rctree *node ) {
+	ALuint i;
+
+	for(i = 0; i < rlist.size; i++) {
+		if(rlist.data[i] == node) {
+			rlist.freeslots++;
+			rlist.data[i] = NULL;
+
+			return;
+		}
+	}
+
+	/* not found */
+
+	return;
+}
+
+/*
+ * rlist_realloc( void )
+ *
+ * Increases the size of rlist.
+ */
+static void rlist_realloc( void ) {
+	ALuint newsize = rlist.size * 2 + 1;
+	ALuint i;
+	void *temp;
+
+	temp = realloc( rlist.data, newsize * sizeof *rlist.data );
+	if(temp == NULL) {
+		assert(0);
+		return;
+	}
+
+	rlist.data = temp;
+
+	for(i = rlist.size; i < newsize; i++) {
+		rlist.data[i] = NULL;
+	}
+
+	rlist.freeslots += newsize - rlist.size;
+
+	rlist.size = newsize;
+
+	return;
+}
Index: /openal-0.0.8/src/al_rctree.h
===================================================================
--- /openal-0.0.8/src/al_rctree.h	(revision 17)
+++ /openal-0.0.8/src/al_rctree.h	(revision 17)
@@ -0,0 +1,62 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_rctree.h
+ *
+ * Stuff related to the rctree data structure
+ *
+ */
+#ifndef AL_RCTREE_H_
+#define AL_RCTREE_H_
+
+#define ALRC_MAXSTRLEN 90
+
+#include "al_rcvar.h"
+
+/*
+ * The AL_rctree is the base type for the alrc language.
+ */
+typedef struct _AL_rctree {
+	ALRcEnum type;
+
+	union {
+		ALboolean b;
+		ALint   i;
+		ALfloat f;
+		ALuint ui;
+		ALvoid *p;
+
+		struct {
+			char c_str[ALRC_MAXSTRLEN];
+			size_t len;
+		} str;
+		struct _AL_rctree *(*proc)(struct _AL_rctree *env, struct _AL_rctree *args);
+		struct {
+			struct _AL_rctree *car;
+			struct _AL_rctree *cdr;
+		} ccell;
+	} data;
+} AL_rctree;
+
+/*
+ * alrc_prim is a typedef that aids in the handling of alrc primitives, which
+ * provide a sort of foreign function interface.
+ */
+typedef	AL_rctree *(*alrc_prim)( AL_rctree *env, AL_rctree *args );
+
+/*
+ * Allocate, initialize, and return an AL_rctree object.
+ */
+AL_rctree *_alRcTreeAlloc( void );
+
+/*
+ * Finalize and deallocate an AL_rctree object.
+ */
+void _alRcTreeFree( AL_rctree *node );
+
+/*
+ * Deallocates any and all AL_rctree objects creates thus far.
+ */
+void _alRcTreeDestroyAll( void );
+
+#endif /* AL_RCTREE_H_ */
Index: /openal-0.0.8/src/al_rcvar.c
===================================================================
--- /openal-0.0.8/src/al_rcvar.c	(revision 17)
+++ /openal-0.0.8/src/al_rcvar.c	(revision 17)
@@ -0,0 +1,502 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_rcvar.c
+ *
+ * Stuff related to the rcvar configuration interface
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "al_config.h"
+#include "al_debug.h"
+#include "al_rcvar.h"
+#include "al_rctree.h"
+
+/*
+ * print_prim( Rcvar obj )
+ *
+ * Prints obj.
+ */
+static void print_prim( Rcvar obj );
+
+/*
+ * rc_lookup( const char *name )
+ *
+ * Returns the binding for the symbol named by name, if it exists, or NULL if
+ * it doesn't.
+ */
+Rcvar rc_lookup( const char *name ) {
+	return _alGlobalBinding( name );
+}
+
+/*
+ * rc_type( Rcvar sym )
+ *
+ * Returns the type of sym.
+ */
+ALRcEnum rc_type( Rcvar symp ) {
+	AL_rctree *sym = (AL_rctree *) symp;
+
+	if(sym == NULL) {
+		return ALRC_INVALID;
+	}
+
+	return sym->type;
+}
+
+/*
+ * rc_car( Rcvar sym )
+ *
+ * Returns the car portion of sym.  If sym is not a cons cell, returns NULL.
+ */
+Rcvar rc_car(Rcvar symp) {
+	return alrc_car( symp );
+}
+
+/*
+ * rc_cdr( Rcvar sym )
+ *
+ * Returns the cdr portion of sym.  If sym is not a cons cell, returns NULL.
+ */
+Rcvar rc_cdr(Rcvar symp) {
+	return alrc_cdr( symp );
+}
+
+/*
+ * If sym has type ALRC_STRING, this call populates retstr ( up to len bytes )
+ * with the value of the string.
+ */
+Rcvar rc_tostr0( Rcvar symp, char *retstr, size_t len ) {
+	AL_rctree *sym = (AL_rctree *) symp;
+	static AL_rctree retval;
+
+	if(sym == NULL) {
+		return NULL;
+	}
+
+	if(rc_type(sym) != ALRC_STRING) {
+		_alDebug(ALD_CONFIG, __FILE__, __LINE__,
+		      "Not a string");
+
+		return NULL;
+	}
+
+	if(len > sym->data.str.len) {
+		len = sym->data.str.len;
+	}
+
+	memcpy(retstr, sym->data.str.c_str, len);
+	retstr[len] = '\0';
+
+	retval = scmtrue;
+
+	return &retval;
+}
+
+/*
+ * If sym has type ALRC_SYMBOL, this call populates retstr ( up to len bytes )
+ * with the name of the symbol.
+ */
+Rcvar rc_symtostr0( Rcvar symp, char *retstr, size_t len ) {
+	AL_rctree *sym = (AL_rctree *) symp;
+	static AL_rctree retval;
+
+	if(sym == NULL) {
+		return NULL;
+	}
+
+	if(rc_type(sym) != ALRC_SYMBOL) {
+		_alDebug(ALD_CONFIG, __FILE__, __LINE__,
+		      "Not a string");
+
+		return NULL;
+	}
+
+	if(len > sym->data.str.len) {
+		len = sym->data.str.len;
+	}
+
+	memcpy(retstr, sym->data.str.c_str, len);
+	retstr[len] = '\0';
+
+	retval = scmtrue;
+
+	return &retval;
+}
+
+/*
+ * rc_tobool( Rcvar sym )
+ *
+ * Returns AL_TRUE if sym is a boolean type and equal to #t, AL_FALSE
+ * otherwise.
+ */
+ALboolean rc_tobool(Rcvar symp) {
+	AL_rctree *sym = (AL_rctree *) symp;
+
+	if(sym == NULL) {
+		return AL_FALSE;
+	}
+
+	if(sym->type != ALRC_BOOL) {
+		return AL_FALSE;
+	}
+
+	return sym->data.b;
+}
+
+/*
+ * rc_eval( const char *str )
+ *
+ * Evaluates str, returning result.
+ */
+Rcvar rc_eval( const char *str ) {
+	return (Rcvar) _alEvalStr( str );
+}
+
+/*
+ * rc_define( const char *symname, Rcvar val );
+ *
+ * Creates a binding between symname and the evaluation of val in the
+ * global scope, returning val.
+ */
+Rcvar rc_define( const char *symname, Rcvar value ) {
+	return _alDefine( symname, (AL_rctree *) value );
+}
+
+/*
+ * rc_typestr( ALRcEnum type )
+ *
+ * Returns a const char *representation of type.
+ */
+const char *rc_typestr( ALRcEnum type ) {
+	switch( type ) {
+		case ALRC_INVALID:
+			return "ALRC_INVALID";
+		case ALRC_PRIMITIVE:
+			return "ALRC_PRIMITIVE";
+		case ALRC_CONSCELL:
+			return "ALRC_CONSCELL";
+		case ALRC_SYMBOL:
+			return "ALRC_SYMBOL";
+		case ALRC_INTEGER:
+			return "ALRC_INTEGER";
+		case ALRC_FLOAT:
+			return "ALRC_FLOAT";
+		case ALRC_STRING:
+			return "ALRC_STRING";
+		case ALRC_BOOL:
+			return "ALRC_BOOL";
+		default:
+			break;
+	}
+
+	return NULL;
+}
+
+/*
+ * rc_member( Rcvar ls, Rcvar sym )
+ *
+ * Returns a list with the first conscell to have a matching car with sym as
+ * its head, NULL otherwise.
+ */
+Rcvar rc_member( Rcvar ls, Rcvar symp ) {
+	if( rc_type(symp) != ALRC_CONSCELL ) {
+		return NULL;
+	}
+
+	if( rc_equal( rc_car( ls ), symp ) ) {
+		return ls;
+	}
+
+	return rc_member( rc_cdr(ls), symp );
+}
+
+/*
+ * rc_equal( Rcvar r1, Rcvar r2 )
+ *
+ * Returns AL_TRUE if r1 and r2 and equivilant, AL_FALSE otherwise.
+ */
+ALboolean rc_equal( Rcvar r1, Rcvar r2 ) {
+	if( rc_type(r1) != rc_type(r2) ) {
+		return AL_FALSE;
+	}
+
+	switch( rc_type(r1) ) {
+		case ALRC_INVALID:
+			return AL_FALSE;
+		case ALRC_PRIMITIVE:
+			return rc_toprim(r1) == rc_toprim(r2);
+		case ALRC_INTEGER:
+			return rc_toint(r1) == rc_toint(r2);
+		case ALRC_FLOAT:
+			return rc_tofloat(r1) == rc_tofloat(r2);
+		case ALRC_BOOL:
+			return rc_tobool(r1) == rc_tobool(r2);
+		case ALRC_SYMBOL:
+		case ALRC_STRING:
+			return rc_strequal(r1, r2);
+		case ALRC_CONSCELL:
+			return rc_equal( rc_car(r1), rc_car(r2) ) &&
+			       rc_equal( rc_cdr(r1), rc_cdr(r2) );
+		default:
+			break;
+	}
+
+	return AL_FALSE;
+}
+
+/*
+ * rc_toprim
+ *
+ * Returns an alrc from sym, or NULL if sym's type is not ALRC_PRIMITIVE.
+ */
+alrc_prim rc_toprim( Rcvar sym ) {
+	AL_rctree *r = sym;
+
+	if( rc_type(sym) != ALRC_PRIMITIVE ) {
+		assert(0);
+
+		return NULL;
+	}
+
+	return r->data.proc;
+}
+
+/*
+ * rc_toint( Rcvar sym )
+ *
+ * If sym is a numerical type, returns the integer value of sym.  Otherwise,
+ * returns 0.
+ */
+ALint rc_toint( Rcvar sym ) {
+	AL_rctree *r = sym;
+
+	switch( rc_type( sym ) ) {
+		case ALRC_INTEGER:
+			return r->data.i;
+		case ALRC_FLOAT:
+			return (ALint) r->data.f;
+		default:
+			return 0;
+	}
+}
+
+/*
+ * rc_tofloat ( Rcvar sym )
+ *
+ * If sym is a numerical type, returns the float value of sym.  Otherwise,
+ * returns 0.0f.
+ */
+ALfloat rc_tofloat( Rcvar sym ) {
+	AL_rctree *r = sym;
+
+	if( rc_type(sym) == ALRC_INTEGER ) {
+		return rc_toint( sym );
+	}
+
+	if( rc_type( sym ) != ALRC_FLOAT ) {
+		return 0.0f;
+	}
+
+	return r->data.f;
+}
+
+/*
+ * rc_strequal( Rcvar d1, Rcvar d2 );
+ *
+ * If d1 and d2 both have type AL_STRING, returns AL_TRUE if there are
+ * equivilant.  Returns AL_FALSE otherwise.
+ */
+ALboolean rc_strequal( Rcvar d1, Rcvar d2 ) {
+	static char str1[65], str2[65];
+
+	switch( rc_type( d1 ) ) {
+		case ALRC_SYMBOL:
+			rc_symtostr0( d1, str1, 65 );
+			break;
+		case ALRC_STRING:
+			rc_tostr0( d1, str1, 65 );
+			break;
+		default:
+			return AL_FALSE;
+	}
+
+	switch( rc_type( d2 ) ) {
+		case ALRC_SYMBOL:
+			rc_symtostr0( d2, str2, 65 );
+			break;
+		case ALRC_STRING:
+			rc_tostr0( d2, str2, 65 );
+			break;
+		default:
+			return AL_FALSE;
+	}
+
+	if( strcmp(d1, d2) == 0 ) {
+		return AL_TRUE;
+	}
+
+	return AL_FALSE;
+}
+
+/*
+ * rc_lookup_list( Rcvar haystack, const char *needle )
+ *
+ * Evaluates needle and sees if it is a member in haystack, returning a list
+ * with the first conscell to have a matching car as its head.
+ */
+Rcvar rc_lookup_list( Rcvar haystack, const char *needle ) {
+	Rcvar rcneedle = rc_eval( needle );
+
+	return rc_member( haystack, rcneedle );
+}
+
+/*
+ * rc_foreach( Rcvar ls, Rcvar (*op)( Rcvar operand ))
+ *
+ * For each member in ls, apply op to the member.
+ */
+void rc_foreach( Rcvar ls, Rcvar (*op)(Rcvar operand) ) {
+	if( rc_type( ls ) != ALRC_CONSCELL ) {
+		_alDebug( ALD_CONFIG, __FILE__, __LINE__,
+			  "rc_foreach fail type = %s",
+			  rc_typestr( rc_type(ls )));
+
+		return;
+	}
+
+	op( rc_car(ls) );
+
+	rc_foreach( rc_cdr( ls ), op );
+
+	return;
+}
+
+/*
+ * rc_define_list( Rcvar ls )
+ *
+ * Creates a binding between car(ls) (symbol) the evaluation of cadr(ls) in the
+ * global scope, returning cadr(ls).
+ */
+Rcvar rc_define_list( Rcvar ls ) {
+	static char symname[65];
+
+	rc_symtostr0( rc_car(ls), symname, 65 );
+
+	return rc_define( symname, rc_cadr(ls) );
+}
+
+/*
+ * print_prim( Rcvar obj )
+ *
+ * Prints obj.
+ */
+static void print_prim( Rcvar obj ) {
+	Rcvar lcar;
+	Rcvar lcdr;
+
+	if(obj == NULL) {
+		/* FIXME */
+		return;
+	}
+
+	switch(rc_type(obj)) {
+		case ALRC_SYMBOL:
+		case ALRC_STRING:
+			printf("%s ", ((AL_rctree *) obj)->data.str.c_str );
+			break;
+		case ALRC_INTEGER:
+			printf("%d ", ((AL_rctree *) obj)->data.i);
+			break;
+		case ALRC_FLOAT:
+			printf("%f ", ((AL_rctree *) obj)->data.f );
+			break;
+		case ALRC_PRIMITIVE:
+			printf("%p ", (void *) ((AL_rctree *) obj)->data.proc);
+			break;
+		case ALRC_POINTER:
+			printf("%p ", (void *) ((AL_rctree *) obj)->data.p);
+			break;
+		case ALRC_BOOL:
+			if(((AL_rctree *) obj)->data.b) {
+				printf("#t ");
+			} else {
+				printf("#f ");
+			}
+			break;
+		case ALRC_CONSCELL:
+			lcar = rc_car(obj);
+			lcdr = rc_cdr(obj);
+
+			if(rc_type(lcar) == ALRC_CONSCELL) {
+				printf("(");
+			} else {
+				printf("( ");
+			}
+
+			print_prim(lcar);
+
+			for( ; rc_type(lcdr) == ALRC_CONSCELL; lcdr = rc_cdr(lcdr)) {
+				Rcvar temp = rc_car(lcdr);
+
+				print_prim(temp);
+			}
+
+			if(lcdr) {
+				if(lcdr == rc_cdr(obj)) {
+					/* pair */
+					printf(" . ");
+				}
+
+				print_prim(lcdr);
+			}
+
+			if(rc_type(lcdr) == ALRC_CONSCELL) {
+				printf(") ");
+			} else {
+				printf(")");
+			}
+			break;
+		case ALRC_INVALID:
+			assert( 0 );
+			break;
+	}
+
+	return;
+}
+
+/*
+ * rc_print( Rcvar sym )
+ *
+ * Prints a stdout representation of sym to stdout.
+ */
+void rc_print( Rcvar sym ) {
+	print_prim( sym );
+
+	printf("\n");
+
+	return;
+}
+
+Rcvar alrc_quote( Rcvar val) {
+	AL_rctree *retval;
+
+	retval = _alRcTreeAlloc();
+	retval->type = ALRC_CONSCELL;
+
+	retval->data.ccell.car = _alRcTreeAlloc();
+	retval->data.ccell.car->type = ALRC_SYMBOL;
+	snprintf( retval->data.ccell.car->data.str.c_str, ALRC_MAXSTRLEN,
+		 "quote" );
+	retval->data.ccell.car->data.str.len = 5;
+
+	retval->data.ccell.cdr = val;
+
+	return retval;
+}
Index: /openal-0.0.8/src/al_rcvar.h
===================================================================
--- /openal-0.0.8/src/al_rcvar.h	(revision 17)
+++ /openal-0.0.8/src/al_rcvar.h	(revision 17)
@@ -0,0 +1,166 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_rcvar.h
+ *
+ * Stuff related to the Rcvar config interface
+ *
+ */
+#ifndef AL_RCVAR_H_
+#define AL_RCVAR_H_
+
+#include <AL/al.h>
+#include <stdlib.h>
+
+/*
+ * opaque pointer to a lisp-like var.  Calling code shouldn't mess with it
+ * directly.
+ */
+typedef void *Rcvar;
+
+/*
+ * Each AL_rctree has a type, which reflects how its data should be
+ * interpreted.  There are those types.
+ */
+typedef enum {
+	ALRC_INVALID,
+	ALRC_PRIMITIVE,
+	ALRC_CONSCELL,
+	ALRC_SYMBOL,
+	ALRC_INTEGER,
+	ALRC_FLOAT,
+	ALRC_STRING,
+	ALRC_BOOL,
+	ALRC_POINTER
+} ALRcEnum;
+
+/*
+ * Returns the binding for the symbol named by name, if it exists, or NULL if
+ * it doesn't.
+ */
+Rcvar rc_lookup( const char *name );
+
+/*
+ * Creates a binding between symname and the evaluation of val in the
+ * global scope, returning val.
+ */
+Rcvar rc_define( const char *symname, Rcvar val );
+
+/*
+ * Creates a binding between car(ls) (symbol) the evaluation of cadr(ls) in the
+ * global scope, returning cadr(ls).
+ */
+Rcvar rc_define_list( Rcvar ls );
+
+/*
+ * Evaluates str, returning result.
+ */
+Rcvar rc_eval( const char *str );
+
+/*
+ * Returns the type of sym.
+ */
+ALRcEnum rc_type( Rcvar sym );
+
+/*
+ * Returns the car portion of sym.  If sym is not a cons cell, returns NULL.
+ */
+Rcvar rc_car( Rcvar sym );
+
+/*
+ * Returns the cdr portion of sym.  If sym is not a cons cell, returns NULL.
+ */
+Rcvar rc_cdr( Rcvar sym );
+
+/*
+ * If sym has type ALRC_SYMBOL, this call populates retstr ( up to len bytes )
+ * with the name of the symbol.
+ */
+Rcvar rc_symtostr0( Rcvar sym, char *retstr, size_t len );
+
+/*
+ * If sym has type ALRC_STRING, this call populates retstr ( up to len bytes )
+ * with the value of the string.
+ */
+Rcvar rc_tostr0( Rcvar sym, char *retstr, size_t len );
+
+/*
+ * Returns AL_TRUE if sym is a boolean type and equal to #t, AL_FALSE
+ * otherwise.
+ */
+ALboolean rc_tobool( Rcvar sym );
+
+/*
+ * If sym is a numerical type, returns the integer value of sym.  Otherwise,
+ * returns 0.
+ */
+ALint rc_toint( Rcvar sym );
+
+/*
+ * If sym is a numerical type, returns the float value of sym.  Otherwise,
+ * returns 0.0f.
+ */
+ALfloat rc_tofloat( Rcvar sym );
+
+/*
+ * If d1 and d2 both have type AL_STRING, returns AL_TRUE if there are
+ * equivilant.  Returns AL_FALSE otherwise.
+ */
+ALboolean rc_strequal( Rcvar d1, Rcvar d2 );
+
+/*
+ * Evaluates needle and sees if it is a member in haystack, returning a list
+ * with the first conscell to have a matching car as its head.
+ */
+Rcvar rc_lookup_list( Rcvar haystack, const char *needle );
+
+/*
+ * Returns a list with the first conscell to have a matching car with sym as
+ * its head, NULL otherwise.
+ */
+Rcvar rc_member( Rcvar ls, Rcvar sym );
+
+/*
+ * Returns AL_TRUE if r1 and r2 and equivilant, AL_FALSE otherwise.
+ */
+ALboolean rc_equal( Rcvar r1, Rcvar r2 );
+
+struct _AL_rctree;
+struct _AL_rctree *(*rc_toprim( Rcvar sym ))( struct _AL_rctree *,
+					      struct _AL_rctree * );
+
+/*
+ * Returns a const char *representation of type.
+ */
+const char *rc_typestr( ALRcEnum type );
+
+/*
+ * For each member in ls, apply op to the member.
+ */
+void rc_foreach( Rcvar ls, Rcvar (*op)( Rcvar operand ));
+
+/*
+ * Prints a stdout representation of sym to stdout.
+ */
+void rc_print( Rcvar sym );
+
+/*
+ * Quotes sym, returning that.
+ */
+Rcvar alrc_quote( Rcvar sym );
+
+/*
+ * car and cdr convienence macros.
+ */
+#define rc_cddr(s)                            rc_cdr(rc_cdr(s))
+#define rc_cdddr(s)                           rc_cdr(rc_cddr(s))
+#define rc_cddddr(s)                          rc_cdr(rc_cdddr(s))
+#define rc_cddddddr(s)                        rc_cdr(rc_cdddddr(s))
+
+#define rc_cadr(s)                            rc_car(rc_cdr(s))
+#define rc_caddr(s)                           rc_car(rc_cddr(s))
+#define rc_cadddr(s)                          rc_car(rc_cdddr(s))
+#define rc_caddddr(s)                         rc_car(rc_cddddr(s))
+#define rc_cadddddr(s)                        rc_car(rc_cdddddr(s))
+
+#endif /* AL_RCVAR_H_ */
Index: /openal-0.0.8/src/al_siteconfig.h
===================================================================
--- /openal-0.0.8/src/al_siteconfig.h	(revision 17)
+++ /openal-0.0.8/src/al_siteconfig.h	(revision 17)
@@ -0,0 +1,36 @@
+#ifndef AL_SITECONFIG_H_
+#define AL_SITECONFIG_H_
+
+/*
+ * Wrap site specific config stuff
+ */
+
+#ifdef DARWIN_PBBUILDER
+#include "config-osx.h"
+#else
+#include "config.h"
+#endif /* DARWIN_PBBUILDER */
+
+#ifdef HAVE___ATTRIBUTE__
+#define UNUSED(x) x __attribute__((unused))
+#define AL_ATTRIBUTE_FORMAT_PRINTF_(x,y) __attribute__((format(printf, x, y)))
+#define AL_ATTRIBUTE_NORETURN_ __attribute__((noreturn))
+#else
+#define UNUSED(x) x
+#define AL_ATTRIBUTE_FORMAT_PRINTF_(x,y)
+#define AL_ATTRIBUTE_NORETURN_
+#endif
+
+#define USE_LRINT 0 /* icculus look here JIV FIXME */
+
+#if USE_LRINT
+
+#define __USE_ISOC99 1
+#define _ISOC99_SOURCE 1
+#define __USE_EXTERN_INLINES 1
+#define __FAST_MATH__ 1
+#include <math.h>
+
+#endif
+
+#endif /* AL_SITE_CONFIG_H_ */
Index: /openal-0.0.8/src/al_source.c
===================================================================
--- /openal-0.0.8/src/al_source.c	(revision 17)
+++ /openal-0.0.8/src/al_source.c	(revision 17)
@@ -0,0 +1,3369 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_source.c
+ *
+ * Contains the implementation for source related functions like
+ * GenSource, DeleteSource, SourcePlay, etc, as well as internal
+ * use functions intended to manage the source structure.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <AL/alext.h>
+#include <math.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <float.h>
+
+#include "al_buffer.h"
+#include "al_config.h"
+#include "al_debug.h"
+#include "al_error.h"
+#include "al_main.h"
+#include "al_mixer.h"
+#include "al_spool.h"
+#include "al_source.h"
+#include "al_queue.h"
+#include "al_types.h"
+#include "al_vector.h"
+#include "alc/alc_context.h"
+#include "alc/alc_speaker.h"
+#include "al_ext.h"
+
+/*
+ * _alInitSource( ALuint sid )
+ *
+ * Initialize an already allocated source.
+ */
+static void _alInitSource( ALuint sid );
+
+/*
+ * _alSource2D( AL_source *src )
+ *
+ * Turns off 3D attributes of a source
+ */
+static void _alSource2D( AL_source *src );
+
+/*
+ * Monoify functions copy an interleaved array of PCM data, usually in LRLR
+ * format into seperate dst buffers.
+ */
+static void _alMonoifyOffset1to2(ALshort **dstref, ALuint offset, ALvoid *src, ALuint ssize);
+static void _alMonoifyOffset2to2(ALshort **dstref, ALuint offset, ALvoid *src, ALuint ssize);
+static void _alMonoifyOffset1to4(ALshort **dstref, ALuint offset, ALvoid *src, ALuint ssize);
+static void _alMonoifyOffset2to4(ALshort **dstref, ALuint offset, ALvoid *src, ALuint ssize);
+static void _alMonoifyOffset4to4(ALshort **dstref, ALuint offset, ALvoid *src, ALuint ssize);
+
+/*
+ * Channelify functions copy the PCM data from srcs[0..nc-1] into an
+ * interleaved destination.  nc ( number of channels) is specified in the
+ * function name, ie _alChannelify2 specifies that srcs[0] and srcs[1] contain
+ * left and right channel data, respectively.
+ */
+static void _alChannelify2Offset(ALshort *dst, ALuint offset, ALshort **srcs, ALuint size);
+static void _alChannelify4Offset(ALshort *dst, ALuint offset, ALshort **srcs, ALuint size);
+
+/* static data */
+static ALshort *stereoptr = NULL; /*
+				   * scratch space for splitting multichannels
+				   * sources.
+				   */
+
+/*
+ * special split source to handle callbacks
+ */
+static void _alSplitSourceCallback(ALuint cid,
+		     ALuint sourceid,
+		     ALint nc, ALuint len,
+		     AL_buffer *samp,
+		     ALshort **buffers);
+/*
+ * special split source to handle looping end case (wrap-around).
+ */
+static void _alSplitSourceLooping(ALuint cid,
+		     ALuint sourceid,
+		     ALint nc, ALuint len,
+		     AL_buffer *samp,
+		     ALshort **buffers);
+
+/*
+ * special split source to handle buffer queue transitions
+ * (wrap-around).
+ */
+static void _alSplitSourceQueue(ALuint cid,
+		     ALuint sourceid,
+		     ALint nc, ALuint len,
+		     AL_buffer *samp,
+		     ALshort **buffers);
+
+/*
+ * get a channel pointer into the buffer's data, scaled by the source's
+ * position into the PCM data.
+ */
+void *_alSourceGetBufptr(AL_source *src, AL_buffer *buf, ALuint ind);
+
+/*
+ * alIsSource( ALuint sid )
+ *
+ * Returns AL_TRUE if sid is a currently valid source id,
+ * AL_FALSE otherwise.
+ */
+ALboolean alIsSource( ALuint sid )
+{
+	ALboolean retval = AL_FALSE;
+
+	_alDCLockSource( sid );
+
+	retval = _alIsSource( sid );
+
+	_alDCUnlockSource( sid );
+
+	return retval;
+}
+
+/*
+ * _alIsSource( ALuint sid )
+ *
+ * Returns AL_TRUE if sid is a currently valid source id,
+ * AL_FALSE otherwise.
+ *
+ * Assumes locked source
+ */
+ALboolean _alIsSource( ALuint sid )
+{
+	AL_source *src;
+	ALboolean retval = AL_TRUE;
+
+	src = _alDCGetSource( sid );
+	if(src == NULL) {
+		retval = AL_FALSE;
+	}
+
+	return retval;
+}
+
+/*
+ * alGenSources( ALsizei n, ALuint *buffer )
+ *
+ * Generate n sources, with sids in buffer[0..(n-1)].  Only
+ * full allocation is performed, with error being set otherwise.
+ *
+ * If n is 0, this is a legal nop.  If n < 0, INVALID_VALUE is
+ * set and this is a nop.
+ */
+void alGenSources( ALsizei n, ALuint *buffer ) {
+	AL_context *cc;
+	ALint sindex;
+	ALuint *temp;
+	int i;
+
+	if( n == 0 ) {
+		/* with n == 0, we NOP */
+		return;
+	}
+
+	_alcDCLockContext();
+ 	cc = _alcDCGetContext();
+	if(cc == NULL)
+	{
+		/*
+		 * alGenSources called without current context.  Is there even
+		 * an error for this?
+		 *
+		 * JIV FIXME: set some sort of error?  Where?
+		 */
+
+		return;
+	}
+
+	if( n < 0 ) {
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "alGenSources: illegal n value %d\n", n );
+
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	temp = malloc( n * sizeof *temp );
+	if(temp == NULL) {
+		/*
+		 * Could not reserve memory for temporary
+		 * ALuint *buffer.
+		 */
+		_alDCSetError( AL_OUT_OF_MEMORY );
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	for(i = 0; i < n; i++) {
+		sindex = spool_alloc( &cc->source_pool );
+		if( sindex == -1 ) {
+			/* We ran into a problem somewhere in
+			 * allocing a set of source ids.  Run
+			 * through the ones we did alloc,
+			 * realloc them, set error and return.
+			 *
+			 * FIXME: Should unlock, or have a non-locking
+			 * version of alDelSources called inside
+			 * the current lock?
+			 */
+			_alcDCUnlockContext();
+
+			if(i > 0) {
+				/*
+				 *  We delete i sources, and not i + 1, because
+				 *  the last alloc did not happen.  And only
+				 *  if i > 0.
+				 */
+				alDeleteSources( i, temp );
+			}
+
+			free( temp );
+
+			_alDCSetError( AL_OUT_OF_MEMORY );
+
+			return;
+		}
+
+		temp[i] = sindex;
+		_alInitSource( temp[i] );
+	}
+
+	_alcDCUnlockContext();
+
+	/*
+	 * temp[0...n-1] now contains the generated buffers.  Copy them
+	 * to the user data.
+	 */
+	memcpy( buffer, temp, n * sizeof *buffer );
+
+	free( temp );
+
+	return;
+}
+
+/*
+ * _alSource2D( AL_source *src )
+ *
+ * Turns off 3D attributes of a source
+ *
+ * Assumes locked source
+ */
+void _alSource2D( AL_source *src ) {
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"_alSource2D: source turned 2D");
+
+	src->position.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_POSITION, src->position.data );
+
+	src->direction.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_DIRECTION, src->direction.data );
+
+	src->cone_inner_angle.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_CONE_INNER_ANGLE, &src->cone_inner_angle.data );
+
+	src->cone_outer_angle.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_CONE_OUTER_ANGLE, &src->cone_outer_angle.data );
+
+	src->cone_outer_gain.isset = AL_FALSE;
+}
+
+/*
+ * alSourcei( ALuint sid, ALenum param, ALint i1 )
+ *
+ * Sets an attribute for a source.
+ *
+ * If sid does not name a valid source, AL_INVALID_NAME.
+ * If param does not specify a source attribute, AL_INVALID_ENUM.
+ * If i1 is out of range for the attribute, AL_INVALID_VALUE.
+ *
+ * If param is AL_BUFFER, and the source in question is not in the state
+ * AL_INITIAL or AL_STOPPED, AL_INVALID_OPERATION.
+ *
+ */
+void alSourcei( ALuint sid, ALenum param, ALint i1 )
+{
+	AL_source *src;
+	ALboolean inrange = AL_TRUE;
+	ALfloat temp;
+
+	/*
+	 * If param refers to a integer attribute, accept it.
+	 * If it refers to a float attribute, delegate it to alSourcefv.  If
+	 * it is an invalid attribute, set INVALID_ENUM and bail out.
+	 *
+	 * Float vectors are obviously not possible, so we set
+	 * INVALID_OPERATION.  This is probably a spec violation.
+	 */
+	switch( param ) {
+		case AL_BUFFER:
+		case AL_LOOPING:
+		case AL_SOURCE_RELATIVE:
+			/*
+			 * We handle these natively.
+			 */
+			break;
+		case AL_PITCH:
+		case AL_MIN_GAIN:
+		case AL_MAX_GAIN:
+		case AL_CONE_INNER_ANGLE:
+		case AL_CONE_OUTER_ANGLE:
+		case AL_CONE_OUTER_GAIN:
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+		case AL_REFERENCE_DISTANCE:
+		case AL_ROLLOFF_FACTOR:
+		case AL_MAX_DISTANCE:
+			temp = i1;
+
+			alSourcef( sid, param, temp );
+
+			return;
+			break;
+		case AL_POSITION:
+		case AL_VELOCITY:
+		case AL_DIRECTION:
+		default:
+			_alcDCLockContext();
+			_alDCSetError( AL_INVALID_ENUM );
+			_alcDCUnlockContext();
+
+			return;
+			break;
+	}
+
+	SOURCELOCK();
+
+	src = _alDCGetSource( sid );
+	if(src == NULL) {
+		/*
+		 * sid is invalid.
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alSourcei: source id %d is not valid", sid);
+
+		_alDCSetError( AL_INVALID_NAME );
+
+		SOURCEUNLOCK();
+		return;
+	}
+
+	/*
+	 * all calls to alSourcei specify ALboolean parameters,
+	 * which means that i1 is either AL_TRUE, AL_FALSE, or
+	 * not valid.  So check for validity of i1 first, and
+	 * set error if that's the case.
+	 */
+	switch( param ) {
+		case AL_LOOPING:
+		case AL_SOURCE_RELATIVE:
+			inrange = _alCheckRangeb( i1 );
+			break;
+		case AL_BUFFER:
+			inrange = alIsBuffer( i1 );
+
+			if( i1 == 0 ) {
+				/*
+				 * bid of 0 has a special meaning: unset the
+				 * parameter.	So it's in range.
+				 */
+				inrange = AL_TRUE;
+			}
+			break;
+		default:
+			/* invalid param, error below. */
+			break;
+	}
+
+	if( inrange == AL_FALSE ) {
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "alSourcei(%d, 0x%x, ...) called with invalid value %d",
+		      sid, param, i1);
+
+		_alDCSetError( AL_INVALID_VALUE );
+
+		SOURCEUNLOCK();
+		return;
+	}
+
+	switch(param)
+	{
+		case AL_BUFFER:
+			switch( src->state )
+			{
+				case AL_PLAYING:
+				case AL_PAUSED:
+					/*
+					 * Invalid state to set buffer in.
+					 */
+					_alDebug( ALD_SOURCE,
+						 __FILE__, __LINE__,
+						"alSourcei(%d): source is playing, AL_BUFFER invalid",
+						sid );
+					_alDCSetError( AL_INVALID_OPERATION );
+					break;
+				default:
+					_alSourceQueueHead( src, i1 );
+					break;
+			}
+
+			break;
+		case AL_LOOPING:
+			src->looping.isset = AL_TRUE;
+			src->looping.data = i1;
+			break;
+		case AL_SOURCE_RELATIVE:
+			src->relative.isset = AL_TRUE;
+			src->relative.data = i1;
+			/* If this is a relative source with zero position,
+			   perform the 2D sound hack...
+			   (Tribes 2 reuses 3D sources as 2D sources)
+			*/
+		  	if ( i1 && src->position.isset &&
+			     ! src->position.data[0] &&
+			     ! src->position.data[1] &&
+			     ! src->position.data[2] ) {
+				_alSource2D(src);
+			}
+			break;
+		default:
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+				"alSourcei: invalid or stubbed source param 0x%x",
+				param );
+
+			_alDCSetError( AL_INVALID_ENUM );
+			break;
+	}
+
+	SOURCEUNLOCK();
+
+	return;
+}
+
+/*
+ * alSourcef( ALuint sid, ALenum param, ALfloat f1 )
+ *
+ * Sets an attribute for a source.
+ *
+ * If sid does not name a valid source, AL_INVALID_NAME.
+ * If param does not specify a source attribute, AL_INVALID_ENUM.
+ * If f1 is out of range for the attribute, AL_INVALID_VALUE.
+ *
+ */
+void alSourcef( ALuint sid, ALenum param, ALfloat f1 ) {
+	/*
+	 * If param refers to a integer attribute, delegate it to alSourcei.
+	 * If it refers to a float attribute, delegate it to alSourcefv.  If
+	 * it is an invalid attribute, set INVALID_ENUM and bail out.
+	 *
+	 * Float vectors are obviously not possible, so we set
+	 * INVALID_OPERATION.  This is probably a spec violation.
+	 */
+	switch( param ) {
+		case AL_BUFFER:
+		case AL_LOOPING:
+		case AL_SOURCE_RELATIVE:
+			alSourcei( sid, param, (ALint) f1 );
+			return;
+		case AL_PITCH:
+		case AL_MIN_GAIN:
+		case AL_MAX_GAIN:
+		case AL_CONE_INNER_ANGLE:
+		case AL_CONE_OUTER_ANGLE:
+		case AL_CONE_OUTER_GAIN:
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+		case AL_REFERENCE_DISTANCE:
+		case AL_ROLLOFF_FACTOR:
+		case AL_MAX_DISTANCE:
+			alSourcefv( sid, param, &f1 );
+			return;
+		case AL_POSITION:
+		case AL_VELOCITY:
+		case AL_DIRECTION:
+		default:
+			_alcDCLockContext();
+			_alDCSetError( AL_INVALID_ENUM );
+			_alcDCUnlockContext();
+			return;
+	}
+}
+
+/*
+ * alSource3f( ALuint sid, ALenum param, ALfloat f1, ALfloat f2, ALfloat f3 )
+ *
+ * Sets an 3 float parameter for a source.
+ *
+ * If sid does not name a valid source, AL_INVALID_NAME.
+ * If param does not specify a source attribute, AL_INVALID_ENUM.
+ * If f1, f2, or f3 is out of range for the attribute, AL_INVALID_VALUE.
+ *
+ */
+void alSource3f( ALuint sid, ALenum param,
+		 ALfloat f1, ALfloat f2, ALfloat f3 ) {
+	ALfloat fv[3];
+
+	fv[0] = f1;
+	fv[1] = f2;
+	fv[2] = f3;
+
+	alSourcefv( sid, param, fv );
+
+	return;
+}
+
+/*
+ * alSourcefv( ALuint sid, ALenum param, ALfloat fv )
+ *
+ * Sets an float vector parameter for a source.
+ *
+ * If sid does not name a valid source, AL_INVALID_NAME.
+ * If param does not specify a source attribute, AL_INVALID_ENUM.
+ * If any member of fv is out of range for the attribute, AL_INVALID_VALUE.
+ *
+ */
+void alSourcefv( ALuint sid, ALenum param, const ALfloat *fv1 )
+{
+	AL_source *source;
+	ALboolean inrange = AL_TRUE;
+
+	/*
+	 * If param refers to a integer attribute, delegate it to alSourcei.
+	 * If it refers to a float attribute, we accept it.
+	 */
+	switch( param ) {
+		case AL_BUFFER:
+		case AL_LOOPING:
+		case AL_SOURCE_RELATIVE:
+			alSourcei( sid, param, (ALint) fv1[0] );
+			return;
+		case AL_PITCH:
+		case AL_MIN_GAIN:
+		case AL_MAX_GAIN:
+		case AL_CONE_INNER_ANGLE:
+		case AL_CONE_OUTER_ANGLE:
+		case AL_CONE_OUTER_GAIN:
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+		case AL_REFERENCE_DISTANCE:
+		case AL_ROLLOFF_FACTOR:
+		case AL_MAX_DISTANCE:
+		case AL_POSITION:
+		case AL_VELOCITY:
+		case AL_DIRECTION:
+			break;
+		default:
+			_alcDCLockContext();
+			_alDCSetError( AL_INVALID_ENUM );
+			_alcDCUnlockContext();
+			return;
+	}
+
+
+	SOURCELOCK();
+	source = _alDCGetSource( sid );
+
+	if( source == NULL ) {
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alSourcefv: %d is an invalid source id", sid );
+
+		_alDCSetError( AL_INVALID_NAME );
+
+		SOURCEUNLOCK();
+
+		return;
+	}
+
+	if( fv1 == NULL ) {
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alSourcefv: passed fv is NULL");
+
+		_alDCSetError( AL_INVALID_VALUE );
+
+		SOURCEUNLOCK();
+
+		return;
+	}
+
+	/* check to see if we are in range, first */
+	switch( param ) {
+		case AL_MIN_GAIN:
+		case AL_MAX_GAIN:
+		case AL_CONE_OUTER_GAIN:
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+		  inrange = _alCheckRangef( fv1[0], 0.0, FLT_MAX );
+		  break;
+		case AL_CONE_INNER_ANGLE:
+		case AL_CONE_OUTER_ANGLE:
+		  inrange = _alCheckRangef( fv1[0], 0.0, 360.0 );
+		  break;
+		case AL_PITCH:
+		  /* FIXME: deviates from spec */
+		  inrange = _alCheckRangef( fv1[0], 0.0, 2.0 );
+		  break;
+		case AL_REFERENCE_DISTANCE:
+		case AL_MAX_DISTANCE:
+		case AL_ROLLOFF_FACTOR:
+		  inrange = _alCheckRangef( fv1[0], 0.0, FLT_MAX );
+		  break;
+		case AL_POSITION:
+		case AL_DIRECTION:
+		  inrange = inrange && ( _alIsFinite( fv1[0] ) == AL_TRUE );
+		  inrange = inrange && ( _alIsFinite( fv1[1] ) == AL_TRUE );
+		  inrange = inrange && ( _alIsFinite( fv1[2] ) == AL_TRUE );
+
+		  assert( inrange );
+		  break;
+		default:
+		  /* invalid param. error below */
+		  break;
+	}
+
+	if( inrange == AL_FALSE ) {
+		/*
+		 *  We have a range error, exit early.
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "alSourcef(%d, 0x%x, ...): %f out of range",
+		      sid, param, fv1[0] );
+
+		_alDCSetError( AL_INVALID_VALUE );
+
+		SOURCEUNLOCK();
+
+		return;
+	}
+
+	switch( param ) {
+		case AL_POSITION:
+		  source->position.isset = AL_TRUE;
+		  memcpy( &source->position.data, fv1, SIZEOFVECTOR );
+		  /* If this is a relative source with zero position,
+		     perform the 2D sound hack...
+		     (Tribes 2 reuses 3D sources as 2D sources)
+		   */
+		  if ( !fv1[0] && !fv1[1] && !fv1[2] &&
+		       source->relative.isset &&
+		       source->relative.data ) {
+			_alSource2D(source);
+		  }
+		  break;
+		case AL_DIRECTION:
+		  /*
+		   * The zero vector will make a directional sound
+		   * non-directional.
+		   */
+		  if(_alIsZeroVector(fv1) == AL_TRUE) {
+			  /* clear DIRECTION flag */
+			  source->direction.isset = AL_FALSE;
+		  } else {
+			  source->direction.isset = AL_TRUE;
+			  memcpy( &source->direction.data, fv1, SIZEOFVECTOR );
+		  }
+		  break;
+		case AL_VELOCITY:
+		  source->velocity.isset = AL_TRUE;
+		  memcpy( &source->velocity.data, fv1, SIZEOFVECTOR );
+
+		  /*
+		   * velocity means doppler, which means that we
+		   * need pitch, which means alf_tpitch takes care of
+		   * incrementing soundpos.  Very kludgey, I'll admit.
+		   *
+		   */
+		  source->flags      |= ALS_NEEDPITCH;
+		  break;
+		case AL_MIN_GAIN:
+		  source->min_gain.isset = AL_TRUE;
+		  source->min_gain.data  = fv1[0];
+		  break;
+		case AL_MAX_GAIN:
+		  source->max_gain.isset = AL_TRUE;
+		  source->max_gain.data  = fv1[0];
+		  break;
+		case AL_CONE_INNER_ANGLE:
+		  source->cone_inner_angle.isset = AL_TRUE;
+		  source->cone_inner_angle.data  = fv1[0];
+		  break;
+		case AL_CONE_OUTER_ANGLE:
+		  source->cone_outer_angle.isset = AL_TRUE;
+		  source->cone_outer_angle.data  = fv1[0];
+		  break;
+		case AL_CONE_OUTER_GAIN:
+		  source->cone_outer_gain.isset = AL_TRUE;
+		  source->cone_outer_gain.data  = fv1[0];
+		  break;
+		case AL_PITCH:
+		  /* only set pitch if it differs from 1.0 */
+		  if(fv1[0] == 1.0) {
+			source->pitch.isset = AL_FALSE;
+			source->pitch.data  = 1.0;
+
+			/*
+			 * If velocity is set, then doppler may 
+			 * change the pitch.
+			 */
+			if (!source->velocity.isset) {
+				source->flags &= ~ALS_NEEDPITCH;
+			}
+		  } else {
+		  	source->pitch.isset = AL_TRUE;
+		  	source->pitch.data  = fv1[0];
+
+			/* tpitch messes with soundpos */
+			source->flags |= ALS_NEEDPITCH;
+		  }
+		  break;
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+		  source->gain.isset = AL_TRUE;
+		  source->gain.data = fv1[0];
+		  break;
+		case AL_REFERENCE_DISTANCE:
+		  source->reference_distance.isset = AL_TRUE;
+		  source->reference_distance.data = fv1[0];
+		  break;
+		case AL_MAX_DISTANCE:
+		  source->max_distance.isset = AL_TRUE;
+		  source->max_distance.data = fv1[0];
+		  break;
+		case AL_ROLLOFF_FACTOR:
+		  source->rolloff_factor.isset = AL_TRUE;
+		  source->rolloff_factor.data = fv1[0];
+		  break;
+		default:
+		  _alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			  "alSourcefv(%d): param 0x%x not valid", sid, param );
+
+		  _alDCSetError( AL_INVALID_ENUM );
+		  break;
+	}
+
+	SOURCEUNLOCK();
+
+	return;
+}
+
+/*
+ * alGetSourcei( ALuint sid, ALenum pname, ALint *retref )
+ *
+ * Retrieve the value of a source (scalar) attribute
+ *
+ * If sid does not name a valid source, AL_INVALID_NAME.
+ * If param does not specify a source attribute, AL_INVALID_ENUM.
+ *
+ */
+void alGetSourcei( ALuint sid, ALenum param, ALint *retref )
+{
+	ALint safety_first[6];
+
+	alGetSourceiv( sid, param, safety_first );
+
+	*retref = safety_first[0];
+
+	return;
+}
+
+/*
+ * alGetSourceiv( ALuint sid, ALenum pname, ALint *retref )
+ *
+ * Retrieve the value of a source attribute.
+ *
+ * If sid does not name a valid source, AL_INVALID_NAME.
+ * If param does not specify a source attribute, AL_INVALID_ENUM.
+ *
+ */
+void alGetSourceiv( ALuint sid, ALenum param, ALint *retref )
+{
+	AL_source *src;
+	ALint *temp;
+
+	/*
+	 * Check for invalid type request: eg AL_GAIN.  We need
+	 * to convert these.
+	 */
+	switch( param ) {
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+		case AL_CONE_INNER_ANGLE:
+		case AL_CONE_OUTER_ANGLE:
+		case AL_CONE_OUTER_GAIN:
+		case AL_PITCH:
+		case AL_REFERENCE_DISTANCE:
+		case AL_ROLLOFF_FACTOR:
+		case AL_MAX_DISTANCE:
+			/* float conversion */
+			do {
+				ALfloat ftemp = 0.0f;
+
+				alGetSourcefv( sid, param, &ftemp );
+
+				/* how do we know if we've failed? */
+				*retref = ftemp;
+
+				return;
+			} while(0);
+			break;
+		case AL_VELOCITY:
+		case AL_POSITION:
+		case AL_DIRECTION:
+			/* float conversion */
+			do {
+				ALfloat ftemp[3];
+
+				alGetSourcefv( sid, param, ftemp );
+
+				/* how do we know if we've failed? */
+				retref[0] = ftemp[0];
+				retref[1] = ftemp[1];
+				retref[2] = ftemp[2];
+
+				return;
+			} while(0);
+			break;
+		default:
+			/*
+			 * either integer, boolean, or invalid
+			 * param.
+			 */
+			break;
+	}
+
+	SOURCELOCK();
+	src = _alDCGetSource( sid );
+
+	if( src == NULL ) {
+		/*
+		 * Invalid source id
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "alGetSourcei: invalid source id %d",
+		      sid);
+
+		_alDCSetError( AL_INVALID_NAME );
+
+		SOURCEUNLOCK();
+		return;
+	}
+
+	if(retref == NULL) {
+		/* silently ignore */
+
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "alGetSourcei(%d): NULL value", sid);
+
+		SOURCEUNLOCK();
+		return;
+	}
+
+
+	/*
+	 * get param value, and store it in temp.  We need it
+	 * for most, but not all, of the following params enums.
+	 */
+	temp = _alGetSourceParam( src, param );
+	if(temp != NULL) {
+		/* If temp is not NULL, then there is a value set,
+		 * and we don't have to slog through the defaults
+		 * below.
+		 */
+
+		switch( param ) {
+			case AL_LOOPING:
+			case AL_SOURCE_RELATIVE:
+				*retref = * (ALboolean *) temp;
+				break;
+			default:
+				*retref = *temp;
+				break;
+		}
+
+		SOURCEUNLOCK();
+
+		return;
+	}
+
+	switch(param) {
+		case AL_BUFFERS_QUEUED:
+		  /* AL_BUFFERS_QUEUED is not setable, and has no default. */
+		  /* Following code incorrectly subtracts the number of
+		   * processed buffers from the total number of buffers
+		   * queued.  We return the total number of buffers queued at
+		   * all times.
+		   *
+		   * *retref = src->bid_queue.size - src->bid_queue.read_index;
+		   *
+		   * Following code correctly returns total number of buffers
+		   * queued.
+		   */
+		  if(src->bid_queue.size == 1)
+		  {
+		  	/*
+			 * Test to see if the only buffer queued is the 0
+			 * buffer.  If so, don't report it.
+			 */
+			if(src->bid_queue.queue[0] == 0)
+			{
+				*retref = 0;
+			}
+			else
+			{
+				/*
+				 * There was only one bid but it wasn't the
+				 * 0 buffer.
+				 */
+				*retref = 1;
+			}
+		  }
+		  else
+		  {
+		  	/*
+			 * More than one bid, not the 0 buffer.  Or is it
+			 * possible to stick it in there?  Do we count it?
+			 *
+			 * JIV FIXME: check it out.
+			 */
+		  	*retref = src->bid_queue.size;
+		  }
+		  break;
+		case AL_BUFFERS_PROCESSED:
+		  /* AL_BUFFERS_PROCESSED is not setable, and has no default. */
+
+		  if( src->bid_queue.read_index == 0 ) {
+		  	/*
+			 * We're still reading the first bid, so we haven't
+			 * processed any yet.  So return 0.
+			 */
+			*retref = 0;
+		  } else {
+		  	*retref = src->bid_queue.read_index;
+		  }
+		  break;
+#ifdef AL_SUPPORT_BYTE_LOKI_SOURCE_ATTR_
+		case AL_BYTE_LOKI:
+		  /* AL_BYTE_LOKI is not setable, and has no default. */
+		  switch(src->state) {
+			  case AL_PLAYING:
+			  case AL_PAUSED:
+			    *retref = src->srcParams.soundpos;
+			    break;
+			  default:
+			    *retref = -1;
+			    break;
+		  }
+		  break;
+#endif
+		case AL_SOURCE_STATE:
+		  *retref = src->state;
+		  break;
+		case AL_LOOPING:
+		case AL_SOURCE_RELATIVE:
+			/*
+			 * These all have default states, but must be handled
+			 * differently because they are booleans.
+			 */
+			{
+				ALboolean val;
+
+				_alSourceGetParamDefault( param, &val );
+
+				*retref = val;
+			}
+			break;
+		case AL_BUFFER:
+			/* These all have default states */
+			_alSourceGetParamDefault( param, retref );
+			break;
+		default:
+		  _alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		        "alGetSourcei: invalid or unsupported param 0x%x",
+			param);
+
+		  _alDCSetError( AL_INVALID_ENUM );
+
+		  break;
+	}
+
+	SOURCEUNLOCK();
+
+	return;
+}
+
+/*
+ * alGetSource3f( ALuint sid, ALenum param,
+ *                ALfloat *value1, ALfloat *value2, ALfloat *value3)
+ *
+ * Retrieve the value of a (potentially) 3-tuple valued source attribute.
+ *
+ * If sid does not name a valid source, AL_INVALID_NAME.
+ * If param does not specify a source attribute, AL_INVALID_ENUM.
+ */
+void alGetSource3f( ALuint sid, ALenum param,
+		    ALfloat *value1, ALfloat *value2, ALfloat *value3)
+{
+	ALfloat safety_first[6];
+
+	if(( value1 == NULL ) &&
+	   ( value2 == NULL ) &&
+	   ( value3 == NULL ))
+	{
+		/* silently ignore */
+		_alDebug( ALD_SOURCE, __FILE__, __LINE__,
+			"alGetSource3f: value passed is NULL" );
+
+		return;
+	}
+
+	alGetSourcefv( sid, param, safety_first );
+
+	if(value1)
+	{
+		*value1 = safety_first[0];
+	}
+
+	if(value2)
+	{
+		*value2 = safety_first[1];
+	}
+
+	if(value3)
+	{
+		*value3 = safety_first[2];
+	}
+
+	return;
+}
+
+/*
+ * alGetSourcef( ALuint sid, ALenum param, ALfloat *value )
+ *
+ * Retrieve the value of a source attribute.
+ *
+ * If sid does not name a valid source, AL_INVALID_NAME.
+ * If param does not specify a source attribute, AL_INVALID_ENUM.
+ */
+void alGetSourcef( ALuint sid, ALenum param, ALfloat *value )
+{
+	ALfloat safety_first[6];
+
+	if( value == NULL )
+	{
+		/* silently ignore */
+		_alDebug( ALD_SOURCE, __FILE__, __LINE__,
+			"alGetSourcef: value passed is NULL" );
+
+		return;
+	}
+
+	alGetSourcefv( sid, param, safety_first );
+
+	*value = safety_first[0];
+
+	return;
+}
+
+/*
+ * alGetSourcefv( ALuint sid, ALenum param, ALfloat *values )
+ *
+ * Retrieve the value of a source attribute.
+ *
+ * If sid does not name a valid source, AL_INVALID_NAME.
+ * If param does not specify a source attribute, AL_INVALID_ENUM.
+ */
+void alGetSourcefv( ALuint sid, ALenum param, ALfloat *values ) {
+	AL_source *src;
+	ALfloat *srcvals;
+	ALsizei numvalues; /* number of values to copy */
+
+	/*
+	 * Check for invalid type request: eg integer, boolean
+	 * or single float types.
+	 *
+	 * We need to convert these.
+	 */
+	switch( param ) {
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+		case AL_CONE_INNER_ANGLE:
+		case AL_CONE_OUTER_ANGLE:
+		case AL_CONE_OUTER_GAIN:
+		case AL_PITCH:
+		case AL_REFERENCE_DISTANCE:
+		case AL_MAX_DISTANCE:
+		case AL_ROLLOFF_FACTOR:
+			/* scalar param, only copy 1 value */
+			numvalues = 1;
+			break;
+		case AL_LOOPING:
+		case AL_SOURCE_RELATIVE:
+		case AL_BUFFERS_QUEUED:
+		case AL_BUFFERS_PROCESSED:
+#ifdef AL_SUPPORT_BYTE_LOKI_SOURCE_ATTR_
+		case AL_BYTE_LOKI:
+#endif
+		case AL_SOURCE_STATE:
+		case AL_BUFFER:
+			/* conversion to integer */
+			do {
+				ALint temp = 0;
+
+				alGetSourceiv( sid, param, &temp );
+
+				/*
+				 * how do we know if we've failed?
+				 *
+				 * only populate first entry
+				 */
+				*values = temp;
+
+				return;
+			} while(0);
+			break;
+		default:
+			/*
+			 * either float vector or invalid
+			 * param.
+			 */
+			numvalues = 3;
+			break;
+	}
+
+	SOURCELOCK();
+	src = _alDCGetSource( sid );
+
+	if(src == NULL) {
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"alGetSourcefv: source id %d is invalid", sid);
+
+		_alDCSetError( AL_INVALID_NAME );
+
+		SOURCEUNLOCK();
+		return;
+	}
+
+	if( values == NULL ) {
+		/* silently ignore */
+
+		_alDebug( ALD_SOURCE, __FILE__, __LINE__,
+			"alGetSourcefv: values passed is NULL" );
+
+		SOURCEUNLOCK();
+
+		return;
+	}
+
+	srcvals = _alGetSourceParam( src, param );
+	if(srcvals != NULL) {
+		/*
+		 * If srcvals is not NULL, then the attribute has been set by
+		 * the application, and we don't need to set defaults.
+		 */
+		memcpy( values, srcvals, numvalues * sizeof *values );
+
+		SOURCEUNLOCK();
+
+		return;
+	}
+
+	/* If we are at this point, srcvals is NULL, which means
+	 * that either param is an invalid param, or that the value
+	 * is not set.	Check for a valid param, in which case we
+	 * set the default, or set error.
+	 */
+	switch( param ) {
+		/* scalars */
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+		case AL_MIN_GAIN:
+		case AL_MAX_GAIN:
+		case AL_CONE_INNER_ANGLE:
+		case AL_CONE_OUTER_ANGLE:
+		case AL_CONE_OUTER_GAIN:
+		case AL_PITCH:
+		case AL_ROLLOFF_FACTOR:
+		case AL_REFERENCE_DISTANCE:
+		case AL_MAX_DISTANCE:
+		case AL_VELOCITY:
+		case AL_POSITION:
+		case AL_DIRECTION:
+			_alSourceGetParamDefault( param, values );
+			break;
+		default:
+			_alDebug( ALD_SOURCE, __FILE__, __LINE__,
+			       "alGetSourcefv: param 0x%x either invalid or unset",
+			       param);
+
+			_alDCSetError( AL_INVALID_ENUM );
+
+			break;
+	}
+
+	SOURCEUNLOCK();
+
+	return;
+}
+
+/*
+ * _alGetSource( ALuint cid, ALuint sid )
+ *
+ * Returns the address of the source sid from the
+ * context cid, or NULL if the cid or sid is
+ * invalid.
+ *
+ * Assumes locked context
+ */
+AL_source *_alGetSource( ALuint cid, ALuint sid ) {
+	AL_context *cc;
+
+	cc  = _alcGetContext( cid );
+	if(cc == NULL) {
+		/*
+		 * FIXME: Where, if at all, should be set the error?
+		 */
+		return NULL;
+	}
+
+	return spool_index( &cc->source_pool, sid );
+}
+
+/*
+ * _alSplitSources( ALuint cid, ALuint sid,
+ *                  ALint nc, ALuint len,
+ *                  AL_buffer *buf, ALshort **buffs );
+ *
+ * Populate buffs[0..nc-1][0..len/2-1] with data from buf, with offset into
+ * buf given by the position associated with the source named by sid in the
+ * context named by cid.
+ *
+ * This function delegates to static functions in the case of looping,
+ * callback or queue sounds.
+ *
+ * assumes locked context
+ *
+ * FIXME: what an ugly mess
+ */
+void _alSplitSources( ALuint cid,
+		      ALuint sourceid,
+		      ALint nc, ALuint len,
+		      AL_buffer *samp,
+		      ALshort **buffers ) {
+	AL_source *src;
+	AL_sourcestate *srcstate;
+	ALuint i;
+	char *bufptr = NULL;
+	static ALuint buflen = 0;
+
+	src = _alGetSource( cid, sourceid );
+	if(src == NULL)
+	{
+		/* bad mojo */
+		return;
+	}
+
+	/*
+	 * if buflen is less that the passed len, this is probably
+	 * the first initialization and we need to allocate the
+	 * stereoptr (stereoptr being that buffer where we mix this
+	 * sort of thing).
+	 *
+	 * or buflen is equal to len and stereoptr is null because
+	 * the device was destroyed and then restarted.
+	 */
+	if(buflen < len || stereoptr == NULL)
+	{
+		buflen = len;
+
+		stereoptr = realloc(stereoptr, buflen * 2);
+
+		memset( stereoptr, 0, buflen * 2 );
+	}
+
+	if(stereoptr == NULL)
+	{
+		/* at this point, we're dead and don't know it. */
+		return;
+	}
+
+	/* Shouldn't happen. */
+	if(len == 0) {
+		_alDebug(ALD_SOURCE,
+			__FILE__, __LINE__,
+			"wtf? size = 0!!!!!!");
+		_alDebug(ALD_SOURCE,
+			__FILE__, __LINE__,
+			"Expect SIGSEGV soon");
+		return;
+	}
+
+
+	srcstate = _alSourceQueueGetCurrentState( src );
+
+	/*
+	 *  If we have a callback function, read from it.
+	 */
+	if(samp->flags & ALB_CALLBACK)
+	{
+		srcstate->flags |= ALQ_CALLBACKBUFFER;
+
+		_alSplitSourceCallback(cid, sourceid, nc, len, samp, buffers);
+		return;
+	} else {
+		/* make sure we mark this as a normal buffer */
+		srcstate->flags &= ~ALQ_CALLBACKBUFFER;
+	}
+
+	if(_alSourceBytesLeftByChannel(src, samp) < (ALint) len)
+	{
+		if(_alSourceIsLooping(src) == AL_TRUE &&
+		   _alSourceIsQueue(src) == AL_FALSE )
+		{
+			/*
+			 * looping sources, when they need to wrap,
+			 * are handled via SplitSourceLooping.
+			 */
+			_alSplitSourceLooping(cid, sourceid,
+		     			nc, len,
+		     			samp,
+		     			buffers);
+
+			return;
+		}
+
+		if(_alSourceGetPendingBids(src) > 0)
+		{
+			/*
+			 * There are more buffers in the queue, so
+			 * do the wrapping.
+			 */
+			_alSplitSourceQueue(cid, sourceid,
+					    nc, len, samp, buffers);
+
+			return;
+		}
+
+		len = _alSourceBytesLeftByChannel(src, samp);
+
+		if((len <= 0) || (len > samp->size))
+		{
+			/* really short sound */
+			len = samp->size;
+
+			return;
+		}
+	}
+
+	if(_alSourceGetPendingBids(src) > 0)
+		assert(src->bid_queue.read_index < src->bid_queue.size );
+
+	for(i = 0; i < _alcGetNumSpeakers(cid); i++)
+	{
+		bufptr = _alSourceGetBufptr(src, samp, i);
+
+		memcpy(buffers[i], bufptr, len);
+	}
+
+	return;
+}
+
+/*
+ * _alSplitSourceCallback( ALuint cid,
+ *                         ALuint sourceid,
+ *                         ALint nc, ALuint len,
+ *                         AL_buffer *samp,
+ *                         ALshort **buffers )
+ *
+ *  Special SplitSource for callback sources, which need to have their
+ *  data populated not from the buffer's original data, but from the
+ *  callback.
+ */
+static void _alSplitSourceCallback( ALuint cid,
+				    ALuint sourceid,
+				    ALint nc, ALuint len,
+				    AL_buffer *samp,
+				    ALshort **buffers ) {
+	AL_source *src;
+	int *bid            = NULL;
+	ALuint nsamps = 0;
+	int resultsamps     = -1;
+	int bufchannels     = _alGetChannelsFromFormat( samp->format );
+
+	src = _alGetSource( cid, sourceid );
+	if(src == NULL) {
+		/*
+		 * Should we really be setting the error here?
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "_alSplitSourceCallback: invalid source id %d",
+		      sourceid);
+
+		_alSetError(cid, AL_INVALID_NAME);
+		return;
+	}
+
+ 	bid = (int *) _alGetSourceParam(src, AL_BUFFER);
+	if(bid == NULL) {
+		return;
+	}
+
+	nsamps = bufchannels * len / sizeof **buffers;
+
+	resultsamps = samp->callback(sourceid, *bid,
+				     stereoptr,
+				     samp->format,
+				     samp->frequency,
+				     nsamps);
+
+	if(resultsamps < 0) {
+		/* callback problem */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"%d callback returned -1", sourceid);
+
+		memset(stereoptr, 0, len);
+
+		_alRemoveSourceFromMixer(sourceid);
+
+		return;
+	}
+
+	if(resultsamps < (ALint) nsamps) {
+		/* source is over */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"time for %d to die", sourceid);
+
+		/* FIXME:
+		 *
+		 * offset memset at resultsamps / width to end
+
+		 memset(stereoptr, 0, len);
+		 */
+
+		/*
+		 * we want this to end.  please.
+		 * What a cheat.
+		 */
+
+		src->srcParams.soundpos = samp->size + nc * resultsamps * sizeof **buffers;
+	}
+
+	/* set len to the number of bytes we actually got back
+	 * from the callback.
+	 */
+	len = resultsamps * sizeof **buffers / bufchannels;
+
+	/*
+	 * since we're decoding it, copy it to the orig_buffers so we only
+	 * have to do it once.
+	 */
+	_alMonoify(buffers, stereoptr, len, samp->num_buffers, bufchannels);
+
+	samp->size += nc * resultsamps * sizeof **buffers;
+
+	return;
+}
+
+/*
+ * _alSplitSourceLooping( ALuint cid,
+ *                        ALuint sourceid,
+ *                        ALint nc, ALuint len,
+ *                        AL_buffer *samp,
+ *                        ALshort **buffers )
+ *
+ * _alSplitSourceLooping is called to split a looping source that
+ * has reached the loop point (ie, point where it needs to wrap around.
+ *
+ * This is very ugly, and needs to be cleaned up.  I'd prefer not to
+ * have a special case so if you're looking to contribute, please
+ * consider redoing this.
+ *
+ * assumes locked context
+ *
+ * FIXME: this is so ugly.
+ */
+static void _alSplitSourceLooping( ALuint cid,
+				   ALuint sourceid,
+				   ALint nc, ALuint len,
+				   AL_buffer *samp,
+				   ALshort **buffers ) {
+	AL_source *src;
+	long mixable;
+	long remaining;
+	char *bufptr;
+	int i;
+	int bi;
+	int bufchannels = _alGetChannelsFromFormat(samp->format);
+	char *mdp;
+
+	src = _alGetSource(cid, sourceid);
+	if(src == NULL) {
+		/*
+		 * Should we really be setting the error here?
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "_alSplitSourceLooping: invalid source id %d",
+		      sourceid);
+
+		_alSetError(cid, AL_INVALID_NAME);
+		return;
+	}
+
+	mixable    = _alSourceBytesLeftByChannel(src, samp);
+	remaining  = 0;
+
+	assert(mixable >= 0);
+
+	/* in case samp->size < len, we don't want
+	 * to overwrite with the memcpy
+	 */
+	if(len * bufchannels <= samp->size) {
+		/* normal case */
+		remaining = (len * bufchannels) - mixable;
+
+		for(i = 0; i < nc; i++) {
+			bufptr = _alSourceGetBufptr(src, samp, i);
+
+			memcpy(buffers[i], bufptr, mixable);
+			memcpy(buffers[i] + mixable/2, samp->orig_buffers[i],
+				remaining);
+		}
+
+		return;
+	} else {
+		/* really small looping sample */
+		if(mixable < 0) {
+			/* we loop sound in monoptr */
+			mixable = src->srcParams.soundpos % len;
+		}
+
+		for(bi = 0; bi < nc; bi++) {
+			mdp = (char *) buffers[bi];
+
+			/* copy samp again and again */
+			for(i = mixable; i < (signed int) len; i += samp->size) {
+				int copylen;
+
+				if(i + samp->size < len) {
+					copylen = samp->size;
+				} else {
+					copylen = len - i;
+				}
+
+				memcpy(&mdp[i],	samp->orig_buffers[bi], copylen);
+			}
+
+			for(i = 0; i < mixable; i += samp->size) {
+				int copylen;
+
+				if(i + samp->size < (unsigned int) mixable) {
+					copylen = samp->size;
+				} else {
+					copylen = mixable - i;
+				}
+
+				memcpy(&mdp[i],
+					samp->orig_buffers[bi],
+					copylen);
+			}
+		}
+
+		return;
+	}
+#if 0
+	/* ToDo: This is never reached?! */
+	for(i = 0; i < nc; i++) {
+		bufptr = _alSourceGetBufptr(src, samp, i);
+
+		memcpy(buffers[i], bufptr, len);
+	}
+#endif
+}
+
+/*
+ * _alSplitSourceQueue( ALuint cid,
+ *                      ALuint sourceid,
+ *                      ALint nc, ALuint len,
+ *                      AL_buffer *samp,
+ *                      ALshort **buffers )
+ *
+ * _alSplitSourceQueue is called to ease the transition between
+ * buffers in a source's queue.
+ *
+ * This is very ugly, and needs to be cleaned up.  I'd prefer not to
+ * have a special case so if you're looking to contribute, please
+ * consider redoing this.
+ *
+ * assumes locked context
+ *
+ * FIXME: this is so ugly.
+ */
+static void _alSplitSourceQueue( ALuint cid,
+				 ALuint sourceid,
+				 ALint nc, ALuint len,
+				 AL_buffer *samp,
+				 ALshort **buffers )
+{
+	AL_source *src;
+	AL_buffer *nextsamp;
+	long mixable;
+	ALuint remaining;
+	char *bufptr;
+	ALuint nextbid;
+	void *nextpcm;
+	int new_soundpos = -1;
+	int old_soundpos;
+	int old_readindex;
+	ALuint collected_bytes = 0;
+	int i;
+
+	src = _alGetSource(cid, sourceid);
+	if(src == NULL)
+	{
+		/*
+		 * Should we really be setting the error here?
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "_alSplitSourceQueue: invalid source id %d",
+		      sourceid);
+
+		_alSetError(cid, AL_INVALID_NAME);
+		return;
+	}
+
+	old_soundpos = src->srcParams.soundpos;
+	old_readindex = src->bid_queue.read_index;
+
+#if 1
+	if( _alSourceBytesLeftByChannel(src, samp) <= 0)
+	{
+
+		ALuint bid = 0;
+
+		/* no data left in this buffer */
+		src->bid_queue.read_index++;
+		if(src->bid_queue.read_index >= src->bid_queue.size)
+		{
+			/* JIV FIXME: breaks queue looping? */
+			if(_alSourceIsLooping(src))
+			{
+				src->bid_queue.read_index = 0;
+			}
+			else
+			{
+				/* JIV FIXME: doesn't mix last queue bit */
+
+				return;
+			}
+		}
+
+		bid  = src->bid_queue.queue[src->bid_queue.read_index];
+		samp = _alGetBuffer(bid);
+		if(samp == NULL)
+		{
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+				 "_alSplitSourceQueue: null buffer");
+
+			return;
+		}
+
+		src->srcParams.soundpos = 0;
+
+		/* ho ho ho ho */
+		_alSplitSources(cid, sourceid, nc, len, samp, buffers);
+		return;
+	}
+#endif
+
+	nextbid = src->bid_queue.queue[src->bid_queue.read_index + 1];
+	nextsamp = _alGetBuffer(nextbid);
+	if(nextsamp == NULL)
+	{
+		/*
+		 * Should we really be setting the error here?
+		 */
+		_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+		      "_alSplitSourceQueue: shouldn't happen");
+
+		return;
+	}
+
+/* 	assert(len >= 0); */
+/* 	assert(src->srcParams.soundpos >= 0); */
+
+	/*
+	 *
+	 * First, test whether we can get enough data to fill the
+	 * request with the current buffer's data ( minus current sound
+	 * pos ) plus the next buffer's data.
+	 */
+	if( samp->size + nextsamp->size >= len + src->srcParams.soundpos )
+	{
+#ifdef DEBUG_QUEUE
+		_alDebug(ALD_QUEUE, __FILE__, __LINE__,
+			 "Queue filling from two buffers ( size + nextsize (%d) vs soundpos + len %d",
+			samp->size + nextsamp->size,
+			 len + src->srcParams.soundpos);
+#endif
+
+		/* we can fill the request */
+		mixable = _alSourceBytesLeftByChannel(src, samp);
+		remaining = 0;
+
+		assert( mixable >= 0 );
+
+		/*
+		 * in case samp->size < len, we don't want
+		 * to overwrite with the memcpy
+		 */
+		remaining = len - mixable;
+
+#ifdef DEBUG_QUEUE
+		_alDebug(ALD_QUEUE, __FILE__, __LINE__,
+			 "first buffer %d, second buffer %d",
+			 mixable, remaining);
+#endif
+
+
+		for(i = 0; i < nc; i++) {
+			bufptr = _alSourceGetBufptr(src, samp, i);
+			nextpcm = nextsamp->orig_buffers[i];
+
+			memcpy(buffers[i], bufptr, mixable);
+			memcpy(buffers[i] + mixable/2, nextpcm, remaining);
+		}
+
+		src->srcParams.new_readindex = src->bid_queue.read_index + 1;
+		src->srcParams.new_soundpos = remaining;
+
+		if(remaining >= nextsamp->size)
+		{
+			/* we read all of the next buffer */
+			src->srcParams.new_readindex++;
+		}
+
+#ifdef DEBUG_QUEUE
+		_alDebug(ALD_QUEUE, __FILE__, __LINE__,
+			 "SplitSourceQueue, read_index is now %d",
+			 src->srcParams.new_readindex);
+#endif
+
+		return;
+	}
+
+#ifdef DEBUG_QUEUE
+	fprintf(stderr, "Splitting from multiple needed %d left %d\n",
+		len,
+		samp->size - src->srcParams.soundpos);
+#endif
+
+	/*
+	 * We need to get data from more than one buffer
+	 */
+	while( collected_bytes < len )
+	{
+		int bid;
+
+		if( src->bid_queue.read_index >= src->bid_queue.size )
+		{
+#ifdef DEBUG_QUEUE
+			fprintf(stderr, "end of buffer queue\n" );
+#endif
+
+			/*
+			 * Read past the last buffer and we still
+			 * have to write out.  Pad the rest with silence,
+			 * I guess.  Do we support looping queued buffers?
+			 */
+			for(i = 0; i < nc; i++)
+			{
+				memset(buffers[i] + collected_bytes/2,
+				       0, len - collected_bytes);
+			}
+
+			src->bid_queue.read_index = old_readindex;
+			src->srcParams.soundpos   = old_soundpos;
+
+			return;
+		}
+
+		assert(src->bid_queue.read_index < src->bid_queue.size );
+
+		bid = src->bid_queue.queue[src->bid_queue.read_index];
+		samp = _alGetBuffer(bid);
+
+		mixable = samp->size - src->srcParams.soundpos;
+
+		if(mixable > (int) (len - collected_bytes))
+		{
+			mixable = len - collected_bytes;
+			new_soundpos = src->srcParams.soundpos + mixable;
+		}
+		else
+		{
+			src->bid_queue.read_index++;
+			new_soundpos = 0;
+		}
+
+		/* copy from current buffer */
+		for(i = 0; i < nc; i++)
+		{
+			bufptr = _alSourceGetBufptr(src, samp, i);
+
+			memcpy(buffers[i] + collected_bytes/2, bufptr, mixable);
+		}
+
+		collected_bytes += mixable;
+
+		src->srcParams.soundpos = new_soundpos;
+	}
+
+	src->srcParams.new_readindex = src->bid_queue.read_index;
+	src->srcParams.new_soundpos = new_soundpos;
+
+	src->bid_queue.read_index = old_readindex;
+	src->srcParams.soundpos   = old_soundpos;
+
+	return;
+}
+
+/*
+ * _alMonoifyOffset( ALshort **dstref, ALuint offset,
+ *                   ALvoid *src, ALuint src_size,
+ *                   ALuint dest_channels, ALuint src_channels )
+ *
+ * Copies the interleaved data from src[0..(src_size/2)-1] to
+ * dstret[0..dest_channels-1], splitting it into seperate channels.
+ * src_channels describes the period of the channel repetition in src,
+ * dest_channels describes the number of independant buffers in dstref.
+ * src_size is the size of src in bytes, and offset is the offset into each
+ * seperate channel in dstref where the copying begins.
+ *
+ * assumes locked context
+ */
+void _alMonoifyOffset(ALshort **dstref, ALuint offset,
+		      ALvoid *srcp, ALuint size, ALuint dc, ALuint sc) {
+	switch( dc ) {
+	        case 4:
+                  switch(sc) {
+                          case 1:
+                                _alMonoifyOffset1to4(dstref, offset, srcp, size);
+                                break;
+                          case 2:
+                                _alMonoifyOffset2to4(dstref, offset, srcp, size);
+				break;
+                          case 4:
+                                _alMonoifyOffset4to4(dstref, offset, srcp, size);
+				break;
+                          default:
+			  	fprintf(stderr, "unhandled Monoify (dc %d sc %d)\n",
+					dc, sc);
+				break;
+		  }
+		  break;
+		case 2:
+		  switch(sc) {
+			  case 1:
+				_alMonoifyOffset1to2(dstref, offset, srcp, size);
+				break;
+			  case 2:
+				_alMonoifyOffset2to2(dstref, offset, srcp, size);
+				break;
+			  default:
+			  	fprintf(stderr, "unhandled Monoify (dc %d sc %d)\n",
+					dc, sc);
+				break;
+		  }
+		  break;
+		case 1:
+		  switch(sc) {
+			  case 1:
+		    		memcpy((char *) *dstref + offset, srcp, size);
+				break;
+			  default:
+			  	fprintf(stderr, "unhandled Monoify (dc %d sc %d)\n",
+					dc, sc);
+			  	break;
+		  }
+		  break;
+		default:
+		  _alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			"Unhandled dc %d", dc);
+		  break;
+	}
+
+	return;
+}
+
+static void _alMonoifyOffset1to4( ALshort **dsts, ALuint offset,
+				  ALvoid *srcp, ALuint size) {
+	ALshort *src = (ALshort *) srcp;
+	ALshort *dst0 = dsts[0];
+	ALshort *dst1 = dsts[1];
+	ALshort *dst2 = dsts[2];
+	ALshort *dst3 = dsts[3];
+
+	int len      = size / sizeof *src;
+        int i;
+
+	offset /= sizeof **dsts;
+	dst0 += offset;
+	dst1 += offset;
+	dst2 += offset;
+	dst3 += offset;
+
+	for(i = 0; i < len; i++) {
+		dst0[i] = src[0];
+		dst1[i] = src[0];
+		dst2[i] = src[0];
+		dst3[i] = src[0];
+
+		src++;
+	}
+
+        return;
+}
+
+
+
+static void _alMonoifyOffset2to4( ALshort **dsts, ALuint offset,
+				  ALvoid *srcp, ALuint size) {
+	ALshort *src = (ALshort *) srcp;
+	ALshort *dst0 = dsts[0];
+	ALshort *dst1 = dsts[1];
+	ALshort *dst2 = dsts[2];
+	ALshort *dst3 = dsts[3];
+
+	int len      = size / sizeof *src;
+        int i;
+
+	offset /= sizeof **dsts;
+	dst0 += offset;
+	dst1 += offset;
+	dst2 += offset;
+	dst3 += offset;
+
+	for(i = 0; i < len; i++) {
+		dst0[i] = src[0];
+		dst1[i] = src[1];
+		dst2[i] = src[0];
+		dst3[i] = src[1];
+
+		src += 2;
+	}
+
+        return;
+}
+
+
+
+static void _alMonoifyOffset4to4( ALshort **dsts, ALuint offset,
+				  ALvoid *srcp, ALuint size) {
+	ALshort *src = (ALshort *) srcp;
+	ALshort *dst0 = dsts[0];
+	ALshort *dst1 = dsts[1];
+	ALshort *dst2 = dsts[2];
+	ALshort *dst3 = dsts[3];
+
+	int len      = size / sizeof *src;
+        int i;
+
+	offset /= sizeof **dsts;
+	dst0 += offset;
+	dst1 += offset;
+	dst2 += offset;
+	dst3 += offset;
+
+	for(i = 0; i < len; i++) {
+		dst0[i] = src[0];
+		dst1[i] = src[1];
+		dst2[i] = src[2];
+		dst3[i] = src[3];
+
+		src += 4;
+	}
+
+        return;
+}
+
+
+/*
+ * _alMonoifyOffset1to2( ALshort **dsts, ALuint offset,
+ * 			 ALvoid *srcp, ALuint size)
+ *
+ * Helper function for _alMonoifyOffset.  Converts from stereo to 2 channels
+ * of buffer data.
+ */
+static void _alMonoifyOffset1to2( ALshort **dsts, ALuint offset,
+				  ALvoid *srcp, ALuint size) {
+	ALshort *src = (ALshort *) srcp;
+	ALshort *dst0 = dsts[0];
+	ALshort *dst1 = dsts[1];
+	int len      = size / sizeof *src;
+        int i;
+
+	offset /= sizeof **dsts;
+	dst0 += offset;
+	dst1 += offset;
+
+	for(i = 0; i < len; i++) {
+		dst0[i] = src[0];
+		dst1[i] = src[0];
+
+		src++;
+	}
+
+        return;
+}
+
+/*
+ * _alMonoifyOffset2to2( ALshort **dsts, ALuint offset,
+ *                       ALvoid *srcp, ALuint size )
+ *
+ * Helper function for _alMonoifyOffset.  Converts from stereo to 2 channels
+ * of buffer data.
+ */
+static void _alMonoifyOffset2to2( ALshort **dsts, ALuint offset,
+				  ALvoid *srcp, ALuint size) {
+	ALshort *src = (ALshort *) srcp;
+	ALshort *dst0 = dsts[0];
+	ALshort *dst1 = dsts[1];
+	int len      = size / sizeof *src;
+        int i;
+
+	offset /= sizeof **dsts;
+
+	dst0 += offset;
+	dst1 += offset;
+
+	for(i = 0; i < len; i++) {
+		dst0[i] = src[0];
+		dst1[i] = src[1];
+
+		src += 2;
+	}
+
+        return;
+}
+
+/*
+ * _alChannelifyOffset( ALshort *dst, ALuint offset,
+ *                      ALshort **srcs, ALuint size, ALuint nc )
+ *
+ * This function is sort of the complement of _alMonoifyOffset.  Data is
+ * copied from srcs[0..nc-1][offset/2..(offset + size)/2-1] into an
+ * interleaved array dst.
+ *
+ * assumes locked context
+ *
+ *  FIXME: handle cases with > 2 channels
+ */
+void _alChannelifyOffset( ALshort *dst, ALuint offset,
+			  ALshort **srcs, ALuint size, ALuint nc )
+{
+	switch( nc )
+	{
+		case 4:
+			_alChannelify4Offset(dst, offset, srcs, size);
+			break;
+		case 2:
+			_alChannelify2Offset(dst, offset, srcs, size);
+			break;
+		case 1:
+			memcpy( dst, srcs[0] + offset/sizeof *srcs, size );
+			break;
+		default:
+			break;
+	}
+
+	return;
+}
+
+/*
+ *  _alChannelify2Offset( ALshort *dst, ALuint offset,
+ *                        ALshort **srcs, ALuint size )
+ *
+ * This function is like ChannelifyOffset, but specificly for those cases
+ * where the number of channels in srcs is 2.
+ *
+ * assumes locked context
+ */
+void _alChannelify2Offset( ALshort *dst, ALuint offset,
+			   ALshort **srcs, ALuint size ) {
+	ALshort *src0 = &srcs[0][offset / sizeof *srcs];
+	ALshort *src1 = &srcs[1][offset / sizeof *srcs];
+	ALuint k;
+
+	size /= sizeof *dst; /* we need sample offsets */
+
+	for( k = 0; k < size; k++ ) {
+		dst[0] = src0[k];
+		dst[1] = src1[k];
+
+		dst += 2;
+	}
+
+	return;
+}
+
+/*
+ *  _alChannelify4Offset( ALshort *dst, ALuint offset,
+ *                        ALshort **srcs, ALuint size )
+ *
+ * This function is like ChannelifyOffset, but specificly for those cases
+ * where the number of channels in srcs is 4.
+ *
+ * assumes locked context
+ */
+void _alChannelify4Offset( ALshort *dst, ALuint offset,
+                           ALshort **srcs, ALuint size ) {
+        ALshort *src0 = &srcs[0][offset / sizeof *srcs];
+        ALshort *src1 = &srcs[1][offset / sizeof *srcs];
+	ALshort *src2 = &srcs[2][offset / sizeof *srcs];
+	ALshort *src3 = &srcs[3][offset / sizeof *srcs];
+        ALuint k;
+
+        size /= sizeof *dst; /* we need sample offsets */
+
+        for( k = 0; k < size; k++ ) {
+                dst[0] = src0[k];
+                dst[1] = src1[k];
+		dst[2] = src2[k];
+		dst[3] = src3[k];
+
+                dst += 4;
+        }
+
+        return;
+}
+
+
+
+/*
+ * alDeleteSources( ALsizei n, ALuint *sources )
+ *
+ * Delete n sources, with sids located in sources[0..n-1].  Only full
+ * deallocations are possible, and if one of sources[0..n-1] is not a
+ * valid source id (or is currently in an active state), and error is
+ * set and no deallocation occurs.
+ *
+ * If n is 0, this is a legal nop.  If n < 0, INVALID_VALUE is set
+ * and this is a nop.
+ */
+void alDeleteSources( ALsizei n, const ALuint *sources ) {
+	AL_source *src;
+	AL_context *cc;
+	int i;
+
+	if(n == 0) {
+		/* silently return */
+		return;
+	}
+
+	if(n < 0) {
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+		      "alDeleteSources: invalid n %d\n", n);
+
+		_alDCSetError(AL_INVALID_VALUE);
+		return;
+	}
+
+	_alcDCLockContext();
+
+	cc = _alcDCGetContext();
+        if(cc == NULL) {
+		/*
+		 * No current context with which to evaluate the
+		 * validity of the sources
+		 */
+		_alcDCUnlockContext();
+		return;
+	}
+
+	for(i = 0; i < n; i++) {
+		src = _alDCGetSource( sources[i] );
+		if(src == NULL) {
+			/* invalid source id, return. */
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			      "alDeleteSources: invalid source %d",
+			      sources[i]);
+
+			_alDCSetError( AL_INVALID_NAME );
+			_alcDCUnlockContext();
+
+			return;
+		}
+
+		if((src->state == AL_PLAYING) || (src->state == AL_PAUSED)) {
+			/*
+			 * FIXME: illegal to delete playing source?
+			 */
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			      "alDeleteSources: tried to delete playing/paused source %d",
+			      sources[i]);
+
+			_alDCSetError(AL_INVALID_OPERATION);
+			_alcDCUnlockContext();
+			return;
+		}
+
+	}
+
+	for(i = 0; i < n; i++) {
+		src = _alDCGetSource(sources[i]);
+		if(src == NULL) {
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			      "alDeleteSources: invalid source %d",
+			      sources[i]);
+
+			_alDCSetError(AL_INVALID_NAME);
+			continue;
+		}
+
+		if(src->state == AL_PLAYING) {
+			/*
+			 * FIXME: illegal to delete playing source?
+			 */
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			      "alDeleteSources: tried to del playing source %d",
+			      sources[i]);
+
+			_alDCSetError(AL_INVALID_OPERATION);
+			continue;
+		}
+
+		spool_dealloc(&cc->source_pool, sources[i],
+						_alDestroySource);
+	}
+
+	_alcDCUnlockContext();
+	return;
+}
+
+/*
+ * _alDestroySources
+ *
+ * This destructor is responsible for deallocating source data structures
+ * after openal has finished.
+ */
+void _alDestroySources(spool_t *spool) {
+	ALuint i;
+
+	for( i = 0; i < spool->size; i++ ) {
+		_alDestroyMutex( spool->smutexen[i] );
+	}
+
+
+	spool_free( spool, _alDestroySource );
+
+	free( spool->smutexen );
+	free( stereoptr );
+
+	spool->smutexen = NULL;
+	stereoptr = NULL;
+
+	return;
+}
+
+/*
+ * _alDestroySource
+ *
+ * Deallocates the memory associated with an AL_source, passed as a void *
+ * to this function.
+ *
+ * assumes locked context
+ */
+void _alDestroySource( void *srcp ) {
+	AL_source *src = (AL_source *) srcp;
+	ALuint *bidp;
+	int i;
+
+	/*
+	 * if we have a callback buffer, call the
+	 * destructor with the "free one source" args
+	 */
+	bidp = _alGetSourceParam(src, AL_BUFFER);
+	if(bidp != NULL) {
+		if(_alBidIsCallback(*bidp) == AL_TRUE) {
+			_alBidCallDestroyCallbackSource(src->sid);
+		}
+	}
+
+	/* deallocation per source scratch space */
+	free(src->srcParams.outbuf);
+	src->srcParams.outbuf = NULL;
+
+	for(i = _alcDCGetNumSpeakers() - 1; i >= 0; i--) {
+		if(src->reverb_buf[i] != NULL) {
+			/* deallocation reverb scratch space */
+			free( src->reverb_buf[i] );
+			src->reverb_buf[i] = NULL;
+		}
+	}
+
+	free( src->bid_queue.queuestate );
+	free( src->bid_queue.queue );
+
+	src->bid_queue.queue = NULL;
+	src->bid_queue.queuestate = NULL;
+	src->bid_queue.size = 0;
+
+	return;
+}
+
+/*
+ * alSourcePause( ALuint sid )
+ *
+ * If sid is a valid source name, then if the source associated with it has
+ * the state AL_PLAYING, it will be taken to the state AL_PAUSED.
+ *
+ * If sid is not a valid source name, set AL_INVALID_NAME.
+ */
+void alSourcePause( ALuint sid ) {
+	alSourcePausev( 1, &sid );
+
+	return;
+}
+
+/*
+ * alSourcePlay( ALuint sid )
+ *
+ * If sid is a valid source name, then if the source associated with it has
+ * the state AL_INITAL, AL_PAUSED, or AL_STOPPED, it will be taken to the
+ * state AL_PLAYING.
+ *
+ * If sid is not a valid source name, set AL_INVALID_NAME.
+ */
+void alSourcePlay( ALuint sid ) {
+	alSourcePlayv( 1, &sid );
+
+	return;
+}
+
+/*
+ * alSourceStop( ALuint sid )
+ *
+ * If sid is a valid source name, then if the source associated with it has
+ * the state AL_PLAYING or AL_PAUSED it will be taken to the state AL_STOPPED.
+ *
+ * If sid is not a valid source name, set AL_INVALID_NAME.
+ */
+void alSourceStop( ALuint sid ) {
+	alSourceStopv( 1, &sid );
+
+	return;
+}
+
+/*
+ * alSourceRewind( ALuint sid )
+ *
+ * If sid is a valid source name, then if the source associated with it has
+ * the state AL_PLAYING, AL_PAUSED or AL_STOPPED, it will be taken to the
+ * state AL_INITAL.
+ *
+ * If the source is playing or paused, it will first be stopped.
+ *
+ * If sid is not a valid source name, set AL_INVALID_NAME.
+ */
+void alSourceRewind( ALuint sid ) {
+	alSourceRewindv( 1, &sid );
+
+	return;
+}
+
+/*
+ * alSourceRewindv( ALsizei ns, ALuint *sids )
+ *
+ * If ns == 0, legal NOP.
+ * If ns < 0, sets AL_INVALID_VALUE.
+ *
+ * If sids[0..ns-1] are all valid source names, then for each source with
+ * state AL_PLAYING, AL_PAUSED or AL_STOPPER change the state to AL_INITAL.
+ * If sources are playing or paused, they will first be stopped.
+ *
+ * If any member of sids[0..ns-1] is not a valid source name, set
+ * AL_INVALID_NAME.
+ */
+void alSourceRewindv( ALsizei ns, const ALuint *sids ) {
+	AL_source *src;
+	ALsizei i;
+
+	if( ns == 0 ) {
+		/* legal NOP */
+		return;
+	}
+
+	if( ns < 0 ) {
+		/* set error */
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	SOURCELOCK();
+
+	/* validate */
+	for( i = 0; i < ns; i++ ) {
+		if( _alIsSource( sids[i] ) == AL_FALSE ) {
+			_alDCSetError( AL_INVALID_NAME );
+
+			SOURCEUNLOCK();
+
+			return;
+		}
+	}
+
+	_alLockMixBuf();
+
+	for( i = 0; i < ns; i++ ) {
+		src = _alDCGetSource( sids[i] );
+		if(src == NULL) {
+			/* shouldn't happen */
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+			      "alSourceRewindv: source id %d is invalid",
+			      sids[i] );
+
+			_alDCSetError( AL_INVALID_NAME );
+
+			SOURCEUNLOCK();
+			return;
+		}
+
+
+		switch( src->state ) {
+			case AL_INITIAL:
+				/* legal NOP */
+				break;
+			case AL_PAUSED:
+			case AL_PLAYING:
+				_alRemoveSourceFromMixer( sids[i] );
+			case AL_STOPPED:
+				src->state = AL_INITIAL;
+				src->srcParams.soundpos = 0;
+				break;
+		}
+	}
+
+	_alUnlockMixBuf();
+
+	SOURCEUNLOCK();
+
+	return;
+}
+
+/*
+ * alSourceStopv( ALsizei ns, ALuint *sids )
+ *
+ * If ns == 0, legal NOP.
+ * If ns < 0, sets AL_INVALID_VALUE.
+ *
+ * If sids[0..ns-1] are all valid source names, then for each source with
+ * state AL_PLAYING or AL_PAUSED change the state to AL_STOPPED.  Otherwise,
+ * set AL_INVALID_NAME.
+ */
+void alSourceStopv( ALsizei ns, const ALuint *sids ) {
+	ALsizei i;
+
+	if( ns == 0 ) {
+		/* legal NOP */
+		return;
+	}
+
+	if( ns < 0 ) {
+		/* set error */
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	SOURCELOCK();
+
+	/* validate */
+	for( i = 0; i < ns; i++ ) {
+		if( _alIsSource( sids[i] ) == AL_FALSE ) {
+			_alDCSetError( AL_INVALID_NAME );
+
+			SOURCEUNLOCK();
+
+			return;
+		}
+	}
+
+	_alLockMixBuf();
+
+	for( i = 0; i < ns; i++ ) {
+		_alRemoveSourceFromMixer( sids[i] );
+	}
+
+	_alUnlockMixBuf();
+
+	SOURCEUNLOCK();
+
+	return;
+}
+
+/*
+ * alSourcePlayv( ALsizei ns, ALuint *sids )
+ *
+ * If ns == 0, legal NOP.
+ * If ns < 0, sets AL_INVALID_VALUE.
+ *
+ * If sids[0..ns-1] are all valid source names, then for each source with
+ * state AL_INITIAL, AL_STOPPED or AL_PAUSED, change the state to AL_PLAYING.
+ * Otherwise, set AL_INVALID_NAME.
+ */
+void alSourcePlayv( ALsizei ns, const ALuint *sids ) {
+	ALsizei i;
+
+	if( ns == 0 ) {
+		/* legal NOP */
+		return;
+	}
+
+	if( ns < 0 ) {
+		/* set error */
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	SOURCELOCK();
+
+	/* validate */
+	for( i = 0; i < ns; i++ ) {
+		if( _alIsSource( sids[i] ) == AL_FALSE ) {
+			_alDCSetError( AL_INVALID_NAME );
+
+			SOURCEUNLOCK();
+
+			return;
+		}
+	}
+
+	_alLockMixBuf();
+
+	for(i = 0; i < ns; i++) {
+		_alAddSourceToMixer( sids[i] );
+	}
+
+	_alUnlockMixBuf();
+
+	SOURCEUNLOCK();
+
+	return;
+}
+
+/*
+ * alSourcePausev( ALsizei ns, ALuint *sids )
+ *
+ * If ns == 0, legal NOP.
+ * If ns < 0, sets AL_INVALID_VALUE.
+ *
+ * If sids[0..ns-1] are all valid source names, then for each source with
+ * state AL_PLAYING, change the state to AL_PAUSED.  Otherwise, set
+ * AL_INVALID_NAME.
+ *
+ */
+void alSourcePausev( ALsizei ns, const ALuint *sids ) {
+	AL_source *src;
+	ALsizei i;
+
+	if( ns == 0 ) {
+		 /* legal NOP */
+		return;
+	}
+
+	if( ns < 0 ) {
+		/* set error */
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	SOURCELOCK();
+
+	/* validate */
+	for( i = 0; i < ns; i++ ) {
+		if( _alIsSource( sids[i] ) == AL_FALSE ) {
+			_alDCSetError( AL_INVALID_NAME );
+
+			SOURCEUNLOCK();
+
+			return;
+		}
+	}
+
+	/* set */
+
+	_alLockMixBuf();
+
+	for( i = 0; i < ns; i++ ) {
+		src = _alDCGetSource( sids[i] );
+
+		/*
+		 * If source is active, set it to be paused.  Otherwise,
+		 * it's a legal NOP.
+		 */
+
+		if( src->state == AL_PLAYING ) {
+			src->state = AL_PAUSED;
+		}
+	}
+
+	_alUnlockMixBuf();
+
+	SOURCEUNLOCK();
+
+	return;
+}
+
+/*
+ * _alCollapseSource( ALuint cid, ALuint sid,
+ *                    ALuint nc, ALuint mixbuflen,
+ *                    ALshort **buffers );
+ *
+ * Populates the scratch space associated with the source named by sid in the
+ * context named by cid with interleaved data.  The data is interleaved using
+ * alternating channels from buffers[0..nc-1].  Each member of the set
+ * buffers[0..nc-1] is an indepedent channel's worth of data, 0..mixbuflen/2
+ * long bytes long.
+ *
+ * assumes locked context
+ */
+void _alCollapseSource( ALuint cid, ALuint sid,
+			ALuint nc, ALuint mixbuflen,
+			ALshort **buffers ) {
+	ALboolean islooping;
+	ALboolean isqueued;
+	AL_source *src;
+	AL_buffer *smp;
+	ALuint len;
+
+	len = mixbuflen / nc;
+
+	src = _alGetSource( cid, sid );
+	if(src == NULL) {
+		_alSetError( cid, AL_INVALID_NAME );
+		return;
+	}
+
+	smp = _alGetBufferFromSid( cid, sid );
+	if(smp == NULL) {
+		_alSetError( cid, AL_INVALID_NAME );
+		return;
+	}
+
+	islooping = _alSourceIsLooping(src);
+	isqueued  = _alSourceGetPendingBids(src) > 0;
+
+	if(src->srcParams.outbuf == NULL) {
+		src->srcParams.outbuf = malloc( mixbuflen );
+
+		if(src->srcParams.outbuf == NULL) {
+			_alSetError( cid, AL_OUT_OF_MEMORY );
+			return;
+		}
+	}
+
+	if(len > (smp->size - src->srcParams.soundpos)) {
+		if( !isqueued  && !islooping )
+		{
+			/* kludge.  dc->silence? */
+			memset(src->srcParams.outbuf, 0, mixbuflen);
+
+			/*
+			 * Non looping source get f_buffer truncated because
+			 * they don't (potentially) posses enough data.
+			 */
+			len = (smp->size - src->srcParams.soundpos);
+		}
+	}
+
+	_alChannelify(src->srcParams.outbuf, buffers, len, nc);
+
+	return;
+}
+
+/*
+ * _alInitSource( ALuint sid )
+ *
+ * Initialize an already allocated source.
+ */
+static void _alInitSource( ALuint sid ) {
+	AL_source *src;
+	AL_sourcestate *srcstate;
+	int i;
+
+	src = _alDCGetSource( sid );
+	if(src == NULL) {
+		/* sid is invalid */
+		return;
+	}
+
+	/* set state */
+	src->state = AL_INITIAL;
+
+	/* set identifier */
+	src->sid = sid;
+
+	/* set data values */
+	src->srcParams.outbuf   = NULL;
+	src->srcParams.soundpos = 0;
+	src->srcParams.new_soundpos = -1;
+	src->srcParams.new_readindex = -1;
+	src->flags              = ALS_NONE;
+	src->reverbpos          = 0;
+
+	for(i = 0; i < _ALC_MAX_CHANNELS; i++) {
+		src->reverb_buf[i] = NULL;
+	}
+
+	/* Initialize the buffer queue */
+	_alSourceQueueInit( src );
+
+	srcstate = _alSourceQueueGetCurrentState( src );
+	assert( srcstate );
+
+	_alSourceStateInit( srcstate );
+
+	/*
+	 * initialize position, direction, velocity.
+	 */
+	src->position.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_POSITION, src->position.data );
+
+	src->direction.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_DIRECTION, src->direction.data );
+
+	src->velocity.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_VELOCITY, src->velocity.data );
+
+	/*
+	 * initialize reverb kludge
+	 */
+	src->reverb_scale = 0.25;
+	src->reverb_delay = 0.00;
+
+	/*
+	 * initialize default mix rate
+	 */
+	src->mixrate = 1.0;
+	
+	/*
+	 * initialize gain
+	 */
+	src->gain.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_GAIN, &src->gain.data );
+
+	src->min_gain.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_MIN_GAIN, &src->min_gain.data );
+
+	src->max_gain.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_MAX_GAIN, &src->max_gain.data );
+
+	/* cone initializations */
+	src->cone_inner_angle.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_CONE_INNER_ANGLE,
+				  &src->cone_inner_angle.data );
+
+	src->cone_outer_angle.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_CONE_OUTER_ANGLE,
+				  &src->cone_outer_angle.data );
+
+	src->cone_outer_gain.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_CONE_OUTER_GAIN,
+				  &src->cone_outer_gain.data );
+
+	/*
+	 * initialize source relative, looping, pitch
+	 */
+
+	src->relative.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_SOURCE_RELATIVE, &src->relative.data );
+
+	src->looping.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_LOOPING, &src->looping.data );
+
+	src->pitch.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_PITCH, &src->pitch.data );
+
+	/*
+	 * initialize reference distance, max distance, rolloff factor
+	 */
+	src->reference_distance.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_REFERENCE_DISTANCE,
+				  &src->reference_distance.data );
+
+	src->max_distance.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_MAX_DISTANCE,
+				  &src->max_distance.data );
+
+	src->rolloff_factor.isset = AL_FALSE;
+	_alSourceGetParamDefault( AL_ROLLOFF_FACTOR,
+				  &src->rolloff_factor.data );
+
+	return;
+}
+
+/*
+ * _alSourceTranslate( AL_source *src, ALfloat *delta )
+ *
+ * Translates the source (src) position attribute by delta.  Delta is a three
+ * tuple x/y/z.
+ *
+ * assumes locked context
+ */
+void _alSourceTranslate( AL_source *src, ALfloat *delta ) {
+	ALfloat *opos; /* original source position */
+
+	opos = _alGetSourceParam( src, AL_POSITION );
+	if( opos == NULL ) {
+		/* no translation possible or needed */
+		return;
+	}
+
+	_alVectorTranslate( opos, opos, delta );
+
+	return;
+}
+
+/*
+ * srcParam functions
+ *
+ * The use of srcParam settings is this: most filter operations break down
+ * into applying a multiplier or delay to the raw PCM data copied in
+ * SplitSources.  Since there operations are cumulative, this can be simplified
+ * by simply collecting the coefficients of the operations and applying them
+ * all at one.  So instead of actually performing a gain or delay operation on
+ * the PCM data, the filter can change the srcParam setting, which is applied
+ * in _alSourceParamApply.
+ *
+ */
+
+/*
+ * _alSourceParamReset( AL_source *src )
+ *
+ * Resets the srcParam settings gain and delay.  Does not affect srcParam
+ * settings associated with sound position or the temporary scratch space.
+ *
+ * assumes locked context
+ */
+void _alSourceParamReset( AL_source *src ) {
+	AL_listener *lis;
+	int i;
+
+	lis = _alcDCGetListener();
+
+	if(src == NULL) {
+		return;
+	}
+
+	for(i = 0; i < _ALC_MAX_CHANNELS; i++) {
+		src->srcParams.delay[i] = 0;
+		src->srcParams.gain[i]  = 1.0;
+	}
+
+	return;
+}
+
+/*
+ * _alSourceParamApply( AL_source *src,
+ *                      ALuint nc, ALuint len, ALshort **buffers)
+ *
+ * Applies the srcParam settings of src to buffers[0..nc-1][0..(len/2)-1].
+ *
+ * This function should be called before a source is collapsed, in
+ * ApplyFilters.
+ *
+ * assumes locked context
+ *
+ * FIXME: ignores delay
+ */
+void _alSourceParamApply( AL_source *src,
+			  ALuint nc, ALuint len, ALshort **buffers ) {
+	ALuint sampLen;
+	ALuint i;
+	ALfloat gain;
+
+	sampLen = len / sizeof(ALshort); /* we pass sample length */
+
+	for(i = 0; i < nc; i++) {
+		gain = src->srcParams.gain[i];
+
+		if(gain == 1.0) {
+			/* don't floatmul when gain is 1.0 */
+			continue;
+		}
+
+		_alFloatMul( buffers[i], gain, sampLen );
+	}
+
+	return;
+}
+
+/*
+ * _alSourceGetPendingBids( AL_source *src )
+ *
+ * Returns the number of buffers queued in the source, not including the
+ * current one ( if any ).
+ */
+ALint _alSourceGetPendingBids(AL_source *src) {
+	ALint retval =  (src->bid_queue.size - 1) - src->bid_queue.read_index;
+
+	return retval;
+}
+
+/*
+ * _alSourceShouldIncrement( AL_source *src )
+ *
+ * Usually, the top-level mixing function _alMixSources handles updating each
+ * source's sound position ( a pointer into its associate buffer's raw PCM
+ * data. )  Some attributes, like pitch, demand a more sophisticated approach
+ * that can only be done by the filter which handles this attribute.
+ *
+ * _alSourceShouldIncrement returns AL_TRUE if the top-level mixing function
+ * should update this sort of state information, and AL_FALSE if it should
+ * leave it to another portion of the library.
+ *
+ * assumes locked context
+ */
+ALboolean _alSourceShouldIncrement(AL_source *src) {
+	AL_sourcestate *srcstate;
+
+	srcstate =_alSourceQueueGetCurrentState(src);
+
+	if((srcstate == NULL) || (src->flags & ALS_NEEDPITCH)) {
+		return AL_FALSE;
+	}
+
+	return AL_TRUE;
+}
+
+/*
+ * _alSourceIncrement( AL_source *src, ALuint bytes )
+ *
+ * Increments the source's (src) offset into its current buffer's PCM data.
+ */
+void _alSourceIncrement(AL_source *src, ALuint bytes) {
+	src->srcParams.soundpos += bytes;
+
+	return;
+}
+
+/*
+ * _alSourceGetBufptr( AL_source *src, AL_buffer *buf, ALuint index )
+ *
+ * Returns pointer to pcm data for buf, offset by src's soundpos.
+ *
+ * assumes locked context
+ */
+void *_alSourceGetBufptr( AL_source *src, AL_buffer *buf, ALuint ind ) {
+	ALbyte *retval;
+	ALuint pos = src->srcParams.soundpos;
+
+	retval = buf->orig_buffers[ind];
+
+	return retval + pos;
+}
+
+/*
+ * _alSourceBytesLeftByChannel( AL_source *src, AL_buffer *samp )
+ *
+ * Returns the byte length of the amount of data left before this source/samp
+ * pair will either run out of data or be required to wrap.  This returns the
+ * byte length of a simple array, with 1 channel's worth of data.
+ */
+ALint _alSourceBytesLeft(AL_source *src, AL_buffer *samp) {
+	ALuint nc = samp->num_buffers;
+
+	return nc * _alSourceBytesLeftByChannel(src, samp);
+}
+
+/*
+ * _alSourceBytesLeft(AL_source *src, AL_buffer *samp)
+ *
+ * Returns the byte length of the amount of data left before this source/samp
+ * pair will either run out of data or be required to wrap.  This returns the
+ * byte length of an interleaved array, with periodic repetition equal to the
+ * number of channels in the canonical format.
+ */
+ALint _alSourceBytesLeftByChannel(AL_source *src, AL_buffer *samp) {
+	return samp->size - src->srcParams.soundpos;
+}
+
+/*
+ *
+ * _alSourceIsQueue( AL_source * src )
+ *
+ * Returns AL_TRUE if source (src) has its queue set to AL_TRUE, AL_FALSE otherwise.
+ */
+ALboolean _alSourceIsQueue( AL_source * src ) {
+
+	if ( src->looping.isset == AL_TRUE &&
+	     src->looping.data == AL_TRUE &&
+	     src->bid_queue.size > 1 ) return AL_TRUE;
+
+	return AL_FALSE;
+}
+
+/*
+ * _alSourceIsLooping( AL_source *src )
+ *
+ * Returns AL_TRUE if the source (src) has its AL_LOOPING attribute set to
+ * AL_TRUE, AL_FALSE otherwise.
+ */
+ALboolean _alSourceIsLooping( AL_source *src ) {
+	ALboolean *boo = _alGetSourceParam( src, AL_LOOPING );
+
+	if( boo == NULL ) {
+		return AL_FALSE;
+	}
+
+	return *boo;
+}
+
+/*
+ * FL_alLockSource( UNUSED(const char *fn),
+ *                  UNUSED(int ln),
+ *                  ALuint cid,
+ *                  ALuint sid )
+ *
+ * Locks source sid at cid.
+ */
+ALboolean FL_alLockSource( UNUSED(const char *fn),
+			   UNUSED(int ln),
+			   ALuint cid,
+			   ALuint sid ) {
+	ALint sindex;
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if( cc == NULL ) {
+		return AL_FALSE;
+	}
+
+	_alLockPrintf("_alLockSource", fn, ln);
+
+	sindex = spool_sid_to_index( &cc->source_pool, sid );
+	if( sindex < 0 ) {
+		/* invalid sid */
+		return AL_FALSE;
+	}
+
+	if( cc->source_pool.smutexen[sindex] == NULL ) {
+		return AL_FALSE;
+	}
+
+	_alLockMutex( cc->source_pool.smutexen[sindex] );
+
+	return AL_TRUE;
+}
+
+/*
+ * FL_alUnlockSource( UNUSED(const char *fn),
+ *                    UNUSED(int ln),
+ *                    ALuint cid,
+ *                    ALuint sid )
+ *
+ * Unlocks source mutex for sid at cid.
+ */
+ALboolean FL_alUnlockSource( UNUSED(const char *fn),
+			     UNUSED(int ln),
+			     ALuint cid,
+			     ALuint sid ) {
+	ALint sindex;
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if( cc == NULL ) {
+		return AL_FALSE;
+	}
+
+	_alLockPrintf("_alUnlockSource", fn, ln);
+
+	sindex = spool_sid_to_index( &cc->source_pool, sid );
+	if( sindex < 0 ) {
+		/* invalid sid */
+		return AL_FALSE;
+	}
+
+	if( cc->source_pool.smutexen[sindex] == NULL ) {
+		return AL_FALSE;
+	}
+
+	_alUnlockMutex( cc->source_pool.smutexen[sindex] );
+
+	return AL_TRUE;
+}
+
+/*
+ * _alGetSourceParam( AL_source *source, ALenum param )
+ *
+ * Returns a pointer to the source attribute specified by param.  If the
+ * attribute has not been set by the application, NULL is returned.
+ *
+ * NOTES:
+ *  This returns NULL if the paramater specified by param hasn't
+ *  been set, so that the calling function can determine what it
+ *  thinks a sensible default should be.  Perhaps it would be
+ *  best to have a set of default variables here and return their
+ *  value when need be?
+ */
+void *_alGetSourceParam(AL_source *source, ALenum param )
+{
+	if( _alSourceIsParamSet( source, param ) == AL_FALSE )
+	{
+		if(param == AL_BUFFER)
+			assert(0);
+
+		return NULL;
+	}
+
+	switch( param )
+	{
+		case AL_BUFFER:
+			if( source->bid_queue.read_index >=
+			    source->bid_queue.size )
+			{
+				int size = source->bid_queue.size;
+
+				/* often the case for size one queues */
+				return &source->bid_queue.queue[size - 1];
+			}
+			else
+			if( source->bid_queue.size > 0 )
+			{
+				int rind = source->bid_queue.read_index;
+
+				assert(rind < source->bid_queue.size);
+				return &source->bid_queue.queue[rind];
+			}
+			else
+			{
+				_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+					"_alGetSourceState: bid_queue.size == %d",
+				source->bid_queue.size);
+			}
+			break;
+		case AL_CONE_INNER_ANGLE:
+			return &source->cone_inner_angle.data;
+			break;
+		case AL_CONE_OUTER_ANGLE:
+			return &source->cone_outer_angle.data;
+			break;
+		case AL_CONE_OUTER_GAIN:
+			return &source->cone_outer_gain.data;
+			break;
+		case AL_DIRECTION:
+			return &source->direction.data;
+			break;
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+			return &source->gain.data;
+			break;
+		case AL_LOOPING:
+			return &source->looping.data;
+			break;
+		case AL_PITCH:
+			return &source->pitch.data;
+			break;
+		case AL_POSITION:
+			return &source->position.data;
+			break;
+		case AL_SOURCE_RELATIVE:
+			return &source->relative.data;
+			break;
+		case AL_VELOCITY:
+			return &source->velocity.data;
+			break;
+		case AL_MIN_GAIN:
+		 	return &source->min_gain.data;
+			break;
+		case AL_MAX_GAIN:
+			return &source->max_gain.data;
+			break;
+		case AL_SOURCE_STATE:
+			return &source->state;
+			break;
+		case AL_REFERENCE_DISTANCE:
+			return &source->reference_distance.data;
+			break;
+		case AL_MAX_DISTANCE:
+			return &source->max_distance.data;
+			break;
+		case AL_ROLLOFF_FACTOR:
+			return &source->rolloff_factor.data;
+			break;
+		default:
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+				"unknown source param 0x%x", param);
+
+			assert( 0 );
+
+			break;
+	}
+
+		if(param == AL_BUFFER)
+			assert(0);
+	return NULL;
+}
+
+/*
+ * _alSourceIsParamSet( AL_source *source, ALenum param )
+ *
+ * Returns AL_TRUE if param is set for source, AL_FALSE otherwise.
+ */
+ALboolean _alSourceIsParamSet( AL_source *source, ALenum param ) {
+	switch( param ) {
+		case AL_BUFFER:
+		case AL_SOURCE_STATE:
+			return AL_TRUE;
+		case AL_CONE_INNER_ANGLE:
+			return source->cone_inner_angle.isset;
+		case AL_CONE_OUTER_ANGLE:
+			return source->cone_outer_angle.isset;
+		case AL_CONE_OUTER_GAIN:
+			return source->cone_outer_gain.isset;
+		case AL_DIRECTION:
+			return source->direction.isset;
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+			return source->gain.isset;
+		case AL_LOOPING:
+			return source->looping.isset;
+		case AL_PITCH:
+			return source->pitch.isset;
+		case AL_POSITION:
+			return source->position.isset;
+		case AL_SOURCE_RELATIVE:
+			return source->relative.isset;
+		case AL_VELOCITY:
+			return source->velocity.isset;
+		case AL_MIN_GAIN:
+			return source->min_gain.isset;
+		case AL_MAX_GAIN:
+			return source->max_gain.isset;
+		case AL_REFERENCE_DISTANCE:
+			return source->reference_distance.isset;
+		case AL_MAX_DISTANCE:
+			return source->max_distance.isset;
+		case AL_ROLLOFF_FACTOR:
+			return source->rolloff_factor.isset;
+		default:
+			_alDebug(ALD_SOURCE, __FILE__, __LINE__,
+				"unknown source param 0x%x", param);
+			return AL_FALSE;
+	}
+}
+
+/*
+ * _alSourceGetParamDefault( ALenum param, ALvoid *retref )
+ *
+ * Sets retref to the default value for param.
+ */
+void _alSourceGetParamDefault( ALenum param, ALvoid *retref ) {
+	ALint *ip     = retref;
+	ALboolean *bp = retref;
+	ALfloat *fp   = retref;
+	Rcvar pref    = NULL;
+
+	switch( param ) {
+		case AL_BUFFER:
+			*ip = 0;
+			break;
+		case AL_CONE_INNER_ANGLE:
+		case AL_CONE_OUTER_ANGLE:
+			*fp = 360.0f;
+			break;
+		case AL_MIN_GAIN:
+		case AL_CONE_OUTER_GAIN:
+			*fp = 0.0f;
+			break;
+		case AL_GAIN:
+		case AL_GAIN_LINEAR_LOKI:
+		case AL_MAX_GAIN:
+		case AL_PITCH:
+		case AL_REFERENCE_DISTANCE:
+			*fp = 1.0f;
+			break;
+		case AL_ROLLOFF_FACTOR:
+			/*
+			 * check user preference.  If set, use that.
+			 * Otherwise, use the default of 1.0f
+			 */
+			pref = rc_lookup( "source-rolloff-factor" );
+			if( pref != NULL ) {
+				*fp = rc_tofloat( pref );
+			}  else {
+				*fp = 1.0f;
+			}
+			break;
+		case AL_DIRECTION:
+		case AL_POSITION:
+		case AL_VELOCITY:
+			fp[0] = 0.0f;
+			fp[1] = 0.0f;
+			fp[2] = 0.0f;
+			break;
+		case AL_LOOPING:
+		case AL_SOURCE_RELATIVE:
+			*bp = AL_FALSE;
+			break;
+		case AL_MAX_DISTANCE:
+			*fp = FLT_MAX;
+			break;
+		case AL_SOURCE_STATE:
+		default:
+			assert( 0 );
+			break;
+	}
+}
+
+/*
+ * _alSourceGetNextBuffer( AL_source *src )
+ *
+ * Returns the next buffer in a queue, or NULL if no next buffer exists.
+ * Assumes locked source.
+ *
+ */
+AL_buffer *_alSourceGetNextBuffer( AL_source *src )
+{
+	assert( src );
+
+	if(src->bid_queue.read_index < src->bid_queue.size - 1)
+	{
+		ALuint ri  = src->bid_queue.read_index;
+		ALuint bid = src->bid_queue.queue[ri];
+
+		return _alGetBuffer(bid);
+	}
+
+	return NULL;
+}
+
+/*
+ * _alSourceQueuedBuffers( AL_source *src )
+ *
+ * Returns the total number of buffers queued for the source,
+ * without regard to the read or write pointer.
+ */
+ALint _alSourceQueuedBuffers( AL_source *src )
+{
+	assert( src );
+
+	return src->bid_queue.size;
+}
Index: /openal-0.0.8/src/al_source.h
===================================================================
--- /openal-0.0.8/src/al_source.h	(revision 17)
+++ /openal-0.0.8/src/al_source.h	(revision 17)
@@ -0,0 +1,230 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_source.h
+ *
+ * Prototypes, macros and definitions related to the creation and
+ * management of sources.
+ *
+ */
+#ifndef _AL_SOURCE_H_
+#define _AL_SOURCE_H_
+
+#include <stdio.h>
+
+#include "al_types.h"
+
+/*
+ * Non locking version of alIsSource.
+ */
+ALboolean _alIsSource( ALuint sid );
+
+/*
+ * Returns AL_source named by sid from context named by cid.
+ */
+AL_source *_alGetSource( ALuint cid, ALuint sid );
+
+/*
+ * Returns a pointer to the attribute specified by param in the AL_source
+ * object *source, or NULL if the attribute is invalid or has not been set.
+ */
+void *_alGetSourceParam( AL_source *source, ALenum param );
+
+/*
+ * Returns AL_TRUE if param is a valid source attribute and has been set in
+ * source, AL_FALSE otherwise.
+ */
+ALboolean _alSourceIsParamSet( AL_source *source, ALenum param );
+
+/*
+ * Populates *retref with the default value for source attribute param.  If
+ * param is not a valid source attribute, no action is taken.
+ */
+void _alSourceGetParamDefault( ALenum param, ALvoid *retref );
+
+/*
+ * Finalize a source object.
+ */
+void _alDestroySource( ALvoid *src );
+
+/*
+ * Finalize each source object referenced in spool ( see al_spool.h for more
+ * information about source pool objects and their relationship to AL_sources).
+ */
+void _alDestroySources( spool_t *spool );
+
+/*
+ * Populate buffs[0..nc-1][0..len/2-1] with data from buf, with offset into
+ * buf given by the position associated with the source named by sid in the
+ * context named by cid.
+ *
+ * This function delegates to static functions in the case of looping or
+ * callback sounds.
+ */
+void _alSplitSources( ALuint cid, ALuint sid,
+		      ALint nc, ALuint len,
+		      AL_buffer *buf, ALshort **buffs );
+
+/*
+ * Populates the scratch space associated with the source named by sid in the
+ * context named by cid with interleaved data.  The data is interleaved using
+ * alternating channels from buffers[0..nc-1].  Each member of the set
+ * buffers[0..nc-1] is an indepedent channel's worth of data, 0..mixbuflen/2
+ * long bytes long.
+ */
+void _alCollapseSource( ALuint cid, ALuint sid,
+			ALuint nc, ALuint mixbuflen,
+			ALshort **buffers );
+
+
+/*
+ * Translates the source (src) position attribute by delta.  Delta is a three
+ * tuple x/y/z.
+ */
+void _alSourceTranslate( AL_source *src, ALfloat *delta );
+
+/*
+ * srcParam functions
+ *
+ * The use of srcParam settings is this: most filter operations break down
+ * into applying a multiplier or delay to the raw PCM data copied in
+ * SplitSources.  Since there operations are cumulative, this can be simplified
+ * by simply collecting the coefficients of the operations and applying them
+ * all at one.  So instead of actually performing a gain or delay operation on
+ * the PCM data, the filter can change the srcParam setting, which is applied
+ * in _alSourceParamApply.
+ *
+ */
+
+/*
+ * Resets the srcParam settings gain and delay.  Does not affect srcParam
+ * settings associated with sound position or the temporary scratch space.
+ */
+void _alSourceParamReset( AL_source *src );
+
+/*
+ * Applies the srcParam settings of src to buffers[0..nc-1][0..(len/2)-1].
+ */
+void _alSourceParamApply( AL_source *src,
+			  ALuint nc, ALuint len, ALshort **buffers );
+
+/*
+ * Returns the number of buffers queued in the source, not including the
+ * current one ( if any ).
+ */
+ALint _alSourceGetPendingBids( AL_source *src );
+
+/*
+ * Returns the next buffer in a queue, or NULL if no next buffer exists.
+ * Assumes locked source.
+ *
+ */
+AL_buffer *_alSourceGetNextBuffer( AL_source *src );
+
+/*
+ * Returns the total number of buffers queued for the source,
+ * without regard to the read or write pointer.
+ */
+ALint _alSourceQueuedBuffers( AL_source *src );
+
+/*
+ * Copies the interleaved data from src[0..(src_size/2)-1] to
+ * dstret[0..dest_channels-1], splitting it into seperate channels.
+ * src_channels describes the period of the channel repetition in src,
+ * dest_channels describes the number of independant buffers in dstref.
+ * src_size is the size of src in bytes, and offset is the offset into each
+ * seperate channel in dstref where the copying begins.
+ */
+void _alMonoifyOffset( ALshort **dstref, ALuint offset,
+		       ALvoid *src, ALuint src_size,
+		       ALuint dest_channels, ALuint src_channels );
+
+/*
+ * This function is sort of the complement of _alMonoifyOffset.  Data is
+ * copied from srcs[0..nc-1][offset/2..(offset + size)/2-1] into an
+ * interleaved array dst.
+ */
+void _alChannelifyOffset( ALshort *dst, ALuint offset,
+			  ALshort **srcs, ALuint size, ALuint nc );
+
+
+/*
+ * Usually, the top-level mixing function _alMixSources handles updating each
+ * source's sound position ( a pointer into its associate buffer's raw PCM
+ * data. )  Some attributes, like pitch, demand a more sophisticated approach
+ * that can only be done by the filter which handles this attribute.
+ *
+ * _alSourceShouldIncrement returns AL_TRUE if the top-level mixing function
+ * should update this sort of state information, and AL_FALSE if it should
+ * leave it to another portion of the library.
+ */
+ALboolean _alSourceShouldIncrement( AL_source *src );
+
+/*
+ * Increments the source's (src) offset into its current buffer's PCM data.
+ */
+void _alSourceIncrement( AL_source *src, ALuint bytes );
+
+/*
+ * Returns the byte length of the amount of data left before this source/samp
+ * pair will either run out of data or be required to wrap.  This returns the
+ * byte length of an interleaved array, with periodic repetition equal to the
+ * number of channels in the canonical format.
+ */
+ALint _alSourceBytesLeft( AL_source *src, AL_buffer *samp );
+
+/*
+ * Returns the byte length of the amount of data left before this source/samp
+ * pair will either run out of data or be required to wrap.  This returns the
+ * byte length of a simple array, with 1 channel's worth of data.
+ */
+ALint _alSourceBytesLeftByChannel( AL_source *src, AL_buffer *samp );
+
+/*
+ * Returns AL_TRUE if the source (src) has its queue set to AL_TRUE,
+ * AL_FALSE otherwise.
+ */
+ALboolean _alSourceIsQueue( AL_source * src );
+
+/*
+ * Returns AL_TRUE if the source (src) has its AL_LOOPING attribute set to
+ * AL_TRUE, AL_FALSE otherwise.
+ */
+ALboolean _alSourceIsLooping( AL_source *src );
+
+/*
+ * Locks the mutex guarding source sid in context cid, and passes fn and ln
+ * to _alLockPrintf for debugging purposes.
+ */
+ALboolean FL_alLockSource( const char *fn, int ln, ALuint cid, ALuint sid );
+
+/*
+ * Unlocks the mutex guarding source sid in context cid, and passes fn and ln
+ * to _alLockPrintf for debugging purposes.
+ */
+ALboolean FL_alUnlockSource( const char *fn, int ln, ALuint cid, ALuint sid );
+
+/* macros */
+#define _alDCGetSource(i)              _alGetSource(_alcCCId, i)
+#define _alChannelify(d,srcs,size,nc)  _alChannelifyOffset(d, 0, srcs, size, nc)
+#define _alMonoify(d, s, size, dc, sc) _alMonoifyOffset(d, 0, s, size, dc, sc)
+#define _alLockSource(cid, sid)        FL_alLockSource(__FILE__, __LINE__, cid, sid)
+#define _alUnlockSource(cid, sid)      FL_alUnlockSource(__FILE__, __LINE__, cid, sid)
+#define _alDCLockSource(sid)           FL_alLockSource(__FILE__, __LINE__, _alcCCId, sid)
+#define _alDCUnlockSource(sid)         FL_alUnlockSource(__FILE__, __LINE__, _alcCCId, sid)
+
+#ifdef PARANOID_LOCKING
+#define SOURCELOCK()   _alcDCLockContext()
+#define SOURCEUNLOCK() _alcDCUnlockContext()
+#else
+#define SOURCELOCK()
+#define SOURCEUNLOCK()
+#endif
+
+/*
+ * AL_FIRST_SOURCE_ID is the first integer value at which source names are
+ * created.
+ */
+#define AL_FIRST_SOURCE_ID  0x4000
+
+#endif /* _AL_SOURCE_H_ */
Index: /openal-0.0.8/src/al_spool.c
===================================================================
--- /openal-0.0.8/src/al_spool.c	(revision 17)
+++ /openal-0.0.8/src/al_spool.c	(revision 17)
@@ -0,0 +1,225 @@
+#include "al_siteconfig.h"
+
+#include <stdlib.h>
+#include <sys/types.h>
+
+#include "al_debug.h"
+#include "al_source.h"
+#include "al_spool.h"
+
+/*
+ *  Resize spool to at least newsize units
+ */
+ALboolean spool_resize(spool_t *spool, size_t newsize) {
+	void *temp;
+	unsigned int i;
+
+	if(newsize < 1) {
+		newsize = 1;
+	}
+
+	if(spool->size >= newsize) {
+		return AL_TRUE; /* no resize needed */
+	}
+
+	/*
+	 * Resize the AL_source pool.
+	 */
+	temp = realloc(spool->pool, newsize * sizeof *spool->pool);
+	if(temp == NULL) {
+		return AL_FALSE; /* could not realloc */
+	}
+	spool->pool = temp;
+
+	/*
+	 * Resize the sid -> index map.
+	 */
+	temp = realloc(spool->map, newsize * sizeof *spool->map);
+	if(temp == NULL) {
+		return AL_FALSE; /* could not resize map */
+	}
+	spool->map = temp;
+
+	/*
+	 * Resize the mutex locks
+	 */
+	temp = realloc( spool->smutexen, newsize * sizeof *spool->smutexen );
+	if( temp == NULL ) {
+		return AL_FALSE;
+	}
+	spool->smutexen = temp;
+
+	/*
+	 * set defaults for newly allocated stuff
+	 */
+	for(i = spool->size; i < newsize; i++) {
+		spool->pool[i].inuse = AL_FALSE;       /* use flag  */
+		spool->map[i] = 0;                     /* unset sid */
+		spool->smutexen[i] = _alCreateMutex();  /* new mutex */
+	}
+
+	spool->size = newsize;
+
+	return AL_TRUE;
+}
+
+/*
+ *  Reserve an AL_source in spool, returning the index of the AL_source,
+ *  and mark it in use.  Return -1 if no reservation is possible.
+ */
+int spool_alloc(spool_t *spool) {
+	int sindex;
+
+	sindex = spool_first_free_index(spool);
+	if(sindex == -1) {
+		if(spool_resize(spool, spool->size * 2) == AL_FALSE) {
+			return -1;
+		}
+
+		sindex = spool_first_free_index(spool);
+	}
+
+	spool->pool[sindex].inuse = AL_TRUE;
+	spool->map[sindex] = spool_next_id();
+
+	return spool->map[sindex];
+}
+
+/*
+ *  Get the AL_source from sourcepool spool at index index, if
+ *  it's in use.  Otherwise, return NULL.
+ */
+AL_source *spool_index(spool_t *spool, ALuint sid) {
+	int sindex;
+
+	sindex = spool_sid_to_index(spool, sid);
+
+	if(sindex < 0) {
+		return NULL;
+	}
+
+	if(sindex >= (int) spool->size) {
+		return NULL;
+	}
+
+	if(spool->pool[sindex].inuse == AL_FALSE) {
+		return NULL;
+	}
+
+	return &spool->pool[sindex].data;
+}
+
+int spool_first_free_index(spool_t *spool) {
+	unsigned int i;
+
+	for(i = 0; i < spool->size; i++) {
+		if(spool->pool[i].inuse == AL_FALSE) {
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+ALboolean spool_dealloc(spool_t *spool, ALuint sid,
+				void (*freer_func)(void *)) {
+	AL_source *src;
+	int sindex;
+
+	sindex = spool_sid_to_index(spool, sid);
+	if(sindex < 0) {
+		/* sid is invalid */
+		return AL_FALSE;
+	}
+
+	if(sindex >= (int) spool->size) {
+		return AL_FALSE;
+	}
+
+	src = spool_index(spool, sid);
+	if(src == NULL) {
+		_alDebug(ALD_SOURCE,
+			__FILE__, __LINE__,
+			"sid %d is a bad index", sid);
+		return AL_FALSE;
+	}
+
+	if(spool->pool[sindex].inuse == AL_FALSE) {
+		/* already deleted */
+		return AL_FALSE;
+	}
+
+	freer_func(src);
+
+	spool->pool[sindex].inuse = AL_FALSE;
+
+	return AL_TRUE;
+}
+
+void spool_free(spool_t *spool, void (*freer_func)(void *)) {
+	unsigned int i;
+	ALuint sid;
+
+	for(i = 0; i < spool->size; i++) {
+		if(spool->pool[i].inuse == AL_TRUE) {
+			sid = spool->pool[i].data.sid;
+
+			spool_dealloc(spool, sid, freer_func);
+		}
+	}
+
+	if(spool->pool != NULL) {
+		free(spool->pool);
+		spool->pool = NULL;
+	}
+
+	if(spool->map != NULL) {
+		free(spool->map);
+		spool->map = NULL;
+	}
+
+	spool->size = 0;
+
+	/* let the caller free spool itself */
+	return;
+}
+
+void spool_init(spool_t *spool) {
+	if(spool == NULL) {
+		return;
+	}
+
+	spool->size     = 0;
+	spool->pool     = NULL;
+	spool->map      = NULL;
+	spool->smutexen = NULL;
+
+	return;
+}
+
+/*
+ * Get unique id.
+ */
+ALuint spool_next_id(void) {
+	static ALuint id = AL_FIRST_SOURCE_ID;
+
+	return ++id;
+}
+
+/*
+ * Convert the sid to an index in spool's pool.  This is
+ * to enable unique sids but reuse the indexes.
+ *
+ * FIXME: use binary search.
+ */
+int spool_sid_to_index(spool_t *spool, ALuint sid) {
+	unsigned int i;
+
+	for(i = 0; i < spool->size; i++) {
+		if(spool->map[i] == sid) {
+			return i;
+		}
+	}
+
+	return -1;
+}
Index: /openal-0.0.8/src/al_spool.h
===================================================================
--- /openal-0.0.8/src/al_spool.h	(revision 17)
+++ /openal-0.0.8/src/al_spool.h	(revision 17)
@@ -0,0 +1,77 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_spool.h
+ *
+ * Prototypes, macros and definitions related to the management of spool
+ * objects.  spool objects are objects which ease the slab allocation of
+ * AL_source objects.
+ *
+ */
+#ifndef _AL_SPOOL_H_
+#define _AL_SPOOL_H_
+
+#include "al_types.h"
+
+#include <sys/types.h>
+
+/*
+ * source pool stuff
+ *
+ * overcomplicated method of pooling sources to avoid memory
+ * fragmentation.
+ *
+ */
+
+/*
+ * Creates, initializes and returns source pool object.
+ */
+void spool_init( spool_t *spool );
+
+/*
+ * Allocates a source pool node and returns and index that can be used in
+ * other spool_ calls.
+ */
+int spool_alloc( spool_t *spool );
+
+/*
+ * Deallocates all source pool nodes in a source pool object.
+ */
+void spool_free( spool_t *spool, void (*freer_func)(void *) );
+
+/*
+ * Returns the index of first unused source pool node.
+ */
+int spool_first_free_index( spool_t *spool );
+
+/*
+ * retrieve the source pool node associated with sindex from the source pool
+ * object spool.
+ */
+AL_source *spool_index( spool_t *spool, ALuint sindex );
+
+/*
+ * Converts an AL_source name (sid) to the source pool node index suitable
+ * for passing to spool_index.
+ */
+int spool_sid_to_index( spool_t *spool, ALuint sid );
+
+/*
+ * Returns next suitable AL_source name (id) suitable for using in
+ * al calls ( alSourcei( sid, ... ), etc )
+ */
+ALuint spool_next_id( void );
+
+/*
+ * Finalizes a source pool node, keyed off of sid, in spool, using freer_func.
+ */
+ALboolean spool_dealloc( spool_t *spool, ALuint sid,
+				void (*freer_func)(void *) );
+
+/*
+ * Increases the size of source pool object spool to accomodate at least size
+ * source pool nodes.
+ */
+ALboolean spool_resize( spool_t *spool, size_t size );
+
+#endif /* AL_SPOOL_H_ */
Index: /openal-0.0.8/src/al_state.c
===================================================================
--- /openal-0.0.8/src/al_state.c	(revision 17)
+++ /openal-0.0.8/src/al_state.c	(revision 17)
@@ -0,0 +1,290 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_state.c
+ *
+ * Per-context state management.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+#include "al_distance.h"
+#include "al_error.h"
+#include "al_ext.h"
+
+/*
+ * A few general remarks about the code below:
+ *
+ *    * When there is no current context, we set an AL_INVALID_OPERATION. Even
+ *      without a context for recording this error, this is nice for
+ *      debugging.
+ *
+ *    * As a general contract with the user, we never modify any data via
+ *      pointers if an error condition occurs.
+ *
+ *    * Getting and locking the context should be done in a single atomic
+ *      operation, but our internal API is not yet capable of this.
+ *
+ *    * We should somehow hook in the extension mechanism here.
+ *
+ */
+
+void
+alEnable( ALenum param )
+{
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError( AL_INVALID_OPERATION );
+		return;
+	}
+	_alcDCLockContext();
+
+	switch (param) {
+	default:
+		_alDCSetError( AL_INVALID_ENUM );
+		break;
+	}
+
+	_alcDCUnlockContext();
+}
+
+void
+alDisable( ALenum param )
+{
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError( AL_INVALID_OPERATION );
+		return;
+	}
+	_alcDCLockContext();
+
+	switch (param) {
+	default:
+		_alDCSetError( AL_INVALID_ENUM );
+		break;
+	}
+
+	_alcDCUnlockContext();
+}
+
+ALboolean
+alIsEnabled( ALenum param )
+{
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError( AL_INVALID_OPERATION );
+		return AL_FALSE;
+	}
+	_alcDCLockContext();
+
+	switch (param) {
+	default:
+		_alDCSetError( AL_INVALID_ENUM );
+		break;
+	}
+
+	_alcDCUnlockContext();
+	return AL_FALSE;
+}
+
+const ALchar*
+alGetString( ALenum param )
+{
+	const ALchar *value;
+	ALchar extensions[1024]; /* TODO: Ugly! */
+
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError( AL_INVALID_OPERATION );
+		return NULL;
+	}
+	_alcDCLockContext();
+
+	switch (param) {
+	case AL_VERSION:
+		value = "1.1";
+		break;
+	case AL_RENDERER:
+		value = "Software";
+		break;
+	case AL_VENDOR:
+		value = "OpenAL Community";
+		break;
+	case AL_EXTENSIONS:
+		_alGetExtensionStrings( extensions, sizeof( extensions ) );
+		value = extensions;
+		break;
+	case AL_NO_ERROR:
+		value = "No Error";
+		break;
+	case AL_INVALID_NAME:
+		value = "Invalid Name";
+		break;
+	case AL_INVALID_ENUM:
+		value = "Invalid Enum";
+		break;
+	case AL_INVALID_VALUE:
+		value = "Invalid Value";
+		break;
+	case AL_INVALID_OPERATION:
+		value = "Invalid Operation";
+		break;
+	case AL_OUT_OF_MEMORY:
+		value = "Out of Memory";
+		break;
+	default:
+		value = NULL;
+		_alDCSetError( AL_INVALID_ENUM );
+		break;
+	}
+
+	_alcDCUnlockContext();
+	return value;
+}
+
+#define MAX_DATA_ENTRIES_FILLED 1
+
+/* everything is better than code duplication, even macros... */
+
+#define DEFINE_GETTER(type,conv,namev,name)		\
+void							\
+namev( ALenum param, type *data )			\
+{							\
+	AL_context *cc = _alcDCGetContext();		\
+	if( cc == NULL ) {				\
+		_alDCSetError( AL_INVALID_OPERATION );	\
+		return;					\
+	}						\
+	_alcDCLockContext();				\
+							\
+	switch( param ) {				\
+	case AL_DOPPLER_FACTOR:				\
+		data[0] = conv(cc->doppler_factor);	\
+		break;					\
+	case AL_DOPPLER_VELOCITY:			\
+		data[0] = conv(cc->doppler_velocity);	\
+		break;					\
+	case AL_SPEED_OF_SOUND:				\
+		data[0] = conv(cc->speed_of_sound);	\
+		break;					\
+	case AL_DISTANCE_MODEL:				\
+		data[0] = conv(cc->distance_model);	\
+		break;					\
+	default:					\
+		_alDCSetError( AL_INVALID_ENUM );	\
+		break;					\
+	}						\
+							\
+	_alcDCUnlockContext();				\
+}							\
+							\
+type							\
+name( ALenum param )					\
+{							\
+	type buf[MAX_DATA_ENTRIES_FILLED];		\
+	namev(param, buf);				\
+	return buf[0];					\
+}
+
+#define CONV_BOOLEAN(x) ((x) ? AL_TRUE : AL_FALSE)
+#define CONV_INTEGER(x) ((ALint)(x))
+#define CONV_FLOAT(x)   ((ALfloat)(x))
+#define CONV_DOUBLE(x)  ((ALdouble)(x))
+
+DEFINE_GETTER(ALboolean,CONV_BOOLEAN,alGetBooleanv,alGetBoolean)
+DEFINE_GETTER(ALint,CONV_INTEGER,alGetIntegerv,alGetInteger)
+DEFINE_GETTER(ALfloat,CONV_FLOAT,alGetFloatv,alGetFloat)
+DEFINE_GETTER(ALdouble,CONV_DOUBLE,alGetDoublev,alGetDouble)
+
+#undef DEFINE_GETTER
+
+void
+alDopplerFactor( ALfloat value )
+{
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError( AL_INVALID_OPERATION );
+		return;
+	}
+	_alcDCLockContext();
+
+	if( value < 0.0f ) {
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+		return;
+	}
+	cc->doppler_factor = value;
+
+	_alcDCUnlockContext();
+}
+
+void
+alDopplerVelocity( ALfloat value )
+{
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError( AL_INVALID_OPERATION );
+		return;
+	}
+	_alcDCLockContext();
+
+	if( value <= 0.0f ) {
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+		return;
+	}
+	cc->doppler_velocity = value;
+
+	_alcDCUnlockContext();
+}
+
+void
+alSpeedOfSound( ALfloat value )
+{
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError( AL_INVALID_OPERATION );
+		return;
+	}
+	_alcDCLockContext();
+
+	if( value <= 0.0f ) {
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+		return;
+	}
+	cc->speed_of_sound = value;
+
+	_alcDCUnlockContext();
+}
+
+void
+alDistanceModel( ALenum distanceModel )
+{
+	AL_context *cc = _alcDCGetContext();
+	if( cc == NULL ) {
+		_alDCSetError( AL_INVALID_OPERATION );
+		return;
+	}
+	_alcDCLockContext();
+
+	switch( distanceModel ) {
+	case AL_NONE:
+	case AL_INVERSE_DISTANCE:
+	case AL_INVERSE_DISTANCE_CLAMPED:
+	case AL_LINEAR_DISTANCE:
+	case AL_LINEAR_DISTANCE_CLAMPED:
+	case AL_EXPONENT_DISTANCE:
+	case AL_EXPONENT_DISTANCE_CLAMPED:
+		cc->distance_model = distanceModel;
+		_alUpdateDistanceModel(cc);
+		break;
+	default:
+		_alDCSetError( AL_INVALID_ENUM );
+		break;
+	}
+
+	_alcDCUnlockContext();
+}
Index: /openal-0.0.8/src/al_threadlib.c
===================================================================
--- /openal-0.0.8/src/al_threadlib.c	(revision 17)
+++ /openal-0.0.8/src/al_threadlib.c	(revision 17)
@@ -0,0 +1,191 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_threadlib.c
+ */
+
+#include <stdlib.h>
+#include "al_threadlib.h"
+
+#if defined(USE_POSIXTHREADING)
+
+typedef int ( *ptfunc ) ( void * );
+
+static void *runThread( void *data ) AL_ATTRIBUTE_NORETURN_;
+
+static void *runThread( void *data )
+{
+	ptfunc fn = ( ptfunc ) data;
+	fn( NULL );
+	pthread_exit( NULL );
+#ifndef HAVE___ATTRIBUTE__
+	return NULL;
+#endif
+}
+
+ThreadID _alCreateThread( int ( *fn ) ( void * ) )
+{
+	pthread_attr_t type;
+	pthread_t *thread = malloc( sizeof *thread );
+	if( thread == NULL ) {
+		return NULL;
+	}
+
+	if( pthread_attr_init( &type ) != 0 ) {
+		free( thread );
+		return NULL;
+	}
+
+	pthread_attr_setdetachstate( &type, PTHREAD_CREATE_JOINABLE );
+
+	if( pthread_create( thread, &type, runThread, ( void * ) fn ) != 0 ) {
+		free( thread );
+		return NULL;
+	}
+
+	return thread;
+}
+
+int _alWaitThread( ThreadID thread )
+{
+	int retval = pthread_join( *thread, NULL );
+	free( thread );
+	return retval;
+}
+
+unsigned int _alSelfThread( void )
+{
+	return ( unsigned int ) pthread_self(  );
+}
+
+void _alExitThread( void )
+{
+	pthread_exit( NULL );
+}
+
+#elif defined(USE_WINDOWSTHREADING)
+
+/* for _alMicroSleep */
+#include "al_main.h"
+
+ThreadID _alCreateThread( int ( *fn ) ( void * ) )
+{
+	DWORD dummy;
+	return CreateThread( NULL, 0, ( LPTHREAD_START_ROUTINE ) fn, NULL, 0,
+			     &dummy );
+}
+
+int _alWaitThread( ThreadID thread )
+{
+	int tries = 20;		/* gets tries iterations before we nuke it */
+	const int interval = 40000;
+
+	do {
+		DWORD ExitCode;
+		if( GetExitCodeThread( thread, &ExitCode ) == 0 ) {
+			break;
+		}
+
+		/* thread is still running, be nice and wait a bit */
+		_alMicroSleep( interval );
+	} while( tries-- );
+
+	return ( TerminateThread( thread, 0 ) == 0 ) ? -1 : 0;
+}
+
+void _alExitThread( void )
+{
+	ExitThread( 0 );
+}
+
+unsigned int _alSelfThread( void )
+{
+	return ( unsigned int ) GetCurrentThreadId(  );
+}
+
+#elif defined(USE_MORPHOSTHREADING)
+
+#include <dos/dostags.h>
+#include <proto/dos.h>
+#include <proto/exec.h>
+
+#include "al_types.h"
+
+struct ThreadStartMsg {
+	struct Message tsm_Msg;
+	int tsm_Result;
+};
+
+ThreadID _alCreateThread( int ( *fn ) ( void * ) )
+{
+	struct ThreadData *thread =
+	    AllocVec( sizeof( struct ThreadData ), MEMF_PUBLIC );
+	if( thread == NULL ) {
+		return NULL;
+	}
+
+	thread->td_MsgPort = CreateMsgPort(  );
+	if( !thread->td_MsgPort ) {
+		FreeVec( thread );
+		return NULL;
+	}
+
+	struct ThreadStartMsg *startup_msg =
+	    AllocVec( sizeof( struct ThreadStartMsg ),
+		      MEMF_PUBLIC | MEMF_CLEAR );
+	if( startup_msg == NULL ) {
+		DeleteMsgPort( thread->td_MsgPort );
+		FreeVec( thread );
+		return NULL;
+	}
+
+	startup_msg->tsm_Msg.mn_Node.ln_Type = NT_MESSAGE;
+	startup_msg->tsm_Msg.mn_ReplyPort = thread->td_MsgPort;
+	startup_msg->tsm_Msg.mn_Length = sizeof( *startup_msg );
+
+	thread->td_Thread =
+	    CreateNewProcTags( NP_Entry, ( ULONG ) fn, NP_Name, ( ULONG )
+			       "OpenAL Thread",
+			       NP_CodeType,
+			       CODETYPE_PPC,
+			       NP_StartupMsg,
+			       ( ULONG ) startup_msg,
+			       NP_PPC_Arg1, 0, TAG_DONE );
+	if( !thread->td_Thread ) {
+		FreeVec( startup_msg );
+		DeleteMsgPort( thread->td_MsgPort );
+		FreeVec( thread );
+		return NULL;
+	}
+
+	return thread;
+}
+
+int _alWaitThread( ThreadID thread )
+{
+	struct ThreadStartMsg *tsm;
+	int retval;
+	WaitPort( thread->td_MsgPort );
+	tsm = ( struct ThreadStartMsg * ) GetMsg( thread->td_MsgPort );
+	DeleteMsgPort( thread->td_MsgPort );
+	retval = tsm->tsm_Result;
+	FreeVec( tsm );
+	FreeVec( thread );
+	return retval;
+}
+
+unsigned int _alSelfThread( void )
+{
+	return ( unsigned int ) FindTask( NULL );
+}
+
+void _alExitThread( void )
+{
+	struct ThreadStartMsg *msg;
+	if( NewGetTaskAttrs( NULL, &msg, sizeof( msg ), TASKINFOTYPE_STARTUPMSG,
+			     TAG_DONE ) && msg )
+		msg->tsm_Result = 0;
+	/*RemTask(NULL); */
+}
+
+#endif
Index: /openal-0.0.8/src/al_threadlib.h
===================================================================
--- /openal-0.0.8/src/al_threadlib.h	(revision 17)
+++ /openal-0.0.8/src/al_threadlib.h	(revision 17)
@@ -0,0 +1,61 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_threadlib.h
+ *
+ * Header which sorts out which thread package we're using.
+ */
+#ifndef THREADLIB_H_
+#define THREADLIB_H_
+
+#include "al_siteconfig.h"
+
+#if defined(USE_POSIXTHREADING)
+
+#include <pthread.h>
+typedef pthread_t *ThreadID;
+
+#elif defined(USE_WINDOWSTHREADING)
+
+#include <windows.h>
+typedef HANDLE ThreadID;
+
+#elif defined(USE_MORPHOSTHREADING)
+
+#include <exec/ports.h>
+#include <dos/dosextens.h>
+
+struct ThreadData {
+	struct Process *td_Thread;
+	struct MsgPort *td_MsgPort;
+};
+
+typedef struct ThreadData *ThreadID;
+
+#else
+
+#error "No thread package"
+
+#endif
+
+/*
+ * Creates a thread, which starts by running fn.
+ */
+extern ThreadID _alCreateThread( int ( *fn ) ( void * ) );
+
+/*
+ * Waits for thread to terminate before returning.
+ */
+extern int _alWaitThread( ThreadID thread );
+
+/*
+ * Returns the identifier for the callee's thread.
+ */
+extern unsigned int _alSelfThread( void );
+
+/*
+ * Forces the callee to terminate.
+ */
+extern void _alExitThread( void ) AL_ATTRIBUTE_NORETURN_;
+
+#endif				/* THREADLIB_H_ */
Index: /openal-0.0.8/src/al_types.h
===================================================================
--- /openal-0.0.8/src/al_types.h	(revision 17)
+++ /openal-0.0.8/src/al_types.h	(revision 17)
@@ -0,0 +1,360 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_types.h
+ *
+ * internal type definitions
+ *
+ * Naming convention: If the spec describes an attribute AL_FOO_BAR, the
+ * corresponding struct has a field foo_bar. Furthermore, the fields are ordered
+ * in the same way as they are described in the spec.
+ */
+
+#ifndef _LAL_TYPES_H_
+#define _LAL_TYPES_H_
+
+#include <AL/al.h>
+#include <AL/alc.h>
+
+#include "al_mutexlib.h"
+
+#include <stddef.h>
+#include <sys/types.h>
+
+#define _ALC_MAX_CHANNELS    6
+#define _ALC_MAX_FILTERS     9
+
+#define _ALF_MAX_NAME        15
+#define _AL_MAX_DISTANCE     (60.0f)
+#define SIZEOFVECTOR         (sizeof(ALfloat) * 3)
+
+typedef struct _ALmatrix {
+	ALfloat **data;
+	ALint rows;
+	ALint cols;
+} ALmatrix;
+
+typedef enum _DeviceEnum {
+	ALCD_NONE                = 0,
+	ALCD_WRITE               = (1<<0),
+	ALCD_READ                = (1<<1)
+} DeviceEnum;
+
+typedef enum _EnableEnum {
+	ALE_NONE                 = 0
+} EnableEnum;
+
+typedef enum _SrcEnum {
+	ALS_NONE           = 0,
+	ALS_REVERB         = (1<<0),
+	ALS_NEEDPITCH      = (1<<1)  /* don't increment */
+} SrcEnum;
+
+/* flags that are set in the source on a buffer by buffer basis */
+typedef enum _QueueEnum {
+	ALQ_NONE           = 0,
+	ALQ_CALLBACKBUFFER = (1<<0) /* don't increment */
+} QueueEnum;
+
+typedef enum _Bufenum {
+	ALB_NONE           = 0,
+	ALB_STREAMING      = (1<<1),
+	ALB_STREAMING_WRAP = (1<<2),
+	ALB_CALLBACK       = (1<<3),
+	ALB_PENDING_DELETE = (1<<4)
+} Bufenum;
+
+typedef struct {
+	ALboolean isset;
+	ALfloat data;
+} AL_floatparam;
+
+typedef struct {
+	ALboolean isset;
+	ALfloat data[3];
+} AL_float3vparam;
+
+typedef struct {
+	ALboolean isset;
+	ALfloat data[6];
+} AL_float6vparam;
+
+typedef struct {
+	ALboolean isset;
+	ALint data;
+} AL_intparam;
+
+typedef struct {
+	ALboolean isset;
+	ALboolean data;
+} AL_boolparam;
+
+typedef struct {
+	ALboolean isset;
+	ALuint data;
+} AL_uintparam;
+
+typedef struct {
+	ALboolean isset;
+	ALshort data;
+} AL_shortparam;
+
+
+typedef void (*AL_funcPtr)(void);
+
+typedef struct _AL_extension {
+	const ALubyte *name;
+	AL_funcPtr addr;
+} AL_extension;
+
+/* internal use destruction callbacks */
+typedef void (*DestroyCallback_LOKI)(ALuint id);
+
+/* scratch space to avoid unneeded reallocs */
+typedef struct {
+	void *data[_ALC_MAX_CHANNELS];
+	ALuint len;
+} _alDecodeScratch;
+
+typedef struct _AL_bufsourcelist {
+	ALuint *sids;
+	ALuint size;
+	ALuint items;
+} AL_bufsourcelist;
+
+/*
+ *  Our buffer
+ */
+typedef struct {
+	/*
+	 * The following three fields are the "official" part of the buffer
+	 * state, the rest are implementation details. Note that the bits per
+	 * sample and the number of channels can be calculated from the format.
+	 */
+	ALuint frequency;
+	ALuint size;
+	ALshort format;
+
+	ALuint bid;         /* unique identifier */
+
+	void *orig_buffers[_ALC_MAX_CHANNELS];    /* original buffer: unadulturated */
+	ALuint num_buffers; /* number of populated channels in orig_buffers */
+
+	Bufenum flags;
+	/* int refcount; */
+
+	/* our refcount */
+	AL_bufsourcelist queue_list;
+	AL_bufsourcelist current_list;
+
+	ALuint streampos; /* position for streaming sounds */
+	ALuint appendpos; /* position for append operation */
+
+	/* callback for on-the-fly decoding */
+	int (*callback)(ALuint, ALuint, ALshort *, ALenum, ALint, ALint);
+
+	DestroyCallback_LOKI destroy_buffer_callback; /* callback for when
+						       * buffer is destroyed */
+	DestroyCallback_LOKI destroy_source_callback; /* callback for when
+						       * source is destroyed */
+} AL_buffer;
+
+/*
+ * AL_sourcestate is used to store buffer specific parameters.
+ */
+typedef struct _AL_sourcestate {
+	QueueEnum flags;
+} AL_sourcestate;
+
+typedef struct _AL_source {
+	/*
+	 * The following sixteen fields are the "official" part of the source
+	 * state, the rest are implementation details. Note that the AL_BUFFER,
+	 * AL_BUFFERS_QUEUED, and AL_BUFFERS_PROCESSED attributes are implicitly
+	 * in bid_queue. Furthermore, AL_SEC_OFFSET, AL_SAMPLE_OFFSET, and
+	 * AL_BYTE_OFFSET can probably calculated from one of the fields below,
+	 * but this has not been implemented yet.
+	 */
+	AL_float3vparam position;
+	AL_float3vparam velocity;
+	AL_floatparam gain;
+	AL_boolparam relative;
+	AL_intparam source_type; /* TODO: Currently unused. */
+	AL_boolparam looping;
+	AL_floatparam min_gain;
+	AL_floatparam max_gain;
+	AL_floatparam reference_distance;
+	AL_floatparam rolloff_factor;
+	AL_floatparam max_distance;
+	AL_floatparam pitch;
+	AL_float3vparam direction;
+	AL_floatparam cone_inner_angle;
+	AL_floatparam cone_outer_angle;
+	AL_floatparam cone_outer_gain;
+
+	struct {
+		AL_sourcestate *queuestate;
+		ALuint *queue;
+
+		int size;
+		int read_index;  /* what al_mixer reads   */
+		int write_index; /* what Queue{i,f} reads */
+	} bid_queue;  /* buffer queue */
+
+	/* Our state */
+	ALenum state;
+
+	struct {
+		unsigned long soundpos; /* position into sound */
+
+		/*
+		 * It really makes more sense for split source to
+		 * maintain soundpos, so set these.  If this works
+		 * out move everything over to use them.
+		 */
+		ssize_t new_soundpos;
+		ssize_t new_readindex;
+
+		void *outbuf;           /* buffer where output data is stored */
+		ALuint delay[_ALC_MAX_CHANNELS];
+		ALfloat gain[_ALC_MAX_CHANNELS];
+	} srcParams; /* values refreshed each iteration through SplitSources */
+
+	SrcEnum flags;
+
+	/* kludges follow */
+	void *reverb_buf[_ALC_MAX_CHANNELS]; /* reverb data */
+	long reverbpos;
+	long reverblen;
+
+	ALfloat reverb_scale;
+	ALint   reverb_delay;
+
+	/* true mixing rate of the source */
+	ALfloat mixrate;
+	
+	ALuint sid; /* our identifier */
+} AL_source;
+
+typedef struct _AL_listener {
+	/*
+	 * The following four fields are the "official" part of the listener
+	 * state. We are lucky and need nothing else here... :-)
+	 */
+	ALfloat position[3];
+	ALfloat velocity[3];
+	ALfloat gain;
+	ALfloat orientation[6];
+} AL_listener;
+
+typedef struct _AL_capture {
+	ALuint cpid;
+	ALuint state;
+
+	AL_intparam bid;
+} AL_capture;
+
+/* pool structures */
+typedef struct
+{
+	AL_source data;
+	ALboolean inuse;
+} spool_node;
+
+typedef struct
+{
+	spool_node *pool;
+	ALuint size;
+	ALuint *map;        /* { sid, index } pair.  map[index] = sid */
+	MutexID *smutexen;  /* array of source locks */
+} spool_t;
+
+typedef void time_filter (ALuint c, AL_source *src, AL_buffer *samp,
+		   ALshort **buffers, ALuint nc, ALuint len);
+
+/* types */
+typedef struct _time_filter_set {
+	char name[ _ALF_MAX_NAME + 1 ];
+	time_filter *filter;
+} time_filter_set;
+
+struct _AL_context;
+
+typedef struct ALCdevice_struct {
+	struct _AL_context *cc;
+
+	void *handle;	     /*
+			      * pointer to something that is meaningful
+			      * to the OS's sound stuff
+			      */
+
+	/* device settings, not internal format */
+	ALenum format;
+	ALuint speed;
+	ALuint bufsiz;
+
+	DeviceEnum flags;
+	ALCchar *specifier;
+} AL_device;
+
+typedef struct _AL_context {
+	/*
+	 * The following four fields are the "official" part of the context
+	 * state, the rest are implementation details. Note that there are
+	 * currently no enable/disable flags in the spec, so there is no field
+	 * for these.
+	 */
+	ALfloat doppler_factor;
+	ALfloat doppler_velocity; /* deprecated */
+	ALfloat speed_of_sound;
+	ALenum distance_model;
+
+	AL_listener listener;
+
+	spool_t source_pool;
+
+	ALboolean _inuse;
+
+	AL_device *write_device;
+	AL_device *read_device;
+
+	/* distance of speaker from
+	 * origin  [x,y,z].  Ranges from 0.0 (origin) to
+	 * 1.0 * scaling_factor
+	 *
+	 * 0 -> left
+	 * 1 -> right
+	 * 2 -> left satellite
+	 * 3 -> right satellite
+	 */
+	struct {
+		ALfloat pos[3];
+	} _speaker_pos[_ALC_MAX_CHANNELS];
+
+
+	ALint alErrorIndex;
+
+	time_filter_set time_filters[_ALC_MAX_FILTERS];
+
+	ALboolean should_sync; /* is mojo updated synchronous? */
+	ALboolean issuspended; /* is the context suspended? */
+
+	/* structure for restoring system mixer settings */
+	struct {
+		ALfloat main;
+		ALfloat pcm;
+	} restore;
+
+	ALfloat (*distance_func)( ALfloat dist, ALfloat rolloff,
+				  ALfloat ref, ALfloat max );
+
+	ALint *Flags;
+	ALint NumFlags;
+} AL_context;
+
+typedef struct _alMixEntry {
+	ALvoid *data;
+	ALint bytes;
+} alMixEntry;
+
+#endif /* _LAL_TYPES_H */
Index: /openal-0.0.8/src/al_vector.c
===================================================================
--- /openal-0.0.8/src/al_vector.c	(revision 17)
+++ /openal-0.0.8/src/al_vector.c	(revision 17)
@@ -0,0 +1,115 @@
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <math.h>
+#include <stdlib.h>
+
+#include "al_debug.h"
+#include "al_main.h"
+#include "al_vector.h"
+
+#ifndef M_PI
+#define M_PI		3.14159265358979323846	/* pi */
+#endif /* M_PI */
+
+
+/*
+ * _alVectorMagnitude( const ALfloat *origin, const ALfloat *v2 )
+ *
+ * Returns magnitude of v2 with origin at origin.
+ *
+ * FIXME: please check my math
+ */
+ALfloat _alVectorMagnitude( const ALfloat *origin, const ALfloat *v2 ) {
+	ALfloat lsav[3];
+	ALfloat retval;
+
+	_alVectorDistance( lsav, origin, v2 );
+
+	retval = sqrt( lsav[0] * lsav[0] +
+		       lsav[1] * lsav[1] +
+		       lsav[2] * lsav[2] );
+
+	retval = fabs( retval );
+
+	return retval;
+
+}
+
+/*
+ * _alVectorNormalize( ALfloat *d, const ALfloat *s)
+ *
+ * Normalizes s, placing result in d.
+ */
+void _alVectorNormalize( ALfloat *d, const ALfloat *s) {
+	ALfloat mag;
+
+	mag = _alVectorMagnitudeAtZero( s );
+
+	if( mag == 0 ) {
+		d[0] = 0.0; d[1] = 0.0; d[2] = 0.0;
+
+		return;
+	}
+
+	d[0] = s[0] / mag;
+	d[1] = s[1] / mag;
+	d[2] = s[2] / mag;
+
+	return;
+}
+
+/*
+ * _alVectorAngleBetween( const ALfloat *origin, const ALfloat *v1,
+ *                       const ALfloat *v2 )
+ *
+ * Returns the angle between two vectors, with origins at origin.
+ *
+ * FIXME: please check my math
+ */
+ALfloat _alVectorAngleBetween( const ALfloat *origin, const ALfloat *v1,
+                              const ALfloat *v2 ) {
+	ALfloat m1;     /* |v2| */
+	ALfloat m2;     /* |v1| */
+	ALfloat mt;     /* |v1| * |v2| */
+	ALfloat dp;    /*  dot product */
+	ALfloat mag;
+
+	m1  = _alVectorMagnitude( origin, v1 );
+	m2  = _alVectorMagnitude( origin, v2 );
+	dp  = _alVectorDotp( origin, v1, v2 );
+
+	mt = m1 * m2;
+	if(mt == 0.0f) {
+		return M_PI / 2.0f;
+	}
+
+	mag = acos( dp / mt );
+
+	return mag;
+}
+
+/*
+ * _alVectorDotp( const ALfloat *origin, const ALfloat *v1,
+ *		const ALfloat *v2 )
+ *
+ * Returns dot product between v1 and v2, with origin at origin.
+ */
+ALfloat _alVectorDotp( const ALfloat *origin, const ALfloat *v1,
+		       const ALfloat *v2 ) {
+	ALfloat o_inverse[3];
+	ALfloat v1_trans[3];
+	ALfloat v2_trans[3];
+	ALfloat retval = 0.0f;
+
+	_alVectorInverse( o_inverse, origin );
+
+	_alVectorTranslate( v1_trans, v1, o_inverse );
+	_alVectorTranslate( v2_trans, v2, o_inverse );
+
+	retval += v1_trans[0] * v2_trans[0];
+	retval += v1_trans[1] * v2_trans[1];
+	retval += v1_trans[2] * v2_trans[2];
+
+	return retval;
+}
Index: /openal-0.0.8/src/al_vector.h
===================================================================
--- /openal-0.0.8/src/al_vector.h	(revision 17)
+++ /openal-0.0.8/src/al_vector.h	(revision 17)
@@ -0,0 +1,106 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_vector.h
+ *
+ * kludgey vector math stuff
+ */
+
+#ifndef AL_VECTOR_H_
+#define AL_VECTOR_H_
+
+#include <math.h>
+/*
+ * Returns magnitude of v2 with origin at (0,0,0).
+ */
+static __inline ALfloat _alVectorMagnitudeAtZero( const ALfloat *v2 ) {
+	ALfloat retval;
+
+	retval = sqrt( v2[0] * v2[0] +
+		       v2[1] * v2[1] +
+		       v2[2] * v2[2] );
+
+	retval = fabs( retval );
+
+	return retval;
+}
+
+/*
+ * Return magnitude of v with origin at origin.
+ */
+ALfloat _alVectorMagnitude( const ALfloat *origin, const ALfloat *v );
+
+/*
+ * Places distance between two vectors in retref.
+ */
+static __inline void _alVectorDistance( ALfloat *retref, const ALfloat *v1,
+			const ALfloat *v2 ) {
+
+	retref[0] = fabs( v1[0] - v2[0] );
+	retref[1] = fabs( v1[1] - v2[1] );
+	retref[2] = fabs( v1[2] - v2[2] );
+	
+	return;
+}
+
+/*
+ * Rotate point about axis by angle.
+ */
+void _alRotatePointAboutAxis( const ALfloat angle, ALfloat *point,
+                              const ALfloat *axis );
+
+/*
+ * Returns angle between two vectors with v1, v2 with shared origin.
+ *
+ * NOTE: Always positive
+ */
+ALfloat _alVectorAngleBetween( const ALfloat *origin, const ALfloat *v1,
+                              const ALfloat *v2 );
+
+/*
+ * Returns dot product of v1 . v2 ( with shared origin )
+ */
+ALfloat _alVectorDotp( const ALfloat *origin, const ALfloat *v1,
+                       const ALfloat *v2 );
+
+/*
+ * Translate s by delta, populating d.
+ */
+static __inline void _alVectorTranslate( ALfloat *d, const ALfloat *s,
+			 const ALfloat *delta ) {
+	d[0] = s[0] + delta[0];
+	d[1] = s[1] + delta[1];
+	d[2] = s[2] + delta[2];
+
+	return;
+}
+
+/*
+ * Populates d with vector inverse of s.
+ */
+static __inline void _alVectorInverse( ALfloat *d, const ALfloat *s ) {
+	d[0] = -s[0];
+	d[1] = -s[1];
+	d[2] = -s[2];
+
+	return;
+}
+
+/*
+ * Normalizes s, places result in d.
+ */
+void _alVectorNormalize( ALfloat *d, const ALfloat *s );
+
+/*
+ * Returns cross product between v1 and v2, result in d.
+ */
+static __inline void _alVectorCrossProduct( ALfloat *d, const ALfloat *v1,
+			      const ALfloat *v2 ) {
+	d[0] = v1[1] * v2[2] - v1[2] * v2[1];
+	d[1] = v1[2] * v2[0] - v1[0] * v2[2];
+	d[2] = v1[0] * v2[1] - v1[1] * v2[0];
+
+	return;
+}
+
+#endif /* AL_VECTOR_H */
Index: /openal-0.0.8/src/alc/alc_context.c
===================================================================
--- /openal-0.0.8/src/alc/alc_context.c	(revision 17)
+++ /openal-0.0.8/src/alc/alc_context.c	(revision 17)
@@ -0,0 +1,1915 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * alc_context.c
+ *
+ * Context management and application level calls.
+ */
+
+#include "al_siteconfig.h"
+
+#include <AL/alc.h>
+#include <AL/alext.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "al_mixer.h"
+#include "al_main.h"
+#include "al_debug.h"
+#include "al_ext.h"
+#include "al_listen.h"
+#include "al_source.h"
+#include "al_spool.h"
+#include "al_buffer.h"
+#include "al_filter.h"
+#include "al_distance.h"
+#include "al_cpu_caps.h"
+
+#include "alc/alc_error.h"
+#include "alc/alc_device.h"
+#include "alc/alc_speaker.h"
+#include "alc/alc_context.h"
+
+#include "backends/alc_backend.h"
+
+/*
+ * CONTEXT_BASE is the number which we start at for context ids.
+ */
+#define CONTEXT_BASE   0x9000
+
+/*
+ * canon_max and canon_min are the max/min values for PCM data in our
+ * canonical format, respectively.
+ */
+const int canon_max = ((1<<(16-1))-1),
+	  canon_min = -(1<<(16-1));
+
+/*
+ * canon_format is the canonical format that we represent data internally as.
+ */
+ALenum canon_format = _ALC_CANON_FMT;
+
+/*
+ * canon_speed is the sampling rate at which we internally represent data.
+ */
+ALuint canon_speed = _ALC_CANON_SPEED;
+
+/*
+ * _alcCCId holds the context id of the current context.
+ */
+ALuint _alcCCId = (ALuint) -1;
+
+/*
+ * al_contexts is our context pool.
+ */
+static struct {
+	ALuint size;
+	ALuint items;
+
+	ALuint *map;
+	ALboolean *inuse;
+	AL_context *pool;
+} al_contexts = { 0, 0, NULL, NULL, NULL };
+
+/*
+ * all_context_mutex is the mutex guarding operations which require all the
+ * contexts to be locked.
+ */
+static MutexID all_context_mutex = NULL;
+
+/*
+ * contex_mutexen is a set of mutexes, one for each context, guarding each
+ * contex.
+ */
+static MutexID *context_mutexen  = NULL;
+
+/*
+ * _alcDestroyContext( AL_context *cc )
+ *
+ * Non locking version of alcDestroyContext.
+ */
+static void _alcDestroyContext( AL_context *cc );
+
+/*
+ * _alcReallocContexts( ALuint newsize )
+ *
+ * Increases data structures to accomodate at least newsize contexts.
+ */
+static void _alcReallocContexts( ALuint newsize );
+
+/*
+ * _alcGenerateNewCid( void )
+ *
+ * Returns a new unique ALuint suitable for use as a cid.
+ */
+static ALuint _alcGenerateNewCid( void );
+
+/*
+ * _alcCidToIndex( ALuint cid )
+ *
+ * Converts cid into a simple index, returning that.
+ */
+static ALuint _alcCidToIndex( ALuint cid );
+
+/*
+ * _alcIndexToCid( int index )
+ *
+ * Converts index to a cid, returning that.
+ */
+static ALuint _alcIndexToCid( int cindex );
+
+/*
+ * ALCCONTEXTP_TO_ALUINT and ALUINT_TO_ALCCONTEXTP are macros to ease the
+ * conversion of ALCcontext* to ALuint and visa versa.
+ *
+ * ToDo: I don't understand the need for the int64_t casts below...
+ */
+#if SIZEOF_VOID_P == 8
+#define ALCCONTEXTP_TO_ALUINT(vp) ((ALuint) (int64_t) (vp))
+#define ALUINT_TO_ALCCONTEXTP(al) ((ALCcontext *) (int64_t) (al))
+#else
+#define ALCCONTEXTP_TO_ALUINT(vp) ((ALuint) (vp))
+#define ALUINT_TO_ALCCONTEXTP(al) ((ALCcontext *) (al))
+#endif
+
+/*
+ * alcMakeContextCurrent( ALCcontext *handle )
+ *
+ * Makes the context refered to by handle the current context.  If handle does
+ * not refer to a context, ALC_INVALID_CONTEXT is set and ALC_FALSE returned.
+ * Otherwise, the operation suceeds and ALC_TRUE is returned.
+ */
+ALCboolean alcMakeContextCurrent( ALCcontext *handle )
+{
+	AL_context *cc;
+	int cid;
+	static ALboolean ispaused = AL_FALSE;
+	ALboolean should_init_mixer = AL_FALSE;
+
+	if(handle == NULL) {
+		/* NULL handle means pause */
+		if(ispaused == AL_FALSE) {
+			if(al_contexts.items != 0) {
+				/* only lock if a context has been
+				 * created.  Otherwise, don't.
+				 */
+
+				/* Give mixer thread chance to catch up */
+
+				_alLockMixerPause();
+
+				_alcLockAllContexts();
+
+				cc = _alcDCGetContext();
+				if( cc == NULL ) {
+					/* I don't even want to think about it */
+
+					/* FIXME: wrong error */
+					_alcSetError( ALC_INVALID_CONTEXT );
+					_alcUnlockAllContexts();
+					return ALC_FALSE;
+				}
+
+				/*
+				 * inform current audio device about
+				 * impending stall.
+				 */
+				if( cc->write_device ) {
+					_alcDevicePause( cc->write_device );
+				}
+				if( cc->read_device ) {
+					_alcDevicePause( cc->read_device );
+				}
+
+				_alcCCId = (ALuint) -1;
+				_alcUnlockAllContexts();
+			}
+
+			ispaused = AL_TRUE;
+		}
+
+		return ALC_TRUE;
+	}
+
+	cid = ALCCONTEXTP_TO_ALUINT( handle );
+
+	_alcLockAllContexts();
+
+	if( _alcIsContext( _alcCCId ) == AL_FALSE ) {
+		should_init_mixer = AL_TRUE;
+	}
+
+	_alcCCId = cid;
+
+	cc = _alcGetContext( cid );
+	if( cc == NULL ) {
+		/* I don't even want to think about it */
+
+		/* FIXME: wrong error */
+		_alcSetError( ALC_INVALID_CONTEXT );
+		_alcUnlockAllContexts( );
+		return ALC_FALSE;
+	}
+
+	if( should_init_mixer == AL_TRUE ) {
+		/* Set up mixer thread */
+		if(_alInitMixer() == AL_FALSE) {
+			/* do something */
+		}
+	}
+
+	/* set device's current context */
+	if(cc->write_device) {
+		cc->write_device->cc = cc;
+		_alcDeviceSet( cc->write_device );
+	}
+
+	_alSetMixer( cc->should_sync ); /* set mixing stats */
+
+	if(cc->read_device) {
+		cc->read_device->cc = cc;
+		_alcDeviceSet( cc->read_device );
+	}
+
+
+	if(ispaused == AL_TRUE) {
+		/* someone unpaused us */
+		ispaused = AL_FALSE;
+
+		_alcDeviceResume( cc->write_device );
+		_alcDeviceResume( cc->read_device );
+
+		_alcUnlockAllContexts();
+		_alUnlockMixerPause();
+	} else {
+		/* just unlock contexts */
+		_alcUnlockAllContexts();
+	}
+
+	return ALC_TRUE;
+}
+
+/*
+ * alcDestroyContext( ALvoid *handle )
+ *
+ * Destroys the context referred to by handle.
+ */
+void alcDestroyContext( ALCcontext *handle )
+{
+	AL_context *cc;
+	int cid;
+
+	if( handle == NULL ) {
+		_alcSetError( ALC_INVALID_CONTEXT );
+		return;
+	}
+
+	cid = ALCCONTEXTP_TO_ALUINT( handle );
+
+	_alcLockContext( cid );
+	cc = _alcGetContext( cid );
+	if( cc == NULL ) {
+		_alcSetError( ALC_INVALID_CONTEXT );
+		_alcUnlockContext( cid );
+		return;
+	}
+
+	/*
+	 * If this is the last context, run _alExit()
+	 * to clean up the cruft
+	 */
+	if( al_contexts.items == 1 ) {
+		/* unlock context for final time */
+		_alcUnlockContext( cid );
+
+		/* cleanup */
+		_alExit();
+
+		/*
+		 * Set NumContexts to 0
+		 */
+		al_contexts.items = 0;
+
+		/*
+		 * Destroy the all-locking-contexts
+		 */
+		_alDestroyMutex( all_context_mutex );
+		all_context_mutex = NULL;
+
+		return;
+	}
+
+	/* call internal destroyer */
+	_alcDestroyContext( cc );
+
+	/*
+	 * Decrement the number of contexts in use.
+	 */
+	al_contexts.items--;
+
+	_alcUnlockContext( cid );
+}
+
+/**
+ * alcProcessContext( ALvoid *alcHandle )
+ *
+ * Performs processing on a synced context, nop on a asynchronous
+ * context.
+ *
+ * If alcHandle is not valid, ALC_INVALID_CONTEXT is set.
+ */
+void alcProcessContext( ALCcontext *alcHandle )
+{
+	AL_context *cc;
+	ALboolean should_sync;
+	int cid;
+
+	if( alcHandle == NULL ) {
+		/*
+		 * invalid name?
+		 */
+		_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+		      "alcUpdateContext: alcHandle == NULL");
+
+		_alcSetError( ALC_INVALID_CONTEXT );
+		return;
+	}
+
+	cid = ALCCONTEXTP_TO_ALUINT( alcHandle );
+
+	/* determine whether we need to sync or not */
+	_alcLockAllContexts();
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		_alDebug( ALD_CONTEXT, __FILE__, __LINE__,
+			  "alcUpdateContext: invalid context id %d",
+			  cid );
+
+		_alcSetError( ALC_INVALID_CONTEXT );
+		_alcUnlockAllContexts();
+		return;
+	}
+
+	should_sync = cc->should_sync;
+	_alcUnlockAllContexts();
+
+	if( should_sync == AL_TRUE ) {
+		mixer_iterate( NULL );
+	} else {
+		/* unsuspend async contexts */
+		cc->issuspended = AL_FALSE;
+	}
+}
+
+/**
+ *
+ * alcSuspendContext( ALCcontext *alcHandle )
+ *
+ * Suspends processing on an asynchronous context.  This is a legal nop on a
+ * synced context.
+ *
+ * If alcHandle is not valid, ALC_INVALID_CONTEXT is returned.
+ */
+void alcSuspendContext( ALCcontext *alcHandle )
+{
+	AL_context *cc;
+	ALuint cid;
+
+	if( alcHandle == NULL ) {
+		/*
+		 * invalid name?
+		 */
+		_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+		      "alcUpdateContext: alcHandle == NULL");
+
+		_alcSetError( ALC_INVALID_CONTEXT );
+
+		return;
+	}
+
+	cid = ALCCONTEXTP_TO_ALUINT( alcHandle );
+
+	/* determine whether we need to sync or not */
+	_alcLockAllContexts();
+
+	cc = _alcGetContext( cid );
+	if( cc == NULL ) {
+		_alDebug( ALD_CONTEXT, __FILE__, __LINE__,
+			  "alcUpdateContext: invalid context id %d",
+			  cid );
+
+		_alcSetError( ALC_INVALID_CONTEXT );
+
+		_alcUnlockAllContexts();
+
+		return;
+	}
+
+	if( cc->should_sync == AL_FALSE) {
+		/*
+		 * only asynchronous contexts can be
+		 * suspended.
+		 */
+		cc->issuspended = AL_TRUE;
+	}
+
+	_alcUnlockAllContexts();
+
+	return;
+}
+
+/*
+ * alcCreateContext( ALCdevice *dev, ALCint *attrlist )
+ *
+ * Allocates, initialiaes, and returns an AL_context handle, suitable for
+ * passing to other alc functions.  Uses dev as the write device for the
+ * context.  attrlist is an int array, zero terminated, that contains
+ * attribute/value pairs used to initialize the context.
+ *
+ * We use a meet-or-exceed system here.  If any attribute in attrlist cannot
+ * have the required value met or exceeded, NULL is returned.  If dev is not
+ * valid, ALC_INVALID_DEVICE is set and NULL is returned.
+ *
+ * FIXME: not as well tested as I'd like.
+ */
+ALCcontext *alcCreateContext( ALCdevice *dev, const ALCint *attrlist )
+{
+	ALint cid;
+
+	if( dev == NULL ) {
+		_alcSetError( ALC_INVALID_DEVICE );
+
+		return NULL;
+	}
+	
+	_alDetectCPUCaps();
+	
+	if( al_contexts.items == 0 ) {
+		/*
+		 * This is the first context to be created.  Initialize the
+		 * library's data structures.
+		 */
+
+		/* get a context name for the new context */
+		cid = _alcGetNewContextId();
+
+		/* misc library initialization */
+		_alInit();
+
+		/* set the context attributes */
+		_alcLockContext( cid );
+		_alcSetContext( attrlist, cid, dev );
+		_alcUnlockContext( cid );
+
+		return ALUINT_TO_ALCCONTEXTP( cid );
+	}
+
+	_alcLockAllContexts();
+	cid = _alcGetNewContextId();
+	if(cid == -1) {
+		_alDebug( ALD_CONTEXT, __FILE__, __LINE__,
+			  "alcCreateContext failed." );
+
+		_alcSetError( ALC_INVALID_DEVICE );
+		_alcUnlockAllContexts();
+
+		return NULL;
+	}
+
+	_alcUnlockAllContexts();
+
+	_alcLockContext( cid );
+	_alcSetUse( cid, AL_TRUE );
+	_alcSetContext( attrlist, cid, dev );
+	_alcUnlockContext( cid );
+
+	return ALUINT_TO_ALCCONTEXTP( cid );
+}
+
+/*
+ * _alcDestroyContext( AL_context *cc )
+ *
+ * Non locking version of alcDestroyContext.
+ *
+ * FIXME: should assume that *all contexts* are locked?
+ */
+void _alcDestroyContext( AL_context *cc )
+{
+	free(cc->Flags);
+	cc->Flags = 0;
+	cc->NumFlags = 0;
+
+	_alDestroyListener( &cc->listener );
+	_alDestroySources( &cc->source_pool );
+}
+
+
+/*
+ * FL_alcLockContext( ALuint cid, const char *fn, int ln )
+ *
+ * Locks the mutex associated with the context named by cid, passing fn and ln
+ * to _alLockPrintf for debugging purposes.
+ */
+void FL_alcLockContext(ALuint cid, UNUSED(const char *fn), UNUSED(int ln)) {
+	int cindex;
+
+	_alLockPrintf("_alcLockContext", fn, ln);
+
+	cindex = _alcCidToIndex(cid);
+	if( cindex < 0 ) {
+		_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+				"FL_alcLockContext: invalid context.");
+		return;
+	}
+
+	_alcLockAllContexts();
+
+	_alLockMutex(context_mutexen[cindex]);
+
+	_alcUnlockAllContexts();
+
+	return;
+}
+
+/*
+ * FL_alcUnlockContext( ALuint cid, const char *fn, int ln )
+ *
+ * Unlocks the mutex associated with the context named by cid, passing fn and ln
+ * to _alLockPrintf for debugging purposes.
+ */
+void FL_alcUnlockContext(ALuint cid, UNUSED(const char *fn), UNUSED(int ln)) {
+	int cindex;
+
+	_alLockPrintf("_alcUnlockContext", fn, ln);
+
+	cindex = _alcCidToIndex( cid );
+	if( cindex < 0 ) {
+		_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+				"FL_alcUnlockContext: invalid context.");
+		return;
+	}
+
+	_alUnlockMutex(context_mutexen[cindex]);
+
+	return;
+}
+
+/*
+ * _alcGetContext( ALuint cid )
+ *
+ * Returns pointer to the AL_context named by cid, or NULL if cid is not a
+ * valid context name.
+ */
+AL_context *_alcGetContext( ALuint cid ) {
+	ALuint cindex;
+
+	cindex = _alcCidToIndex(cid);
+
+	if(cindex >= al_contexts.size) {
+		return NULL;
+	}
+
+	if(al_contexts.inuse[cindex] == AL_FALSE) {
+		return NULL;
+	}
+
+	return &al_contexts.pool[cindex];
+}
+
+
+/*
+ * void _alcSetContext( const ALCint *attrlist, ALuint cid, AL_device *dev )
+ *
+ * Sets context id paramaters according to an attribute list and device.
+ *
+ */
+void _alcSetContext(const ALCint *attrlist, ALuint cid, AL_device *dev ) {
+	AL_context *cc;
+	ALboolean reading_keys = AL_TRUE;
+	struct { int key; int val; } rdr;
+	ALuint refresh_rate = 15;
+        ALuint bufsiz;
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		return;
+	}
+
+	/* get ready to copy attrlist */
+	free(cc->Flags);
+	cc->Flags = 0;
+	cc->NumFlags = 0;
+
+	/* Set our preferred mixer stats */
+        if (dev->flags & ALCD_WRITE)
+	{
+		cc->write_device = dev;
+		/* At this point we know the listener position and the number of speakers. */
+		_alcSpeakerMove( cid );
+	}
+        if (dev->flags & ALCD_READ)
+	{
+		cc->read_device = dev;
+	}
+
+	while(attrlist && (reading_keys == AL_TRUE)) {
+		void *t = 0;
+
+		rdr.key = *attrlist++;
+		if(rdr.key != 0)
+		{
+			rdr.val = *attrlist++;
+		}
+
+		t = realloc(cc->Flags,
+				  (2 + cc->NumFlags) * 2 * sizeof *cc->Flags);
+		if(t)
+		{
+			cc->Flags = t;
+
+			cc->Flags[2 * cc->NumFlags] = rdr.key;
+			cc->Flags[2 * cc->NumFlags + 1] = rdr.val;
+
+			cc->NumFlags++;
+		}
+
+		switch(rdr.key) {
+			case ALC_FREQUENCY:
+				canon_speed = rdr.val;
+
+				_alDebug( ALD_CONTEXT, __FILE__, __LINE__,
+					"cc->external_speed = %d", rdr.val );
+				break;
+			case ALC_REFRESH:
+			        refresh_rate = rdr.val;
+				break;
+			case ALC_SOURCES_LOKI:
+				spool_resize(&cc->source_pool, rdr.val);
+
+				_alDebug(ALD_CONTEXT,
+					__FILE__, __LINE__,
+					"ALC_SOURCES (%d)", rdr.val);
+				break;
+			case ALC_BUFFERS_LOKI:
+				_alNumBufferHint( rdr.val );
+				break;
+			case ALC_SYNC:
+				if(rdr.val == AL_TRUE) {
+					cc->should_sync = AL_TRUE;
+				} else {
+					cc->should_sync = AL_FALSE;
+				}
+				break;
+			case 0:
+				reading_keys = AL_FALSE;
+				break;
+			default:
+				reading_keys = AL_FALSE;
+				_alDebug(ALD_CONTEXT,
+					__FILE__, __LINE__,
+					"unsupported context attr %d",
+					rdr.key );
+				break;
+		}
+	}
+
+	/* okay, now post process */
+
+	if( refresh_rate > canon_speed ) {
+		/*
+		 * We don't accept refresh rates greater than the
+		 * sampling rate.
+		 */
+		refresh_rate = canon_speed;
+	}
+
+	bufsiz = _alSmallestPowerOfTwo(
+				(ALuint) ((float) canon_speed / refresh_rate));
+        if (dev->flags & ALCD_WRITE)
+		cc->write_device->bufsiz = bufsiz;
+        if (dev->flags & ALCD_READ)
+		cc->read_device->bufsiz = bufsiz;
+
+	_alDebug( ALD_CONTEXT, __FILE__, __LINE__,
+		"new bufsiz = %d", bufsiz);
+
+	return;
+}
+
+/*
+ * _alcInitContext( ALuint cid )
+ *
+ * Initialize the context named by cid, and returns the AL_context associated
+ * with that id.
+ *
+ * assumes locked context
+ */
+AL_context *
+_alcInitContext( ALuint cid )
+{
+	AL_context *cc = _alcGetContext(cid);
+	if(cc == NULL) {
+		/* invalid context */
+		return NULL;
+	}
+
+	/* initialize spec parameters */
+	cc->doppler_factor = 1.0f;
+	cc->doppler_velocity = 1.0f;
+	cc->speed_of_sound = 343.3f;
+	cc->distance_model = AL_INVERSE_DISTANCE_CLAMPED;
+
+	_alUpdateDistanceModel(cc);
+
+	_alInitTimeFilters(cc->time_filters);
+
+	cc->alErrorIndex   = AL_NO_ERROR;
+
+	_alInitListener(&cc->listener);
+
+	/* Source initializations */
+	spool_init(&cc->source_pool);
+
+	cc->read_device = NULL;
+	cc->write_device = NULL;
+
+	/*
+	 *_speaker_pos is initialized later when we know the output device and
+	 * therefore the number of speakers
+	 */
+
+	/*
+	 * should_sync:
+	 * 	AL_FALSE:
+	 * 		we use async_mixer_iterate, and don't need
+	 * 		to have alcUpdateContext called to actually
+	 * 		mix the audio.
+	 * 	AL_TRUE:
+	 * 		we use sync_mixer_iterate, and need to have
+	 * 		alcUpdateContext called to actually mix the
+	 * 		audio.
+	 */
+	cc->should_sync = AL_FALSE;
+	cc->issuspended = AL_FALSE; /* deviates */
+
+	cc->Flags = 0;
+	cc->NumFlags = 0;
+
+	return cc;
+}
+
+/*
+ * _alcSetUse( ALuint cid, ALboolean value )
+ *
+ * Sets the use flag of context with id cid to value.
+ *
+ * Assumes context is locked
+ *
+ * NOTES:
+ *    Can't use alcGetContext, because that checks the use flag,
+ *    which maybe set to false, which is what this function seeks
+ *    to correct.
+ *
+ */
+ALboolean _alcSetUse(ALuint cid, ALboolean val) {
+	ALuint cindex;
+
+	cindex = _alcCidToIndex(cid);
+
+	if(cindex >= al_contexts.size) {
+		return !val;
+	}
+
+	return al_contexts.inuse[cindex] = val;
+}
+
+/*
+ * _alcInUse( ALuint cid )
+ *
+ * Returns AL_TRUE if the context named by cid is in use, AL_FALSE otherwise.
+ */
+ALboolean _alcInUse(ALuint cid) {
+	ALuint cindex;
+
+	cindex = _alcCidToIndex(cid);
+
+	if(cindex >= al_contexts.size) {
+		return AL_FALSE;
+	}
+
+	return al_contexts.inuse[cindex];
+}
+
+/*
+ * FL_alcLockAllContexts( const char *fn, int ln )
+ *
+ * Locks the mutex associated guarding all contexts, passing fn and ln to
+ * _alLockPrintf for debugging purposes.
+ */
+void FL_alcLockAllContexts(UNUSED(const char *fn), UNUSED(int ln)) {
+	if( all_context_mutex == NULL ) {
+		return;
+	}
+
+	_alLockPrintf("_alcLockAllContexts", fn, ln);
+	_alLockMutex(all_context_mutex);
+}
+
+/*
+ * FL_alcUnlockAllContexts( const char *fn, int ln )
+ *
+ * Unlocks the mutex associated guarding all contexts, passing fn and ln to
+ * _alLockPrintf for debugging purposes.
+ */
+void FL_alcUnlockAllContexts(UNUSED(const char *fn), UNUSED(int ln)) {
+	if( all_context_mutex == NULL ) {
+		return;
+	}
+
+	_alLockPrintf("_alcUnlockAllContexts", fn, ln);
+	_alUnlockMutex(all_context_mutex);
+}
+
+/*
+ * _alcGetListener( ALuint cid )
+ *
+ * Returns a pointer to the listener associated with context named by cid, or
+ * NULL if cid does not name a valid context.
+ *
+ * assumes locked context
+ */
+AL_listener *_alcGetListener( ALuint cid ) {
+	AL_context *cc;
+
+	cc = _alcGetContext(cid);
+	if(cc == NULL) {
+		return NULL;
+	}
+
+	return &cc->listener;
+}
+
+/*
+ * _alcDestroyAll( void )
+ *
+ * Deallocates the data structures for all contexts.
+ */
+void _alcDestroyAll( void ) {
+	AL_context *freer;
+	ALuint i;
+	ALuint cid;
+
+	for(i = 0; i < al_contexts.items; i++) {
+		cid = _alcIndexToCid( i );
+
+		if(context_mutexen[i] != NULL) {
+			_alDestroyMutex( context_mutexen[i] );
+			context_mutexen[i] = NULL;
+		}
+
+		if(_alcInUse(cid) == AL_TRUE) {
+			freer = _alcGetContext( cid );
+
+			if(freer != NULL) {
+				_alcDestroyContext( freer );
+			}
+		}
+	}
+
+	free( context_mutexen );
+	context_mutexen = NULL;
+
+	free( al_contexts.map );
+	free( al_contexts.pool );
+	free( al_contexts.inuse );
+
+	al_contexts.map   = NULL;
+	al_contexts.pool  = NULL;
+	al_contexts.inuse = NULL;
+	al_contexts.items = 0;
+	al_contexts.size  = 0;
+
+	return;
+}
+
+/*
+ * _alcGetNewContextId( void )
+ *
+ * Returns a new id for use as a context name, setting its use flag to
+ * AL_TRUE, and returns the id.
+ *
+ * If there are no unused contexts, at least one more is created,
+ * and it is modified and returned in the manner described above.
+ *
+ * assumes locked contexts
+ */
+ALint _alcGetNewContextId(void) {
+	ALuint i;
+	ALuint cid;
+	ALuint cindex;
+
+	for(i = 0; i < al_contexts.size; i++) {
+		if(al_contexts.inuse[i] == AL_TRUE) {
+			continue;
+		}
+
+		al_contexts.items++;
+		al_contexts.inuse[i] = AL_TRUE;
+		return al_contexts.map[i] = _alcGenerateNewCid();
+	}
+
+	_alcReallocContexts(al_contexts.size + 1);
+
+	cindex = al_contexts.size - 1;
+	cid = _alcGenerateNewCid();
+
+	assert(al_contexts.inuse[cindex] == AL_FALSE);
+
+	al_contexts.inuse[cindex] = AL_TRUE;
+	al_contexts.map[cindex]   = cid;
+
+	if(_alcInitContext(cid) == NULL) {
+		assert(0);
+		return -1;
+	}
+
+	al_contexts.items++;
+
+	/*
+	 *  We create contexts at the end, so the context id
+	 *  will be the last valid element index (al_contexts.items - 1)
+	 */
+	return cid;
+}
+
+/*
+ * _alcReallocContexts( ALuint newsize )
+ *
+ * _alcReallocContexts resizes the context pool to at least
+ * newsize contexts, and creates mutex such that the new
+ * contexts can be locked.
+ *
+ * assumes locked contexts
+ */
+static void _alcReallocContexts(ALuint newsize) {
+	void *temp;
+	ALuint i;
+
+	if(al_contexts.size >= newsize) {
+		return;
+	}
+
+	/* resize context pool */
+	temp = realloc(al_contexts.pool, sizeof *al_contexts.pool * newsize);
+	if(temp == NULL) {
+		perror("_alcReallocContexts malloc");
+		exit(4);
+	}
+	al_contexts.pool = temp;
+
+	/* resize inuse flags */
+	temp = realloc(al_contexts.inuse, sizeof *al_contexts.inuse * newsize);
+	if(temp == NULL) {
+		perror("_alcReallocContexts malloc");
+		exit(4);
+	}
+	al_contexts.inuse = temp;
+
+	/* resize context map */
+	temp = realloc(al_contexts.map, sizeof *al_contexts.map * newsize);
+	if(temp == NULL) {
+		perror("_alcReallocContexts malloc");
+		exit(4);
+	}
+	al_contexts.map = temp;
+
+	temp = realloc(context_mutexen, sizeof *context_mutexen * newsize);
+	if(temp == NULL) {
+		perror("_alcReallocContexts malloc");
+		exit(4);
+	}
+	context_mutexen = temp;
+
+	/* initialize new data */
+	for(i = al_contexts.items; i < newsize; i++) {
+		al_contexts.inuse[i] = AL_FALSE;
+		al_contexts.map[i] = 0;
+		context_mutexen[i] = _alCreateMutex();
+	}
+
+	if(al_contexts.items == 0) {
+		/* If al_contexts.items is <= 0, then were are creating
+		 * the contexts for the first time, and must create the
+		 * "lock all contexts" mutex as well.
+		 */
+
+		all_context_mutex = _alCreateMutex();
+		if(all_context_mutex == NULL) {
+			perror("CreateMutex");
+			exit(2);
+		}
+	}
+
+	al_contexts.size = newsize;
+
+	return;
+}
+
+/*
+ * _alcGetTimeFilters( ALuint cid )
+ *
+ * Returns a pointer to the time_filter_set associated with the context named
+ * by cid, or NULL if cid does not name a context.
+ *
+ * assumes locked context cid
+ */
+time_filter_set *_alcGetTimeFilters( ALuint cid ) {
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		return NULL;
+	}
+
+	return cc->time_filters;
+}
+
+/*
+ * _alcIndexToCid( int index )
+ *
+ * Converts index to a cid, returning that.
+ */
+static ALuint _alcCidToIndex( ALuint cid ) {
+	ALuint i;
+
+	for(i = 0; i < al_contexts.size; i++) {
+		if( al_contexts.map[i] == cid ) {
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+/*
+ * _alcIndexToCid( int index )
+ *
+ * Converts index to a cid, returning that.
+ */
+static ALuint _alcIndexToCid(int ind)
+{
+	assert(ind >= 0);
+	assert(ind < (int) al_contexts.size);
+
+	return al_contexts.map[ind];
+}
+
+/*
+ * _alcGenerateNewCid( void )
+ *
+ * Returns a new unique ALuint suitable for use as a cid.
+ */
+static ALuint _alcGenerateNewCid(void) {
+	static ALuint base = CONTEXT_BASE;
+
+	return base++;
+}
+
+/*
+ * alcGetCurrentContext( void )
+ *
+ * Returns context handle suitable associated with current context,
+ * suitable for use with every function that takes a context handle,
+ * or NULL if there is no current context.
+ */
+ALCcontext *alcGetCurrentContext( void )
+{
+	if(al_contexts.items == 0)
+	{
+		return NULL;
+	}
+
+	if( _alcCCId == (ALuint) -1 )
+	{
+		/* We are paused */
+		return NULL;
+	}
+
+	return ALUINT_TO_ALCCONTEXTP( _alcCCId );
+}
+
+/*
+ * _alcGetReadBufsiz( ALuint cid )
+ *
+ * Returns the preferred read buffer size of the context named by cid,
+ * in bytes.
+ */
+ALuint _alcGetReadBufsiz( ALuint cid ) {
+	AL_context *cc = _alcGetContext( cid );
+
+	if(cc == NULL) {
+		return 0;
+	}
+
+	if( cc->read_device == NULL) {
+		return 0;
+	}
+
+	return cc->read_device->bufsiz;
+}
+
+/*
+ * _alcGetWriteBufsiz( ALuint cid )
+ *
+ * Returns the preferred write buffer size of the context named by cid,
+ * in bytes.
+ *
+ * assumes locked context
+ */
+ALuint _alcGetWriteBufsiz( ALuint cid ) {
+	AL_context *cc = _alcGetContext( cid );
+
+	if(cc == NULL) {
+		return 0;
+	}
+
+	if( cc->write_device == NULL) {
+		return 0;
+	}
+
+	return cc->write_device->bufsiz;
+}
+
+/*
+ * _alcGetReadFormat( ALuint cid )
+ *
+ * Returns the preferred read openal format of the context named by cid.
+ *
+ * assumes locked context
+ */
+ALenum _alcGetReadFormat( ALuint cid ) {
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		return 0;
+	}
+
+	if( cc->read_device == NULL) {
+		return 0;
+	}
+
+	return cc->read_device->format;
+}
+
+/*
+ * _alcGetWriteFormat( ALuint cid )
+ *
+ * Returns the preferred write openal format of the context named by cid.
+ */
+ALenum _alcGetWriteFormat( ALuint cid ) {
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		return 0;
+	}
+
+	if( cc->write_device == NULL) {
+		return 0;
+	}
+
+	return cc->write_device->format;
+}
+
+/*
+ * _alcGetReadSpeed( ALuint cid )
+ *
+ * Returns the preferred sampling rate of the read device associated with the
+ * context named by cid.
+ *
+ * assumed locked context
+ */
+ALuint _alcGetReadSpeed(ALuint cid) {
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		return 0;
+	}
+
+	if( cc->read_device == NULL) {
+		return 0;
+	}
+
+	return cc->read_device->speed;
+}
+
+/*
+ * _alcGetWriteSpeed( ALuint cid )
+ *
+ * Returns the preferred sampling rate of the write device associated with the
+ * context named by cid.
+ *
+ * assumes locked context
+ */
+ALuint _alcGetWriteSpeed( ALuint cid ) {
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		return 0;
+	}
+
+	if( cc->write_device == NULL) {
+		return 0;
+	}
+
+	return cc->write_device->speed;
+}
+
+/*
+ * _alcDeviceRead( ALuint cid, ALvoid *dataptr, ALuint bytes_to_read )
+ *
+ * Reads bytes_to_read worth of data from the read device
+ * associated with the context named cid.
+ *
+ * assumes locked context
+ */
+ALsizei _alcDeviceRead( ALuint cid, ALvoid *dataptr, ALuint bytes_to_read )
+{
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if( cc == NULL ) {
+		return 0;
+	}
+
+	if( cc->read_device == NULL ) {
+		return 0;
+	}
+
+	return alcBackendRead_(cc->read_device->handle, dataptr, bytes_to_read);
+}
+
+/*
+ * _alcDeviceWrite( ALuint cid, ALvoid *dataptr, ALuint bytes_to_write )
+ *
+ * Writes bytes_to_write worth of data from dataptr to the write device
+ * associated with the context named cid.
+ *
+ * assumes locked context
+ */
+void _alcDeviceWrite( ALuint cid, ALvoid *dataptr, ALuint bytes_to_write ) {
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if( cc == NULL ) {
+		return;
+	}
+
+	if( cc->write_device == NULL ) {
+		return;
+	}
+
+	alcBackendWrite_( cc->write_device->handle, dataptr, bytes_to_write );
+
+	return;
+}
+
+/*
+ * _alcIsContext( ALuint cid )
+ *
+ * Returns AL_TRUE if cid names a valid context, AL_FALSE otherwise.
+ *
+ * assumes locked context
+ */
+ALboolean _alcIsContext( ALuint cid ) {
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if( cc == NULL ) {
+		return AL_FALSE;
+	}
+
+	return AL_TRUE;
+}
+
+/*
+ * _alcIsContextSuspended( ALuint cid )
+ *
+ * Returns AL_TRUE if this context is suspended, AL_FALSE otherwise.
+ * Suspended contexts do not have their sources updated, or mixed.
+ *
+ * assumes locked context
+ */
+ALboolean _alcIsContextSuspended( ALuint cid ) {
+	AL_context *cc;
+
+	cc = _alcGetContext( cid );
+	if( cc == NULL ) {
+		return AL_TRUE;
+	}
+
+	return cc->issuspended;
+}
+
+/*
+ * alcIsExtensionPresent( UNUSED(ALCdevice *device), ALCubyte *extName )
+ *
+ * Returns AL_TRUE if the alc extension extName is present, AL_FALSE
+ * otherwise.
+ */
+ALCboolean alcIsExtensionPresent( UNUSED(ALCdevice *device), const ALCchar *extName ) {
+	return alIsExtensionPresent( extName );
+}
+
+#define DEFINE_ALC_PROC(p) { #p, (AL_funcPtr)p }
+
+typedef struct
+{
+	const ALCchar *name;
+	AL_funcPtr value;
+} funcNameAddressPair;
+
+funcNameAddressPair alcProcs[] = {
+	DEFINE_ALC_PROC(alcCaptureCloseDevice),
+	DEFINE_ALC_PROC(alcCaptureOpenDevice),
+	DEFINE_ALC_PROC(alcCaptureSamples),
+	DEFINE_ALC_PROC(alcCaptureStart),
+	DEFINE_ALC_PROC(alcCaptureStop),
+	DEFINE_ALC_PROC(alcCloseDevice),
+	DEFINE_ALC_PROC(alcCreateContext),
+	DEFINE_ALC_PROC(alcDestroyContext),
+	DEFINE_ALC_PROC(alcGetContextsDevice),
+	DEFINE_ALC_PROC(alcGetCurrentContext),
+	DEFINE_ALC_PROC(alcGetEnumValue),
+	DEFINE_ALC_PROC(alcGetError),
+	DEFINE_ALC_PROC(alcGetIntegerv),
+	DEFINE_ALC_PROC(alcGetProcAddress),
+	DEFINE_ALC_PROC(alcGetString),
+	DEFINE_ALC_PROC(alcIsExtensionPresent),
+	DEFINE_ALC_PROC(alcMakeContextCurrent),
+	DEFINE_ALC_PROC(alcOpenDevice),
+	DEFINE_ALC_PROC(alcProcessContext),
+	DEFINE_ALC_PROC(alcSuspendContext)
+};
+
+#undef DEFINE_ALC_PROC
+
+static int
+compareFuncNameAddressPairs(const void *s1, const void *s2)
+{
+	const funcNameAddressPair *p1 = (const funcNameAddressPair*)s1;
+	const funcNameAddressPair *p2 = (const funcNameAddressPair*)s2;
+	return strcmp((const char*)(p1->name), (const char*)(p2->name));
+}
+
+static ALCboolean
+getStandardProcAddress(AL_funcPtr *value, const ALCchar *funcName)
+{
+	funcNameAddressPair key;
+	funcNameAddressPair *p;
+	key.name = funcName;
+	p = bsearch(&key, alcProcs,
+		    sizeof(alcProcs) / sizeof(alcProcs[0]),
+		    sizeof(alcProcs[0]),
+		    compareFuncNameAddressPairs);
+	if (p == NULL) {
+		return ALC_FALSE;
+	}
+	*value = p->value;
+	return ALC_TRUE;
+}
+
+static ALCboolean
+getExtensionProcAddress( AL_funcPtr *procAddress, UNUSED(ALCdevice *device), const ALCchar *funcName )
+{
+	/* TODO: using _alGetExtensionProcAddress is a HACK */
+	return (_alGetExtensionProcAddress( procAddress, (const ALchar*)funcName) == AL_TRUE) ? ALC_TRUE : ALC_FALSE;
+}
+
+/*
+ * alcGetProcAddress( UNUSED(ALCdevice *device), ALCubyte *funcName ).
+ *
+ * Returns the alc extension function named funcName, or NULL if it doesn't
+ * exist.
+ */
+void *
+alcGetProcAddress( ALCdevice *device, const ALCchar *funcName )
+{
+	AL_funcPtr value;
+	if (getStandardProcAddress(&value, funcName) == ALC_TRUE) {
+		return (void *)value; /* NOTE: The cast is not valid ISO C! */
+	}
+	if (getExtensionProcAddress(&value, device, funcName) == ALC_TRUE) {
+		return (void *)value; /* NOTE: The cast is not valid ISO C! */
+	}
+	_alcSetError( ALC_INVALID_VALUE );
+	return NULL;
+}
+
+#define DEFINE_ALC_ENUM(e) { #e, e }
+
+typedef struct
+{
+	const ALCchar *name;
+	ALCenum value;
+} enumNameValuePair;
+
+enumNameValuePair alcEnums[] = {
+	/* this has to be sorted! */
+	DEFINE_ALC_ENUM(ALC_ALL_ATTRIBUTES),
+	DEFINE_ALC_ENUM(ALC_ATTRIBUTES_SIZE),
+	DEFINE_ALC_ENUM(ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER),
+	DEFINE_ALC_ENUM(ALC_CAPTURE_DEVICE_SPECIFIER),
+	DEFINE_ALC_ENUM(ALC_CAPTURE_SAMPLES),
+	DEFINE_ALC_ENUM(ALC_DEFAULT_DEVICE_SPECIFIER),
+	DEFINE_ALC_ENUM(ALC_DEVICE_SPECIFIER),
+	DEFINE_ALC_ENUM(ALC_EXTENSIONS),
+	DEFINE_ALC_ENUM(ALC_FALSE),
+	DEFINE_ALC_ENUM(ALC_FREQUENCY),
+	DEFINE_ALC_ENUM(ALC_INVALID_CONTEXT),
+	DEFINE_ALC_ENUM(ALC_INVALID_DEVICE),
+	DEFINE_ALC_ENUM(ALC_INVALID_ENUM),
+	DEFINE_ALC_ENUM(ALC_INVALID_VALUE),
+	DEFINE_ALC_ENUM(ALC_MAJOR_VERSION),
+	DEFINE_ALC_ENUM(ALC_MINOR_VERSION),
+	DEFINE_ALC_ENUM(ALC_MONO_SOURCES),
+	DEFINE_ALC_ENUM(ALC_NO_ERROR),
+	DEFINE_ALC_ENUM(ALC_OUT_OF_MEMORY),
+	DEFINE_ALC_ENUM(ALC_REFRESH),
+	DEFINE_ALC_ENUM(ALC_STEREO_SOURCES),
+	DEFINE_ALC_ENUM(ALC_SYNC),
+	DEFINE_ALC_ENUM(ALC_TRUE)
+};
+
+#undef DEFINE_ALC_ENUM
+
+static int
+compareEnumNameValuePairs(const void *s1, const void *s2)
+{
+	const enumNameValuePair *p1 = (const enumNameValuePair*)s1;
+	const enumNameValuePair *p2 = (const enumNameValuePair*)s2;
+	return strcmp((const char*)(p1->name), (const char*)(p2->name));
+}
+
+static ALCboolean
+getStandardEnumValue(ALCenum *value, const ALCchar *enumName)
+{
+	enumNameValuePair key;
+	enumNameValuePair *p;
+	key.name = enumName;
+	p = bsearch(&key, alcEnums,
+		    sizeof(alcEnums) / sizeof(alcEnums[0]),
+		    sizeof(alcEnums[0]),
+		    compareEnumNameValuePairs);
+	if (p == NULL) {
+		return ALC_FALSE;
+	}
+	*value = p->value;
+	return ALC_TRUE;
+}
+
+static ALCboolean
+getExtensionEnumValue( UNUSED(ALCenum *value), UNUSED(ALCdevice *device), UNUSED(const ALCchar *enumName) )
+{
+	/* ToDo: Hook in our extension loader somehow */
+	return ALC_FALSE;
+}
+
+/*
+ * alcGetEnumValue( ALCdevice *device, ALCubyte *enumName )
+ *
+ * Returns enum value for enumName.
+ */
+ALCenum
+alcGetEnumValue( ALCdevice *device, const ALCchar *enumName )
+{
+	ALCenum value = 0;
+	if (getStandardEnumValue(&value, enumName) == ALC_TRUE) {
+		return value;
+	}
+	if (getExtensionEnumValue(&value, device, enumName) == ALC_TRUE) {
+		return value;
+	}
+	_alcSetError( ALC_INVALID_VALUE );
+	return value;
+}
+
+ALCdevice *alcGetContextsDevice(ALCcontext *handle)
+{
+	AL_device *dc;
+	AL_context *cc;
+	ALuint cid = ALCCONTEXTP_TO_ALUINT( handle );
+
+	_alcLockAllContexts();
+
+	cc = _alcGetContext( cid );
+	if( cc == NULL )
+	{
+		_alcSetError( ALC_INVALID_CONTEXT );
+		_alcUnlockAllContexts( );
+
+		return NULL;
+	}
+
+	dc = cc->write_device;
+
+	/* just unlock contexts */
+	_alcUnlockAllContexts();
+
+	return dc;
+}
+
+const ALCchar *alcGetString( ALCdevice *dev, ALCenum token )
+{
+	switch(token)
+	{
+		case ALC_DEFAULT_DEVICE_SPECIFIER:
+		  return (const ALCchar *) "'((sampling-rate 44100) (device '(native))";
+		  break;
+		case ALC_DEVICE_SPECIFIER:
+		  if(!dev)
+		  {
+			  _alcSetError(ALC_INVALID_DEVICE);
+			  return (const ALCchar *) "";
+		  }
+
+		  return dev->specifier;
+		  break;
+		case ALC_EXTENSIONS:
+		  return (const ALCchar *) "";
+		  break;
+		case ALC_NO_ERROR:
+		  return (const ALCchar *) "ALC_NO_ERROR";
+		  break;
+		case ALC_INVALID_DEVICE:
+		  return (const ALCchar *) "ALC_INVALID_DEVICE";
+		  break;
+		case ALC_INVALID_CONTEXT:
+		  return (const ALCchar *) "ALC_INVALID_CONTEXT";
+		  break;
+		case ALC_INVALID_ENUM:
+		  return (const ALCchar *) "ALC_INVALID_ENUM";
+		  break;
+		case ALC_INVALID_VALUE:
+		  return (const ALCchar *) "ALC_INVALID_VALUE";
+		  break;
+		default:
+		  _alcSetError(ALC_INVALID_ENUM);
+		  break;
+	}
+
+	return (const ALCchar *) "";
+}
+
+/* evil */
+extern ALint __alcGetAvailableSamples (void);
+
+static AL_context *
+_alcGetContextOfDevice (ALCdevice *deviceHandle)
+{
+  AL_context *cc;
+
+  if (deviceHandle == NULL)
+    {
+      _alcSetError (ALC_INVALID_DEVICE);
+      return NULL;
+    }
+
+  cc = deviceHandle->cc;
+  if (cc == NULL)
+    {
+      _alcSetError (ALC_INVALID_CONTEXT);
+      return NULL;
+    }
+
+  return cc;
+}
+
+static int
+_alcIsDestinationValid (ALCsizei neededSize, ALCsizei size, ALCint *dest)
+{
+  if ((neededSize > size) || (dest == NULL))
+    {
+      _alcSetError (ALC_INVALID_VALUE);
+      return 0;
+    }
+  return 1;
+}
+
+/*
+ * FIXME: Do we have to do some locking below? Move major/minor to
+ * header and copy attributes at context creation time.
+ */
+void
+alcGetIntegerv (ALCdevice *deviceHandle, ALCenum token,
+                ALCsizei size, ALCint *dest)
+{
+  AL_context *cc;
+  ALint i;
+
+  switch (token)
+    {
+    case ALC_ATTRIBUTES_SIZE:
+      cc = _alcGetContextOfDevice (deviceHandle);
+      if ((cc == NULL) || !_alcIsDestinationValid (1, size, dest))
+        {
+          return;
+        }
+      *dest = 2 * cc->NumFlags + 1;
+      return;
+
+    case ALC_ALL_ATTRIBUTES:
+      cc = _alcGetContextOfDevice (deviceHandle);
+      if ((cc == NULL)
+          || !_alcIsDestinationValid (2 * cc->NumFlags + 1, size, dest))
+        {
+          return;
+        }
+      for (i = 0; i < 2 * cc->NumFlags; i++)
+        {
+          dest[i] = cc->Flags[i];
+        }
+      dest[2 * cc->NumFlags] = 0;
+      return;
+
+    case ALC_MAJOR_VERSION:
+      if (!_alcIsDestinationValid (1, size, dest))
+        {
+          return;
+        }
+      *dest = 1;
+      return;
+
+    case ALC_MINOR_VERSION:
+      if (!_alcIsDestinationValid (1, size, dest))
+        {
+          return;
+        }
+      *dest = 0;
+      return;
+
+    case ALC_CAPTURE_SAMPLES:
+      cc = _alcGetContextOfDevice (deviceHandle);
+      if ((cc == NULL) || !_alcIsDestinationValid (1, size, dest))
+        {
+          return;
+        }
+      *dest = __alcGetAvailableSamples ();
+      return;
+
+    default:
+      _alcSetError (ALC_INVALID_ENUM);
+      return;
+    }
+}
+
+/*
+ Capture functions
+*/
+
+/* Hacked in ALC_EXT_capture support.  --ryan. */
+/* This doesn't support multiple devices, device enumeration, or capture */
+/*  devices seperate from an existing context. How painful. */
+
+/* ring buffer functionality... */
+
+typedef struct {
+	ALubyte *buffer;
+	ALsizei size;
+	ALsizei write;
+	ALsizei read;
+	ALsizei used;
+} __ALRingBuffer;
+
+static ALboolean __alRingBufferInit( __ALRingBuffer * ring, ALsizei size );
+static ALvoid __alRingBufferShutdown( __ALRingBuffer * ring );
+static ALsizei __alRingBufferSize( __ALRingBuffer * ring );
+static ALvoid __alRingBufferPut( __ALRingBuffer * ring, ALubyte *data,
+				 ALsizei size );
+static ALsizei __alRingBufferGet( __ALRingBuffer * ring, ALubyte *data,
+				  ALsizei size );
+
+static __ALRingBuffer captureRing;
+
+static ALboolean __alRingBufferInit( __ALRingBuffer * ring, ALsizei size )
+{
+	ALubyte *ptr = ( ALubyte * ) realloc( ring->buffer, size );
+	if( ptr == NULL ) {
+		return AL_FALSE;
+	}
+
+	ring->buffer = ptr;
+	ring->size = size;
+	ring->write = 0;
+	ring->read = 0;
+	ring->used = 0;
+	return AL_TRUE;
+}
+
+static ALvoid __alRingBufferShutdown( __ALRingBuffer * ring )
+{
+	free( ring->buffer );
+	ring->buffer = NULL;
+}
+
+static ALsizei __alRingBufferSize( __ALRingBuffer * ring )
+{
+	return ring->used;
+}
+
+static ALvoid __alRingBufferPut( __ALRingBuffer * ring, ALubyte *data,
+				 ALsizei _size )
+{
+	register ALsizei size = _size;
+	register ALsizei cpy;
+	register ALsizei avail;
+
+	if( !size ) {		/* just in case... */
+		return;
+	}
+
+	/* Putting more data than ring buffer holds in total? Replace it all. */
+	if( size > ring->size ) {
+		ring->write = 0;
+		ring->read = 0;
+		ring->used = ring->size;
+		memcpy( ring->buffer, data + ( size - ring->size ),
+			ring->size );
+		return;
+	}
+
+	/* Buffer overflow? Push read pointer to oldest sample not overwritten. */
+	avail = ring->size - ring->used;
+	if( size > avail ) {
+		ring->read += size - avail;
+		if( ring->read > ring->size ) {
+			ring->read -= ring->size;
+		}
+	}
+
+	/* Clip to end of buffer and copy first block... */
+	cpy = ring->size - ring->write;
+	if( size < cpy ) {
+		cpy = size;
+	}
+	if( cpy ) {
+		memcpy( ring->buffer + ring->write, data, cpy );
+	}
+
+	/* Wrap around to front of ring buffer and copy remaining data... */
+	avail = size - cpy;
+	if( avail ) {
+		memcpy( ring->buffer, data + cpy, avail );
+	}
+
+	/* Update write pointer... */
+	ring->write += size;
+	if( ring->write > ring->size ) {
+		ring->write -= ring->size;
+	}
+
+	ring->used += size;
+	if( ring->used > ring->size ) {
+		ring->used = ring->size;
+	}
+}
+
+static ALsizei __alRingBufferGet( __ALRingBuffer * ring, ALubyte *data,
+				  ALsizei _size )
+{
+	register ALsizei cpy;
+	register ALsizei size = _size;
+	register ALsizei avail = ring->used;
+
+	/* Clamp amount to read to available data... */
+	if( size > avail ) {
+		size = avail;
+	}
+
+	/* Clip to end of buffer and copy first block... */
+	cpy = ring->size - ring->read;
+	if( cpy > size ) {
+		cpy = size;
+	}
+	if( cpy ) {
+		memcpy( data, ring->buffer + ring->read, cpy );
+	}
+
+	/* Wrap around to front of ring buffer and copy remaining data... */
+	avail = size - cpy;
+	if( avail ) {
+		memcpy( data + cpy, ring->buffer, avail );
+	}
+
+	/* Update read pointer... */
+	ring->read += size;
+	if( ring->read > ring->size ) {
+		ring->read -= ring->size;
+	}
+
+	ring->used -= size;
+
+	return size;	/* may have been clamped if there wasn't enough data... */
+}
+
+static ALenum captureFmt = AL_NONE;
+static ALuint captureFreq = 0;
+static ALint captureFmtSize = 0;
+
+ALCdevice *alcCaptureOpenDevice( const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei bufferSize )
+{
+	ALCdevice *retval;
+	AL_context *cc;
+	ALuint cid;
+
+	if ( deviceName != NULL )  { /* !!! FIXME */
+		return NULL;
+	}
+
+	switch( format ) { /* try to keep this sane for now... */
+        case AL_FORMAT_MONO8:
+        case AL_FORMAT_MONO16:
+        case AL_FORMAT_STEREO8:
+        case AL_FORMAT_STEREO16:
+		break;  /* format okay. */
+        default:
+		return NULL;
+	}
+
+	captureFmt = format;
+	captureFreq = frequency;
+	captureFmtSize = _alGetBitsFromFormat( format ) / 8;
+	if( ( format == AL_FORMAT_STEREO8 ) || ( format == AL_FORMAT_STEREO16 ) ) {
+		captureFmtSize *= 2;
+	}
+
+	bufferSize *= captureFmtSize;
+
+	if ( !__alRingBufferInit( &captureRing, bufferSize )) {
+		return NULL;
+	}
+
+	if( !alCaptureInit_EXT( format, frequency, bufferSize) ) {
+		return NULL;
+	}
+
+	cid = _alcCCId;
+	_alcLockContext( cid );
+	cc = _alcGetContext(cid);
+	retval = cc->read_device;
+	retval->cc = cc;
+	_alcUnlockContext( cid );
+
+	return retval;
+}
+
+ALCboolean alcCaptureCloseDevice( ALCdevice *device )
+{
+	if( device == NULL ) {
+		return ALC_FALSE;
+	}
+
+	alCaptureDestroy_EXT();
+	__alRingBufferShutdown( &captureRing );
+	return ALC_TRUE;
+}
+
+void alcCaptureStart( UNUSED(ALCdevice *device) )
+{
+	alCaptureStart_EXT();
+
+}
+
+void alcCaptureStop( UNUSED(ALCdevice *device) )
+{
+	alCaptureStop_EXT();
+}
+
+/* !!! FIXME: Not ideal; reads samples in ALC_CAPTURE_SAMPLES query */
+/* !!! FIXME: should query hardware here and do read in alcCaptureSamples() */
+ALint __alcGetAvailableSamples( void )
+{
+	static ALubyte buf[2048];
+	ALsizei got;
+    
+	while ( (got = alCaptureGetData_EXT(buf, sizeof (buf), captureFmt, captureFreq) ) > 0 ) {
+		__alRingBufferPut( &captureRing, buf, got );
+	}
+
+	/* printf("got %d have %d\n", (int) got, (int) (__alRingBufferSize(&captureRing) / captureFmtSize)); */
+
+	return __alRingBufferSize(&captureRing) / captureFmtSize;
+}
+
+void alcCaptureSamples( UNUSED(ALCdevice *device), ALCvoid *buffer, ALCsizei samples )
+{
+	if( ( __alRingBufferSize(&captureRing) / captureFmtSize ) < samples ) {
+		return;  /* !!! FIXME: This is an error condition! */
+	}
+
+	__alRingBufferGet( &captureRing, buffer, samples * captureFmtSize );
+}
Index: /openal-0.0.8/src/alc/alc_context.h
===================================================================
--- /openal-0.0.8/src/alc/alc_context.h	(revision 17)
+++ /openal-0.0.8/src/alc/alc_context.h	(revision 17)
@@ -0,0 +1,216 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * alc_context.h
+ *
+ * Prototypes, defines etc for context aquisition and management.
+ */
+#ifndef _ALC_CONTEXT_H_
+#define _ALC_CONTEXT_H_
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alc.h>
+
+#include "al_types.h"
+
+/*
+ * _ALC_DEF_FREQ is the default internal mixing frequency.
+ */
+#define _ALC_DEF_FREQ        44100
+
+/*
+ * _ALC_DEF_BUFSIZ is the default length of chunks mixed and written to the
+ * audio device.  Must be a power of two.
+ */
+#define _ALC_DEF_BUFSIZ       1024
+
+/*
+ * Canonical stuff
+ */
+#define _ALC_CANON_FMT           AL_FORMAT_MONO16
+#define _ALC_CANON_SPEED         _ALC_DEF_FREQ
+
+#define _ALC_EXTERNAL_FMT        AL_FORMAT_STEREO16
+#define _ALC_EXTERNAL_SPEED      _ALC_DEF_FREQ
+
+/* globally accesible data */
+
+/*
+ * _alcCCId holds the context id of the current context.
+ */
+extern ALuint _alcCCId;
+
+/*
+ * canon_max and canon_min are the max/min values for PCM data in our
+ * canonical format, respectively.
+ */
+extern const int canon_max, canon_min;
+
+
+
+/*
+ * canon_format is the canonical format that we represent data internally as.
+ */
+extern ALenum canon_format;
+
+/*
+ * canon_speed is the sampling rate at which we internally represent data.
+ */
+extern ALuint canon_speed;
+
+/*
+ * Deallocates the data structures allocated in _alcInitContexts.
+ */
+void _alcDestroyAll( void );
+
+/*
+ * Initialize the context named by cid.
+ */
+AL_context *_alcInitContext( ALuint cid );
+
+/*
+ * Returns pointer to the AL_context named by cid, or NULL if cid is not a
+ * valid context name.
+ */
+AL_context *_alcGetContext( ALuint cid );
+
+/*
+ * Returns AL_TRUE if cid names a valid context, AL_FALSE otherwise.
+ */
+ALboolean _alcIsContext( ALuint cid );
+
+/*
+ * Sets context id paramaters according to an attribute list and device.
+ */
+void _alcSetContext( const ALCint *attrlist, ALuint cid, AL_device *dev );
+
+/*
+ * Returns a new id for use as a context name.
+ */
+ALint _alcGetNewContextId( void );
+
+/*
+ * Returns AL_TRUE if the context named by cid is in use, AL_FALSE otherwise.
+ */
+ALboolean _alcInUse( ALuint cid );
+
+/*
+ * Sets the use flag of context with id cid to value.
+ */
+ALboolean _alcSetUse( ALuint cid, ALboolean value );
+
+/*
+ * Returns the preferred read buffer size of the context named by cid,
+ * in bytes.
+ */
+ALuint _alcGetReadBufsiz( ALuint cid );
+
+/*
+ * Returns the preferred write buffer size of the context named by cid,
+ * in bytes.
+ */
+ALuint _alcGetWriteBufsiz( ALuint cid );
+
+/*
+ * Returns the preferred read openal format of the context named by cid.
+ */
+ALenum _alcGetReadFormat( ALuint cid );
+
+/*
+ * Returns the preferred write openal format of the context named by cid.
+ */
+ALenum _alcGetWriteFormat( ALuint cid );
+
+/*
+ * Returns the preferred sampling rate of the read device associated with the
+ * context named by cid.
+ */
+ALuint _alcGetReadSpeed( ALuint cid );
+
+/*
+ * Returns the preferred sampling rate of the write device associated with the
+ * context named by cid.
+ */
+ALuint _alcGetWriteSpeed( ALuint cid );
+
+/*
+ * Returns a pointer to the listener associated with context named by cid, or
+ * NULL if cid does not name a valid context.
+ */
+AL_listener *_alcGetListener( ALuint cid );
+
+/*
+ * Returns AL_TRUE if this context is suspended, AL_FALSE otherwise.
+ * Suspended contexts do not have their sources updated, or mixed.
+ */
+ALboolean _alcIsContextSuspended( ALuint cid );
+
+/*
+ * Returns a pointer to the time_filter_set associated with the context named
+ * by cid, or NULL if cid does not name a context.
+ */
+time_filter_set *_alcGetTimeFilters( ALuint cid );
+
+/*
+ * Locks the mutex associated with the context named by cid, passing fn and ln
+ * to _alLockPrintf for debugging purposes.
+ */
+void FL_alcLockContext( ALuint cid, const char *fn, int ln );
+
+/*
+ * Unlocks the mutex associated with the context named by cid, passing fn and ln
+ * to _alLockPrintf for debugging purposes.
+ */
+void FL_alcUnlockContext( ALuint cid, const char *fn, int ln );
+
+/*
+ * Locks the mutex associated guarding all contexts, passing fn and ln to
+ * _alLockPrintf for debugging purposes.
+ */
+void FL_alcLockAllContexts( const char *fn, int ln );
+
+/*
+ * Unlocks the mutex associated guarding all contexts, passing fn and ln to
+ * _alLockPrintf for debugging purposes.
+ */
+void FL_alcUnlockAllContexts( const char *fn, int ln );
+
+/*
+ * Write bytes_to_write worth of data from data to the device associated with
+ * the context named by cid.
+ */
+void _alcDeviceWrite( ALuint cid, ALvoid *data, ALuint bytes_to_write );
+
+/*
+ * Read bytes_to_read worth of data from the device associated with the
+ * context named by cid.
+ */
+ALsizei _alcDeviceRead( ALuint cid, void *data, ALuint bytes_to_read );
+
+/* default context macros */
+#define _alcDCGetContext()        _alcGetContext(_alcCCId)
+#define _alcDCGetReadBufsiz()     _alcGetReadBufsiz(_alcCCId)
+#define _alcDCGetWriteBufsiz()    _alcGetWriteBufsiz(_alcCCId)
+#define _alcDCGetTimeFilters()    _alcGetTimeFilters(_alcCCId)
+#define _alcDCGetFreqFilters()    _alcGetFreqFilters(_alcCCId)
+#define _alcDCGetListener()       _alcGetListener(_alcCCId)
+#define _alcDCEnableCapture()     _alcEnableCapture(_alcCCId)
+#define _alcDCDisableCapture()    _alcDisableCapture(_alcCCId)
+
+#define _alcDCGetReadSpeed()      _alcGetReadSpeed(_alcCCId)
+#define _alcDCGetReadFormat()     _alcGetReadFormat(_alcCCId)
+#define _alcDCGetWriteSpeed()     _alcGetWriteSpeed(_alcCCId)
+#define _alcDCGetWriteFormat()    _alcGetWriteFormat(_alcCCId)
+#define _alcDCDeviceWrite(d,b)    _alcDeviceWrite(_alcCCId, d, b)
+#define _alcDCDeviceRead(d,b)     _alcDeviceRead(_alcCCId, d, b)
+
+#define _alcDCLockContext()     FL_alcLockContext(_alcCCId, __FILE__, __LINE__)
+#define _alcDCUnlockContext()   FL_alcUnlockContext(_alcCCId,__FILE__, __LINE__)
+#define _alcUnlockContext(c)    FL_alcUnlockContext(c, __FILE__, __LINE__)
+#define _alcLockContext(c)      FL_alcLockContext(c, __FILE__, __LINE__)
+#define _alcUnlockAllContexts() FL_alcUnlockAllContexts(__FILE__, __LINE__)
+#define _alcLockAllContexts()   FL_alcLockAllContexts(__FILE__, __LINE__)
+
+#endif /* _ALC_CONTEXT_H_ */
Index: /openal-0.0.8/src/alc/alc_device.c
===================================================================
--- /openal-0.0.8/src/alc/alc_device.c	(revision 17)
+++ /openal-0.0.8/src/alc/alc_device.c	(revision 17)
@@ -0,0 +1,240 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * alc_device.c
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "al_config.h"
+#include "al_main.h"
+#include "al_debug.h"
+
+#include "alc/alc_device.h"
+#include "alc/alc_error.h"
+
+#include "backends/alc_backend.h"
+
+static int num_devices = 0;
+
+/*
+ * Opens a device, using the alrc expression deviceSpecifier to specify
+ * attributes for the device.  Returns the device if successful, NULL
+ * otherwise.
+ */
+ALCdevice *alcOpenDevice( const ALchar *deviceSpecifier ) {
+	ALCdevice *retval;
+	char dirstr[65];
+	Rcvar foo = NULL;
+	Rcvar direction = NULL;
+	Rcvar freq_sym = NULL;
+	Rcvar speakers = NULL;
+	Rcvar devices = NULL;
+	int openForInput;
+
+	if( num_devices == 0 ) {
+		/* first initialization */
+		if( _alParseConfig() == AL_FALSE ) {
+			_alDebug(ALD_CONFIG, __FILE__, __LINE__,
+				"Couldn't parse config file.");
+		}
+	}
+
+	/* see if the user defined devices, sampling-rate, or direction */
+	devices   = rc_lookup( "devices" );
+	direction = rc_lookup( "direction" );
+	freq_sym  = rc_lookup( "sampling-rate" );
+	speakers  = rc_lookup( "speaker-num" );
+
+	/* get the attributes requested in the args */
+	if( deviceSpecifier ) {
+		foo = rc_eval( (const char *) deviceSpecifier );
+	}
+
+	/* define each attribute pair */
+	rc_foreach( foo, rc_define_list );
+
+	/* redefine the stuff we saved */
+	if( direction != NULL ) {
+		rc_define( "direction", alrc_quote( direction ));
+	}
+
+	if( devices != NULL ) {
+		rc_define( "devices", alrc_quote( devices ) );
+	}
+
+	if( freq_sym != NULL ) {
+		rc_define( "sampling-rate", alrc_quote( freq_sym ));
+	}
+
+	if( speakers != NULL ) {
+		rc_define( "speaker-num", alrc_quote( speakers ));
+	}
+
+	direction = rc_lookup( "direction" );
+	devices   = rc_lookup( "devices" );
+	freq_sym  = rc_lookup( "sampling-rate" );
+	speakers  = rc_lookup( "speaker-num" );
+
+	memset( dirstr, 0, sizeof(dirstr) );
+	
+	if( direction != NULL ) {
+		switch( rc_type( direction ) ) {
+			case ALRC_STRING:
+				rc_tostr0(direction, dirstr, 64);
+				break;
+			case ALRC_SYMBOL:
+				rc_symtostr0(direction, dirstr, 64);
+				break;
+			default:
+				break;
+		}
+	}
+
+	retval = malloc( sizeof *retval );
+	if( retval == NULL) {
+		/* FIXME: set AL_OUT_OF_MEMORY here? */
+
+		return NULL;
+	}
+
+	/* copy specifier */
+	if(deviceSpecifier)
+	{
+		size_t len;
+		len = strlen((const char *) deviceSpecifier);
+		retval->specifier = malloc(len+1);
+		if(retval->specifier == NULL)
+		{
+			free(retval);
+			return NULL;
+		}
+
+		memcpy(retval->specifier, deviceSpecifier, len);
+		retval->specifier[len] = '\0';
+	}
+	else
+	{
+		/* JIV FIXME: maybe set to default string? */
+		retval->specifier = malloc(1);
+		retval->specifier[0] = '\0';
+	}
+
+	/* defaults */
+	retval->format = _ALC_EXTERNAL_FMT;
+	retval->speed  = _ALC_EXTERNAL_SPEED;
+	retval->bufsiz = _ALC_DEF_BUFSIZ;
+	retval->flags  = ALCD_NONE;
+
+	if( freq_sym != NULL ) {
+		switch(rc_type( freq_sym )) {
+			case ALRC_INTEGER:
+			case ALRC_FLOAT:
+				retval->speed = rc_toint( freq_sym );
+				break;
+			default:
+				_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+					"invalid type %s for sampling-rate",
+					rc_typestr( rc_type( freq_sym ) ));
+				break;
+		}
+	}
+
+	if( speakers != NULL ) {
+		switch(rc_type( speakers )) {
+			case ALRC_INTEGER:
+			case ALRC_FLOAT:
+				{
+					ALint s = rc_toint( speakers );
+					if (s >= 0) {
+						ALenum fmt = _al_formatscale( retval->format, (ALuint)s );
+						if ( fmt >= 0 ) {
+							retval->format = fmt;
+						}
+					}
+				}
+				break;
+			default:
+				break;
+		}
+	}
+
+	openForInput = (strncmp( dirstr, "read", 64 ) == 0);
+	retval->handle = alcBackendOpen_( openForInput ? ALC_OPEN_INPUT_ : ALC_OPEN_OUTPUT_ );
+	if( retval->handle == NULL ) {
+		free( retval );
+		_alcSetError(ALC_INVALID_DEVICE);
+		return NULL;
+	}
+	retval->flags |= ( openForInput ? ALCD_READ : ALCD_WRITE );
+
+	num_devices++;
+
+	return retval;
+}
+
+/*
+ * Closes the device referred to by dev.
+ */
+ALCboolean
+alcCloseDevice( ALCdevice *dev )
+{
+	/* ToDo: Is this test really necessary? */
+	if ( dev->handle != NULL) {
+		/* ToDo: Use return value */
+		alcBackendClose_( dev->handle );
+	}
+
+	free( dev->specifier );
+	free( dev );
+
+	num_devices--;
+
+	return ALC_TRUE;
+}
+
+/*
+ * Sets the attributes for the device from the settings in the device. The
+ * library is free to change the parameters associated with the device, but
+ * until _alcDeviceSet is called, none of the changes are important.
+ *
+ * Sets ALC_INVALID_DEVICE if the setting operation failed.  After a call to
+ * this function, the caller should check the members in dev is see what the
+ * actual values set where.
+ */
+void
+_alcDeviceSet( AL_device *dev )
+{
+	if( alcBackendSetAttributes_(dev->handle, &dev->bufsiz, &dev->format, &dev->speed) != AL_TRUE ) {
+		_alDebug(ALD_CONTEXT, __FILE__, __LINE__, "_alcDeviceSet failed.");
+		_alcSetError( ALC_INVALID_DEVICE );
+	}
+	_alDebug( ALD_CONVERT, __FILE__, __LINE__,
+		  "after set_audiodevice, f|s|b 0x%x|%d|%d",
+		  dev->format,
+		  dev->speed,
+		  dev->bufsiz );
+}
+
+/*
+ * Pauses a device.
+ */
+void
+_alcDevicePause( AL_device *dev  )
+{
+	alcBackendPause_( dev->handle );
+}
+
+/*
+ * Resumes a device.
+ */
+void
+_alcDeviceResume( AL_device *dev  )
+{
+	alcBackendResume_( dev->handle );
+}
Index: /openal-0.0.8/src/alc/alc_device.h
===================================================================
--- /openal-0.0.8/src/alc/alc_device.h	(revision 17)
+++ /openal-0.0.8/src/alc/alc_device.h	(revision 17)
@@ -0,0 +1,36 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * alc_device.h
+ *
+ * Prototypes, defines etc for device aquisition and management.
+ */
+#ifndef ALC_DEVICE_H_
+#define ALC_DEVICE_H_
+
+#include "al_siteconfig.h"
+#include <AL/al.h>
+
+#include "al_types.h"
+/*
+ * Pauses a device.
+ */
+void _alcDevicePause( AL_device *dev );
+
+/*
+ * Resumes a device.
+ */
+void _alcDeviceResume( AL_device *dev );
+
+/*
+ * Sets the attributes for the device from the settings in the device. The
+ * library is free to change the parameters associated with the device, but
+ * until _alcDeviceSet is called, none of the changes are important.
+ *
+ * Sets ALC_INVALID_DEVICE if the setting operation failed.  After a call to
+ * this function, the caller should check the members in dev is see what the
+ * actual values set where.
+ */
+void _alcDeviceSet( AL_device *dev );
+
+#endif /* _ALC_DEVICE_H_ */
Index: /openal-0.0.8/src/alc/alc_error.c
===================================================================
--- /openal-0.0.8/src/alc/alc_error.c	(revision 17)
+++ /openal-0.0.8/src/alc/alc_error.c	(revision 17)
@@ -0,0 +1,199 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * alc_error.c
+ *
+ * openal error reporting.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alc.h>
+
+#include "al_debug.h"
+#include "al_main.h"
+
+#include "alc/alc_error.h"
+
+/*
+ * alcErrorIndex is a simple index referring to an error.
+ */
+static int alcErrorIndex = 0;
+
+/*
+ * _alcErrorStr is a table of string representations of ALC errors.
+ *
+ * 0 -> ALC_NO_ERROR
+ * 1 -> ALC_INVALID_DEVICE
+ * 2 -> ALC_INVALID_CONTEXT
+ * 3 -> ALC_INVALID_ENUM
+ * 4 -> ALC_INVALID_VALUE
+ */
+static const char *_alcErrorStr[] = {
+	"No alc error.",
+	"There is no accessible sound device/driver/server",
+	"The Context argument does not name a valid context",
+	"Illegal paramater",
+	"Invalid enum parameter value"
+};
+
+/*
+ * ErrorNo2index( ALenum error_number )
+ *
+ * Returns a simple index from an alc error.
+ */
+static int ErrorNo2index( ALenum error_number );
+
+/*
+ * index2ErrorNo( int index )
+ *
+ * Returns an alc error from a simple index.
+ */
+static int index2ErrorNo( int ind );
+
+/*
+ * ErrorNo2index( ALenum error_number )
+ *
+ * Returns a simple index from an alc error.
+ */
+static int ErrorNo2index( ALenum error_number ) {
+	switch( error_number ) {
+		case ALC_NO_ERROR:
+			return 0;
+		case ALC_INVALID_DEVICE:
+			return 1;
+		case ALC_INVALID_CONTEXT:
+			return 2;
+		case ALC_INVALID_ENUM:
+			return 3;
+		case ALC_INVALID_VALUE:
+			return 4;
+		default:
+			_alDebug( ALD_ERROR, __FILE__, __LINE__,
+				  "Unknown error condition: 0x%x", error_number );
+			return -1;
+	}
+}
+
+/*
+ * index2ErrorNo( int index )
+ *
+ * Returns an alc error from a simple index.
+ */
+static int index2ErrorNo(int ind) {
+	switch(ind) {
+ 		case 0:
+		  return ALC_NO_ERROR;
+		  break;
+		case 1:
+		  return ALC_INVALID_DEVICE;
+		  break;
+		case 2:
+		  return ALC_INVALID_CONTEXT;
+		  break;
+		case 3:
+		  return ALC_INVALID_ENUM;
+		  break;
+		case 4:
+		  return ALC_INVALID_VALUE;
+		  break;
+		default:
+		  _alDebug(ALD_ERROR, __FILE__, __LINE__,
+		  	"Unknown error index: %d", ind);
+		  break;
+	}
+
+	return -1;
+}
+
+/**
+ * Error support.
+ */
+
+/*
+ * alcGetError( ALCdevice *dev )
+ *
+ * Returns the most recent error generated in the AL state machine,
+ * but for alc.
+ */
+ALCenum alcGetError( UNUSED(ALCdevice *dev) )
+{
+	ALCenum retval;
+
+	retval = index2ErrorNo( alcErrorIndex );
+
+	/*
+	 * In deference to the new spec, GetError clears the error
+	 * after reading it.
+	 */
+	alcErrorIndex = 0;
+
+	return retval;
+}
+
+/*
+ * _alcSetError( ALenum param )
+ *
+ * Sets the alc error, if unset.
+ */
+void _alcSetError( ALenum param ) {
+	int setval;
+
+	setval = ErrorNo2index( param );
+	if(setval == -1) {
+		/* invalid param*/
+		return;
+	}
+
+	if( alcErrorIndex == 0 ) {
+		/*
+		 * Only set error if no previous error has been recorded.
+		 */
+
+		alcErrorIndex = setval;
+	}
+
+	return;
+}
+
+/*
+ * _alcGetErrorString( ALenum param )
+ *
+ * This function returns the string corresponding to the
+ * error in question.  It doesn't validate that the passed
+ * param, so calling functions should ensure that _alcIsError(param)
+ * return AL_TRUE before passing it to this function.
+ */
+const ALubyte *_alcGetErrorString(ALenum param) {
+	int offset;
+
+	offset = ErrorNo2index( param );
+
+	if(offset >= 0) {
+		return (const ALubyte *) _alcErrorStr[ offset ];
+	}
+
+	return NULL;
+}
+
+/*
+ * alcIsError( ALenum param )
+ *
+ * Returns AL_TRUE if param is an alc error, AL_FALSE otherwise.
+ */
+ALboolean alcIsError( ALenum param ) {
+	switch( param ) {
+		case ALC_NO_ERROR:
+		case ALC_INVALID_DEVICE:
+		case ALC_INVALID_CONTEXT:
+		case ALC_INVALID_ENUM:
+		case ALC_INVALID_VALUE:
+			return AL_TRUE;
+			break;
+		default:
+			break;
+	}
+
+	return AL_FALSE;
+}
Index: /openal-0.0.8/src/alc/alc_error.h
===================================================================
--- /openal-0.0.8/src/alc/alc_error.h	(revision 17)
+++ /openal-0.0.8/src/alc/alc_error.h	(revision 17)
@@ -0,0 +1,32 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * alc_error.h
+ *
+ * openal alc error reporting.
+ */
+#ifndef _LAL_ALC_ERROR_H_
+#define _LAL_ALC_ERROR_H_
+
+#include "al_siteconfig.h"
+
+#include <AL/alc.h>
+
+/*
+ * Returns AL_TRUE if param specifies a valid alc error, AL_FALSE otherwise.
+ */
+ALboolean alcIsError( ALCenum param );
+
+/*
+ * Sets the context-independant error to param, if param is a valid context
+ * error.
+ */
+void _alcSetError( ALCenum param );
+
+/*
+ * Returns a const ALubyte * string giving a readable representation of the
+ * error param, or NULL if param is not an alc error.
+ */
+const ALubyte *_alcGetErrorString( ALCenum param );
+
+#endif /* _LAL_ALC_ERROR_H_ */
Index: /openal-0.0.8/src/alc/alc_speaker.c
===================================================================
--- /openal-0.0.8/src/alc/alc_speaker.c	(revision 17)
+++ /openal-0.0.8/src/alc/alc_speaker.c	(revision 17)
@@ -0,0 +1,223 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * alc_speaker.c
+ *
+ * functions related to the position of the speakers in the alc world.
+ *
+ * This speaker handling stuff is a little goofy.  Rotation code should be
+ * rewritten.  Also, the assumption is that speaker positions correspond to an
+ * interleaved layout of LRLRLR, or LF RF LB RB.  This might not always be the
+ * case.
+ */
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alc.h>
+
+#include "al_debug.h"
+#include "al_main.h"
+#include "al_vector.h"
+#include "al_matrix.h"
+
+#include "alc/alc_error.h"
+#include "alc/alc_speaker.h"
+
+#ifndef M_SQRT1_2
+# define M_SQRT1_2      0.70710678118654752440  /* 1/sqrt(2) */
+#endif
+
+/*
+ * _alcSpeakerMove( ALuint cid )
+ *
+ * Moves speakers for context named by cid, using listener orientation and
+ * position as modifiers.
+ *
+ * If cid is invalid, set ALC_INVALID_CONTEXT.
+ *
+ * assumes context cid is locked
+ *
+ * FIXME:
+ *    please check my math
+ */
+void _alcSpeakerMove( ALuint cid ) {
+	AL_context *cc;
+	ALfloat vec[3];
+	ALfloat *pos;    /* listener position */
+	ALfloat *ori;    /* listener orientation */
+	ALfloat ipos[3]; /* inverse listener position */
+	ALuint i;
+	ALmatrix *m;
+	ALmatrix *pm;
+	ALmatrix *rm;
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+		      "_alcSpeakerMove: invalid context id %d", cid);
+
+		_alcSetError( ALC_INVALID_CONTEXT );
+
+		return;
+	}
+
+	pos = cc->listener.position;
+	ori = cc->listener.orientation;
+
+	m  = _alMatrixAlloc(3, 3);
+	pm = _alMatrixAlloc(1, 3);
+	rm = _alMatrixAlloc(1, 3);
+
+	_alVectorCrossProduct(vec, ori + 0, ori + 3);
+	_alVectorNormalize(m->data[0], vec);
+
+	_alVectorCrossProduct(vec, m->data[0], ori + 0);
+	_alVectorNormalize(m->data[1], vec);
+
+	_alVectorNormalize(m->data[2], ori + 0);
+
+	/* reset speaker position */
+	_alcSpeakerInit(cid);
+
+	_alVectorInverse( ipos, cc->listener.position );
+
+	/* rotate about at and up vectors */
+	for(i = 0; i < _alcGetNumSpeakers(cid); i++) {
+		_alVectorTranslate(pm->data[0],
+				   cc->_speaker_pos[i].pos, ipos);
+
+		_alMatrixMul(rm, pm, m);
+
+		_alVectorTranslate(cc->_speaker_pos[i].pos,
+				   rm->data[0], pos);
+	}
+
+	_alDebug(ALD_MATH, __FILE__, __LINE__,
+		"SpAdj: l/r [%f|%f|%f] [%f|%f|%f]",
+		cc->_speaker_pos[0].pos[0],
+		cc->_speaker_pos[0].pos[1],
+		cc->_speaker_pos[0].pos[2],
+
+		cc->_speaker_pos[1].pos[0],
+		cc->_speaker_pos[1].pos[1],
+		cc->_speaker_pos[1].pos[2]);
+
+	_alMatrixFree(m);
+	_alMatrixFree(pm);
+	_alMatrixFree(rm);
+
+	return;
+}
+
+/*
+ * _alcSpeakerInit( ALuint cid )
+ *
+ * Initialize position wrt listener, w/o rt orientation.
+ *
+ * assumes locked context
+ */
+void _alcSpeakerInit( ALuint cid ) {
+	AL_context  *cc;
+	AL_listener *lis;
+	ALfloat *lpos;
+	ALfloat sdis; /* scaled distance */
+	ALuint i;
+	ALuint num;
+
+	cc  = _alcGetContext( cid );
+	lis = _alcGetListener( cid );
+	if(cc == NULL) {
+		/* invalid cid */
+		_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+			"_alcSpeakerInit: invalid cid 0x%x", cid );
+
+		return;
+	}
+
+	if(lis == NULL) {
+		/* weird */
+		return;
+	}
+
+	lpos = lis->position;
+
+	/*
+	 * A speaker distance of one simplifies the math later.
+	 */
+	sdis = 1.0f;
+
+	_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+		"_alcSpeakerInit: ( sdis %f )", sdis );
+
+	for (i = 0; i < _ALC_MAX_CHANNELS; i++)
+	{
+		cc->_speaker_pos[i].pos[0]   = lpos[0];
+		cc->_speaker_pos[i].pos[1]   = lpos[1];
+		cc->_speaker_pos[i].pos[2]   = lpos[2];
+	}
+
+	num = _alcGetNumSpeakers(cid);
+
+	/* fourpoint */
+
+	if (num >= 4)
+	{
+		sdis *= M_SQRT1_2;
+
+		cc->_speaker_pos[ALS_LEFT].pos[2] += sdis;
+		cc->_speaker_pos[ALS_RIGHT].pos[2] += sdis;
+
+		cc->_speaker_pos[ALS_LEFTS].pos[0] -= sdis;
+		cc->_speaker_pos[ALS_LEFTS].pos[2] -= sdis;
+
+		cc->_speaker_pos[ALS_RIGHTS].pos[0] += sdis;
+		cc->_speaker_pos[ALS_RIGHTS].pos[2] -= sdis;
+	}
+
+	/* stereo */
+
+	if (num >= 2)
+	{
+		cc->_speaker_pos[ALS_LEFT].pos[0] -= sdis;
+		cc->_speaker_pos[ALS_RIGHT].pos[0] += sdis;
+	}
+	return;
+}
+
+/*
+ * _alcGetNumSpeakers( ALuint cid )
+ *
+ * Returns number of speakers available for context named cid.
+ *
+ * assumes locked context
+ */
+ALuint _alcGetNumSpeakers( ALuint cid ) {
+	return _alGetChannelsFromFormat( _alcGetWriteFormat( cid ) );
+}
+
+/*
+ * _alcGetSpeakerPosition( ALuint cid, ALuint speaker_num )
+ *
+ * Returns 3-float tuple giving the speaker position for speaker with offset
+ * speaker_num for the context named cid, or NULL on error.
+ *
+ * assumes locked context
+ */
+ALfloat *_alcGetSpeakerPosition( ALuint cid, ALuint speaker_num ) {
+	AL_context *cc;
+	ALuint nc;
+
+	cc = _alcGetContext( cid );
+	if(cc == NULL) {
+		return NULL;
+	}
+
+	nc = _alcGetNumSpeakers( cid );
+
+	if( speaker_num >= nc ) {
+		return NULL;
+	}
+
+	return cc->_speaker_pos[speaker_num].pos;
+}
Index: /openal-0.0.8/src/alc/alc_speaker.h
===================================================================
--- /openal-0.0.8/src/alc/alc_speaker.h	(revision 17)
+++ /openal-0.0.8/src/alc/alc_speaker.h	(revision 17)
@@ -0,0 +1,52 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * alc_speaker.h
+ *
+ * Prototypes, defines etc for speaker management.
+ */
+#ifndef ALC_SPEAKER_H_
+#define ALC_SPEAKER_H_
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+#include "alc/alc_context.h"
+
+typedef enum {
+	ALS_LEFT,
+	ALS_RIGHT,
+	ALS_LEFTS,
+	ALS_RIGHTS
+} _alcSpeakerEnum;
+
+/*
+ * Initializes the speaker setup for the context named by cid.
+ */
+void _alcSpeakerInit( ALuint cid );
+
+/*
+ *  Updates the speaker setup for the context named by cid for changes in
+ *  listener position and orientation.
+ */
+void _alcSpeakerMove( ALuint cid );
+
+/*
+ * Returns the 3-tuple position (x/y/z) of the speaker enumerated by
+ * speaker_num for the context named by cid, or NULL if cid does not name a
+ * context.
+ */
+ALfloat *_alcGetSpeakerPosition( ALuint cid, ALuint speaker_num );
+
+/*
+ * Returns the number of speakers associated with the context named by cid.
+ */
+ALuint _alcGetNumSpeakers( ALuint cid );
+
+/* default context macros */
+#define _alcDCSpeakerMove()     _alcSpeakerMove(_alcCCId)
+#define _alcDCSpeakerInit()     _alcSpeakerInit(_alcCCId)
+#define _alcDCGetNumSpeakers()  _alcGetNumSpeakers(_alcCCId)
+
+#endif /* _ALC_SPEAKERS_H_ */
Index: /openal-0.0.8/src/arch/Makefile.am
===================================================================
--- /openal-0.0.8/src/arch/Makefile.am	(revision 17)
+++ /openal-0.0.8/src/arch/Makefile.am	(revision 17)
@@ -0,0 +1,3 @@
+# kludge for nasm vs. automake-1.8
+
+SUBDIRS = i386
Index: /openal-0.0.8/src/arch/Makefile.in
===================================================================
--- /openal-0.0.8/src/arch/Makefile.in	(revision 17)
+++ /openal-0.0.8/src/arch/Makefile.in	(revision 17)
@@ -0,0 +1,540 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# kludge for nasm vs. automake-1.8
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/arch
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/admin/autotools/m4/acx_pthread.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSC_CONFIG = @ARTSC_CONFIG@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLEEXTENSIONALEXTMP3_FALSE = @ENABLEEXTENSIONALEXTMP3_FALSE@
+ENABLEEXTENSIONALEXTMP3_TRUE = @ENABLEEXTENSIONALEXTMP3_TRUE@
+ENABLEEXTENSIONALEXTVORBIS_FALSE = @ENABLEEXTENSIONALEXTVORBIS_FALSE@
+ENABLEEXTENSIONALEXTVORBIS_TRUE = @ENABLEEXTENSIONALEXTVORBIS_TRUE@
+ESD_CONFIG = @ESD_CONFIG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEATURECFLAGS = @FEATURECFLAGS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+NASM = @NASM@
+NASM_FORMAT = @NASM_FORMAT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZATIONCFLAGS = @OPTIMIZATIONCFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PROFILINGLDFLAGS = @PROFILINGLDFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SDL_CONFIG = @SDL_CONFIG@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZEOF_VOID_P = @SIZEOF_VOID_P@
+SMPEG_CONFIG = @SMPEG_CONFIG@
+STRIP = @STRIP@
+USEBACKENDALSA_FALSE = @USEBACKENDALSA_FALSE@
+USEBACKENDALSA_TRUE = @USEBACKENDALSA_TRUE@
+USEBACKENDARTS_FALSE = @USEBACKENDARTS_FALSE@
+USEBACKENDARTS_TRUE = @USEBACKENDARTS_TRUE@
+USEBACKENDESD_FALSE = @USEBACKENDESD_FALSE@
+USEBACKENDESD_TRUE = @USEBACKENDESD_TRUE@
+USEBACKENDNATIVEBSD_FALSE = @USEBACKENDNATIVEBSD_FALSE@
+USEBACKENDNATIVEBSD_TRUE = @USEBACKENDNATIVEBSD_TRUE@
+USEBACKENDNATIVEDARWIN_FALSE = @USEBACKENDNATIVEDARWIN_FALSE@
+USEBACKENDNATIVEDARWIN_TRUE = @USEBACKENDNATIVEDARWIN_TRUE@
+USEBACKENDNATIVEIRIX_FALSE = @USEBACKENDNATIVEIRIX_FALSE@
+USEBACKENDNATIVEIRIX_TRUE = @USEBACKENDNATIVEIRIX_TRUE@
+USEBACKENDNATIVELINUX_FALSE = @USEBACKENDNATIVELINUX_FALSE@
+USEBACKENDNATIVELINUX_TRUE = @USEBACKENDNATIVELINUX_TRUE@
+USEBACKENDNATIVEMORPHOS_FALSE = @USEBACKENDNATIVEMORPHOS_FALSE@
+USEBACKENDNATIVEMORPHOS_TRUE = @USEBACKENDNATIVEMORPHOS_TRUE@
+USEBACKENDNATIVESOLARIS_FALSE = @USEBACKENDNATIVESOLARIS_FALSE@
+USEBACKENDNATIVESOLARIS_TRUE = @USEBACKENDNATIVESOLARIS_TRUE@
+USEBACKENDNATIVEWINDOWS_FALSE = @USEBACKENDNATIVEWINDOWS_FALSE@
+USEBACKENDNATIVEWINDOWS_TRUE = @USEBACKENDNATIVEWINDOWS_TRUE@
+USEBACKENDNULL_FALSE = @USEBACKENDNULL_FALSE@
+USEBACKENDNULL_TRUE = @USEBACKENDNULL_TRUE@
+USEBACKENDSDL_FALSE = @USEBACKENDSDL_FALSE@
+USEBACKENDSDL_TRUE = @USEBACKENDSDL_TRUE@
+USEBACKENDWAVEOUT_FALSE = @USEBACKENDWAVEOUT_FALSE@
+USEBACKENDWAVEOUT_TRUE = @USEBACKENDWAVEOUT_TRUE@
+VERSION = @VERSION@
+WARNINGCFLAGS = @WARNINGCFLAGS@
+X86ENABLED_FALSE = @X86ENABLED_FALSE@
+X86ENABLED_TRUE = @X86ENABLED_TRUE@
+X86MMXENABLED_FALSE = @X86MMXENABLED_FALSE@
+X86MMXENABLED_TRUE = @X86MMXENABLED_TRUE@
+X86NASMENABLED_FALSE = @X86NASMENABLED_FALSE@
+X86NASMENABLED_TRUE = @X86NASMENABLED_TRUE@
+X86NASMMMXENABLED_FALSE = @X86NASMMMXENABLED_FALSE@
+X86NASMMMXENABLED_TRUE = @X86NASMMMXENABLED_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+SUBDIRS = i386
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/arch/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/arch/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-generic clean-libtool clean-recursive ctags \
+	ctags-recursive distclean distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive \
+	mostlyclean mostlyclean-generic mostlyclean-libtool \
+	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /openal-0.0.8/src/arch/i386/Makefile.am
===================================================================
--- /openal-0.0.8/src/arch/i386/Makefile.am	(revision 17)
+++ /openal-0.0.8/src/arch/i386/Makefile.am	(revision 17)
@@ -0,0 +1,52 @@
+# based on LAME's Makefile.am for nasm compilation
+
+AUTOMAKE_OPTIONS = foreign
+
+DEFS = @DEFS@ @CONFIG_DEFS@
+
+if X86NASMENABLED
+noinst_LTLIBRARIES = libx86_asm_routines.la
+libx86_asm_routines_la_SOURCES = \
+	x86_cpu_caps_detect_prk.nasm
+
+am_libx86_asm_routines_la_OBJECTS = \
+	x86_cpu_caps_detect_prk$U.lo
+
+if X86NASMMMXENABLED
+libx86_asm_routines_la_SOURCES += \
+	memcpy_mmx_prk.nasm
+
+am_libx86_asm_routines_la_OBJECTS += \
+	memcpy_mmx_prk$U.lo
+endif
+endif
+
+SUFFIXES = .nasm .lo
+
+CLEANFILES = \
+	x86_cpu_caps_detect_prk.o.lst \
+	x86_cpu_caps_detect_prk.lo.lst \
+	memcpy_mmx_prkt.o.lst \
+	memcpy_mmx_prk.lo.lst
+
+
+NASM = @NASM@
+NASMFLAGS = @NASM_FORMAT@
+
+.nasm.o:
+	$(NASM) $(NASMFLAGS) $< -o $@ -l $@.lst
+
+.nasm.lo:
+	test -d .libs || mkdir .libs
+	$(ECHO) '# Generated by ltmain.sh - GNU libtool 1.5 (1.1220 2003/04/05 19:32:58)' >$@
+	$(ECHO) "pic_object='.libs/$*.o'" >>$@
+	$(ECHO) "non_pic_object='$*.o'" >>$@
+	$(NASM) $(NASMFLAGS) $< -o .libs/$*.o -l $@.lst
+
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
+	$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
Index: /openal-0.0.8/src/arch/i386/Makefile.in
===================================================================
--- /openal-0.0.8/src/arch/i386/Makefile.in	(revision 17)
+++ /openal-0.0.8/src/arch/i386/Makefile.in	(revision 17)
@@ -0,0 +1,458 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# based on LAME's Makefile.am for nasm compilation
+
+SOURCES = $(libx86_asm_routines_la_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+@X86NASMENABLED_TRUE@@X86NASMMMXENABLED_TRUE@am__append_1 = \
+@X86NASMENABLED_TRUE@@X86NASMMMXENABLED_TRUE@	memcpy_mmx_prk.nasm
+
+@X86NASMENABLED_TRUE@@X86NASMMMXENABLED_TRUE@am__append_2 = \
+@X86NASMENABLED_TRUE@@X86NASMMMXENABLED_TRUE@	memcpy_mmx_prk$U.lo
+
+subdir = src/arch/i386
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/admin/autotools/m4/acx_pthread.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_c__attribute.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_cflags_wall.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_check_flag.m4 \
+	$(top_srcdir)/admin/autotools/m4/alut_eval_stderr.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libx86_asm_routines_la_LIBADD =
+am__libx86_asm_routines_la_SOURCES_DIST =  \
+	x86_cpu_caps_detect_prk.nasm memcpy_mmx_prk.nasm
+@X86NASMENABLED_TRUE@@X86NASMMMXENABLED_TRUE@am__objects_1 = memcpy_mmx_prk.lo
+libx86_asm_routines_la_OBJECTS = $(am_libx86_asm_routines_la_OBJECTS)
+@X86NASMENABLED_TRUE@am_libx86_asm_routines_la_rpath =
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+SOURCES = $(libx86_asm_routines_la_SOURCES)
+DIST_SOURCES = $(am__libx86_asm_routines_la_SOURCES_DIST)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ARTSC_CONFIG = @ARTSC_CONFIG@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@ @CONFIG_DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLEEXTENSIONALEXTMP3_FALSE = @ENABLEEXTENSIONALEXTMP3_FALSE@
+ENABLEEXTENSIONALEXTMP3_TRUE = @ENABLEEXTENSIONALEXTMP3_TRUE@
+ENABLEEXTENSIONALEXTVORBIS_FALSE = @ENABLEEXTENSIONALEXTVORBIS_FALSE@
+ENABLEEXTENSIONALEXTVORBIS_TRUE = @ENABLEEXTENSIONALEXTVORBIS_TRUE@
+ESD_CONFIG = @ESD_CONFIG@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEATURECFLAGS = @FEATURECFLAGS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+NASM = @NASM@
+NASM_FORMAT = @NASM_FORMAT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZATIONCFLAGS = @OPTIMIZATIONCFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PROFILINGLDFLAGS = @PROFILINGLDFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SDL_CONFIG = @SDL_CONFIG@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZEOF_VOID_P = @SIZEOF_VOID_P@
+SMPEG_CONFIG = @SMPEG_CONFIG@
+STRIP = @STRIP@
+USEBACKENDALSA_FALSE = @USEBACKENDALSA_FALSE@
+USEBACKENDALSA_TRUE = @USEBACKENDALSA_TRUE@
+USEBACKENDARTS_FALSE = @USEBACKENDARTS_FALSE@
+USEBACKENDARTS_TRUE = @USEBACKENDARTS_TRUE@
+USEBACKENDESD_FALSE = @USEBACKENDESD_FALSE@
+USEBACKENDESD_TRUE = @USEBACKENDESD_TRUE@
+USEBACKENDNATIVEBSD_FALSE = @USEBACKENDNATIVEBSD_FALSE@
+USEBACKENDNATIVEBSD_TRUE = @USEBACKENDNATIVEBSD_TRUE@
+USEBACKENDNATIVEDARWIN_FALSE = @USEBACKENDNATIVEDARWIN_FALSE@
+USEBACKENDNATIVEDARWIN_TRUE = @USEBACKENDNATIVEDARWIN_TRUE@
+USEBACKENDNATIVEIRIX_FALSE = @USEBACKENDNATIVEIRIX_FALSE@
+USEBACKENDNATIVEIRIX_TRUE = @USEBACKENDNATIVEIRIX_TRUE@
+USEBACKENDNATIVELINUX_FALSE = @USEBACKENDNATIVELINUX_FALSE@
+USEBACKENDNATIVELINUX_TRUE = @USEBACKENDNATIVELINUX_TRUE@
+USEBACKENDNATIVEMORPHOS_FALSE = @USEBACKENDNATIVEMORPHOS_FALSE@
+USEBACKENDNATIVEMORPHOS_TRUE = @USEBACKENDNATIVEMORPHOS_TRUE@
+USEBACKENDNATIVESOLARIS_FALSE = @USEBACKENDNATIVESOLARIS_FALSE@
+USEBACKENDNATIVESOLARIS_TRUE = @USEBACKENDNATIVESOLARIS_TRUE@
+USEBACKENDNATIVEWINDOWS_FALSE = @USEBACKENDNATIVEWINDOWS_FALSE@
+USEBACKENDNATIVEWINDOWS_TRUE = @USEBACKENDNATIVEWINDOWS_TRUE@
+USEBACKENDNULL_FALSE = @USEBACKENDNULL_FALSE@
+USEBACKENDNULL_TRUE = @USEBACKENDNULL_TRUE@
+USEBACKENDSDL_FALSE = @USEBACKENDSDL_FALSE@
+USEBACKENDSDL_TRUE = @USEBACKENDSDL_TRUE@
+USEBACKENDWAVEOUT_FALSE = @USEBACKENDWAVEOUT_FALSE@
+USEBACKENDWAVEOUT_TRUE = @USEBACKENDWAVEOUT_TRUE@
+VERSION = @VERSION@
+WARNINGCFLAGS = @WARNINGCFLAGS@
+X86ENABLED_FALSE = @X86ENABLED_FALSE@
+X86ENABLED_TRUE = @X86ENABLED_TRUE@
+X86MMXENABLED_FALSE = @X86MMXENABLED_FALSE@
+X86MMXENABLED_TRUE = @X86MMXENABLED_TRUE@
+X86NASMENABLED_FALSE = @X86NASMENABLED_FALSE@
+X86NASMENABLED_TRUE = @X86NASMENABLED_TRUE@
+X86NASMMMXENABLED_FALSE = @X86NASMMMXENABLED_FALSE@
+X86NASMMMXENABLED_TRUE = @X86NASMMMXENABLED_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+AUTOMAKE_OPTIONS = foreign
+@X86NASMENABLED_TRUE@noinst_LTLIBRARIES = libx86_asm_routines.la
+@X86NASMENABLED_TRUE@libx86_asm_routines_la_SOURCES =  \
+@X86NASMENABLED_TRUE@	x86_cpu_caps_detect_prk.nasm \
+@X86NASMENABLED_TRUE@	$(am__append_1)
+@X86NASMENABLED_TRUE@am_libx86_asm_routines_la_OBJECTS =  \
+@X86NASMENABLED_TRUE@	x86_cpu_caps_detect_prk$U.lo \
+@X86NASMENABLED_TRUE@	$(am__append_2)
+SUFFIXES = .nasm .lo
+CLEANFILES = \
+	x86_cpu_caps_detect_prk.o.lst \
+	x86_cpu_caps_detect_prk.lo.lst \
+	memcpy_mmx_prkt.o.lst \
+	memcpy_mmx_prk.lo.lst
+
+NASMFLAGS = @NASM_FORMAT@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
+	$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .nasm .lo .o
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/arch/i386/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/arch/i386/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libx86_asm_routines.la: $(libx86_asm_routines_la_OBJECTS) $(libx86_asm_routines_la_DEPENDENCIES) 
+	$(LINK) $(am_libx86_asm_routines_la_rpath) $(libx86_asm_routines_la_LDFLAGS) $(libx86_asm_routines_la_OBJECTS) $(libx86_asm_routines_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	clean-noinstLTLIBRARIES distclean distclean-compile \
+	distclean-generic distclean-libtool distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am uninstall-info-am
+
+
+.nasm.o:
+	$(NASM) $(NASMFLAGS) $< -o $@ -l $@.lst
+
+.nasm.lo:
+	test -d .libs || mkdir .libs
+	$(ECHO) '# Generated by ltmain.sh - GNU libtool 1.5 (1.1220 2003/04/05 19:32:58)' >$@
+	$(ECHO) "pic_object='.libs/$*.o'" >>$@
+	$(ECHO) "non_pic_object='$*.o'" >>$@
+	$(NASM) $(NASMFLAGS) $< -o .libs/$*.o -l $@.lst
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /openal-0.0.8/src/arch/i386/memcpy_mmx_prk.nasm
===================================================================
--- /openal-0.0.8/src/arch/i386/memcpy_mmx_prk.nasm	(revision 17)
+++ /openal-0.0.8/src/arch/i386/memcpy_mmx_prk.nasm	(revision 17)
@@ -0,0 +1,98 @@
+;***************************************************************************
+;*   Copyright (C) 2005 by Prakash Punnoor                                 *
+;*   prakash@punnoor.de                                                    *
+;*                                                                         *
+;*   This program is free software; you can redistribute it and/or modify  *
+;*   it under the terms of the GNU Library General Public License as       *
+;*   published by the Free Software Foundation; either version 2 of the    *
+;*   License, or (at your option) any later version.                       *
+;*                                                                         *
+;*   This program is distributed in the hope that it will be useful,       *
+;*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+;*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+;*   GNU General Public License for more details.                          *
+;*                                                                         *
+;*   You should have received a copy of the GNU Library General Public     *
+;*   License along with this program; if not, write to the                 *
+;*   Free Software Foundation, Inc.,                                       *
+;*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+;***************************************************************************
+
+; void _alMMXmemcpy(void* dst, void* src, unsigned int n);
+; pretty straight-forward implementation
+; by design broken for n<8, so check that before calling
+; x86 32 bit only!
+global __alMMXmemcpy
+global _alMMXmemcpy
+
+__alMMXmemcpy:
+_alMMXmemcpy:
+
+; Save the registers affected
+pushf
+push edi
+push esi
+
+cld
+
+mov edi, [esp + 16] ;char* dst
+mov esi, [esp + 20] ;char* src
+mov edx, [esp + 24] ;int n
+
+; align dest
+mov ecx, edi
+and ecx, 7	;MMX align - 1
+sub ecx, 8	;MMX align
+neg ecx		;eax has pre copy bytes
+
+sub edx, ecx	;less to copy after this
+; pre copy
+; copying first dwords and then
+; remaining bytes wasn't faster
+rep movsb
+
+; calc MMX copy length
+mov ecx, edx
+and ecx, 63	;post copy bytes
+shr edx, 6	;MMX copy iterations
+cmp edx, 0
+
+jz .loopend
+; MMX copy
+.loopstart
+movq mm0, [esi]
+movq mm1, [esi + 8]
+movq mm2, [esi + 16]
+movq mm3, [esi + 24]
+movq mm4, [esi + 32]
+movq mm5, [esi + 40]
+movq mm6, [esi + 48]
+movq mm7, [esi + 56]
+movq [edi], mm0
+movq [edi + 8], mm1
+movq [edi + 16], mm2
+movq [edi + 24], mm3
+movq [edi + 32], mm4
+movq [edi + 40], mm5
+movq [edi + 48], mm6
+movq [edi + 56], mm7
+add esi, 64
+add edi, 64
+dec edx
+jnz .loopstart
+emms
+.loopend
+
+; post copy
+rep movsb
+
+; Restore registers
+pop esi
+pop edi
+popf
+ret
+
+; prevent executable stack
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
Index: /openal-0.0.8/src/arch/i386/mixaudio16_mmx_prk.c
===================================================================
--- /openal-0.0.8/src/arch/i386/mixaudio16_mmx_prk.c	(revision 17)
+++ /openal-0.0.8/src/arch/i386/mixaudio16_mmx_prk.c	(revision 17)
@@ -0,0 +1,930 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by Prakash Punnoor                                 *
+ *   prakash@punnoor.de                                                    *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Library General Public License as       *
+ *   published by the Free Software Foundation; either version 2 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU Library General Public     *
+ *   License along with this program; if not, write to the                 *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+#include "mixaudio16_mmx_prk.h"
+
+#ifdef __MMX__
+#include <string.h>
+#include "x86_simd_support_prk.h"
+
+#ifdef HAVE_MMX_MEMCPY
+void _alMMXmemcpy(void* dst, void* src, unsigned int n);
+#endif /* HAVE_MMX_MEMCPY */
+
+
+/* prepare sign-extension from 16bit to 32 bit for stream ST */
+#define GET_SIGNMASK(ST)							\
+	indata   = *(v4hi*)((ALshort*)entries[ST].data + offset);		\
+	signmask = (v4hi)(di)__builtin_ia32_pand((di)indata, (di)m.v);		\
+	signmask = __builtin_ia32_pcmpeqw(signmask, m.v);
+
+/* mix stream 0 */
+#define MIX_ST0									\
+	GET_SIGNMASK (0);							\
+	loout = (v2si)__builtin_ia32_punpcklwd(indata, signmask);		\
+	hiout = (v2si)__builtin_ia32_punpckhwd(indata, signmask);
+
+/* sign-extension and mix stream ST */
+#define MIX(ST)									\
+	GET_SIGNMASK(ST)							\
+	temp  = (v2si)__builtin_ia32_punpcklwd(indata, signmask);		\
+	loout = __builtin_ia32_paddd(loout, temp);				\
+	temp  = (v2si)__builtin_ia32_punpckhwd(indata, signmask);		\
+	hiout = __builtin_ia32_paddd(hiout, temp);
+
+/* manual saturation to dst */
+#define SATURATE								\
+	if (sample == (short)sample)						\
+		*dst = sample;							\
+	else {									\
+		if(sample > 0 )							\
+			*dst = max_audioval;					\
+		else								\
+			*dst = min_audioval;					\
+	}
+
+/* manually mix LEN samples */
+#define MIX_MANUAL(STREAMS, LEN)						\
+	while (offset < LEN) {							\
+		int sample = 0;							\
+										\
+		for (st = 0; st < STREAMS; ++st)				\
+			sample += *((ALshort*)entries[st].data + offset);	\
+										\
+		SATURATE;							\
+		++dst;								\
+		++offset;							\
+	}
+
+/* manually mix two streams of LEN samples */
+#define MIX_MANUAL2(LEN)							\
+	while (offset < LEN) {							\
+		int sample = *src1;						\
+		++src1;								\
+		sample += *src2;						\
+		++src2;								\
+										\
+		SATURATE;							\
+		++dst;								\
+		++offset;\
+	}
+
+
+#define MixAudio16_MMX_HEAD(STREAMS)						\
+	ALuint samples = entries[0].bytes;					\
+	ALuint samples_main;							\
+	ALuint samples_pre;							\
+	ALuint samples_post;							\
+	ALuint offset;								\
+	ALuint st;								\
+										\
+	v4hi indata;								\
+	v4hi signmask;								\
+	v2si loout;								\
+	v2si hiout;								\
+	v2si temp;								\
+										\
+	samples /= sizeof(ALshort);						\
+	offset = 0;								\
+	if (samples < 40) {							\
+		MIX_MANUAL(STREAMS, samples);					\
+		return;								\
+	}									\
+										\
+	samples_pre = MMX_ALIGN - (aint)dst % MMX_ALIGN;			\
+	samples_pre /= sizeof(ALshort);						\
+	samples_post = (samples - samples_pre) % 4;				\
+	samples_main = samples - samples_post;					\
+										\
+	MIX_MANUAL(STREAMS, samples_pre);					\
+										\
+	while (offset < samples_main) {						\
+										\
+		MIX_ST0;
+
+#define MixAudio16_MMX_N_TAIL(STREAMS)						\
+		offset += 4;							\
+	}									\
+	__builtin_ia32_emms();							\
+										\
+	MIX_MANUAL(STREAMS, samples);						\
+	return;
+
+#define MixAudio16_MMX_TAIL(STREAMS)						\
+		*(v4hi*)dst = __builtin_ia32_packssdw(loout, hiout);		\
+		dst += 4;							\
+		MixAudio16_MMX_N_TAIL(STREAMS);
+
+/* sign-extension and mix stream; for generic function */
+#define MIX_N									\
+	indata   = *(v4hi*)((ALshort*)src->data + offset);			\
+	signmask = (v4hi)(di)__builtin_ia32_pand((di)indata, (di)m.v);		\
+	signmask = __builtin_ia32_pcmpeqw(signmask, m.v);			\
+	temp  = (v2si)__builtin_ia32_punpcklwd(indata, signmask);		\
+	loout = __builtin_ia32_paddd(loout, temp);				\
+	temp  = (v2si)__builtin_ia32_punpckhwd(indata, signmask);		\
+	hiout = __builtin_ia32_paddd(hiout, temp);
+
+
+
+union {
+	unsigned short s[4];
+	v4hi v;
+} ALIGN16(m) = {{0x8000, 0x8000, 0x8000, 0x8000}};
+
+
+void MixAudio16_MMX_n(ALshort *dst, alMixEntry *entries, ALuint numents)
+{
+	ALuint mod_streams = (numents + 3) % 4;
+	alMixEntry *src;
+	MixAudio16_MMX_HEAD(numents);
+	st = 1;
+	src = entries + 1;
+	
+	switch (mod_streams) {
+		do {
+	case 0:
+			MIX_N;
+			++st;
+			++src;
+	case 3:
+			MIX_N;
+			++st;
+			++src;
+	case 2:
+			MIX_N;
+			++st;
+			++src;
+	case 1:
+			MIX_N;
+			++st;
+			++src;
+		} while (st < numents);
+	}
+	*(v4hi*)dst = __builtin_ia32_packssdw(loout, hiout);
+	dst += 4;
+	MixAudio16_MMX_N_TAIL(numents);
+}
+
+void MixAudio16_MMX_0(UNUSED(ALshort *dst), UNUSED(alMixEntry *entries))
+{
+	return;
+}
+
+void MixAudio16_MMX_1(ALshort *dst, alMixEntry *entries)
+{
+	unsigned int len = entries->bytes;
+	
+#ifdef HAVE_MMX_MEMCPY
+	if (len < 300) {
+		memcpy(dst, entries->data, len);
+		return;
+	}
+	_alMMXmemcpy(dst, entries->data, len);
+#else
+	memcpy(dst, entries->data, len);
+#endif /* HAVE_MMX_MEMCPY */
+	return;
+}
+
+void MixAudio16_MMX_2(ALshort *dst, alMixEntry *entries)
+{
+
+	ALuint samples = entries[0].bytes;
+	ALuint samples_main;
+	ALuint samples_pre;
+	ALuint samples_post;
+	ALuint offset;
+	
+	ALshort *src1 = entries[0].data;
+	ALshort *src2 = entries[1].data;
+	
+	samples /= sizeof(ALshort);
+	offset = 0;
+	if (samples < 40) {
+		MIX_MANUAL2(samples);
+		return;
+	}
+	
+	samples_pre = MMX_ALIGN - (aint)dst % MMX_ALIGN;
+	samples_pre /= sizeof(ALshort);
+	samples_post = (samples - samples_pre) % 16;
+	samples_main = samples - samples_post;
+
+#define PADDSW									\
+	*(v4hi*)dst = __builtin_ia32_paddsw(*(v4hi*)src1, *(v4hi*)src2);	\
+	src1 += 4;								\
+	src2 += 4;								\
+	dst += 4;
+	
+	
+	MIX_MANUAL2(samples_pre);
+
+	while(offset < samples_main) {
+		PADDSW;
+		offset += 4 ;
+		PADDSW;
+		offset += 4;
+		PADDSW;
+		offset += 4;
+		PADDSW;
+		offset += 4;
+	}
+	__builtin_ia32_emms();
+	
+	MIX_MANUAL2(samples);
+	return;
+}
+
+void MixAudio16_MMX_3(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(3);
+	MIX(1);
+	MIX(2);
+	MixAudio16_MMX_TAIL(3);
+}
+
+void MixAudio16_MMX_4(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(4);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MixAudio16_MMX_TAIL(4);
+}
+
+void MixAudio16_MMX_5(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(5);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MixAudio16_MMX_TAIL(5);
+}
+
+void MixAudio16_MMX_6(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(6);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MixAudio16_MMX_TAIL(6);
+}
+
+void MixAudio16_MMX_7(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(7);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MixAudio16_MMX_TAIL(7);
+}
+
+void MixAudio16_MMX_8(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(8);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MixAudio16_MMX_TAIL(8);
+}
+
+void MixAudio16_MMX_9(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(9);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MixAudio16_MMX_TAIL(9);
+}
+
+void MixAudio16_MMX_10(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(10);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MixAudio16_MMX_TAIL(10);
+}
+
+void MixAudio16_MMX_11(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(11);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MixAudio16_MMX_TAIL(11);
+}
+
+void MixAudio16_MMX_12(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(12);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MixAudio16_MMX_TAIL(12);
+}
+
+void MixAudio16_MMX_13(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(13);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MixAudio16_MMX_TAIL(13);
+}
+
+void MixAudio16_MMX_14(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(14);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MixAudio16_MMX_TAIL(14);
+}
+
+void MixAudio16_MMX_15(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(15);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MixAudio16_MMX_TAIL(15);
+}
+
+void MixAudio16_MMX_16(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(16);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MixAudio16_MMX_TAIL(16);
+}
+
+void MixAudio16_MMX_17(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(17);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MixAudio16_MMX_TAIL(17);
+}
+
+void MixAudio16_MMX_18(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(18);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MixAudio16_MMX_TAIL(18);
+}
+
+void MixAudio16_MMX_19(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(19);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MixAudio16_MMX_TAIL(19);
+}
+
+void MixAudio16_MMX_20(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(20);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MixAudio16_MMX_TAIL(20);
+}
+
+void MixAudio16_MMX_21(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(21);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MixAudio16_MMX_TAIL(21);
+}
+
+void MixAudio16_MMX_22(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(22);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MixAudio16_MMX_TAIL(22);
+}
+
+void MixAudio16_MMX_23(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(23);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MixAudio16_MMX_TAIL(23);
+}
+
+void MixAudio16_MMX_24(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(24);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MIX(23);
+	MixAudio16_MMX_TAIL(24);
+}
+
+void MixAudio16_MMX_25(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(25);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MIX(23);
+	MIX(24);
+	MixAudio16_MMX_TAIL(25);
+}
+
+void MixAudio16_MMX_26(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(26);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MIX(23);
+	MIX(24);
+	MIX(25);
+	MixAudio16_MMX_TAIL(26);
+}
+
+void MixAudio16_MMX_27(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(27);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MIX(23);
+	MIX(24);
+	MIX(25);
+	MIX(26);
+	MixAudio16_MMX_TAIL(27);
+}
+
+void MixAudio16_MMX_28(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(28);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MIX(23);
+	MIX(24);
+	MIX(25);
+	MIX(26);
+	MIX(27);
+	MixAudio16_MMX_TAIL(28);
+}
+
+void MixAudio16_MMX_29(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(29);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MIX(23);
+	MIX(24);
+	MIX(25);
+	MIX(26);
+	MIX(27);
+	MIX(28);
+	MixAudio16_MMX_TAIL(29);
+}
+
+void MixAudio16_MMX_30(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(30);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MIX(23);
+	MIX(24);
+	MIX(25);
+	MIX(26);
+	MIX(27);
+	MIX(28);
+	MIX(29);
+	MixAudio16_MMX_TAIL(30);
+}
+
+void MixAudio16_MMX_31(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(31);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MIX(23);
+	MIX(24);
+	MIX(25);
+	MIX(26);
+	MIX(27);
+	MIX(28);
+	MIX(29);
+	MIX(30);
+	MixAudio16_MMX_TAIL(31);
+}
+
+void MixAudio16_MMX_32(ALshort *dst, alMixEntry *entries)
+{
+	MixAudio16_MMX_HEAD(32);
+	MIX(1);
+	MIX(2);
+	MIX(3);
+	MIX(4);
+	MIX(5);
+	MIX(6);
+	MIX(7);
+	MIX(8);
+	MIX(9);
+	MIX(10);
+	MIX(11);
+	MIX(12);
+	MIX(13);
+	MIX(14);
+	MIX(15);
+	MIX(16);
+	MIX(17);
+	MIX(18);
+	MIX(19);
+	MIX(20);
+	MIX(21);
+	MIX(22);
+	MIX(23);
+	MIX(24);
+	MIX(25);
+	MIX(26);
+	MIX(27);
+	MIX(28);
+	MIX(29);
+	MIX(30);
+	MIX(31);
+	MixAudio16_MMX_TAIL(32);
+}
+#endif /* __MMX__ */
Index: /openal-0.0.8/src/arch/i386/mixaudio16_mmx_prk.h
===================================================================
--- /openal-0.0.8/src/arch/i386/mixaudio16_mmx_prk.h	(revision 17)
+++ /openal-0.0.8/src/arch/i386/mixaudio16_mmx_prk.h	(revision 17)
@@ -0,0 +1,74 @@
+ /***************************************************************************
+ *   Copyright (C) 2005 by Prakash Punnoor                                 *
+ *   prakash@punnoor.de                                                    *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Library General Public License as       *
+ *   published by the Free Software Foundation; either version 2 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU Library General Public     *
+ *   License along with this program; if not, write to the                 *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#ifndef _MIXAUDIO16_MMX_PRK_H_
+#define _MIXAUDIO16_MMX_PRK_H_
+
+#include "al_siteconfig.h"
+#ifdef __MMX__
+#include <AL/al.h>
+#include "al_main.h"
+#include "al_types.h"
+
+/*
+ * max_audioval is the maximum value of a signed short.
+ */
+#define max_audioval ((1<<(16-1))-1)
+
+/*
+ * min_audioval is the minimum value of a signed short.
+ */
+#define min_audioval -(1<<(16-1))
+
+void MixAudio16_MMX_n(ALshort *dst, alMixEntry *entries, ALuint numents);
+void MixAudio16_MMX_0( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_1( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_2( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_3( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_4( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_5( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_6( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_7( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_8( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_9( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_10( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_11( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_12( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_13( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_14( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_15( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_16( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_17( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_18( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_19( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_20( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_21( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_22( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_23( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_24( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_25( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_26( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_27( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_28( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_29( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_30( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_31( ALshort *dst, alMixEntry *entries );
+void MixAudio16_MMX_32( ALshort *dst, alMixEntry *entries );
+#endif /* __MMX__ */
+#endif /* _MIXAUDIO16_MMX_PRK_H_ */
Index: /openal-0.0.8/src/arch/i386/x86_cpu_caps_detect_prk.nasm
===================================================================
--- /openal-0.0.8/src/arch/i386/x86_cpu_caps_detect_prk.nasm	(revision 17)
+++ /openal-0.0.8/src/arch/i386/x86_cpu_caps_detect_prk.nasm	(revision 17)
@@ -0,0 +1,71 @@
+;***************************************************************************
+;*   Copyright (C) 2005 by Prakash Punnoor                                 *
+;*   prakash@punnoor.de                                                    *
+;*                                                                         *
+;*   This program is free software; you can redistribute it and/or modify  *
+;*   it under the terms of the GNU Library General Public License as       *
+;*   published by the Free Software Foundation; either version 2 of the    *
+;*   License, or (at your option) any later version.                       *
+;*                                                                         *
+;*   This program is distributed in the hope that it will be useful,       *
+;*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+;*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+;*   GNU General Public License for more details.                          *
+;*                                                                         *
+;*   You should have received a copy of the GNU Library General Public     *
+;*   License along with this program; if not, write to the                 *
+;*   Free Software Foundation, Inc.,                                       *
+;*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+;***************************************************************************
+
+; int _alDetectx86CPUCaps(uint* caps1, uint* caps2, uint* caps3);
+; derived from loki_cpuinfo.c, 1997-98 by H. Dietz and R. Fisher
+; using infos from sandpile.org
+
+; returns 0 if no CPUID available
+global __alDetectx86CPUCaps
+global _alDetectx86CPUCaps
+
+__alDetectx86CPUCaps:
+_alDetectx86CPUCaps:
+
+pushf
+pop	eax
+mov	ecx, eax
+
+xor	eax, 0x200000
+push	eax
+popf
+
+pushf
+pop	eax
+
+xor	ecx, eax
+xor	eax, eax
+test	ecx, 0x200000
+jz	.Return
+
+; standard CPUID
+push ebx
+mov	eax, 1
+cpuid
+mov	eax, [esp + 8]	;caps1 - MMX, SSE, SSE2
+mov	[eax], edx
+mov	eax, [esp + 12]	;caps2 - SSE3
+mov	[eax], ecx
+
+; extended CPUID
+mov	eax, 0x80000001
+cpuid
+mov	eax, [esp + 16]	;caps3 - 3DNOW!, 3DNOW!EXT, CYRIX-MMXEXT, AMD-MMX-SSE
+mov	[eax], edx
+pop ebx
+
+; End
+.Return
+ret
+
+; prevent executable stack
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
Index: /openal-0.0.8/src/arch/i386/x86_cpu_caps_prk.c
===================================================================
--- /openal-0.0.8/src/arch/i386/x86_cpu_caps_prk.c	(revision 17)
+++ /openal-0.0.8/src/arch/i386/x86_cpu_caps_prk.c	(revision 17)
@@ -0,0 +1,155 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by Prakash Punnoor                                 *
+ *   prakash@punnoor.de                                                    *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Library General Public License as       *
+ *   published by the Free Software Foundation; either version 2 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU Library General Public     *
+ *   License along with this program; if not, write to the                 *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#include "al_siteconfig.h"
+#include <string.h>
+#include <stdlib.h>
+#include "al_cpu_caps.h"
+#include "al_debug.h"
+
+typedef unsigned int uint;
+int _alDetectx86CPUCaps(uint* caps1, uint* caps2, uint* caps3);
+
+	/* caps1 */
+#define MMX_BIT             23
+#define SSE_BIT             25
+#define SSE2_BIT            26
+
+	/* caps2 */
+#define SSE3_BIT             0
+
+	/* caps3 */
+#define	AMD_3DNOW_BIT       31
+#define	AMD_3DNOWEXT_BIT    30
+#define AMD_SSE_MMX_BIT     22
+#define CYRIX_MMXEXT_BIT    24
+
+
+struct x86cpu_caps_s x86cpu_caps = { 0, 0, 0, 0, 0, 0, 0, 0};
+struct x86cpu_caps_s x86cpu_caps_use = { 1, 1, 1, 1, 1, 1, 1, 1};
+
+void _alDetectCPUCaps(void)
+{
+	/* compile time detection */
+#ifdef __MMX__
+	x86cpu_caps.mmx = 1;
+#endif
+#ifdef __SSE__
+	x86cpu_caps.sse = 1;
+#endif
+#ifdef __SSE2__
+	x86cpu_caps.sse2 = 1;
+#endif
+#ifdef __SSE3__
+	x86cpu_caps.sse3 = 1;
+#endif
+#ifdef __3dNOW__
+	x86cpu_caps.amd_3dnow = 1;
+#ifdef __athlon__
+	x86cpu_caps.amd_sse_mmx = 1;
+#endif
+#endif
+#ifdef __3dNOW_A__
+	x86cpu_caps.amd_3dnowext = 1;
+#endif
+	/* end compile time detection */
+	
+	/* runtime detection */
+#ifdef HAVE_CPU_CAPS_DETECTION
+	{
+		uint caps1, caps2, caps3;
+		
+		if (_alDetectx86CPUCaps(&caps1, &caps2, &caps3)) {
+			
+			x86cpu_caps.mmx &= (caps1 >> MMX_BIT) & 1;
+			x86cpu_caps.sse &= (caps1 >> SSE_BIT) & 1;
+			x86cpu_caps.sse2 &= (caps1 >> SSE2_BIT) & 1;
+			
+			x86cpu_caps.sse3 &= (caps2 >> SSE3_BIT) & 1;
+			
+			x86cpu_caps.amd_3dnow &= (caps3 >> AMD_3DNOW_BIT) & 1;
+			x86cpu_caps.amd_3dnowext &= (caps3 >> AMD_3DNOWEXT_BIT) & 1;
+			x86cpu_caps.amd_sse_mmx &= (caps3 >> AMD_SSE_MMX_BIT) & 1;
+			/* FIXME: For Cyrix MMXEXT detect Cyrix CPU first! */
+			/*
+			x86cpu_caps.cyrix_mmxext = (caps3 >> CYRIX_MMXEXT_BIT) & 1;
+			*/
+		}
+	}
+#endif /*HAVE_CPU_CAPS_DETECTION*/
+	/* end runtime detection */
+	
+	/* check environment vars */
+	{
+		char *env;
+		
+		env = getenv("OPENAL_DISABLE_MMX");
+		if (env)
+			x86cpu_caps_use.mmx = !atoi(env);
+		
+		env = getenv("OPENAL_DISABLE_SSE");
+		if (env)
+			x86cpu_caps_use.sse = !atoi(env);
+		
+		env = getenv("OPENAL_DISABLE_SSE2");
+		if (env)
+			x86cpu_caps_use.sse2 = !atoi(env);
+		
+		env = getenv("OPENAL_DISABLE_SSE3");
+		if (env)
+			x86cpu_caps_use.sse3 = !atoi(env);
+		
+		env = getenv("OPENAL_DISABLE_3DNOW");
+		if (env)
+			x86cpu_caps_use.amd_3dnow = !atoi(env);
+		
+		env = getenv("OPENAL_DISABLE_3DNOWEXT");
+		if (env)
+			x86cpu_caps_use.amd_3dnowext = !atoi(env);
+		
+		env = getenv("OPENAL_DISABLE_SSE_MMX");
+		if (env)
+			x86cpu_caps_use.amd_sse_mmx = !atoi(env);
+		
+		env = getenv("OPENAL_DISABLE_SIMD");
+		if (env  &&  atoi(env))
+			memset(&x86cpu_caps_use, 0, sizeof x86cpu_caps_use);
+	}
+	/* end check environment vars */
+
+	_alDebug(ALD_CONFIG, __FILE__, __LINE__,"mmx found %i  use %i",
+	         x86cpu_caps.mmx, x86cpu_caps_use.mmx);
+	_alDebug(ALD_CONFIG, __FILE__, __LINE__,"sse found %i  use %i",
+	         x86cpu_caps.sse, x86cpu_caps_use.sse);
+	_alDebug(ALD_CONFIG, __FILE__, __LINE__,"sse2 found %i  use %i",
+	         x86cpu_caps.sse2, x86cpu_caps_use.sse2);
+	_alDebug(ALD_CONFIG, __FILE__, __LINE__,"sse3 found %i  use %i",
+	         x86cpu_caps.sse3, x86cpu_caps_use.sse3);
+	_alDebug(ALD_CONFIG, __FILE__, __LINE__,"amd_3dnow found %i  use %i",
+	         x86cpu_caps.amd_3dnow, x86cpu_caps_use.amd_3dnow);
+	_alDebug(ALD_CONFIG, __FILE__, __LINE__,"amd_3dnowext found %i  use %i",
+	         x86cpu_caps.amd_3dnowext, x86cpu_caps_use.amd_3dnowext);
+	_alDebug(ALD_CONFIG, __FILE__, __LINE__,"amd_sse_mmx found %i  use %i",
+	         x86cpu_caps.amd_sse_mmx, x86cpu_caps_use.amd_sse_mmx);
+	/*
+	_alDebug(ALD_CONFIG, __FILE__, __LINE__,"cyrix_mmxext found %i  use %i",
+	         x86cpu_caps.cyrix_mmxext, x86cpu_caps_use.cyrix_mmxext);
+	*/
+
+}
Index: /openal-0.0.8/src/arch/i386/x86_cpu_caps_prk.h
===================================================================
--- /openal-0.0.8/src/arch/i386/x86_cpu_caps_prk.h	(revision 17)
+++ /openal-0.0.8/src/arch/i386/x86_cpu_caps_prk.h	(revision 17)
@@ -0,0 +1,81 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by Prakash Punnoor                                 *
+ *   prakash@punnoor.de                                                    *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Library General Public License as       *
+ *   published by the Free Software Foundation; either version 2 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU Library General Public     *
+ *   License along with this program; if not, write to the                 *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#ifndef X86_CPU_CAPS_H
+#define X86_CPU_CAPS_H
+
+struct x86cpu_caps_s {
+	int mmx;
+	int sse;
+	int sse2;
+	int sse3;
+	int amd_3dnow;
+	int amd_3dnowext;
+	int amd_sse_mmx;
+	int cyrix_mmxext;
+};
+
+extern struct x86cpu_caps_s x86cpu_caps;
+extern struct x86cpu_caps_s x86cpu_caps_use;
+
+static __inline int _alHaveMMX(void);
+static __inline int _alHaveSSE(void);
+static __inline int _alHaveSSE2(void);
+static __inline int _alHaveSSE3(void);
+static __inline int _alHave3DNOW(void);
+static __inline int _alHave3DNOWEXT(void);
+static __inline int _alHaveSSEMMX(void);
+
+
+static __inline int _alHaveMMX(void)
+{
+	return x86cpu_caps.mmx & x86cpu_caps_use.mmx;
+}
+
+static __inline int _alHaveSSE(void)
+{
+	return x86cpu_caps.sse & x86cpu_caps_use.sse;
+}
+
+static __inline int _alHaveSSE2(void)
+{
+	return x86cpu_caps.sse2 & x86cpu_caps_use.sse2;
+}
+
+static __inline int _alHaveSSE3(void)
+{
+	return x86cpu_caps.sse3 & x86cpu_caps_use.sse3;
+}
+
+static __inline int _alHave3DNOW(void)
+{
+	return x86cpu_caps.amd_3dnow & x86cpu_caps_use.amd_3dnow;
+}
+
+static __inline int _alHave3DNOWEXT(void)
+{
+	return x86cpu_caps.amd_3dnowext & x86cpu_caps_use.amd_3dnowext;
+}
+
+static __inline int _alHaveSSEMMX(void)
+{
+	return x86cpu_caps.amd_sse_mmx & x86cpu_caps_use.amd_sse_mmx;
+}
+
+#endif /* X86_CPU_CAPS_H */
Index: /openal-0.0.8/src/arch/i386/x86_floatmul.c
===================================================================
--- /openal-0.0.8/src/arch/i386/x86_floatmul.c	(revision 17)
+++ /openal-0.0.8/src/arch/i386/x86_floatmul.c	(revision 17)
@@ -0,0 +1,104 @@
+/***************************************************************************
+ *   MMX routine                                                           *
+ *   Copyright (C) 2005 by Prakash Punnoor                                 *
+ *   prakash@punnoor.de                                                    *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Library General Public License as       *
+ *   published by the Free Software Foundation; either version 2 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU Library General Public     *
+ *   License along with this program; if not, write to the                 *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include "al_cpu_caps.h"
+#include "x86_simd_support_prk.h"
+
+/* MMX routine needs 16 */
+#define SCALING_POWER  16
+#define SCALING_FACTOR (1 << SCALING_POWER)
+
+void _alFloatMul(ALshort *bpt, ALfloat sa, ALuint len);
+
+void _alFloatMul(ALshort *bpt, ALfloat sa, ALuint len) {
+	ALint scaled_sa = sa * SCALING_FACTOR;
+	ALint iter;
+	
+#ifdef __MMX__
+	if (_alHaveMMX()) {
+		union {
+			short s[4];
+			v4hi v;
+		} ALIGN16(v_sa);
+		ALuint samples_main;
+		ALuint samples_pre;
+		ALuint samples_post;
+		v4hi temp;
+		
+		
+		samples_pre = MMX_ALIGN - (aint)bpt % MMX_ALIGN;
+		samples_pre /= sizeof(ALshort);
+		samples_main = len - samples_pre;
+		samples_post = samples_main % 8;
+		samples_main = samples_main / 8;
+		len = samples_post;
+		
+		while(samples_pre--) {
+			iter = *bpt;
+			iter *= scaled_sa;
+			iter >>= SCALING_POWER;
+			*bpt = iter;
+			++bpt;
+		}
+		
+		if (scaled_sa < (1 << 15)) {
+			/* we do signed multiplication, so 1 << 15 is the max */
+			v_sa.s[0] = scaled_sa;
+			v_sa.s[1] = v_sa.s[0];
+			v_sa.s[2] = scaled_sa;
+			v_sa.s[3] = v_sa.s[0];
+			
+			while (samples_main--) {
+				*(v4hi*)bpt = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
+				bpt += 4;
+				*(v4hi*)bpt = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
+				bpt += 4;
+			}
+		} else {
+			/* we lose 1 bit here, but well... */
+			v_sa.s[0] = scaled_sa >> 1;
+			v_sa.s[1] = v_sa.s[0];
+			v_sa.s[2] = v_sa.s[0];
+			v_sa.s[3] = v_sa.s[0];
+			
+			while (samples_main--) {
+				temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
+				*(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
+				bpt += 4;
+				temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v);
+				*(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL);
+				bpt += 4;
+			}
+		}
+		__builtin_ia32_emms();
+	}
+#endif /* __MMX__ */
+
+	while(len--) {
+		iter = *bpt;
+		iter *= scaled_sa;
+		iter >>= SCALING_POWER;
+		*bpt = iter;
+		++bpt;
+	}
+}
Index: /openal-0.0.8/src/arch/i386/x86_simd_support_prk.h
===================================================================
--- /openal-0.0.8/src/arch/i386/x86_simd_support_prk.h	(revision 17)
+++ /openal-0.0.8/src/arch/i386/x86_simd_support_prk.h	(revision 17)
@@ -0,0 +1,69 @@
+/***************************************************************************
+ *   Copyright (C) 2005 by Prakash Punnoor                                 *
+ *   prakash@punnoor.de                                                    *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Library General Public License as       *
+ *   published by the Free Software Foundation; either version 2 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU Library General Public     *
+ *   License along with this program; if not, write to the                 *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#ifndef _X86_SIMD_SUPPORT_H_
+#define _X86_SIMD_SUPPORT_H_
+
+#ifdef __MMX__
+/*
+ * We use built-ins for gcc instead of Intel/MSVC style intrinsics
+ * as (older) gccs are slower with them
+ */
+#if __GNUC__ && !__INTEL_COMPILER
+#if __GNUC__ < 4
+typedef short v4hi __attribute__ ((__mode__(__V4HI__)));
+typedef int   v2si __attribute__ ((__mode__(__V2SI__)));
+typedef int   di   __attribute__ ((__mode__(__DI__)));
+#else
+typedef short v4hi __attribute__ ((vector_size (8)));
+typedef int   v2si __attribute__ ((vector_size (8)));
+typedef int   di   __attribute__ ((vector_size (8)));
+#endif
+
+#define ALIGN16(x) x __attribute__((aligned(16)))
+typedef unsigned long aint;
+
+#else /* NO GCC */
+#include <mmintrin.h>
+typedef __m64 v4hi;
+typedef __m64 v2si;
+typedef __m64 di;
+
+#define __builtin_ia32_pand(X,Y)	_mm_and_si64(X,Y)
+#define __builtin_ia32_pcmpeqw(X,Y)	_mm_cmpeq_pi16(X,Y)
+#define __builtin_ia32_packssdw(X,Y)	_mm_packs_pi32(X,Y)
+#define __builtin_ia32_punpcklwd(X,Y)	_mm_unpacklo_pi16(X,Y)
+#define __builtin_ia32_punpckhwd(X,Y)	_mm_unpackhi_pi16(X,Y)
+#define __builtin_ia32_paddd(X,Y)	_mm_add_pi32(X,Y)
+#define __builtin_ia32_paddsw(X,Y)	_mm_adds_pi16(X,Y)
+#define __builtin_ia32_pmulhw(X,Y)	_mm_mulhi_pi16(X,Y)
+#define __builtin_ia32_psllw(X,Y)	_mm_slli_pi16(X,Y)
+#define __builtin_ia32_emms() 		_mm_empty()
+
+#define ALIGN16(x) __declspec(align(16)) x
+
+/* FIXME: msvc++'s long in x86_64 isn't 8bytes? */
+typedef unsigned long aint;
+#endif /* __GNUC__ */
+
+#define MMX_ALIGN 8
+#endif /* __MMX__ */
+
+#endif /* _X86_SIMD_SUPPORT_H_ */
+
Index: /openal-0.0.8/src/arch/portable/cpu_caps.c
===================================================================
--- /openal-0.0.8/src/arch/portable/cpu_caps.c	(revision 17)
+++ /openal-0.0.8/src/arch/portable/cpu_caps.c	(revision 17)
@@ -0,0 +1,6 @@
+#include "al_cpu_caps.h"
+
+/* stub to make linker happy */
+void _alDetectCPUCaps()
+{
+}
Index: /openal-0.0.8/src/arch/portable/floatmul.c
===================================================================
--- /openal-0.0.8/src/arch/portable/floatmul.c	(revision 17)
+++ /openal-0.0.8/src/arch/portable/floatmul.c	(revision 17)
@@ -0,0 +1,17 @@
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+#include "al_main.h"
+
+void _alFloatMul( ALshort *bpt, ALfloat sa, ALuint len) {
+	while(len--) {
+#if USE_LRINT
+		bpt[len] = lrintf(bpt[len] * sa);
+#else
+		bpt[len] *= sa;
+#endif
+	}
+
+	return;
+}
Index: /openal-0.0.8/src/audioconvert/ac_adpcm.c
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_adpcm.c	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_adpcm.c	(revision 17)
@@ -0,0 +1,602 @@
+/***********************************************************
+ -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+
+Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam, The
+Netherlands.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Stichting Mathematisch
+Centrum or CWI not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior permission.
+
+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+
+/*
+** Intel/DVI ADPCM coder/decoder.
+**
+** The algorithm for this coder was taken from the IMA Compatability Project
+** proceedings, Vol 2, Number 2; May 1992.
+**
+** Version 1.2, 18-Dec-92.
+**
+** Change log:
+** - Fixed a stupid bug, where the delta was computed as
+**   stepsize*code/4 in stead of stepsize*(code+0.5)/4.
+** - There was an off-by-one error causing it to pick
+**   an incorrect delta once in a blue moon.
+** - The NODIVMUL define has been removed. Computations are now always done
+**   using shifts, adds and subtracts. It turned out that, because the standard
+**   is defined using shift/add/subtract, you needed bits of fixup code
+**   (because the div/mul simulation using shift/add/sub made some rounding
+**   errors that real div/mul don't make) and all together the resultant code
+**   ran slower than just using the shifts all the time.
+** - Changed some of the variable names to be more meaningful.
+*/
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "audioconvert/ac_adpcm.h"
+#include "audioconvert/ac_endian.h"
+#include "audioconvert/ac_wave.h"
+
+#define MS_ADPCM_max ((1<<(16-1))-1)
+#define MS_ADPCM_min -(1<<(16-1))
+
+#define NELEMS(x) ((sizeof x) / (sizeof *x))
+
+/* IMA in-wave-file */
+static ALint IMA_ADPCM_nibble(alIMAADPCM_decodestate_LOKI *state, ALubyte nybble);
+static void Fill_IMA_ADPCM_block(ALubyte *decoded, ALubyte *encoded,
+	int channel, int numchannels, alIMAADPCM_decodestate_LOKI *state);
+
+/* Intel ADPCM step variation table */
+static int indexTable[16] = {
+    -1, -1, -1, -1, 2, 4, 6, 8,
+    -1, -1, -1, -1, 2, 4, 6, 8,
+};
+
+static int stepsizeTable[89] = {
+    7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
+    19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
+    50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
+    130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
+    337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
+    876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
+    2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
+    5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
+    15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
+};
+
+void
+ac_adpcm_coder(short indata[], char outdata[], int len,adpcm_state_t *state) {
+
+    short *inp;			/* Input buffer pointer */
+    signed char *outp;		/* output buffer pointer */
+    int val;			/* Current input sample value */
+    int sign;			/* Current adpcm sign bit */
+    int delta;			/* Current adpcm output value */
+    int diff;			/* Difference between val and valprev */
+    int step;			/* Stepsize */
+    int valpred;		/* Predicted output value */
+    int vpdiff;			/* Current change to valpred */
+    int ind;			/* Current step change index */
+    int outputbuffer = 0;	/* place to keep previous 4-bit value */
+    int bufferstep;		/* toggle between outputbuffer/output */
+
+    outp = (signed char *)outdata;
+    inp = indata;
+
+    valpred = state->valprev;
+    ind = state->index;
+    step = stepsizeTable[ind];
+
+    bufferstep = 1;
+
+    for ( ; len > 0 ; len-- ) {
+	val = *inp++;
+
+	/* Step 1 - compute difference with previous value */
+	diff = val - valpred;
+	sign = (diff < 0) ? 8 : 0;
+	if ( sign ) diff = (-diff);
+
+	/* Step 2 - Divide and clamp */
+	/* Note:
+	** This code *approximately* computes:
+	**    delta = diff*4/step;
+	**    vpdiff = (delta+0.5)*step/4;
+	** but in shift step bits are dropped. The net result of this is
+	** that even if you have fast mul/div hardware you cannot put it to
+	** good use since the fixup would be too expensive.
+	*/
+	delta = 0;
+	vpdiff = (step >> 3);
+
+	if ( diff >= step ) {
+	    delta = 4;
+	    diff -= step;
+	    vpdiff += step;
+	}
+	step >>= 1;
+	if ( diff >= step  ) {
+	    delta |= 2;
+	    diff -= step;
+	    vpdiff += step;
+	}
+	step >>= 1;
+	if ( diff >= step ) {
+	    delta |= 1;
+	    vpdiff += step;
+	}
+
+	/* Step 3 - Update previous value */
+	if ( sign )
+	  valpred -= vpdiff;
+	else
+	  valpred += vpdiff;
+
+	/* Step 4 - Clamp previous value to 16 bits */
+	if ( valpred > 32767 )
+	  valpred = 32767;
+	else if ( valpred < -32768 )
+	  valpred = -32768;
+
+	/* Step 5 - Assemble value, update index and step values */
+	delta |= sign;
+
+	ind += indexTable[delta];
+	if ( ind < 0 ) ind = 0;
+	if ( ind > 88 ) ind = 88;
+	step = stepsizeTable[ind];
+
+	/* Step 6 - Output value */
+	if ( bufferstep ) {
+	    outputbuffer = (delta << 4) & 0xf0;
+	} else {
+	    *outp++ = (delta & 0x0f) | outputbuffer;
+	}
+	bufferstep = !bufferstep;
+    }
+
+    /* Output last step, if needed */
+    if ( !bufferstep )
+      *outp++ = outputbuffer;
+
+    state->valprev = valpred;
+    state->index = ind;
+}
+
+void
+ac_adpcm_decoder(char indata[], short outdata[], int len, adpcm_state_t *state,
+int position)
+{
+    signed char *inp;		/* Input buffer pointer */
+    short *outp;		/* output buffer pointer */
+    int sign;			/* Current adpcm sign bit */
+    int delta;			/* Current adpcm output value */
+    int step;			/* Stepsize */
+    int valpred;		/* Predicted value */
+    int vpdiff;			/* Current change to valpred */
+    int ind;			/* Current step change index */
+    int inputbuffer = 0;	/* place to keep next 4-bit value */
+    int bufferstep;		/* toggle between inputbuffer/input */
+
+    outp = outdata;
+    inp = (signed char *)indata;
+
+    valpred = state->valprev;
+    ind = state->index;
+    step = stepsizeTable[ind];
+
+    inp += position>>1;
+    bufferstep = position&1;
+    if(bufferstep) {
+	    inputbuffer = *inp++;
+    }
+
+    for ( ; len > 0 ; len-- ) {
+
+	/* Step 1 - get the delta value */
+	if ( bufferstep ) {
+	    delta = inputbuffer & 0xf;
+	} else {
+	    inputbuffer = *inp++;
+	    delta = (inputbuffer >> 4) & 0xf;
+	}
+	bufferstep = !bufferstep;
+
+	/* Step 2 - Find new index value (for later) */
+	ind += indexTable[delta];
+	if ( ind < 0 ) ind = 0;
+	if ( ind > 88 ) ind = 88;
+
+	/* Step 3 - Separate sign and magnitude */
+	sign = delta & 8;
+	delta = delta & 7;
+
+	/* Step 4 - Compute difference and new predicted value */
+	/*
+	** Computes 'vpdiff = (delta+0.5)*step/4', but see comment
+	** in adpcm_coder.
+	*/
+	vpdiff = step >> 3;
+	if ( delta & 4 ) vpdiff += step;
+	if ( delta & 2 ) vpdiff += step>>1;
+	if ( delta & 1 ) vpdiff += step>>2;
+
+	if ( sign )
+	  valpred -= vpdiff;
+	else
+	  valpred += vpdiff;
+
+	/* Step 5 - clamp output value */
+	if ( valpred > 32767 )
+	  valpred = 32767;
+	else if ( valpred < -32768 )
+	  valpred = -32768;
+
+	/* Step 6 - Update step value */
+	step = stepsizeTable[ind];
+
+	/* Step 7 - Output value */
+	*outp++ = valpred;
+    }
+
+    state->valprev = valpred;
+    state->index = ind;
+}
+
+int msadpcm_decode(ALubyte *encoded, ALubyte *decoded, ALuint audio_len,
+			   alMSADPCM_state_LOKI *dstate, int offset) {
+	alMSADPCM_decodestate_LOKI *state[2];
+	ALint encoded_len, samplesleft;
+	ALbyte nybble, stereo;
+	ALshort *coeff[2];
+	ALint new_sample;
+
+	/* scale encoded */
+	encoded += (offset/4);
+
+	/* Allocate the proper sized output buffer */
+	encoded_len = audio_len /* 4:1 with 16bit samples */;
+
+	/* Get ready... Go! */
+	stereo = (dstate->wavefmt.channels == 2);
+	state[0] = &dstate->state[0];
+	state[1] = &dstate->state[(int) stereo];
+
+	if(encoded_len < dstate->wavefmt.blockalign ) {
+		fprintf(stderr, "too short\n");
+	}
+
+	while ( encoded_len >= dstate->wavefmt.blockalign ) {
+		/* Grab the initial information for this block */
+		state[0]->hPredictor = *encoded++;
+		if ( stereo ) {
+			state[1]->hPredictor = *encoded++;
+		}
+		state[0]->iDelta = ((encoded[1]<<8)|encoded[0]);
+		encoded += sizeof(ALshort);
+		if ( stereo ) {
+			state[1]->iDelta = ((encoded[1]<<8)|encoded[0]);
+			encoded += sizeof(ALshort);
+		}
+		state[0]->iSamp1 = ((encoded[1]<<8)|encoded[0]);
+		encoded += sizeof(ALshort);
+		if ( stereo ) {
+			state[1]->iSamp1 = ((encoded[1]<<8)|encoded[0]);
+			encoded += sizeof(ALshort);
+		}
+		state[0]->iSamp2 = ((encoded[1]<<8)|encoded[0]);
+		encoded += sizeof(ALshort);
+		if ( stereo ) {
+			state[1]->iSamp2 = ((encoded[1]<<8)|encoded[0]);
+			encoded += sizeof(ALshort);
+		}
+		coeff[0] = dstate->aCoeff[(int) state[0]->hPredictor];
+		coeff[1] = dstate->aCoeff[(int) state[1]->hPredictor];
+
+		/* Store the two initial samples we start with */
+		decoded[0] = state[0]->iSamp2&0xFF;
+		decoded[1] = state[0]->iSamp2>>8;
+		decoded += 2;
+		if ( stereo ) {
+			decoded[0] = state[1]->iSamp2&0xFF;
+			decoded[1] = state[1]->iSamp2>>8;
+			decoded += 2;
+		}
+		decoded[0] = state[0]->iSamp1&0xFF;
+		decoded[1] = state[0]->iSamp1>>8;
+		decoded += 2;
+		if ( stereo ) {
+			decoded[0] = state[1]->iSamp1&0xFF;
+			decoded[1] = state[1]->iSamp1>>8;
+			decoded += 2;
+		}
+
+		/* Decode and store the other samples in this block */
+		samplesleft = (dstate->wSamplesPerBlock-2)*
+					dstate->wavefmt.channels;
+
+		while ( samplesleft > 0 ) {
+			nybble = (*encoded)>>4;
+			new_sample = MS_ADPCM_nibble(state[0], nybble, coeff[0]);
+			decoded[0] = new_sample & 0xFF;
+			new_sample >>= 8;
+			decoded[1] = new_sample & 0xFF;
+			decoded   += 2;
+
+			nybble = (*encoded) & 0x0F;
+			new_sample = MS_ADPCM_nibble(state[1],nybble,coeff[1]);
+			decoded[0] = new_sample & 0xFF;
+			new_sample >>= 8;
+			decoded[1] = new_sample & 0xFF;
+			decoded   += 2;
+
+			++encoded;
+			samplesleft -= 2;
+		}
+		encoded_len -= dstate->wavefmt.blockalign;
+	}
+
+	/* free(freeable); */
+	return 0;
+}
+
+ALint MS_ADPCM_nibble(alMSADPCM_decodestate_LOKI *state,
+					ALubyte nybble, ALshort *coeff) {
+	const ALint adaptive[] = {
+		230, 230, 230, 230, 307, 409, 512, 614,
+		768, 614, 512, 409, 307, 230, 230, 230
+	};
+	ALint new_sample, delta;
+
+	new_sample = ((state->iSamp1 * coeff[0]) +
+		      (state->iSamp2 * coeff[1]))/256;
+
+	if(nybble & 0x08) {
+		new_sample += state->iDelta * (nybble-0x10);
+	} else {
+		new_sample += state->iDelta * nybble;
+	}
+
+	if(new_sample < MS_ADPCM_min) {
+		new_sample = MS_ADPCM_min;
+	} else if(new_sample > MS_ADPCM_max) {
+		new_sample = MS_ADPCM_max;
+	}
+
+	delta = ((ALint) state->iDelta * adaptive[nybble]);
+	if(delta < 4096) {
+		delta = 16;
+	} else {
+		delta /= 256;
+	}
+
+	state->iDelta = delta;
+	state->iSamp2 = state->iSamp1;
+	state->iSamp1 = new_sample;
+
+	return new_sample;
+}
+
+int InitIMA_ADPCM(alIMAADPCM_state_LOKI *state, alWaveFMT_LOKI *format)
+{
+	ALubyte  *rogue_feel;
+	ALushort extra_info;
+
+	/* Set the rogue pointer to the IMA_ADPCM specific data */
+	state->wavefmt.encoding     = swap16le(format->encoding);
+	state->wavefmt.channels     = swap16le(format->channels);
+	state->wavefmt.frequency    = swap32le(format->frequency);
+	state->wavefmt.byterate     = swap32le(format->byterate);
+	state->wavefmt.blockalign   = swap16le(format->blockalign);
+	state->wavefmt.bitspersample =
+					 swap16le(format->bitspersample);
+	rogue_feel = (ALubyte *)format + sizeof(*format);
+	if ( sizeof(*format) == 16 ) {
+		extra_info = ((rogue_feel[1]<<8)|rogue_feel[0]);
+		rogue_feel += sizeof(ALushort);
+	}
+	state->wSamplesPerBlock = ((rogue_feel[1]<<8)|rogue_feel[0]);
+
+	state->state[0].valprev = 0;
+	state->state[0].index   = 0;
+
+	state->state[1].valprev = 0;
+	state->state[1].index   = 0;
+
+	return(0);
+}
+
+static ALint IMA_ADPCM_nibble(alIMAADPCM_decodestate_LOKI *state, ALubyte nybble)
+{
+	const ALint max_audioval = ((1<<(16-1))-1);
+	const ALint min_audioval = -(1<<(16-1));
+	const int index_table[16] = {
+		-1, -1, -1, -1,
+		 2,  4,  6,  8,
+		-1, -1, -1, -1,
+		 2,  4,  6,  8
+	};
+	const ALint step_table[89] = {
+		7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31,
+		34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130,
+		143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408,
+		449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282,
+		1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327,
+		3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630,
+		9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350,
+		22385, 24623, 27086, 29794, 32767
+	};
+	ALint delta, step;
+
+	/* Compute difference and new sample value */
+	step = step_table[(int) state->index];
+	delta = step >> 3;
+	if ( nybble & 0x04 ) delta += step;
+	if ( nybble & 0x02 ) delta += (step >> 1);
+	if ( nybble & 0x01 ) delta += (step >> 2);
+	if ( nybble & 0x08 ) delta = -delta;
+	state->valprev += delta;
+
+	/* Update index value */
+	state->index += index_table[nybble];
+	if ( state->index > 88 ) {
+		state->index = 88;
+	} else
+	if ( state->index < 0 ) {
+		state->index = 0;
+	}
+
+	/* Clamp output sample */
+	if ( state->valprev > max_audioval ) {
+		state->valprev = max_audioval;
+	} else
+	if ( state->valprev < min_audioval ) {
+		state->valprev = min_audioval;
+	}
+	return(state->valprev);
+}
+
+/* Fill the decode buffer with a channel block of data (8 samples) */
+static void Fill_IMA_ADPCM_block(ALubyte *decoded, ALubyte *encoded,
+	int channel, int numchannels, alIMAADPCM_decodestate_LOKI *state)
+{
+	int i;
+	ALbyte  nybble;
+	ALint new_sample;
+
+	decoded += (channel * 2);
+	for ( i=0; i<4; ++i ) {
+		nybble = (*encoded)&0x0F;
+		new_sample = IMA_ADPCM_nibble(state, nybble);
+		decoded[0] = new_sample&0xFF;
+		new_sample >>= 8;
+		decoded[1] = new_sample&0xFF;
+		decoded += 2 * numchannels;
+
+		nybble = (*encoded)>>4;
+		new_sample = IMA_ADPCM_nibble(state, nybble);
+		decoded[0] = new_sample&0xFF;
+		new_sample >>= 8;
+		decoded[1] = new_sample&0xFF;
+		decoded += 2 * numchannels;
+
+		++encoded;
+	}
+}
+
+int IMA_ADPCM_decode(ALubyte *indata, ALubyte *outdata,
+		ALuint len, alIMAADPCM_state_LOKI *istate, int offset) {
+	alIMAADPCM_decodestate_LOKI *state;
+	int indata_len;
+	int c, channels = istate->wavefmt.channels;
+	int samplesleft;
+
+	indata += offset;
+	state = istate->state;
+
+	if(len < istate->wavefmt.blockalign) {
+#ifdef DEBUG_CONVERT
+		fprintf(stderr, "IMA_ADPCM_decode len too small!\n");
+#endif
+		return -1;
+	}
+
+	indata_len = len;
+	/* Get ready... Go! */
+	while ( indata_len >= istate->wavefmt.blockalign ) {
+		/* Grab the initial information for this block */
+		for ( c=0; c<channels; ++c ) {
+			/* Fill the state information for this block */
+			state[c].valprev = ((indata[1]<<8)|indata[0]);
+			indata += 2;
+			if ( state[c].valprev & 0x8000 ) {
+				state[c].valprev -= 0x10000;
+			}
+			state[c].index = *indata++;
+			/* Reserved byte in buffer header, should be 0 */
+			if ( *indata++ != 0 ) {
+				/* Uh oh, corrupt data?  Buggy code? */;
+			}
+
+			/* Store the initial valprev we start with */
+			outdata[0] = state[c].valprev&0xFF;
+			outdata[1] = state[c].valprev>>8;
+			outdata += 2;
+		}
+
+		/* Decode and store the other samples in this block */
+		samplesleft = (istate->wSamplesPerBlock-1)*channels;
+		while ( samplesleft > 0 ) {
+			for ( c=0; c<channels; ++c ) {
+				Fill_IMA_ADPCM_block(outdata, indata,
+						c, channels, &state[c]);
+				indata += 4;
+				samplesleft -= 8;
+			}
+			outdata += (channels * 8 * 2);
+		}
+		indata_len -= istate->wavefmt.blockalign;
+	}
+
+	return 0;
+}
+
+int IMA_ADPCM_decode_FULL(alIMAADPCM_state_LOKI *istate,
+			ALubyte **audio_buf, ALuint *audio_len) {
+	ALubyte *freeable, *encoded;
+	ALint encoded_len;
+	unsigned int channels;
+
+
+
+	/* Check to make sure we have enough variables in the state array */
+	channels = istate->wavefmt.channels;
+	if ( channels > NELEMS(istate->state) ) {
+#ifdef DEBUG_CONVERT
+		fprintf(stderr, "IMA ADPCM decoder can only handle %d channels",
+						NELEMS(istate->state));
+#endif
+
+		return(-1);
+	}
+
+	/* Allocate the proper sized output buffer */
+	encoded_len = *audio_len;
+	encoded = *audio_buf;
+	freeable = *audio_buf;
+	*audio_len = (encoded_len/istate->wavefmt.blockalign) *
+				istate->wSamplesPerBlock*
+				istate->wavefmt.channels*sizeof(ALshort);
+
+	*audio_buf = malloc(*audio_len);
+	if ( *audio_buf == NULL ) {
+#ifdef DEBUG_CONVERT
+		fprintf(stderr, "No mem\n");
+#endif
+		return(-1);
+	}
+
+	return IMA_ADPCM_decode(encoded, *audio_buf,
+			encoded_len, istate, 0);
+}
Index: /openal-0.0.8/src/audioconvert/ac_adpcm.h
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_adpcm.h	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_adpcm.h	(revision 17)
@@ -0,0 +1,64 @@
+/***********************************************************
+ -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam, The
+Netherlands.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Stichting Mathematisch
+Centrum or CWI not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior permission.
+
+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+
+/*
+ *
+ * ac_adpcm.h
+ *
+ * This file contains prototypes and definitions for the ADPCM
+ * decoders in audioconvert.
+ *
+ * For more information, please see ac_adpcm.c
+ */
+#ifndef _AC_ADPCM_H_
+#define _AC_ADPCM_H_
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alext.h>
+
+typedef struct adpcm_state_s {
+    ALshort	valprev;	/* Previous output value */
+    ALbyte	index;		/* Index into stepsize table */
+} adpcm_state_t;
+
+void ac_adpcm_coder   (short [], char [], int, adpcm_state_t *);
+void ac_adpcm_decoder (char [], short [], int, adpcm_state_t *, int pos);
+
+int msadpcm_decode(ALubyte *encoded, ALubyte *decoded, ALuint audio_len,
+			   alMSADPCM_state_LOKI *dstate, int offset);
+
+ALint MS_ADPCM_nibble(alMSADPCM_decodestate_LOKI *state,
+					ALubyte nybble, ALshort *coeff);
+
+int InitIMA_ADPCM(alIMAADPCM_state_LOKI *state, alWaveFMT_LOKI *format);
+int IMA_ADPCM_decode_FULL(alIMAADPCM_state_LOKI *state,
+			ALubyte **audio_buf, ALuint *audio_len);
+int IMA_ADPCM_decode(ALubyte *indata, ALubyte *outdata,
+		ALuint len, alIMAADPCM_state_LOKI *istate, int offset);
+
+#endif /* _AC_ADPCM_H_ */
Index: /openal-0.0.8/src/audioconvert/ac_bits.c
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_bits.c	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_bits.c	(revision 17)
@@ -0,0 +1,83 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * ac_bits.c
+ *
+ * audioconvert functions related to bit depth.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdio.h>
+
+#include "audioconvert/audioconvert.h"
+
+/* Convert 8-bit to 16-bit - LSB */
+void acConvert16LSB( acAudioCVT *cvt, ALushort format ) {
+	int i;
+	ALubyte *src, *dst;
+
+	src = (ALubyte *) cvt->buf + cvt->len_cvt;
+	dst = (ALubyte *) cvt->buf + cvt->len_cvt * 2;
+	for(i = cvt->len_cvt; i; i-- ) {
+		src -= 1;
+		dst -= 2;
+		dst[0] = 0;
+		dst[1] = *src;
+	}
+
+	format = ((format & ~0x0008) | AUDIO_U16LSB);
+	cvt->len_cvt *= 2;
+
+	if ( cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
+
+/* Convert 8-bit to 16-bit - MSB */
+void acConvert16MSB(acAudioCVT *cvt, ALushort format) {
+	int i;
+	ALubyte *src, *dst;
+
+	src = (ALubyte *) cvt->buf + cvt->len_cvt;
+	dst = (ALubyte *) cvt->buf + cvt->len_cvt * 2;
+	for(i = cvt->len_cvt; i; i--) {
+		src -= 1;
+		dst -= 2;
+		dst[1] = 0;
+		dst[0] = *src;
+	}
+
+	format = ((format & ~0x0008) | AUDIO_U16MSB);
+	cvt->len_cvt *= 2;
+
+	if ( cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
+
+/* Convert 16-bit to 8-bit */
+void acConvert8(acAudioCVT *cvt, ALushort format) {
+	int i;
+	ALubyte *src, *dst;
+
+	src = cvt->buf;
+	dst = cvt->buf;
+
+	if((format & 0x1000) != 0x1000) { /* Little endian */
+		++src;
+	}
+
+	for(i = cvt->len_cvt/2; i; i--) {
+		*dst = *src;
+		src += 2;
+		dst += 1;
+	}
+	format = ((format & ~0x9010) | AUDIO_U8);
+
+	cvt->len_cvt /= 2;
+
+	if ( cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
Index: /openal-0.0.8/src/audioconvert/ac_channels.c
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_channels.c	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_channels.c	(revision 17)
@@ -0,0 +1,202 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * ac_channels.c
+ *
+ * audioconvert function related to number of audio channels
+ */
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdio.h>
+
+#include "audioconvert/audioconvert.h"
+
+/* Duplicate a mono channel to both stereo channels */
+void acConvertStereo(acAudioCVT *cvt, ALushort format) {
+	int i;
+
+	if((format & 0xFF) == 16) {
+		ALushort *src, *dst;
+
+		src  = (ALushort *) cvt->buf;
+		dst  = (ALushort *) cvt->buf;
+		src += cvt->len_cvt / sizeof *src;
+		dst += cvt->len_cvt * 2 / sizeof *dst;
+
+		for ( i=cvt->len_cvt/2; i; --i ) {
+			dst -= 2;
+			src -= 1;
+			dst[0] = src[0];
+			dst[1] = src[0];
+		}
+	} else {
+		ALubyte *src, *dst;
+
+		src = (ALubyte *) cvt->buf + cvt->len_cvt;
+		dst = (ALubyte *) cvt->buf + cvt->len_cvt * 2;
+		for(i = cvt->len_cvt; i; i-- ) {
+			dst -= 2;
+			src -= 1;
+			dst[0] = src[0];
+			dst[1] = src[0];
+		}
+	}
+
+	cvt->len_cvt *= 2;
+
+	if ( cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
+
+/* Effectively mix right and left channels into a single channel */
+void acConvertMono(acAudioCVT *cvt, ALushort format) {
+	int i;
+	ALint sample;
+
+	switch(format & 0x8018) {
+		case AUDIO_U8: {
+			ALubyte *src, *dst;
+
+			src = cvt->buf;
+			dst = cvt->buf;
+			for ( i=cvt->len_cvt/2; i; --i ) {
+				sample = src[0] + src[1];
+				sample /= 2;
+
+				if ( sample > 255 ) {
+					*dst = 255;
+				} else {
+					*dst = sample;
+				}
+				src += 2;
+				dst += 1;
+			}
+		}
+		break;
+
+		case AUDIO_S8: {
+			ALbyte *src, *dst;
+
+			src = (ALbyte *)cvt->buf;
+			dst = (ALbyte *)cvt->buf;
+			for ( i=cvt->len_cvt/2; i; --i ) {
+				sample = src[0] + src[1];
+				sample /= 2;
+
+				if ( sample > 127 ) {
+					*dst = 127;
+				} else
+				if ( sample < -128 ) {
+					*dst = -128;
+				} else {
+					*dst = sample;
+				}
+				src += 2;
+				dst += 1;
+			}
+		}
+		break;
+
+		case AUDIO_U16LSB: {
+			ALubyte *src, *dst;
+
+			src = cvt->buf;
+			dst = cvt->buf;
+			if ( (format & 0x1000) == 0x1000 ) {
+				for ( i=cvt->len_cvt/4; i; --i ) {
+					sample = (ALushort)((src[0]<<8)|src[1])+
+					         (ALushort)((src[2]<<8)|src[3]);
+					sample /= 2;
+
+					if ( sample > 65535 ) {
+						dst[0] = 0xFF;
+						dst[1] = 0xFF;
+					} else {
+						dst[1] = (sample&0xFF);
+						sample >>= 8;
+						dst[0] = (sample&0xFF);
+					}
+					src += 4;
+					dst += 2;
+				}
+			} else {
+				for ( i=cvt->len_cvt/4; i; --i ) {
+					sample = (ALushort)((src[1]<<8)|src[0])+
+					         (ALushort)((src[3]<<8)|src[2]);
+					sample /= 2;
+
+					if ( sample > 65535 ) {
+						dst[0] = 0xFF;
+						dst[1] = 0xFF;
+					} else {
+						dst[0] = (sample&0xFF);
+						sample >>= 8;
+						dst[1] = (sample&0xFF);
+					}
+					src += 4;
+					dst += 2;
+				}
+			}
+		}
+		break;
+
+		case AUDIO_S16LSB: {
+			ALubyte *src, *dst;
+
+			src = cvt->buf;
+			dst = cvt->buf;
+			if ( (format & 0x1000) == 0x1000 ) {
+				for ( i=cvt->len_cvt/4; i; --i ) {
+					sample = (ALshort)((src[0]<<8)|src[1])+
+					         (ALshort)((src[2]<<8)|src[3]);
+					sample /= 2;
+
+					if ( sample > 32767 ) {
+						dst[0] = 0x7F;
+						dst[1] = 0xFF;
+					} else
+					if ( sample < -32768 ) {
+						dst[0] = 0x80;
+						dst[1] = 0x00;
+					} else {
+						dst[1] = (sample&0xFF);
+						sample >>= 8;
+						dst[0] = (sample&0xFF);
+					}
+					src += 4;
+					dst += 2;
+				}
+			} else {
+				for ( i=cvt->len_cvt/4; i; --i ) {
+					sample = (ALshort)((src[1]<<8)|src[0])+
+					         (ALshort)((src[3]<<8)|src[2]);
+					sample /= 2;
+
+					if ( sample > 32767 ) {
+						dst[1] = 0x7F;
+						dst[0] = 0xFF;
+					} else
+					if ( sample < -32768 ) {
+						dst[1] = 0x80;
+						dst[0] = 0x00;
+					} else {
+						dst[0] = (sample&0xFF);
+						sample >>= 8;
+						dst[1] = (sample&0xFF);
+					}
+					src += 4;
+					dst += 2;
+				}
+			}
+		}
+		break;
+	}
+	cvt->len_cvt /= 2;
+
+	if ( cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
Index: /openal-0.0.8/src/audioconvert/ac_endian.c
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_endian.c	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_endian.c	(revision 17)
@@ -0,0 +1,29 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * ac_endian.c
+ *
+ * Functions related to handling endian differences.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <string.h>
+
+#include "audioconvert/ac_endian.h"
+
+ALubyte *cp16le(ALubyte *rawdata, ALushort *reader16) {
+	memcpy(reader16, rawdata, sizeof *reader16);
+
+        *reader16 = swap16le(*reader16);
+
+	return rawdata + sizeof *reader16;
+}
+
+ALubyte *cp32le(ALubyte *rawdata, ALuint *reader32) {
+	memcpy(reader32, rawdata, sizeof *reader32);
+
+	*reader32 = swap32le(*reader32);
+	return rawdata + sizeof *reader32;
+}
Index: /openal-0.0.8/src/audioconvert/ac_endian.h
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_endian.h	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_endian.h	(revision 17)
@@ -0,0 +1,30 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * ac_endian.h
+ *
+ * This file contains macros and prototypes for endian management.
+ */
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+#define ac_swap16(D) ((ALushort) (((D)<<8) | ((D)>>8)))
+#define ac_swap32(D) (ALuint) ((((D)<<24) | (((D)<<8)&0x00FF0000) | (((D)>>8)&0x0000FF00) | ((D)>>24)))
+
+ALubyte *cp16le(ALubyte *rawdata, ALushort *reader16);
+ALubyte *cp32le(ALubyte *rawdata, ALuint *reader32);
+
+#ifdef WORDS_BIGENDIAN
+#define swap16le(x) ac_swap16(x)
+#define swap32le(x) ac_swap32(x)
+#define swap16be(x) (x)
+#define swap32be(x) (x)
+#else
+#define swap16le(x) (x)
+#define swap32le(x) (x)
+#define swap16be(x) ac_swap16(x)
+#define swap32be(x) ac_swap32(x)
+
+#endif /* __big_endian */
Index: /openal-0.0.8/src/audioconvert/ac_freq.c
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_freq.c	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_freq.c	(revision 17)
@@ -0,0 +1,269 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * ac_freq.c
+ *
+ * audioconvert functions related to changing the sampling
+ * rate of a buffer.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdio.h>
+
+#include "audioconvert/audioconvert.h"
+
+/* Convert rate up by multiple of 2 */
+void acFreqMUL2(acAudioCVT *cvt, ALushort format) {
+	int i;
+	ALubyte *src, *dst;
+	src = (ALubyte *) cvt->buf + cvt->len_cvt;
+	dst = (ALubyte *) cvt->buf + cvt->len_cvt * 2;
+	
+	switch(format & 0xFF) {
+	case 8:
+		if (format == AUDIO_U8) {
+			ALubyte *src8 = (ALubyte*) src;
+			ALubyte *dst8 = (ALubyte*) dst;
+			src8 -= 1;
+			dst8 -= 2;
+			/* For the first sample to be processed (last sample
+			   in the buffer) there's no 'next' sample in the
+			   buffer to interpolate against.  So we use a value
+			   extrapolated (then dampened) from the previous
+			   sample in the buffer; this dampens (but doesn't
+			   eliminate :() the 'click' of the first sample. */
+			if (cvt->len_cvt >= 2) {
+				int ex; /* extrapolated sample, damped */
+				ex = src8[0] + (src8[0]-(int)src8[-1])/8;
+				if ( ex > 255 )
+					ex = 255;
+				else if ( ex < 0 )
+					ex = 0;
+				dst8[0] = src8[0];
+				dst8[1] = ex;
+				for ( i=cvt->len_cvt-1; i; --i ) {
+					src8 -= 1;
+					dst8 -= 2;
+					dst8[0] = src8[0];
+					dst8[1] = (src8[0]+(int)src8[1])/2;
+				}
+			} else if (cvt->len_cvt == 1) {
+				dst8[0] = src8[0];
+				dst8[1] = src8[0];
+			}
+		} else if (format == AUDIO_S8) {
+			ALbyte *src8 = (ALbyte*) src;
+			ALbyte *dst8 = (ALbyte*) dst;
+			src8 -= 1;
+			dst8 -= 2;
+			if (cvt->len_cvt >= 2) {
+				int ex; /* extrapolated sample, damped */
+				ex = src8[0] + (src8[0]-(int)src8[-1])/8;
+				if ( ex > 127 )
+					ex = 127;
+				else if ( ex < -128 )
+					ex = -128;
+				dst8[0] = src8[0];
+				dst8[1] = ex;
+				for ( i=cvt->len_cvt-1; i; --i ) {
+					src8 -= 1;
+					dst8 -= 2;
+					dst8[0] = src8[0];
+					dst8[1] = (src8[0]+(int)src8[1])/2;
+				}
+			} else {
+				dst8[0] = src8[0];
+				dst8[1] = src8[0];
+			}
+		}
+		break;
+	case 16:
+		if (format == AUDIO_S16) {
+			ALshort *src16 = (ALshort*) src;
+			ALshort *dst16 = (ALshort*) dst;
+			src16 -= 1;
+			dst16 -= 2;
+			if (cvt->len_cvt >= 4) {
+				int ex; /* extrapolated sample, damped */
+				ex = src16[0] + (src16[0]-(int)src16[-1])/8;
+				if ( ex > 32767 )
+					ex = 32767;
+				else if ( ex < -32768 )
+					ex = -32768;
+				dst16[0] = src16[0];
+				dst16[1] = ex;
+				for ( i=cvt->len_cvt/2-1; i; --i ) {
+					src16 -= 1;
+					dst16 -= 2;
+					dst16[0] = src16[0];
+					dst16[1] = (src16[0]+(int)src16[1])/2;
+				}
+			} else if (cvt->len_cvt == 2) {
+				dst16[0] = src16[0];
+				dst16[1] = src16[0];
+			}
+		} else if (format == AUDIO_U16) {
+			ALushort *src16 = (ALushort*) src;
+			ALushort *dst16 = (ALushort*) dst;
+			src16 -= 1;
+			dst16 -= 2;
+			if (cvt->len_cvt >= 4) {
+				int ex; /* extrapolated sample, damped */
+				ex = src16[0] + (src16[0]-(int)src16[-1])/8;
+				if ( ex > 65535 )
+					ex = 65535;
+				else if ( ex < 0 )
+					ex = 0;
+				dst16[0] = src16[0];
+				dst16[1] = ex;
+				for ( i=cvt->len_cvt/2-1; i; --i ) {
+					src16 -= 1;
+					dst16 -= 2;
+					dst16[0] = src16[0];
+					dst16[1] = (src16[0]+(int)src16[1])/2;
+				}
+			} else if (cvt->len_cvt == 2) {
+				dst16[0] = src16[0];
+				dst16[1] = src16[0];
+			}
+		} else {
+			/* this is a 16-bit format that doesn't correspond
+			   to a native type, so sample interpolation isn't
+			   completely trivial; we'll just do sample
+			   duplication.  Not too hard to fix though, for
+			   future work. */
+			ALushort *src16 = (ALushort*) src;
+			ALushort *dst16 = (ALushort*) dst;
+			for ( i=cvt->len_cvt/2; i; --i ) {
+				src16 -= 1;
+				dst16 -= 2;
+				dst16[0] = src16[0];
+				dst16[1] = src16[0];
+			}
+		}
+	break;
+	}
+	cvt->len_cvt *= 2;
+	
+	if (cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
+
+/* Convert rate down by multiple of 2 */
+void acFreqDIV2(acAudioCVT *cvt, ALushort format) {
+	int i;
+	ALubyte *src, *dst;
+
+	src = cvt->buf;
+	dst = cvt->buf;
+	switch(format & 0xFF) {
+		case 8:
+			for ( i=cvt->len_cvt/2; i; --i ) {
+				dst[0] = src[0];
+				src += 2;
+				dst += 1;
+			}
+			break;
+		case 16:
+			for ( i=cvt->len_cvt/4; i; --i ) {
+				dst[0] = src[0];
+				dst[1] = src[1];
+				src += 4;
+				dst += 2;
+			}
+			break;
+	}
+
+	cvt->len_cvt /= 2;
+
+	if (cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
+
+/* Very slow rate conversion routine */
+void acFreqSLOW(acAudioCVT *cvt, ALushort format) {
+	double ipos;
+	int i, clen;
+
+	clen = (int) ((double)cvt->len_cvt / cvt->rate_incr);
+	if(cvt->rate_incr > 1.0) {
+		switch(format & 0xFF) {
+			case 8: {
+				ALubyte *output;
+
+				output = cvt->buf;
+				ipos = 0.0;
+				for ( i=clen; i; --i ) {
+					*output = *((ALubyte *) cvt->buf + (int)ipos);
+					ipos += cvt->rate_incr;
+					output += 1;
+				}
+			}
+			break;
+
+			case 16: {
+				ALushort *output;
+
+				clen &= ~1;
+				output = (ALushort *) cvt->buf;
+				ipos = 0.0;
+				for ( i=clen/2; i; --i ) {
+					*output=((ALushort *)cvt->buf)[(int)ipos];
+					ipos += cvt->rate_incr;
+					output += 1;
+				}
+			}
+			break;
+
+			default: {
+				/* unexpected */
+			}
+			break;
+		}
+	} else {
+		switch (format & 0xFF) {
+			case 8: {
+				ALubyte *output;
+
+				output = (ALubyte *) cvt->buf + clen;
+				ipos = (double)cvt->len_cvt;
+				for ( i=clen; i; --i ) {
+					ipos -= cvt->rate_incr;
+					output -= 1;
+					*output = *((ALubyte *) cvt->buf + (int)ipos);
+				}
+			}
+			break;
+
+			case 16: {
+				ALushort *output;
+
+				clen &= ~1;
+				output = (ALushort *) cvt->buf;
+				output += clen / sizeof *output;
+
+				ipos = (double)cvt->len_cvt/2;
+				for ( i=clen/2; i; --i ) {
+					ipos -= cvt->rate_incr;
+					output -= 1;
+					*output=((ALushort *)cvt->buf)[(int)ipos];
+				}
+			}
+			break;
+
+			default: {
+				/* unexpected */
+			}
+			break;
+		}
+	}
+	cvt->len_cvt = clen;
+
+	if (cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
Index: /openal-0.0.8/src/audioconvert/ac_helper.c
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_helper.c	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_helper.c	(revision 17)
@@ -0,0 +1,247 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * ac_helper.c
+ *
+ * audioconvert helper funcs.
+ *
+ * This file and the funcs within taken almost whole from:
+ *     SDL - Simple DirectMedia Layer
+ *     Copyright (C) 1997, 1998, 1999  Sam Lantinga
+ */
+
+/* Functions for audio drivers to perform runtime conversion of audio format */
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "audioconvert/audioconvert.h"
+
+void acConvertSign(acAudioCVT *cvt, ALushort format);
+void acConvertEndian(acAudioCVT *cvt, ALushort format);
+
+/* Toggle signed/unsigned */
+void acConvertSign(acAudioCVT *cvt, ALushort format) {
+	int i;
+	ALubyte *data;
+
+	data = cvt->buf;
+	if((format & 0xFF) == 16) {
+		if((format & 0x1000) != 0x1000) { /* Little endian */
+			++data;
+		}
+
+		for(i = cvt->len_cvt/2; i; i-- ) {
+			*data ^= 0x80;
+			data += 2;
+		}
+	} else {
+		for(i = cvt->len_cvt; i; i-- ) {
+			*data++ ^= 0x80;
+		}
+	}
+
+	format = (format ^ 0x8000);
+
+	if (cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
+
+/* Toggle endianness */
+void acConvertEndian(acAudioCVT *cvt, ALushort format) {
+	int i;
+	ALubyte *data, tmp;
+
+	data = cvt->buf;
+	for(i = cvt->len_cvt/2; i; i--) {
+		tmp     = data[0];
+		data[0] = data[1];
+		data[1] = tmp;
+		data   += 2;
+	}
+
+	format = (format ^ 0x1000);
+
+	if (cvt->filters[++cvt->filter_index] ) {
+		cvt->filters[cvt->filter_index](cvt, format);
+	}
+}
+
+
+/* Creates a set of audio filters to convert from one format to another.
+   Returns -1 if the format conversion is not supported, or 1 if the
+   audio filter is set up.
+*/
+
+int acBuildAudioCVT(acAudioCVT *cvt,
+	ALushort src_format, ALubyte src_channels, ALuint src_rate,
+	ALushort dst_format, ALubyte dst_channels, ALuint dst_rate) {
+
+	/* Start off with no conversion necessary */
+	cvt->needed       = 0;
+	cvt->filter_index = 0;
+	cvt->filters[0]   = NULL;
+	cvt->len_mult     = 1;
+	cvt->len_ratio    = 1.0;
+
+	/* First filter:  Endian conversion from src to dst */
+	if((( src_format & 0x1000) != (dst_format & 0x1000)) &&
+	    (( src_format & 0xff) != 8))
+	{
+		cvt->filters[cvt->filter_index++] = acConvertEndian;
+	}
+
+	/* Third filter: Sign conversion -- signed/unsigned */
+	if((src_format & 0x8000) != (dst_format & 0x8000)) {
+		cvt->filters[cvt->filter_index++] = acConvertSign;
+	}
+
+	/* Second filter:  Convert 16 bit <--> 8 bit PCM */
+	if((src_format & 0xFF) != (dst_format & 0xFF)) {
+		switch(dst_format & 0x10FF) {
+			case AUDIO_U8:
+				cvt->filters[cvt->filter_index++] =
+							 acConvert8;
+				cvt->len_ratio /= 2;
+				break;
+			case AUDIO_U16LSB:
+				cvt->filters[cvt->filter_index++] =
+							acConvert16LSB;
+				cvt->len_mult *= 2;
+				cvt->len_ratio *= 2;
+				break;
+			case AUDIO_U16MSB:
+				cvt->filters[cvt->filter_index++] =
+							acConvert16MSB;
+				cvt->len_mult *= 2;
+				cvt->len_ratio *= 2;
+				break;
+			default:
+				break;
+		}
+	}
+
+	/* Last filter:  Mono/Stereo conversion */
+	if(src_channels != dst_channels) {
+		while((src_channels * 2) <= dst_channels) {
+			cvt->filters[cvt->filter_index++] =
+						acConvertStereo;
+			src_channels   *= 2;
+			cvt->len_mult  *= 2;
+			cvt->len_ratio *= 2;
+		}
+
+		/*
+		 * This assumes that 4 channel audio is in the format:
+		 * Left {front/back} + Right {front/back}
+		 * so converting to L/R stereo works properly.
+		 */
+		while(((src_channels%2) == 0) &&
+			((src_channels/2) >= dst_channels)) {
+			cvt->filters[cvt->filter_index++] =
+						 acConvertMono;
+			src_channels   /= 2;
+			cvt->len_ratio /= 2;
+		}
+		if ( src_channels != dst_channels ) {
+			/* Uh oh.. */;
+		}
+	}
+
+	/* Do rate conversion */
+	cvt->rate_incr = 0.0;
+	if((src_rate / 100) != (dst_rate / 100)) {
+		ALuint hi_rate, lo_rate;
+		int len_mult;
+		double len_ratio;
+		void (*rate_cvt)(acAudioCVT *, ALushort );
+
+		assert(src_rate != 0);
+
+		if ( src_rate > dst_rate ) {
+			hi_rate   = src_rate;
+			lo_rate   = dst_rate;
+			rate_cvt  = acFreqDIV2;
+			len_mult  = 1;
+			len_ratio = 0.5;
+		} else {
+			hi_rate   = dst_rate;
+			lo_rate   = src_rate;
+			rate_cvt  = acFreqMUL2;
+			len_mult  = 2;
+			len_ratio = 2.0;
+		}
+		/* If hi_rate = lo_rate*2^x then conversion is easy */
+		while(((lo_rate * 2)/100) <= (hi_rate/100)) {
+			cvt->filters[cvt->filter_index++] = rate_cvt;
+			lo_rate        *= 2;
+			cvt->len_mult  *= len_mult;
+			cvt->len_ratio *= len_ratio;
+		}
+
+		/* We may need a slow conversion here to finish up */
+		if((lo_rate/100) != (hi_rate/100)) {
+#if 0
+			/* The problem with this is that if the input buffer is
+			   say 1K, and the conversion rate is say 1.1, then the
+			   output buffer is 1.1K, which may not be an acceptable
+			   buffer size for the audio driver (not a power of 2)
+			*/
+			/* For now, punt and hope the rate distortion isn't great.
+			*/
+#else
+			if ( src_rate < dst_rate ) {
+				cvt->rate_incr = (double)lo_rate/hi_rate;
+				cvt->len_mult *= 2;
+				cvt->len_ratio /= cvt->rate_incr;
+			} else {
+				cvt->rate_incr = (double)hi_rate/lo_rate;
+				cvt->len_ratio *= cvt->rate_incr;
+			}
+			cvt->filters[cvt->filter_index++] = acFreqSLOW;
+#endif
+		}
+	}
+
+	/* Set up the filter information */
+	if(cvt->filter_index != 0) {
+		cvt->needed     = 1;
+		cvt->len        = 0;
+		cvt->buf        = NULL;
+		cvt->src_format = src_format;
+		cvt->dst_format = dst_format;
+		cvt->filters[cvt->filter_index] = NULL;
+	}
+
+	return cvt->needed;
+}
+
+int acConvertAudio(acAudioCVT *cvt) {
+	/* Make sure there's data to convert */
+	if(cvt->buf == NULL) {
+#ifdef DEBUG_MAXIMUS
+		fprintf(stderr,
+			"ALD_MAXIMUS\t[%s:%d]\t %s\n",
+			__FILE__, __LINE__,
+			"No buffer allocated for conversion");
+#endif
+		return -1;
+	}
+
+	/* Return okay if no conversion is necessary */
+	cvt->len_cvt = cvt->len;
+	if(cvt->filters[0] == NULL) {
+		return 0;
+	}
+
+	/* Set up the conversion and go! */
+	cvt->filter_index = 0;
+	cvt->filters[0](cvt, cvt->src_format);
+
+	return 0;
+}
Index: /openal-0.0.8/src/audioconvert/ac_misc.c
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_misc.c	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_misc.c	(revision 17)
@@ -0,0 +1,721 @@
+/*
+ * -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * ac_misc.c
+ *
+ * misc. audioconvert funcs.
+ *
+ * ripped straight from the SDL
+ *
+ * FIXME: consolidate ac_adpcm for MS_ADPCM stuff (ie, remove
+ *        _FULL sillyness
+ *        attach SDL and Sam copyright.
+ */
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "audioconvert/audioconvert.h"
+#include "audioconvert/ac_endian.h"
+#include "audioconvert/ac_wave.h"
+
+#define PCM_CODE        0x0001
+#define MS_ADPCM_CODE   0x0002
+#define IMA_ADPCM_CODE  0x0011
+
+#define MS_ADPCM_max ((1<<(16-1))-1)
+#define MS_ADPCM_min -(1<<(16-1))
+
+struct MS_ADPCM_decodestate_FULL {
+	ALubyte hPredictor;
+	ALushort iDelta;
+	ALshort iSamp1;
+	ALshort iSamp2;
+}
+#ifdef __GNUC__
+ __attribute__ ((packed));
+#else
+ __attribute__;
+#endif /* __GNUC__ JIV */
+
+static struct MS_ADPCM_decoder_FULL {
+	alWaveFMT_LOKI wavefmt;
+	ALushort wSamplesPerBlock;
+	ALushort wNumCoef;
+	ALshort aCoeff[7][2];
+	/* * * */
+	struct MS_ADPCM_decodestate_FULL state[2];
+} MS_ADPCM_state_FULL;
+
+typedef struct Chunk {
+	ALuint magic;
+	ALuint length;
+	void *data;
+} Chunk;
+
+
+/* decode of MS stuff in full (as opposed to ac_adpcm) */
+static ALint MS_ADPCM_nibble_FULL(struct MS_ADPCM_decodestate_FULL *state,
+					ALubyte nybble, ALshort *coeff);
+static int MS_ADPCM_decode_FULL(ALubyte **audio_buf, ALuint *audio_len);
+static int InitMS_ADPCM(alWaveFMT_LOKI *format);
+
+static int ac_isWAVEadpcm(void *data, ALuint size, int encoding);
+
+/* read riff chunk */
+static void ReadChunk(const void *srcp, int *offset, Chunk *chunk) {
+	ALuint reader;
+	const ALubyte *src = srcp;
+
+	src += *offset;
+
+	memcpy((void *) &reader, (void *) src, 4);
+	chunk->magic    = swap32le(reader);
+
+	memcpy((void *) &reader, (void *) (src+4), 4);
+	chunk->length   = swap32le(reader);
+	*offset += chunk->length + 8;
+
+	chunk->data     = (void *) (src+8);
+}
+
+void *ac_guess_info(void *data, ALuint *size,
+		ALushort *fmt, ALushort *chan, ALushort *freq){
+	if(ac_is_wave(data)) {
+		return ac_guess_wave_info(data, size, fmt, chan, freq);
+	}
+#ifdef DEBUG_CONVERT
+	fprintf(stderr,
+		"ac_guess_info: can only guess WAVE files right now.\n");
+#endif
+
+	return NULL;
+}
+
+/* 0 if not wave
+ * 1 if is wave
+ *
+ * FIXME:
+ *   potential endian issues;
+ */
+int ac_is_wave(void *data) {
+	ALuint comparator;
+
+	memcpy((void *) &comparator, data, 4);
+	if(swap32le(comparator) != RIFF) {
+#ifdef DEBUG_CONVERT
+		fprintf(stderr, "Not a RIFF file: magic = 0x%x\n",
+			comparator);
+#endif
+		return 0;
+	}
+
+	memcpy((void *) &comparator, (void *) ((char *)data+8), 4);
+	if(swap32le(comparator) != WAVE) {
+#ifdef DEBUG_CONVERT
+		fprintf(stderr, "Not a WAVE file: magic = 0x%x\n",
+			comparator);
+#endif
+		return 0;
+	}
+
+	return 1;
+}
+
+void *acLoadWAV(const void *data, ALuint *size, void **udata,
+		ALushort *fmt, ALushort *chan, ALushort *freq) {
+	acAudioCVT endianConverter;
+
+	if((data == NULL) || (udata == NULL) || (size == NULL) ||
+	   (fmt  == NULL) || (chan  == NULL) || (freq == NULL)) {
+		return NULL;
+	}
+
+	*udata = ac_wave_to_pcm(data, size, fmt, chan, freq);
+	if(*udata == NULL) {
+#ifdef DEBUG_CONVERT
+		/* bad mojo */
+		fprintf(stderr,
+		"[%s:%d] acLoadWAV: Could not load WAV\n", __FILE__, __LINE__);
+#endif
+
+		return NULL;
+	}
+
+	if((*fmt == AUDIO_S8) || (*fmt == AUDIO_U8) || (*fmt == AUDIO_S16)) {
+		return *udata;
+	}
+
+	if(acBuildAudioCVT(&endianConverter,
+		/* from */
+		*fmt,
+		*chan,
+		*freq,
+
+		/* to */
+		AUDIO_S16,
+		*chan,
+		*freq) < 0) {
+		fprintf(stderr,
+			"[%s:%d] Couldn't build audio convertion data structure.",
+			__FILE__, __LINE__);
+
+		free(udata);
+
+		return NULL;
+	}
+
+	endianConverter.buf = *udata;
+	endianConverter.len = *size;
+
+	acConvertAudio(&endianConverter);
+
+	return endianConverter.buf;
+}
+
+/*
+ * convert wave to pcm data, setting size, fmt, chan, and freq.
+ *
+ * usually just a memcpy, but for MS_ADPCM does that too.
+ */
+void *ac_wave_to_pcm(const void *data, ALuint *size,
+		ALushort *fmt, ALushort *chan, ALushort *freq) {
+	ALubyte *retval;
+	alWaveFMT_LOKI *format;
+	Chunk riffchunk = { 0, 0, 0 };
+	int offset = 12;
+	alIMAADPCM_state_LOKI ima_decoder;
+	ALuint tempfreq;
+
+	do {
+		ReadChunk(data, &offset, &riffchunk);
+	} while ((riffchunk.magic == WAVE) ||
+		 (riffchunk.magic == RIFF));
+
+	if(riffchunk.magic != FMT) {
+		fprintf(stderr,
+			"ouch II magic|FMT [0x%x|0x%x]\n",
+				riffchunk.magic, FMT);
+		return NULL;
+	}
+
+	format = (alWaveFMT_LOKI *) riffchunk.data;
+
+	/* channels */
+	*chan = swap16le(format->channels);
+
+	/* freq */
+	tempfreq = swap32le(format->frequency);
+	*freq = (ALushort) tempfreq;
+
+	switch(swap16le(format->encoding)) {
+		case PCM_CODE:
+		  switch(swap16le(format->bitspersample)) {
+			  case 8:
+			    *fmt = AUDIO_U8;
+			    break;
+			  case 16:
+			    *fmt = AUDIO_S16LSB;
+			    break;
+			  default:
+			    fprintf(stderr,
+			    	"Unknown bits %d\n",
+			        swap16le(format->bitspersample));
+			    break;
+		  }
+
+		  do {
+			ReadChunk(data, &offset, &riffchunk);
+		  } while(riffchunk.magic != DATA);
+
+		  retval = malloc(riffchunk.length);
+		  if(retval == NULL) {
+			  return NULL;
+		  }
+
+		  /* FIXME: Need to convert to native format? */
+#if defined(WORDS_BIGENDIAN) && DEBUG_CONVERT
+		  fprintf(stderr,
+		  	"[%s:%d] do we need to convert to host native format here?\n",
+			__FILE__, __LINE__);
+#endif
+		  memcpy(retval, riffchunk.data, riffchunk.length);
+
+		  *size = riffchunk.length;
+		  return retval;
+		  break;
+		case MS_ADPCM_CODE:
+		  /* not possible to do an inplace conversion */
+		  *fmt = AUDIO_S16LSB;
+
+		  if(InitMS_ADPCM(format) < 0) {
+#ifdef DEBUG
+			  fprintf(stderr, "Couldn't init MSADPCM\n");
+#endif
+			  return NULL;
+		  }
+
+		  do {
+			ReadChunk(data, &offset, &riffchunk);
+			retval = riffchunk.data;
+		  } while (riffchunk.magic != DATA);
+
+		  if(MS_ADPCM_decode_FULL(&retval, &riffchunk.length) < 0) {
+#ifdef DEBUG
+			  fprintf(stderr, "Couldn't decode MS_ADPCM\n");
+#endif
+			  return NULL;
+		  }
+
+		  *size = riffchunk.length;
+		  return retval;
+		  break;
+		case IMA_ADPCM_CODE:
+		  /* not possible to do an inplace conversion */
+		  *fmt = AUDIO_S16LSB;
+
+		  if(InitIMA_ADPCM(&ima_decoder, format) < 0) {
+#ifdef DEBUG_CONVERT
+			  fprintf(stderr, "Couldn't init IMA ADPCM\n");
+#endif
+			  return NULL;
+		  }
+
+		  do {
+			ReadChunk(data, &offset, &riffchunk);
+			retval = riffchunk.data;
+		  } while (riffchunk.magic != DATA);
+
+		  if(IMA_ADPCM_decode_FULL(&ima_decoder, &retval, &riffchunk.length) < 0) {
+#ifdef DEBUG_CONVERT
+			  fprintf(stderr, "Couldn't decode IMA_ADPCM\n");
+#endif
+			  return NULL;
+		  }
+
+		  *size = riffchunk.length;
+		  return retval;
+		  break;
+		default:
+#ifdef DEBUG_CONVERT
+		  fprintf(stderr,
+		  	"[%s:%d] unknown WAVE format 0x%x\n",
+			__FILE__, __LINE__, *fmt);
+#endif
+		  break;
+	}
+
+	return NULL;
+}
+
+void *ac_guess_wave_info(void *data, ALuint *size,
+		ALushort *fmt, ALushort *chan, ALushort *freq) {
+	alWaveFMT_LOKI *format;
+	Chunk riffchunk = { 0, 0, 0 };
+	int offset = 12;
+
+	do {
+		ReadChunk(data, &offset, &riffchunk);
+	} while ((riffchunk.magic == WAVE) ||
+		 (riffchunk.magic == RIFF));
+
+
+	if(riffchunk.magic != FMT) {
+		fprintf(stderr, "ouch II magic|FMT"
+				"[0x%x|0x%x]\n",
+				riffchunk.magic, FMT);
+		return NULL;
+	}
+
+	format = (alWaveFMT_LOKI *) riffchunk.data;
+
+	/* channels */
+	*chan = swap16le(format->channels);
+
+	/* freq */
+	*freq = swap16le(format->frequency);
+
+	switch(swap16le(format->encoding)) {
+		case PCM_CODE:
+		  switch(swap16le(format->bitspersample)) {
+			  case 8:
+			    *fmt = AUDIO_U8;
+			    break;
+			  case 16:
+			    *fmt = AUDIO_S16LSB;
+			    break;
+			  default:
+			    fprintf(stderr, "Unknown bits %d\n",
+			    	    swap16le(format->bitspersample));
+			    break;
+		  }
+
+		  do {
+			ReadChunk(data, &offset, &riffchunk);
+		  } while ((riffchunk.magic == FACT) ||
+			   (riffchunk.magic == FMT)  ||
+			   (riffchunk.magic == LIST) ||
+			   (riffchunk.magic == WAVE) ||
+			   (riffchunk.magic == RIFF));
+
+		  *size = riffchunk.length;
+
+		  return riffchunk.data;
+		  break;
+		case MS_ADPCM_CODE:
+		  break;
+		default:
+#ifdef DEBUG
+		  fprintf(stderr,
+		  	"[%s:%d] unknown WAVE format 0x%x\n",
+			__FILE__, __LINE__, *fmt);
+#endif
+		  break;
+	}
+
+	return NULL;
+}
+
+static int InitMS_ADPCM(alWaveFMT_LOKI *format) {
+	ALubyte *rogue_feel;
+	ALushort extra_info;
+	int i;
+
+	/* Set the rogue pointer to the MS_ADPCM specific data */
+	MS_ADPCM_state_FULL.wavefmt.encoding = swap16le(format->encoding);
+	MS_ADPCM_state_FULL.wavefmt.channels = swap16le(format->channels);
+	MS_ADPCM_state_FULL.wavefmt.frequency = swap32le(format->frequency);
+	MS_ADPCM_state_FULL.wavefmt.byterate = swap32le(format->byterate);
+	MS_ADPCM_state_FULL.wavefmt.blockalign = swap16le(format->blockalign);
+	MS_ADPCM_state_FULL.wavefmt.bitspersample =
+					 swap16le(format->bitspersample);
+	rogue_feel = (ALubyte *)format+sizeof(*format);
+	if(sizeof(*format) == 16) {
+		extra_info = ((rogue_feel[1]<<8)|rogue_feel[0]);
+		rogue_feel += sizeof(ALushort);
+	}
+
+	MS_ADPCM_state_FULL.wSamplesPerBlock = ((rogue_feel[1]<<8)|rogue_feel[0]);
+	rogue_feel += sizeof(ALushort);
+	MS_ADPCM_state_FULL.wNumCoef = ((rogue_feel[1]<<8)|rogue_feel[0]);
+	rogue_feel += sizeof(ALushort);
+	if ( MS_ADPCM_state_FULL.wNumCoef != 7 ) {
+		fprintf(stderr, "Unknown set of MS_ADPCM coefficients\n");
+		return -1;
+	}
+
+	for(i = 0; i < MS_ADPCM_state_FULL.wNumCoef; i++) {
+		MS_ADPCM_state_FULL.aCoeff[i][0] =((rogue_feel[1]<<8)|rogue_feel[0]);
+		rogue_feel += sizeof(ALushort);
+		MS_ADPCM_state_FULL.aCoeff[i][1] =((rogue_feel[1]<<8)|rogue_feel[0]);
+		rogue_feel += sizeof(ALushort);
+	}
+
+	return 0;
+}
+
+static int MS_ADPCM_decode_FULL(ALubyte **audio_buf, ALuint *audio_len) {
+	struct MS_ADPCM_decodestate_FULL *state[2];
+	ALubyte *freeable, *encoded, *decoded;
+	ALint encoded_len, samplesleft;
+	ALbyte nybble, stereo;
+	ALshort *coeff[2];
+	ALint new_sample;
+
+	/* Allocate the proper sized output buffer */
+	encoded_len = *audio_len;
+	encoded = *audio_buf;
+	freeable = *audio_buf;
+	*audio_len = (encoded_len/MS_ADPCM_state_FULL.wavefmt.blockalign) *
+				MS_ADPCM_state_FULL.wSamplesPerBlock*
+				MS_ADPCM_state_FULL.wavefmt.channels*sizeof(ALshort);
+	*audio_buf = malloc(*audio_len);
+	if(*audio_buf == NULL) {
+		perror("malloc");
+		return -1;
+	}
+	decoded = *audio_buf;
+
+	/* Get ready... Go! */
+	stereo = (MS_ADPCM_state_FULL.wavefmt.channels == 2);
+	state[0] = &MS_ADPCM_state_FULL.state[0];
+	state[1] = &MS_ADPCM_state_FULL.state[(int) stereo];
+	while ( encoded_len >= MS_ADPCM_state_FULL.wavefmt.blockalign ) {
+		/* Grab the initial information for this block */
+		state[0]->hPredictor = *encoded++;
+		if ( stereo ) {
+			state[1]->hPredictor = *encoded++;
+		}
+		state[0]->iDelta = ((encoded[1]<<8)|encoded[0]);
+		encoded += sizeof(ALshort);
+		if ( stereo ) {
+			state[1]->iDelta = ((encoded[1]<<8)|encoded[0]);
+			encoded += sizeof(ALshort);
+		}
+		state[0]->iSamp1 = ((encoded[1]<<8)|encoded[0]);
+		encoded += sizeof(ALshort);
+		if ( stereo ) {
+			state[1]->iSamp1 = ((encoded[1]<<8)|encoded[0]);
+			encoded += sizeof(ALshort);
+		}
+		state[0]->iSamp2 = ((encoded[1]<<8)|encoded[0]);
+		encoded += sizeof(ALshort);
+		if ( stereo ) {
+			state[1]->iSamp2 = ((encoded[1]<<8)|encoded[0]);
+			encoded += sizeof(ALshort);
+		}
+		coeff[0] = MS_ADPCM_state_FULL.aCoeff[state[0]->hPredictor];
+		coeff[1] = MS_ADPCM_state_FULL.aCoeff[state[1]->hPredictor];
+
+		/* Store the two initial samples we start with */
+		decoded[0] = state[0]->iSamp2&0xFF;
+		decoded[1] = state[0]->iSamp2>>8;
+		decoded += 2;
+		if ( stereo ) {
+			decoded[0] = state[1]->iSamp2&0xFF;
+			decoded[1] = state[1]->iSamp2>>8;
+			decoded += 2;
+		}
+		decoded[0] = state[0]->iSamp1&0xFF;
+		decoded[1] = state[0]->iSamp1>>8;
+		decoded += 2;
+		if ( stereo ) {
+			decoded[0] = state[1]->iSamp1&0xFF;
+			decoded[1] = state[1]->iSamp1>>8;
+			decoded += 2;
+		}
+
+		/* Decode and store the other samples in this block */
+		samplesleft = (MS_ADPCM_state_FULL.wSamplesPerBlock-2)*
+					MS_ADPCM_state_FULL.wavefmt.channels;
+		while ( samplesleft > 0 ) {
+			nybble = (*encoded)>>4;
+			new_sample = MS_ADPCM_nibble_FULL(state[0],nybble,coeff[0]);
+			decoded[0] = new_sample&0xFF;
+			new_sample >>= 8;
+			decoded[1] = new_sample&0xFF;
+			decoded += 2;
+
+			nybble = (*encoded)&0x0F;
+			new_sample = MS_ADPCM_nibble_FULL(state[1],nybble,coeff[1]);
+			decoded[0] = new_sample&0xFF;
+			new_sample >>= 8;
+			decoded[1] = new_sample&0xFF;
+			decoded += 2;
+
+			++encoded;
+			samplesleft -= 2;
+		}
+		encoded_len -= MS_ADPCM_state_FULL.wavefmt.blockalign;
+	}
+
+	/* free(freeable); */
+	return 0;
+}
+
+static ALint MS_ADPCM_nibble_FULL(struct MS_ADPCM_decodestate_FULL *state,
+					ALubyte nybble, ALshort *coeff) {
+	const ALint adaptive[] = {
+		230, 230, 230, 230, 307, 409, 512, 614,
+		768, 614, 512, 409, 307, 230, 230, 230
+	};
+	ALint new_sample, delta;
+
+	new_sample = ((state->iSamp1 * coeff[0]) +
+		      (state->iSamp2 * coeff[1]))/256;
+
+	if(nybble & 0x08) {
+		new_sample += state->iDelta * (nybble-0x10);
+	} else {
+		new_sample += state->iDelta * nybble;
+	}
+
+	if(new_sample < MS_ADPCM_min) {
+		new_sample = MS_ADPCM_min;
+	} else if(new_sample > MS_ADPCM_max) {
+		new_sample = MS_ADPCM_max;
+	}
+
+	delta = ((ALint) state->iDelta * adaptive[nybble]);
+	if(delta < 4096) {
+		delta = 16;
+	} else {
+		delta /= 256;
+	}
+
+	state->iDelta = delta;
+	state->iSamp2 = state->iSamp1;
+	state->iSamp1 = new_sample;
+
+	return new_sample;
+}
+
+/* 0 if adpcm, -1 otherwise */
+static int ac_isWAVEadpcm(void *data, UNUSED(ALuint size), int encoding) {
+	alWaveFMT_LOKI *format;
+	Chunk riffchunk = { 0, 0, 0 };
+	int offset = 12;
+
+	do {
+		ReadChunk(data, &offset, &riffchunk);
+	} while ((riffchunk.magic == WAVE) ||
+		 (riffchunk.magic == RIFF));
+
+	if(riffchunk.magic != FMT) {
+		return -1;
+	}
+
+	format = (alWaveFMT_LOKI *) riffchunk.data;
+
+	if(swap16le(format->encoding) == encoding) {
+		  return 0;
+	}
+
+#ifdef DEBUG_CONVERT
+	fprintf(stderr, "encoding | format->enc %d|%d\n",
+		format->encoding, encoding);
+#endif
+
+	return -1;
+}
+
+void *ac_getWAVEadpcm_info(void *data, ALuint *size, void *spec) {
+	void *retval;
+	alWaveFMT_LOKI        *format;
+	alMSADPCM_state_LOKI  *mss;
+	alIMAADPCM_state_LOKI *ias;
+	Chunk riffchunk = { 0, 0, 0 };
+	int offset = 12;
+	ALubyte *ext_format_reader;
+	ALushort reader16;
+	int i;
+
+	do {
+		ReadChunk(data, &offset, &riffchunk);
+	} while ((riffchunk.magic == WAVE) ||
+		 (riffchunk.magic == RIFF));
+
+	if(riffchunk.magic != FMT) {
+		fprintf(stderr, "returning NULL\n");
+		return NULL;
+	}
+
+	format = (alWaveFMT_LOKI *) riffchunk.data;
+
+	do {
+		ReadChunk(data, &offset, &riffchunk);
+		retval = riffchunk.data;
+	} while (riffchunk.magic != DATA);
+
+	*size = riffchunk.length;
+
+	switch(swap16le(format->encoding)) {
+		case MS_ADPCM_CODE:
+		  ext_format_reader = (ALubyte *) format + 18;
+		  mss = (alMSADPCM_state_LOKI *) spec;
+
+		  mss->wavefmt.encoding      = swap16le(format->encoding);
+		  mss->wavefmt.channels      = swap16le(format->channels);
+		  mss->wavefmt.frequency     = swap32le(format->frequency);
+		  mss->wavefmt.byterate      = swap32le(format->byterate);
+		  mss->wavefmt.blockalign    = swap16le(format->blockalign);
+		  mss->wavefmt.bitspersample = swap16le(format->bitspersample);
+
+		  ext_format_reader = cp16le(ext_format_reader, &reader16);
+		  mss->wSamplesPerBlock = reader16;
+
+		  ext_format_reader = cp16le(ext_format_reader, &reader16);
+		  mss->wNumCoef = reader16;
+
+		  if(mss->wNumCoef != 7) {
+			  fprintf(stderr, "wNumCoeff != 7\n");
+		  }
+
+		  for(i = 0; i < mss->wNumCoef; i++) {
+			ext_format_reader = cp16le(ext_format_reader,&reader16);
+			mss->aCoeff[i][0] = reader16;
+
+			ext_format_reader = cp16le(ext_format_reader,&reader16);
+			mss->aCoeff[i][1] = reader16;
+		  }
+		  return retval;
+		case IMA_ADPCM_CODE:
+		  ias = (alIMAADPCM_state_LOKI *) spec;
+		  InitIMA_ADPCM(ias, format);
+
+		  return retval;
+		case PCM_CODE:
+		default:
+		  fprintf(stderr, "returning NULL\n");
+		  return NULL;
+	}
+}
+
+int ac_isWAVE_IMA_adpcm(void *data, ALuint size) {
+	return ac_isWAVEadpcm(data, size, IMA_ADPCM_CODE);
+}
+
+int ac_isWAVE_MS_adpcm(void *data, ALuint size) {
+	return ac_isWAVEadpcm(data, size, MS_ADPCM_CODE);
+}
+
+int ac_isWAVE_ANY_adpcm(void *data, ALuint size) {
+	int retval;
+
+	retval = ac_isWAVEadpcm(data, size, MS_ADPCM_CODE);
+	if(retval) {
+		retval = ac_isWAVEadpcm(data, size, IMA_ADPCM_CODE);
+	}
+
+	return retval;
+}
+
+
+/* read riff chunk */
+int RiffOffset(ALubyte *rawdata, ALint magic) {
+	unsigned char *rawp;
+	struct {
+		ALint magic;
+		ALint len;
+	} chunk;
+	int retval;
+
+	rawp = rawdata + 12;
+
+	do {
+		memcpy(&chunk.magic, rawp, sizeof chunk.magic);
+		rawp += sizeof chunk.magic;
+
+		memcpy(&chunk.len,   rawp, sizeof chunk.len);
+		rawp += sizeof chunk.magic;
+
+		chunk.magic = swap32le(chunk.magic);
+		chunk.len   = swap32le(chunk.len);
+
+#ifdef DEBUG_CONVERT
+		fprintf(stderr,
+			"chunk.magic = %c%c%c%c\n",
+			((char *) &chunk.magic)[0],
+			((char *) &chunk.magic)[1],
+			((char *) &chunk.magic)[2],
+			((char *) &chunk.magic)[3]);
+
+		fprintf(stderr,
+			"chunk.len   = %d\n", chunk.len);
+#endif
+
+		if(chunk.magic == magic) {
+			retval = rawp - rawdata;
+			break;
+		}
+
+		rawp += chunk.len;
+	} while(1);
+
+	return retval;
+}
Index: /openal-0.0.8/src/audioconvert/ac_wave.h
===================================================================
--- /openal-0.0.8/src/audioconvert/ac_wave.h	(revision 17)
+++ /openal-0.0.8/src/audioconvert/ac_wave.h	(revision 17)
@@ -0,0 +1,24 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * ac_wave.h
+ *
+ * Defines for RIFF WAVE files.
+ */
+#ifndef AC_WAVE_H_
+#define AC_WAVE_H_
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+#define DATA		0x61746164		/* "data" */
+#define FACT		0x74636166		/* "fact" */
+#define LIST		0x5453494c		/* "LIST" */
+#define RIFF            0x46464952
+#define WAVE            0x45564157
+#define FMT             0x20746D66
+
+int RiffOffset(ALubyte *rawdata, ALint magic);
+
+#endif /* AC_WAVE_H_ */
Index: /openal-0.0.8/src/audioconvert/audioconvert.h
===================================================================
--- /openal-0.0.8/src/audioconvert/audioconvert.h	(revision 17)
+++ /openal-0.0.8/src/audioconvert/audioconvert.h	(revision 17)
@@ -0,0 +1,90 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * This is the header that apps should include when linking against
+ * audioconvert or such.
+ */
+#ifndef AC_H_
+#define AC_H_
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+#include "audioconvert/ac_adpcm.h"
+
+/* new data types */
+typedef struct _acAudioCVT {
+	int needed;			/* Set to 1 if conversion possible */
+	ALushort src_format;		/* Source audio format */
+	ALushort dst_format;		/* Target audio format */
+	double rate_incr;		/* Rate conversion increment */
+	void   *buf;			/* Buffer to hold entire audio data */
+	int    len;			/* Length of original audio buffer */
+	int    len_cvt;			/* Length of converted audio buffer */
+	int    len_mult;		/* buffer must be len*len_mult big */
+	double len_ratio; 	/* Given len, final size is len*len_ratio */
+	void (*filters[10])(struct _acAudioCVT *cvt, ALushort format);
+	int filter_index;		/* Current audio conversion function */
+} acAudioCVT;
+
+/* Audio format flags (defaults to LSB byte order) */
+#define AUDIO_U8	0x0008	/* Unsigned 8-bit samples */
+#define AUDIO_S8	0x8008	/* Signed 8-bit samples */
+#define AUDIO_U16LSB	0x0010	/* Unsigned 16-bit samples */
+#define AUDIO_S16LSB	0x8010	/* Signed 16-bit samples */
+#define AUDIO_U16MSB	0x1010	/* As above, but big-endian byte order */
+#define AUDIO_S16MSB	0x9010	/* As above, but big-endian byte order */
+
+/* Native audio byte ordering */
+#ifndef WORDS_BIGENDIAN
+#define AUDIO_U16	AUDIO_U16LSB
+#define AUDIO_S16	AUDIO_S16LSB
+#else
+#define AUDIO_U16	AUDIO_U16MSB
+#define AUDIO_S16	AUDIO_S16MSB
+#endif
+
+/* macros */
+#define acFormatBits(fmt)           (fmt & 0xff)
+
+/* bit changes */
+void acConvert16MSB(acAudioCVT *cvt, ALushort format);
+void acConvert16LSB(acAudioCVT *cvt, ALushort format);
+void acConvert8(acAudioCVT *cvt, ALushort format);
+
+/* frequency changes */
+void acFreqMUL2(acAudioCVT *cvt, ALushort format);
+void acFreqDIV2(acAudioCVT *cvt, ALushort format);
+void acFreqSLOW(acAudioCVT *cvt, ALushort format);
+
+/* channel changes */
+void acConvertStereo(acAudioCVT *cvt, ALushort format);
+void acConvertMono(acAudioCVT *cvt, ALushort format);
+
+/* misc */
+int   ac_is_wave(void *data);
+void *ac_guess_info(void *data, ALuint *size,
+		ALushort *fmt, ALushort *channels, ALushort *freq);
+void *ac_guess_wave_info(void *data, ALuint *size,
+		ALushort *fmt, ALushort *channels, ALushort *freq);
+void *ac_wave_to_pcm(const void *data, ALuint *size,
+		ALushort *fmt, ALushort *channels, ALushort *freq);
+
+int ac_isWAVE_ANY_adpcm(void *datap, ALuint size);
+int ac_isWAVE_IMA_adpcm(void *data, ALuint size);
+int ac_isWAVE_MS_adpcm(void *data, ALuint size);
+void *ac_getWAVEadpcm_info(void *data, ALuint *size, void *spec);
+
+/* sdl helper stuff */
+int acBuildAudioCVT(acAudioCVT *cvt,
+	ALushort src_format, ALubyte src_channels, ALuint src_rate,
+	ALushort dst_format, ALubyte dst_channels, ALuint dst_rate);
+
+int acConvertAudio(acAudioCVT *);
+void *acLoadWAV(const void *data, ALuint *size, void **udata,
+		ALushort *format,
+		ALushort *channels,
+		ALushort *freq);
+
+#endif /* AC_H_ */
Index: /openal-0.0.8/src/backends/alc_backend.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend.c	(revision 17)
@@ -0,0 +1,482 @@
+/*
+ * This file defines the high-level interface to the sound device. It
+ * actually dispatches requests based on the architecture that we're
+ * targetting. See alc_backend.h for more of a clue.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "al_config.h"
+#include "al_debug.h"
+#include "al_main.h"
+#include "backends/alc_backend.h"
+
+typedef enum
+{
+  AL_BACKEND_NONE_,
+  AL_BACKEND_NATIVE_,           /* native audio for platform */
+  AL_BACKEND_ALSA_,             /* ALSA backend */
+  AL_BACKEND_ARTS_,             /* aRts backend */
+  AL_BACKEND_DMEDIA_,           /* Irix/DMedia back-end */
+  AL_BACKEND_ESD_,              /* ESD backend */
+  AL_BACKEND_SDL_,              /* SDL backend */
+  AL_BACKEND_NULL_,             /* null backend */
+  AL_BACKEND_WAVEOUT_           /* WAVE backend */
+} ALC_BackendType;
+
+struct ALC_BackendStruct
+{
+  ALC_BackendType type;
+  ALC_OpenMode mode;
+  ALC_BackendPrivateData *privateData;
+};
+
+ALC_Backend *
+alcBackendOpen_ (ALC_OpenMode mode)
+{
+  Rcvar device_params;
+  Rcvar device_list;
+  Rcvar device;
+  ALC_BackendType type = AL_BACKEND_NONE_;
+  ALC_BackendPrivateData *privateData = NULL;
+  ALC_Backend *backend;
+  char adevname[64];            /* FIXME: magic number */
+
+  device_list = rc_lookup ("devices");
+  while (device_list != NULL)
+    {
+      device = rc_car (device_list);
+      device_list = rc_cdr (device_list);
+
+      switch (rc_type (device))
+        {
+        case ALRC_STRING:
+          rc_tostr0 (device, adevname, 64);
+          break;
+        case ALRC_SYMBOL:
+          rc_symtostr0 (device, adevname, 64);
+          break;
+        case ALRC_CONSCELL:
+          device_params = rc_cdr (device);
+          if (device_params == NULL)
+            {
+              continue;
+            }
+          rc_define ("device-params", device_params);
+          rc_symtostr0 (rc_car (device), adevname, 64);
+          break;
+        default:
+          _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                    "alcBackendOpen_: bad type %s for device",
+                    rc_typestr (rc_type (device)));
+          continue;
+        }
+
+      if (strcmp (adevname, "dsp") == 0)
+        {
+          _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                    "alcBackendOpen_: 'dsp' is a deprecated device name. Use 'native' instead.");
+          privateData = alcBackendOpenNative_ (mode);
+          if (privateData != NULL)
+            {
+              type = AL_BACKEND_NATIVE_;
+              break;
+            }
+        }
+      if (strcmp (adevname, "native") == 0)
+        {
+          privateData = alcBackendOpenNative_ (mode);
+          if (privateData != NULL)
+            {
+              type = AL_BACKEND_NATIVE_;
+              break;
+            }
+        }
+
+      if (strcmp (adevname, "alsa") == 0)
+        {
+          privateData = alcBackendOpenALSA_ (mode);
+          if (privateData != NULL)
+            {
+              type = AL_BACKEND_ALSA_;
+              break;
+            }
+        }
+
+      if (strcmp (adevname, "arts") == 0)
+        {
+          privateData = alcBackendOpenARts_ (mode);
+          if (privateData != NULL)
+            {
+              type = AL_BACKEND_ARTS_;
+              break;
+            }
+        }
+
+      if (strcmp (adevname, "dmedia") == 0)
+        {
+          privateData = alcBackendOpenDMedia_ (mode);
+          if (privateData != NULL)
+            {
+              type = AL_BACKEND_DMEDIA_;
+              break;
+            }
+        }
+
+      if (strcmp (adevname, "esd") == 0)
+        {
+          privateData = alcBackendOpenESD_ (mode);
+          if (privateData != NULL)
+            {
+              type = AL_BACKEND_ESD_;
+              break;
+            }
+        }
+
+      if (strcmp (adevname, "sdl") == 0)
+        {
+          privateData = alcBackendOpenSDL_ (mode);
+          if (privateData != NULL)
+            {
+              type = AL_BACKEND_SDL_;
+              break;
+            }
+        }
+
+      if (strcmp (adevname, "null") == 0)
+        {
+          privateData = alcBackendOpenNull_ (mode);
+          if (privateData != NULL)
+            {
+              type = AL_BACKEND_NULL_;
+              break;
+            }
+        }
+
+      if (strcmp (adevname, "waveout") == 0)
+        {
+          privateData = alcBackendOpenWAVE_ (mode);
+          if (privateData != NULL)
+            {
+              type = AL_BACKEND_WAVEOUT_;
+              break;
+            }
+        }
+    }
+
+  /* fallback: native */
+  if (type == AL_BACKEND_NONE_)
+    {
+      privateData = alcBackendOpenNative_ (mode);
+      if (privateData != NULL)
+        {
+          type = AL_BACKEND_NATIVE_;
+        }
+    }
+
+  if (type == AL_BACKEND_NONE_)
+    {
+      return NULL;
+    }
+
+  backend =
+    (struct ALC_BackendStruct *) malloc (sizeof (struct ALC_BackendStruct));
+  if (backend == NULL)
+    {
+      return NULL;
+    }
+
+  backend->type = type;
+  backend->mode = mode;
+  backend->privateData = privateData;
+  return backend;
+
+}
+
+ALboolean
+alcBackendClose_ (ALC_Backend *backend)
+{
+  switch (backend->type)
+    {
+    case AL_BACKEND_NATIVE_:
+      release_native (backend->privateData);
+      break;
+    case AL_BACKEND_ALSA_:
+      release_alsa (backend->privateData);
+      break;
+    case AL_BACKEND_ARTS_:
+      release_arts (backend->privateData);
+      break;
+    case AL_BACKEND_DMEDIA_:
+      release_dmedia (backend->privateData);
+      break;
+    case AL_BACKEND_ESD_:
+      release_esd (backend->privateData);
+      break;
+    case AL_BACKEND_SDL_:
+      release_sdl (backend->privateData);
+      break;
+    case AL_BACKEND_NULL_:
+      release_null (backend->privateData);
+      break;
+    case AL_BACKEND_WAVEOUT_:
+      release_waveout (backend->privateData);
+      break;
+    default:
+      _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                "alcBackendClose_: unknown backend %d\n", backend->type);
+      return AL_FALSE;
+    }
+  free (backend);
+  return AL_TRUE;
+}
+
+void
+alcBackendPause_ (ALC_Backend *backend)
+{
+  switch (backend->type)
+    {
+    case AL_BACKEND_NATIVE_:
+      pause_nativedevice (backend->privateData);
+      break;
+    case AL_BACKEND_ALSA_:
+      pause_alsa (backend->privateData);
+      break;
+    case AL_BACKEND_ARTS_:
+      pause_arts (backend->privateData);
+      break;
+    case AL_BACKEND_DMEDIA_:
+      pause_dmedia (backend->privateData);
+      break;
+    case AL_BACKEND_ESD_:
+      pause_esd (backend->privateData);
+      break;
+    case AL_BACKEND_SDL_:
+      pause_sdl (backend->privateData);
+      break;
+    case AL_BACKEND_NULL_:
+      pause_null (backend->privateData);
+      break;
+    case AL_BACKEND_WAVEOUT_:
+      pause_waveout (backend->privateData);
+      break;
+    default:
+      _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                "alcBackendPause_: unknown backend %d\n", backend->type);
+      break;
+    }
+}
+
+void
+alcBackendResume_ (ALC_Backend *backend)
+{
+  switch (backend->type)
+    {
+    case AL_BACKEND_NATIVE_:
+      resume_nativedevice (backend->privateData);
+      break;
+    case AL_BACKEND_ALSA_:
+      resume_alsa (backend->privateData);
+      break;
+    case AL_BACKEND_ARTS_:
+      resume_arts (backend->privateData);
+      break;
+    case AL_BACKEND_DMEDIA_:
+      resume_dmedia (backend->privateData);
+      break;
+    case AL_BACKEND_ESD_:
+      resume_esd (backend->privateData);
+      break;
+    case AL_BACKEND_SDL_:
+      resume_sdl (backend->privateData);
+      break;
+    case AL_BACKEND_NULL_:
+      resume_null (backend->privateData);
+      break;
+    case AL_BACKEND_WAVEOUT_:
+      resume_waveout (backend->privateData);
+      break;
+    default:
+      _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                "alcBackendResume_: unknown backend %d\n", backend->type);
+      break;
+    }
+}
+
+ALboolean
+alcBackendSetAttributes_ (ALC_Backend *backend, ALuint *bufsiz,
+                          ALenum *fmt, ALuint *speed)
+{
+  switch (backend->type)
+    {
+    case AL_BACKEND_NATIVE_:
+      return alcBackendSetAttributesNative_ (backend->mode,
+                                             backend->privateData, bufsiz,
+                                             fmt, speed);
+    case AL_BACKEND_ALSA_:
+      return alcBackendSetAttributesALSA_ (backend->mode,
+                                           backend->privateData, bufsiz, fmt,
+                                           speed);
+    case AL_BACKEND_ARTS_:
+      return alcBackendSetAttributesARts_ (backend->mode,
+                                           backend->privateData, bufsiz, fmt,
+                                           speed);
+    case AL_BACKEND_DMEDIA_:
+      return alcBackendSetAttributesDMedia_ (backend->mode,
+                                             backend->privateData, bufsiz,
+                                             fmt, speed);
+    case AL_BACKEND_ESD_:
+      return alcBackendSetAttributesESD_ (backend->mode, backend->privateData,
+                                          bufsiz, fmt, speed);
+    case AL_BACKEND_SDL_:
+      return alcBackendSetAttributesSDL_ (backend->mode, backend->privateData,
+                                          bufsiz, fmt, speed);
+    case AL_BACKEND_NULL_:
+      return alcBackendSetAttributesNull_ (backend->mode,
+                                           backend->privateData, bufsiz, fmt,
+                                           speed);
+    case AL_BACKEND_WAVEOUT_:
+      return alcBackendSetAttributesWAVE_ (backend->mode,
+                                           backend->privateData, bufsiz, fmt,
+                                           speed);
+    default:
+      _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                "alcBackendSetWrite_: unknown backend %d\n", backend->type);
+      return AL_FALSE;
+    }
+}
+
+void
+alcBackendWrite_ (ALC_Backend *backend, void *dataptr, int bytes_to_write)
+{
+  switch (backend->type)
+    {
+    case AL_BACKEND_NATIVE_:
+      native_blitbuffer (backend->privateData, dataptr, bytes_to_write);
+      break;
+    case AL_BACKEND_ALSA_:
+      alsa_blitbuffer (backend->privateData, dataptr, bytes_to_write);
+      break;
+    case AL_BACKEND_ARTS_:
+      arts_blitbuffer (backend->privateData, dataptr, bytes_to_write);
+      break;
+    case AL_BACKEND_DMEDIA_:
+      dmedia_blitbuffer (backend->privateData, dataptr, bytes_to_write);
+      break;
+    case AL_BACKEND_ESD_:
+      esd_blitbuffer (backend->privateData, dataptr, bytes_to_write);
+      break;
+    case AL_BACKEND_SDL_:
+      sdl_blitbuffer (backend->privateData, dataptr, bytes_to_write);
+      break;
+    case AL_BACKEND_NULL_:
+      null_blitbuffer (backend->privateData, dataptr, bytes_to_write);
+      break;
+    case AL_BACKEND_WAVEOUT_:
+      waveout_blitbuffer (backend->privateData, dataptr, bytes_to_write);
+      break;
+    default:
+      _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                "alcBackendWrite_: unknown backend %d\n", backend->type);
+      break;
+    }
+}
+
+ALsizei
+alcBackendRead_ (ALC_Backend *backend, void *capture_buffer, int bufsiz)
+{
+  switch (backend->type)
+    {
+    case AL_BACKEND_NATIVE_:
+      return capture_nativedevice (backend->privateData, capture_buffer,
+                                   bufsiz);
+    case AL_BACKEND_ALSA_:
+      return capture_alsa (backend->privateData, capture_buffer, bufsiz);
+    case AL_BACKEND_ARTS_:
+      return capture_arts (backend->privateData, capture_buffer, bufsiz);
+    case AL_BACKEND_DMEDIA_:
+      return capture_dmedia (backend->privateData, capture_buffer, bufsiz);
+    case AL_BACKEND_ESD_:
+      return capture_esd (backend->privateData, capture_buffer, bufsiz);
+    case AL_BACKEND_SDL_:
+      return capture_sdl (backend->privateData, capture_buffer, bufsiz);
+    case AL_BACKEND_NULL_:
+      return capture_null (backend->privateData, capture_buffer, bufsiz);
+    case AL_BACKEND_WAVEOUT_:
+      return capture_waveout (backend->privateData, capture_buffer, bufsiz);
+    default:
+      _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                "alcBackendRead_: unknown backend %d\n", backend->type);
+      return 0;
+    }
+}
+
+ALfloat
+alcBackendGetAudioChannel_ (ALC_Backend *backend, ALuint channel)
+{
+  switch (backend->type)
+    {
+    case AL_BACKEND_NATIVE_:
+      return get_nativechannel (backend->privateData, channel);
+    case AL_BACKEND_ALSA_:
+      return get_alsachannel (backend->privateData, channel);
+    case AL_BACKEND_ARTS_:
+      return get_artschannel (backend->privateData, channel);
+    case AL_BACKEND_DMEDIA_:
+      return get_dmediachannel (backend->privateData, channel);
+    case AL_BACKEND_ESD_:
+      return get_esdchannel (backend->privateData, channel);
+    case AL_BACKEND_SDL_:
+      return get_sdlchannel (backend->privateData, channel);
+    case AL_BACKEND_NULL_:
+      return get_nullchannel (backend->privateData, channel);
+    case AL_BACKEND_WAVEOUT_:
+      return get_waveoutchannel (backend->privateData, channel);
+    default:
+      _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                "alcBackendGetAudioChannel_: unknown backend %d\n",
+                backend->type);
+      return 0;
+    }
+}
+
+void
+alcBackendSetAudioChannel_ (ALC_Backend *backend, ALuint channel,
+                            ALfloat volume)
+{
+  switch (backend->type)
+    {
+    case AL_BACKEND_NATIVE_:
+      set_nativechannel (backend->privateData, channel, volume);
+      break;
+    case AL_BACKEND_ALSA_:
+      set_alsachannel (backend->privateData, channel, volume);
+      break;
+    case AL_BACKEND_ARTS_:
+      set_artschannel (backend->privateData, channel, volume);
+      break;
+    case AL_BACKEND_DMEDIA_:
+      set_dmediachannel (backend->privateData, channel, volume);
+      break;
+    case AL_BACKEND_ESD_:
+      set_esdchannel (backend->privateData, channel, volume);
+      break;
+    case AL_BACKEND_SDL_:
+      set_sdlchannel (backend->privateData, channel, volume);
+      break;
+    case AL_BACKEND_NULL_:
+      set_nullchannel (backend->privateData, channel, volume);
+      break;
+    case AL_BACKEND_WAVEOUT_:
+      set_waveoutchannel (backend->privateData, channel, volume);
+      break;
+    default:
+      _alDebug (ALD_CONTEXT, __FILE__, __LINE__,
+                "alcBackendSetAudioChannel_: unknown backend %d\n",
+                backend->type);
+      break;
+    }
+}
Index: /openal-0.0.8/src/backends/alc_backend.h
===================================================================
--- /openal-0.0.8/src/backends/alc_backend.h	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend.h	(revision 17)
@@ -0,0 +1,311 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * interface_sound.h
+ *
+ * High level prototypes for sound device aquisition and management.
+ *
+ */
+#ifndef AL_BACKENDS_ALC_BACKEND_H_
+#define AL_BACKENDS_ALC_BACKEND_H_
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+/*
+ * An opaque backend structure, only used via pointers from outside.
+ */
+typedef struct ALC_BackendStruct ALC_Backend;
+
+typedef enum
+{
+  ALC_OPEN_INPUT_,
+  ALC_OPEN_OUTPUT_
+} ALC_OpenMode;
+
+/*
+ * Returns a handle to a backend suitable for reading or writing sound data, or
+ * NULL if no such backend is available. This function is used to implement
+ * alcOpenDevice.
+ */
+ALC_Backend *alcBackendOpen_ (ALC_OpenMode mode);
+
+/*
+ * Closes an (output or input) backend. Returns AL_TRUE if closing was
+ * successful, AL_FALSE if the handle was invalid or the backend could not be
+ * closed for some reason. This function is used to implement alcCloseDevice.
+ */
+ALboolean alcBackendClose_ (ALC_Backend *backend);
+
+/*
+ * Informs a backend that it is about to get paused. This function is used to
+ * implement alcMakeContextCurrent(NULL).
+ */
+void alcBackendPause_ (ALC_Backend *backend);
+
+/*
+ * Informs a backend that it is about to get resumed. This function is used to
+ * implement alcMakeContextCurrent(NON_NULL).
+ */
+void alcBackendResume_ (ALC_Backend *backend);
+
+/*
+ * Sets the parameters for a backend. Because we follow a meet-or-exceed
+ * policty, *bufsiz, *fmt, and *speed might be different from the parameters
+ * initially passed, so the caller should check these after a succesful
+ * call. Returns AL_TRUE if setting was successful, AL_FALSE if the parameters
+ * could not be matched or exceeded. This function is used to implement
+ * alcMakeContextCurrent(NON_NULL).
+ */
+ALboolean alcBackendSetAttributes_ (ALC_Backend *backend,
+                                    ALuint *bufsiz, ALenum *fmt,
+                                    ALuint *speed);
+
+/*
+ * Writes a given interleaved array of sound data to an output backend. This
+ * function is used to implement (a)sync_mixer_iterate.
+ */
+void alcBackendWrite_ (ALC_Backend *backend, void *data, int size);
+
+/*
+ * Captures data from an input backend into the given buffer. This function is
+ * used to implement alCaptureGetData_EXT.
+ */
+ALsizei alcBackendRead_ (ALC_Backend *backend, void *data, int size);
+
+/*
+ * Returns the normalized volume for the given channel (main/PCM/CD) on an
+ * output backend. This function is used to implement alcGetAudioChannel_LOKI.
+ */
+ALfloat alcBackendGetAudioChannel_ (ALC_Backend *backend, ALuint channel);
+
+/*
+ * Sets the normalized volume for the given channel (main/PCM/CD) on an output
+ * backend. This function is used to implement alcSetAudioChannel_LOKI.
+ */
+void alcBackendSetAudioChannel_ (ALC_Backend *backend, ALuint channel,
+                                 ALfloat volume);
+
+/******************************************************************************/
+
+/*
+ * Various data, the details depend on the backend in question.
+ */
+typedef void ALC_BackendPrivateData;
+
+ALC_BackendPrivateData *alcBackendOpenNative_ (ALC_OpenMode mode);
+void release_native (ALC_BackendPrivateData *privateData);
+void pause_nativedevice (ALC_BackendPrivateData *privateData);
+void resume_nativedevice (ALC_BackendPrivateData *privateData);
+ALboolean alcBackendSetAttributesNative_ (ALC_OpenMode mode,
+                                          ALC_BackendPrivateData *privateData,
+                                          ALuint *bufsiz, ALenum *fmt,
+                                          ALuint *speed);
+void native_blitbuffer (ALC_BackendPrivateData *privateData, void *data,
+                        int bytes);
+ALsizei capture_nativedevice (ALC_BackendPrivateData *privateData,
+                              void *capture_buffer, int bufsiz);
+ALfloat get_nativechannel (ALC_BackendPrivateData *privateData,
+                           ALuint channel);
+int set_nativechannel (ALC_BackendPrivateData *privateData, ALuint channel,
+                       ALfloat volume);
+
+#ifdef USE_BACKEND_ALSA
+ALC_BackendPrivateData *alcBackendOpenALSA_ (ALC_OpenMode mode);
+void release_alsa (ALC_BackendPrivateData *privateData);
+void pause_alsa (ALC_BackendPrivateData *privateData);
+void resume_alsa (ALC_BackendPrivateData *privateData);
+ALboolean alcBackendSetAttributesALSA_ (ALC_OpenMode mode,
+                                        ALC_BackendPrivateData *privateData,
+                                        ALuint *bufsiz, ALenum *fmt,
+                                        ALuint *speed);
+void alsa_blitbuffer (ALC_BackendPrivateData *privateData, void *data,
+                      int bytes);
+ALsizei capture_alsa (ALC_BackendPrivateData *privateData,
+                      void *capture_buffer, int bufsiz);
+ALfloat get_alsachannel (ALC_BackendPrivateData *privateData, ALuint channel);
+int set_alsachannel (ALC_BackendPrivateData *privateData, ALuint channel,
+                     ALfloat volume);
+#else
+#define alcBackendOpenALSA_(m)        NULL
+#define release_alsa(h)
+#define pause_alsa(h)
+#define resume_alsa(h)
+#define alcBackendSetAttributesALSA_(m,h,b,f,s) AL_FALSE
+#define alsa_blitbuffer(h,d,b)
+#define capture_alsa(h,d,b)           0
+#define get_alsachannel(h,c)          0.0
+#define set_alsachannel(h,c,v)        0
+#endif /* USE_BACKEND_ALSA */
+
+#ifdef USE_BACKEND_ARTS
+ALC_BackendPrivateData *alcBackendOpenARts_ (ALC_OpenMode mode);
+void release_arts (ALC_BackendPrivateData *privateData);
+void pause_arts (ALC_BackendPrivateData *privateData);
+void resume_arts (ALC_BackendPrivateData *privateData);
+ALboolean alcBackendSetAttributesARts_ (ALC_OpenMode mode,
+                                        ALC_BackendPrivateData *privateData,
+                                        ALuint *bufsiz, ALenum *fmt,
+                                        ALuint *speed);
+void arts_blitbuffer (ALC_BackendPrivateData *privateData, void *data,
+                      int bytes);
+ALsizei capture_arts (ALC_BackendPrivateData *privateData,
+                      void *capture_buffer, int bufsiz);
+ALfloat get_artschannel (ALC_BackendPrivateData *privateData, ALuint channel);
+int set_artschannel (ALC_BackendPrivateData *privateData, ALuint channel,
+                     ALfloat volume);
+#else
+#define alcBackendOpenARts_(m)        NULL
+#define release_arts(h)
+#define pause_arts(h)
+#define resume_arts(h)
+#define alcBackendSetAttributesARts_(m,h,b,f,s) AL_FALSE
+#define arts_blitbuffer(h,d,b)
+#define capture_arts(h,d,b)           0
+#define get_artschannel(h,c)          0.0
+#define set_artschannel(h,c,v)        0
+#endif /* USE_BACKEND_ARTS */
+
+#ifdef USE_BACKEND_DMEDIA
+ALC_BackendPrivateData *alcBackendOpenDMedia_ (ALC_OpenMode mode);
+void release_dmedia (ALC_BackendPrivateData *privateData);
+void pause_dmedia (ALC_BackendPrivateData *privateData);
+void resume_dmedia (ALC_BackendPrivateData *privateData);
+ALboolean alcBackendSetAttributesDMedia_ (ALC_OpenMode mode,
+                                        ALC_BackendPrivateData *privateData,
+                                        ALuint *bufsiz, ALenum *fmt,
+                                        ALuint *speed);
+void dmedia_blitbuffer (ALC_BackendPrivateData *privateData, void *data,
+                      int bytes);
+ALsizei capture_dmedia (ALC_BackendPrivateData *privateData,
+                      void *capture_buffer, int bufsiz);
+ALfloat get_dmediachannel (ALC_BackendPrivateData *privateData, ALuint channel);
+int set_dmediachannel (ALC_BackendPrivateData *privateData, ALuint channel,
+                     ALfloat volume);
+#else
+#define alcBackendOpenDMedia_(m)        NULL
+#define release_dmedia(h)
+#define pause_dmedia(h)
+#define resume_dmedia(h)
+#define alcBackendSetAttributesDMedia_(m,h,b,f,s) AL_FALSE
+#define dmedia_blitbuffer(h,d,b)
+#define capture_dmedia(h,d,b)           0
+#define get_dmediachannel(h,c)          0.0
+#define set_dmediachannel(h,c,v)        0
+#endif /* USE_BACKEND_DMEDIA */
+
+#ifdef USE_BACKEND_ESD
+void *alcBackendOpenESD_ (ALC_OpenMode mode);
+void release_esd (ALC_BackendPrivateData *privateData);
+void pause_esd (ALC_BackendPrivateData *privateData);
+void resume_esd (ALC_BackendPrivateData *privateData);
+ALboolean alcBackendSetAttributesESD_ (ALC_OpenMode mode,
+                                       ALC_BackendPrivateData *privateData,
+                                       ALuint *bufsiz, ALenum *fmt,
+                                       ALuint *speed);
+void esd_blitbuffer (ALC_BackendPrivateData *privateData, void *data,
+                     int bytes);
+ALsizei capture_esd (ALC_BackendPrivateData *privateData,
+                     void *capture_buffer, int bufsiz);
+ALfloat get_esdchannel (ALC_BackendPrivateData *privateData, ALuint channel);
+int set_esdchannel (ALC_BackendPrivateData *privateData, ALuint channel,
+                    ALfloat volume);
+#else
+#define alcBackendOpenESD_(m)         NULL
+#define pause_esd(h)
+#define release_esd(h)
+#define resume_esd(h)
+#define alcBackendSetAttributesESD_(m,h,b,f,s) AL_FALSE
+#define esd_blitbuffer(h,d,b)
+#define capture_esd(h,d,b)            0
+#define get_esdchannel(h,c)           0.0
+#define set_esdchannel(h,c,v)         0
+#endif /* USE_BACKEND_ESD */
+
+#ifdef USE_BACKEND_SDL
+ALC_BackendPrivateData *alcBackendOpenSDL_ (ALC_OpenMode mode);
+void release_sdl (ALC_BackendPrivateData *privateData);
+void pause_sdl (ALC_BackendPrivateData *privateData);
+void resume_sdl (ALC_BackendPrivateData *privateData);
+ALboolean alcBackendSetAttributesSDL_ (ALC_OpenMode mode,
+                                       ALC_BackendPrivateData *privateData,
+                                       ALuint *bufsiz, ALenum *fmt,
+                                       ALuint *speed);
+void sdl_blitbuffer (ALC_BackendPrivateData *privateData, void *data,
+                     int bytes);
+ALsizei capture_sdl (ALC_BackendPrivateData *privateData,
+                     void *capture_buffer, int bufsiz);
+ALfloat get_sdlchannel (ALC_BackendPrivateData *privateData, ALuint channel);
+int set_sdlchannel (ALC_BackendPrivateData *privateData, ALuint channel,
+                    ALfloat volume);
+#else
+#define alcBackendOpenSDL_(m)         NULL
+#define release_sdl(h)
+#define pause_sdl(h)
+#define resume_sdl(h)
+#define alcBackendSetAttributesSDL_(m,h,b,f,s) AL_FALSE
+#define sdl_blitbuffer(h,d,b)
+#define capture_sdl(h,d,b)            0
+#define get_sdlchannel(h,c)           0.0
+#define set_sdlchannel(h,c,v)         0
+#endif /* USE_BACKEND_SDL */
+
+#ifdef USE_BACKEND_NULL
+ALC_BackendPrivateData *alcBackendOpenNull_ (ALC_OpenMode mode);
+void release_null (ALC_BackendPrivateData *privateData);
+void pause_null (ALC_BackendPrivateData *privateData);
+void resume_null (ALC_BackendPrivateData *privateData);
+ALboolean alcBackendSetAttributesNull_ (ALC_OpenMode mode,
+                                        ALC_BackendPrivateData *privateData,
+                                        ALuint *bufsiz, ALenum *fmt,
+                                        ALuint *speed);
+void null_blitbuffer (ALC_BackendPrivateData *privateData, void *data,
+                      int bytes);
+ALsizei capture_null (ALC_BackendPrivateData *privateData,
+                      void *capture_buffer, int bufsiz);
+ALfloat get_nullchannel (ALC_BackendPrivateData *privateData, ALuint channel);
+int set_nullchannel (ALC_BackendPrivateData *privateData, ALuint channel,
+                     ALfloat volume);
+#else
+#define alcBackendOpenNull_(m)        NULL
+#define release_null(h)
+#define pause_null(h)
+#define resume_null(h)
+#define alcBackendSetAttributesNull_(m,h,b,f,s) AL_FALSE
+#define null_blitbuffer(h,d,b)
+#define capture_null(h,d,b)           0
+#define get_nullchannel(h,c)          0.0
+#define set_nullchannel(h,c,v)        0
+#endif /* USE_BACKEND_NULL */
+
+#ifdef USE_BACKEND_WAVEOUT
+ALC_BackendPrivateData *alcBackendOpenWAVE_ (ALC_OpenMode mode);
+void release_waveout (ALC_BackendPrivateData *privateData);
+void pause_waveout (ALC_BackendPrivateData *privateData);
+void resume_waveout (ALC_BackendPrivateData *privateData);
+ALboolean alcBackendSetAttributesWAVE_ (ALC_OpenMode mode,
+                                        ALC_BackendPrivateData *privateData,
+                                        ALuint *bufsiz, ALenum *fmt,
+                                        ALuint *speed);
+void waveout_blitbuffer (ALC_BackendPrivateData *privateData, void *data,
+                         int bytes);
+ALsizei capture_waveout (ALC_BackendPrivateData *privateData,
+                         void *capture_buffer, int bufsiz);
+ALfloat get_waveoutchannel (ALC_BackendPrivateData *privateData,
+                            ALuint channel);
+int set_waveoutchannel (ALC_BackendPrivateData *privateData, ALuint channel,
+                        ALfloat volume);
+#else
+#define alcBackendOpenWAVE_(m)        NULL
+#define release_waveout(h)
+#define pause_waveout(h)
+#define resume_waveout(h)
+#define alcBackendSetAttributesWAVE_(m,h,b,f,s) AL_FALSE
+#define waveout_blitbuffer(h,d,b)
+#define capture_waveout(h,d,b)        0
+#define get_waveoutchannel(h,c)       0.0
+#define set_waveoutchannel(h,c,v)     0
+#endif /* USE_BACKEND_WAVEOUT */
+
+#endif /* AL_BACKENDS_ALC_BACKEND_H_ */
Index: /openal-0.0.8/src/backends/alc_backend_alsa.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_alsa.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_alsa.c	(revision 17)
@@ -0,0 +1,832 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *  alsa.c
+
+   ALSA backend for OpenAL
+
+    Dirk Ehlke
+    EMail: dehlke@mip.informatik.uni-kiel.de
+
+    Multimedia Information Processing
+    Christian-Albrechts-University of Kiel
+
+    2002/06/13
+*/
+
+
+#ifndef _SVID_SOURCE
+#define _SVID_SOURCE
+#endif /* _SVID_SOURCE */
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif /* _GNU_SOURCE */
+
+#include "al_siteconfig.h"
+
+#include <AL/alext.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "backends/alc_backend.h"
+
+#include "al_config.h"
+#include "al_debug.h"
+#include "al_main.h"
+
+#ifdef OPENAL_DLOPEN_ALSA
+#include <dlfcn.h>
+#endif
+
+#include <alsa/asoundlib.h>
+
+static void *alsa_lib_handle = NULL;
+static int (*psnd_pcm_hw_params_malloc)(snd_pcm_hw_params_t **ptr) = NULL;
+static void (*psnd_pcm_hw_params_free)(snd_pcm_hw_params_t *obj) = NULL;
+static const char *(*psnd_strerror)(int errnum) = NULL;
+static size_t (*psnd_pcm_info_sizeof)(void) = NULL;
+static int (*psnd_pcm_close)(snd_pcm_t *pcm) = NULL;
+static int (*psnd_pcm_hw_params)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params) = NULL;
+static int (*psnd_pcm_hw_params_any)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params) = NULL;
+static int (*psnd_pcm_hw_params_set_access)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t acc) = NULL;
+static int (*psnd_pcm_hw_params_set_buffer_size_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val) = NULL;
+static int (*psnd_pcm_hw_params_set_channels)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val) = NULL;
+static int (*psnd_pcm_hw_params_set_format)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val) = NULL;
+static int (*psnd_pcm_hw_params_set_periods_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir) = NULL;
+static int (*psnd_pcm_hw_params_set_rate_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir) = NULL;
+static size_t (*psnd_pcm_hw_params_sizeof)(void) = NULL;
+static int (*psnd_pcm_prepare)(snd_pcm_t *pcm) = NULL;
+static snd_pcm_sframes_t (*psnd_pcm_readi)(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size) = NULL;
+static int (*psnd_pcm_resume)(snd_pcm_t *pcm) = NULL;
+static snd_pcm_sframes_t (*psnd_pcm_writei)(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size) = NULL;
+static int (*psnd_pcm_hw_params_set_period_size_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir) = NULL;
+static int (*psnd_pcm_open)(snd_pcm_t **pcm, const char *name,
+                     snd_pcm_stream_t stream, int mode) = NULL;
+static int (*psnd_pcm_nonblock)(snd_pcm_t * pcm, int nonblock) = NULL;
+
+/* !!! FIXME: hhm...this is a problem. */
+#if (SND_LIB_MAJOR == 0)
+static int (*psnd_pcm_hw_params_get_buffer_size)(const snd_pcm_hw_params_t *params) = NULL;
+static int (*psnd_pcm_hw_params_get_channels)(const snd_pcm_hw_params_t *params) = NULL;
+static snd_pcm_sframes_t (*psnd_pcm_hw_params_get_period_size)(const snd_pcm_hw_params_t *params, int *dir) = NULL;
+#else
+static int (*psnd_pcm_hw_params_get_buffer_size)(const snd_pcm_hw_params_t *params,
+                                          snd_pcm_uframes_t *val) = NULL;
+static int (*psnd_pcm_hw_params_get_channels)(const snd_pcm_hw_params_t *params, unsigned int *val) = NULL;
+static int (*psnd_pcm_hw_params_get_period_size)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir) = NULL;
+#endif
+
+static int openal_load_alsa_library(void)
+{
+#ifdef OPENAL_DLOPEN_ALSA
+        char * error = NULL;
+#endif
+    
+	if (alsa_lib_handle != NULL)
+		return 1;  /* already loaded. */
+
+        /* versioned symbol fetching macro, or NULL if no dlvsym available */
+#ifdef _GNU_SOURCE
+#define AL_DLVSYM dlvsym
+#else
+#define AL_DLVSYM(a,b,c) NULL
+#endif
+
+        /* ALSA uses symbol versioning, which is usually a good thing except
+           that it turns dlsym() into a lottery.  So, we look for known-good
+           symbol versions first before falling back to unversioned symbols. */
+        /* this is our current preferred symbol versioning order:
+           ALSA_0.9.0rc4 > (generic) */
+	#ifdef OPENAL_DLOPEN_ALSA
+		#define OPENAL_LOAD_ALSA_SYMBOL(x) p##x = AL_DLVSYM(alsa_lib_handle, #x, "ALSA_0.9.0rc4"); \
+                                                   error = dlerror(); \
+                                                   if ((error != NULL)||(p##x == NULL)) { \
+                                                           p##x = dlsym(alsa_lib_handle, #x); \
+                                                           error = dlerror(); \
+                                                           if ((error != NULL)||(p##x == NULL)) { \
+                                                                   fprintf(stderr,"Could not resolve ALSA symbol %s: %s\n", #x, ((error!=NULL)?(error):("(null)"))); \
+                                                                   dlclose(alsa_lib_handle); alsa_lib_handle = NULL; \
+                                                                   return 0; } else _alDebug(ALD_MAXIMUS, __FILE__, __LINE__, "got %s", #x); \
+                                                   } else _alDebug(ALD_MAXIMUS, __FILE__, __LINE__, "got %s", #x "@ALSA_0.9rc4");
+                dlerror(); /* clear error state */
+		alsa_lib_handle = dlopen("libasound.so.2", RTLD_LAZY | RTLD_GLOBAL);
+                error = dlerror();
+		if (alsa_lib_handle == NULL) {
+                        fprintf(stderr,"Could not open ALSA library: %s\n",((error!=NULL)?(error):("(null)")));
+			return 0;
+                }
+	#else
+		#define OPENAL_LOAD_ALSA_SYMBOL(x) p##x = x;
+		alsa_lib_handle = (void *) 0xF00DF00D;
+	#endif
+
+	OPENAL_LOAD_ALSA_SYMBOL(snd_strerror);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_info_sizeof);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_malloc);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_free);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_open);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_close);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_any);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_get_buffer_size);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_get_channels);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_get_period_size);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_set_access);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_set_buffer_size_near);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_set_channels);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_set_format);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_set_period_size_near);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_set_periods_near);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_set_rate_near);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_hw_params_sizeof);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_open);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_nonblock);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_prepare);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_readi);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_resume);
+	OPENAL_LOAD_ALSA_SYMBOL(snd_pcm_writei);
+
+	return 1;
+}
+
+/* alsa stuff */
+#define DEFAULT_DEVICE "plughw:0,0"
+
+/* convert from AL to ALSA format */
+static int AL2ALSAFMT(ALenum format);
+static int FRAMESIZE(snd_pcm_format_t fmt, unsigned int chans);
+
+
+/*
+ * get either the default device name or something the
+ * user specified
+ */
+static void get_in_device_name(char *retref, size_t retsize);
+static void get_out_device_name(char *retref, size_t retsize);
+
+struct alsa_info
+{
+	snd_pcm_t *handle;
+	snd_pcm_format_t format;
+	unsigned int speed;
+	unsigned int channels;
+	unsigned int framesize;
+	unsigned int periods;
+	snd_pcm_uframes_t bufframesize;
+	fd_set fd_set;
+	int setup_read, setup_write;
+};
+
+void release_alsa(void *handle)
+{
+	struct alsa_info *ai = handle;
+	if(handle == NULL)
+	  return;
+	psnd_pcm_close(ai->handle);
+	free(ai);
+}
+
+static void *grab_read_alsa( void )
+{
+	struct alsa_info *retval;
+	snd_pcm_t *handle;
+	char card_name[256];
+	int err;
+
+	if (!openal_load_alsa_library())
+		return NULL;
+
+	get_in_device_name(card_name, 256);
+
+	err = psnd_pcm_open(&handle, card_name, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK);
+	if(err < 0)
+	{
+		const char *serr = psnd_strerror(err);
+
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"grab_alsa: init failed: %s", serr);
+
+		return NULL;
+	}
+
+	retval = malloc(sizeof *retval);
+	retval->handle      = handle;
+	retval->format      = 0;
+	retval->channels    = 0;
+	retval->speed       = 0;
+	retval->framesize   = 0;
+	retval->bufframesize= 0;
+	retval->periods     = 0;
+	retval->setup_read	= 0;
+	retval->setup_write	= 0;
+
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"grab_alsa: init ok, using %s", card_name);
+
+	return retval;
+}
+
+static void get_out_device_name(char *retref, size_t retsize)
+{
+	Rcvar rcv;
+
+	assert(retref);
+
+	if (!(rcv = rc_lookup("alsa-device")))
+		rcv = rc_lookup("alsa-out-device");
+	if (rcv != NULL)
+	{
+		if(rc_type(rcv) == ALRC_STRING)
+		{
+			rc_tostr0(rcv, retref, retsize);
+                        return;
+
+		}
+	}
+
+	strncpy(retref, DEFAULT_DEVICE, retsize);
+	retref[retsize - 1] = '\0';
+}
+
+static void get_in_device_name(char *retref, size_t retsize)
+{
+	Rcvar rcv;
+
+	assert(retref);
+
+	if (!(rcv = rc_lookup("alsa-in-device")))
+		rcv = rc_lookup("alsa-device");
+	if (rcv != NULL)
+	{
+		if(rc_type(rcv) == ALRC_STRING)
+		{
+			rc_tostr0(rcv, retref, retsize);
+                        return;
+
+		}
+	}
+
+	strncpy(retref, DEFAULT_DEVICE, retsize);
+	retref[retsize - 1] = '\0';
+}
+
+static void *grab_write_alsa( void )
+{
+	struct alsa_info *retval;
+	snd_pcm_t *handle;
+	char card_name[256];
+	int err;
+
+	if (!openal_load_alsa_library())
+		return NULL;
+
+	get_out_device_name(card_name, 256);
+
+        /* Try to open the device without blocking, so we can 
+         * try other backends even if this would block.
+         */
+	err = psnd_pcm_open(&handle, card_name, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
+	if(err < 0)
+	{
+		const char *serr = psnd_strerror(err);
+
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"grab_alsa: init failed: %s", serr);
+
+		return NULL;
+	}
+
+        /* Now that we have successfully opened the device, 
+         * we can put it into blocking mode.
+         */
+        err = psnd_pcm_nonblock(handle,0);
+	if(err < 0)
+	{
+		const char *serr = psnd_strerror(err);
+
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"grab_alsa: could not put device into blocking mode: %s", serr);
+	}
+        
+	retval = malloc(sizeof *retval);
+	retval->handle      = handle;
+	retval->format      = 0;
+	retval->channels    = 0;
+	retval->speed       = 0;
+	retval->framesize   = 0;
+	retval->bufframesize= 0;
+	retval->periods     = 0;
+	retval->setup_read	= 0;
+	retval->setup_write	= 0;
+
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+		 "grab_alsa: init ok, using %s", card_name);
+
+	return retval;
+}
+
+void *
+alcBackendOpenALSA_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_alsa() : grab_write_alsa();
+}
+
+static ALboolean set_read_alsa( void *handle,
+				ALuint *bufsiz,
+				ALenum *fmt,
+				ALuint *speed)
+{
+	struct alsa_info *ai = handle;
+	snd_pcm_hw_params_t *setup;
+	snd_pcm_uframes_t buffer_size, period_size;
+	snd_pcm_t *phandle = 0;
+	int err, dir;
+
+	if( (ai == NULL) || (ai->handle == NULL) )
+		return AL_FALSE;
+
+
+	if ((*fmt == AL_FORMAT_QUAD8_LOKI) || (*fmt == AL_FORMAT_STEREO8))
+		*fmt = AL_FORMAT_MONO8;
+	if ((*fmt == AL_FORMAT_QUAD16_LOKI) || (*fmt == AL_FORMAT_STEREO16))
+		*fmt = AL_FORMAT_MONO16;
+
+	ai->channels    = 1;
+	ai->format      = (unsigned int) AL2ALSAFMT(*fmt);
+	ai->speed       = (unsigned int) *speed;
+	ai->framesize   = (unsigned int) FRAMESIZE(ai->format, ai->channels);
+	ai->bufframesize= (snd_pcm_uframes_t) 8192;
+	ai->periods     = 2;
+
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"alsa info (read): channels: %u, format: %u, speed: %u, framesize: %u, bufframesize: %lu,periods: %u",
+			ai->channels, ai->format, ai->speed, ai->framesize, ai->bufframesize, ai->periods);
+
+	phandle = ai->handle;
+
+	psnd_pcm_hw_params_malloc(&setup);
+	err = psnd_pcm_hw_params_any(phandle, setup);
+	if(err < 0)
+	{
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_read_alsa: Could not query parameters: %s",psnd_strerror(err));
+
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	/* set the interleaved read format */
+	err = psnd_pcm_hw_params_set_access(phandle, setup, SND_PCM_ACCESS_RW_INTERLEAVED);
+	if (err < 0) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_read_alsa: Could not set access type: %s",psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	/* set format */
+	err = psnd_pcm_hw_params_set_format(phandle, setup, ai->format);
+	if(err < 0)
+	{
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_read_alsa: could not set format: %s",psnd_strerror(err));
+
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+
+	/* channels */
+	err = psnd_pcm_hw_params_set_channels(phandle, setup, ai->channels);
+	if(err < 0)
+	{
+		unsigned int ch;
+#if (SND_LIB_MAJOR == 0)
+		ch = err = psnd_pcm_hw_params_get_channels(setup);
+#else
+		err = psnd_pcm_hw_params_get_channels(setup, &ch);
+#endif
+
+		if (ch != ai->channels) {
+			_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+					"set_read_alsa: could not set channels: %s",psnd_strerror(err));
+
+			psnd_pcm_hw_params_free(setup);
+			return AL_FALSE;
+		}
+	}
+
+
+	/* sampling rate */
+	err = psnd_pcm_hw_params_set_rate_near(phandle, setup, &ai->speed, NULL);
+	if(err < 0)
+	{
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_read_alsa: could not set speed: %s",psnd_strerror(err));
+
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	/* Set number of periods. Periods used to be called fragments. */
+	{ snd_pcm_uframes_t val = 4096;
+	err = psnd_pcm_hw_params_set_period_size_near(phandle, setup, &val, NULL);
+	if (err < 0) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_read_alsa: %s", psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+	}
+
+	err = psnd_pcm_hw_params_set_periods_near(phandle, setup, &ai->periods, 0);
+	if (err < 0) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_read_alsa: %s", psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	err = psnd_pcm_hw_params_set_buffer_size_near(phandle, setup, &ai->bufframesize);
+	if (err < 0) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_read_alsa: %s, size: %lu, speed: %d",
+				psnd_strerror(err), ai->bufframesize, ai->speed);
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+#if (SND_LIB_MAJOR == 0)
+	buffer_size = psnd_pcm_hw_params_get_buffer_size(setup);
+	period_size = psnd_pcm_hw_params_get_period_size(setup, &dir);
+#else
+	psnd_pcm_hw_params_get_buffer_size(setup, &buffer_size);
+	psnd_pcm_hw_params_get_period_size(setup, &period_size, &dir);
+#endif
+
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"set_read_alsa (info): Buffersize = %lu (%u)",buffer_size, *bufsiz);
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"set_read_alsa (info): Periodsize = %lu", period_size);
+	*bufsiz = buffer_size * ai->framesize;
+
+	err = psnd_pcm_hw_params(phandle, setup);
+	if(err < 0)
+	{
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_read_alsa: %s", psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	err = psnd_pcm_prepare(phandle);
+	if(err < 0)
+	{
+		_alDebug(ALD_MAXIMUS,  __FILE__, __LINE__,
+				"set_read_alsa %s", psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+		 "set_read_alsa: handle: %p, phandle: %p", handle, (void*)phandle);
+	ai->setup_read = 1;
+
+	psnd_pcm_hw_params_free(setup);
+	return AL_TRUE;
+}
+
+static ALboolean set_write_alsa(void *handle,
+				ALuint *bufsiz,
+				ALenum *fmt,
+				ALuint *speed)
+{
+	struct alsa_info *ai = handle;
+	snd_pcm_hw_params_t *setup;
+	snd_pcm_uframes_t buffer_size, period_size;
+	snd_pcm_t *phandle = 0;
+	int err, dir;
+
+	if( (ai == NULL) || (ai->handle == NULL) )
+		return AL_FALSE;
+
+	ai->channels    = (unsigned int) _alGetChannelsFromFormat(*fmt);
+	ai->format      = (unsigned int) AL2ALSAFMT(*fmt);
+	ai->speed       = (unsigned int) *speed;
+	ai->framesize   = (unsigned int) FRAMESIZE(ai->format, ai->channels);
+	ai->bufframesize= (snd_pcm_uframes_t) *bufsiz / ai->framesize * 4;
+	ai->periods     = 2;
+
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"alsa info (write): channels: %u, format: %u, speed: %u, framesize: %u, bufframesize: %lu, periods: %u",
+			ai->channels, ai->format, ai->speed, ai->framesize, ai->bufframesize, ai->periods);
+
+	phandle = ai->handle;
+
+	psnd_pcm_hw_params_malloc(&setup);
+	err = psnd_pcm_hw_params_any(phandle, setup);
+	if(err < 0)
+	{
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_write_alsa: Could not query parameters: %s",psnd_strerror(err));
+
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	/* set the interleaved write format */
+	err = psnd_pcm_hw_params_set_access(phandle, setup, SND_PCM_ACCESS_RW_INTERLEAVED);
+	if (err < 0) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_write_alsa: Could not set access type: %s",psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	/* set format */
+	err = psnd_pcm_hw_params_set_format(phandle, setup, ai->format);
+	if(err < 0)
+	{
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_write_alsa: could not set format: %s",psnd_strerror(err));
+
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+
+	/* channels */
+	err = psnd_pcm_hw_params_set_channels(phandle, setup, ai->channels);
+	if(err < 0)
+	{
+		unsigned int ch;
+#if (SND_LIB_MAJOR == 0)
+		ch = err = psnd_pcm_hw_params_get_channels(setup);
+#else
+		err = psnd_pcm_hw_params_get_channels(setup, &ch);
+#endif
+
+		if (ch != ai->channels) {
+			_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+					"set_write_alsa: could not set channels: %s",psnd_strerror(err));
+
+			psnd_pcm_hw_params_free(setup);
+			return AL_FALSE;
+		}
+	}
+
+
+	/* sampling rate */
+	err = psnd_pcm_hw_params_set_rate_near(phandle, setup, &ai->speed,
+                                               NULL);
+	if(err < 0) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+                         "set_write_alsa: could not set speed: %s",
+                         psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	} else if (err > 0) {
+                /* sampling rate is in 'err' */
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+                         "set_write_alsa: alsa speed returned is %u rather than %u",
+                         (unsigned int) err, ai->speed);
+		ai->speed = (unsigned int) err;
+                if (ai->speed > 200000) {
+                        /* This can happen, and is the precursor to other Bad
+                           Things.  It usually means we dlsym()d a crappy
+                           interface version instead of known-good one, and
+                           our list of preferential interfaces may need
+                           updating. */
+                        _alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+                                 "set_write_alsa: hw speed %u not sane.  failing.", ai->speed);
+                        psnd_pcm_hw_params_free(setup);
+                        return AL_FALSE; 
+                }
+        }
+
+
+	/* Set number of periods. Periods used to be called fragments. */
+	err = psnd_pcm_hw_params_set_periods_near(phandle, setup, &ai->periods, 0);
+	if (err < 0) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_write_alsa: %s", psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	err = psnd_pcm_hw_params_set_buffer_size_near(phandle, setup, &ai->bufframesize);
+	if (err < 0) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_write_alsa: %s, size: %lu, speed: %d",
+				psnd_strerror(err), ai->bufframesize, ai->speed);
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+#if (SND_LIB_MAJOR == 0)
+	buffer_size = psnd_pcm_hw_params_get_buffer_size(setup);
+	period_size = psnd_pcm_hw_params_get_period_size(setup, &dir);
+#else
+	psnd_pcm_hw_params_get_buffer_size(setup, &buffer_size);
+	psnd_pcm_hw_params_get_period_size(setup, &period_size, &dir);
+#endif
+
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"set_write_alsa (info): Buffersize = %lu (%u)",buffer_size, *bufsiz);
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+			"set_write_alsa (info): Periodsize = %lu", period_size);
+
+	err = psnd_pcm_hw_params(phandle, setup);
+	if(err < 0)
+	{
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+				"set_alsa: %s", psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	err = psnd_pcm_prepare(phandle);
+	if(err < 0)
+	{
+		_alDebug(ALD_MAXIMUS,  __FILE__, __LINE__,
+				"set_alsa %s", psnd_strerror(err));
+		psnd_pcm_hw_params_free(setup);
+		return AL_FALSE;
+	}
+
+	_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+		 "set_write_alsa: handle: %p, phandle: %p", handle, (void*)phandle);
+	ai->setup_write = 1;
+
+	psnd_pcm_hw_params_free(setup);
+	return AL_TRUE;
+}
+
+ALboolean
+alcBackendSetAttributesALSA_( ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_alsa(handle, bufsiz, fmt, speed) :
+		set_write_alsa(handle, bufsiz, fmt, speed);
+}
+
+void alsa_blitbuffer(void *handle, void *data, int bytes)
+{
+	struct alsa_info *ai = handle;
+	snd_pcm_t *phandle = 0;
+	char *pdata = data;
+	int data_len = bytes;
+	int channels = 0;
+	int err;
+	snd_pcm_uframes_t frames;
+
+	if((ai == NULL) || (ai->handle == NULL) || (!ai->setup_write))
+	{
+		return;
+	}
+
+	phandle = ai->handle;
+	channels= ai->channels;
+	frames  = (snd_pcm_uframes_t) bytes / ai->framesize;
+
+	while(data_len > 0)
+	{
+		err = psnd_pcm_writei(phandle, pdata, frames);
+		switch(err)
+		{
+			case -EAGAIN:
+				continue;
+				break;
+			case -ESTRPIPE:
+				do
+				{
+					err = psnd_pcm_resume(phandle);
+				} while ( err == -EAGAIN );
+				break;
+                        case -EPIPE:
+                                break;
+			default:
+                                if (err<0) {
+                                        fprintf(stderr,"alsa_blitbuffer: Could not write audio data to sound device: %s\n",
+                                        	psnd_strerror(err));
+                                        break;
+                                }
+                                pdata += err * ai->framesize;
+				data_len -= err * ai->framesize;
+                                frames -= err;
+				break;
+		}
+		if(err < 0)
+		{
+                        err = psnd_pcm_prepare(phandle);
+			if(err < 0)
+			{
+				const char *serr = psnd_strerror(err);
+
+				_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+                                 "alsa_blitbuffer: %s", serr);
+
+				return;
+			}
+		}
+	}
+
+	return;
+}
+
+/* capture data from the audio device */
+ALsizei capture_alsa(void *handle,
+		void *capture_buffer,
+		int bufsize)
+{
+	struct alsa_info *ai = handle;
+	snd_pcm_t *phandle = 0;
+	char *pdata = capture_buffer;
+	int ret;
+	snd_pcm_uframes_t frames;
+
+	if ((ai == NULL) || (ai->handle == NULL) || (!ai->setup_read))
+		return 0;
+
+	phandle = ai->handle;
+	frames = (snd_pcm_uframes_t) bufsize / ai->framesize;
+
+grab:
+	ret = psnd_pcm_readi (phandle, pdata, frames);
+	if (ret < 0) {
+		if (ret == -EAGAIN)
+			return 0;
+		else if (ret == -EPIPE) {
+			fprintf(stderr, "Error, overrun occurred, trying to recover.\n");
+			ret = psnd_pcm_prepare(phandle);
+			if (ret < 0)
+				fprintf(stderr, "Unable to recover: %d\n", ret);
+			else
+				goto grab;
+		} else {
+			fprintf(stderr, "Unknown error occurred: %d.\n", ret);
+		}
+		return 0;
+	} else
+		return ret * ai->framesize;
+}
+
+
+static int AL2ALSAFMT(ALenum format) {
+	switch(format) {
+		case AL_FORMAT_STEREO8:     return SND_PCM_FORMAT_U8;
+		case AL_FORMAT_MONO8:       return SND_PCM_FORMAT_U8;
+		case AL_FORMAT_QUAD8_LOKI:  return SND_PCM_FORMAT_U8;
+		case AL_FORMAT_STEREO16:    return SND_PCM_FORMAT_S16;
+		case AL_FORMAT_MONO16:      return SND_PCM_FORMAT_S16;
+		case AL_FORMAT_QUAD16_LOKI: return SND_PCM_FORMAT_S16;
+
+		default: break;
+	}
+	return -1;
+}
+
+
+
+static int FRAMESIZE(snd_pcm_format_t fmt, unsigned int chans) {
+	int retval = 0;
+	switch(fmt) {
+		case SND_PCM_FORMAT_U8:
+			retval = 1;
+			break;
+		case SND_PCM_FORMAT_S16:
+			retval = 2;
+			break;
+		default:
+	                return -1;
+		        break;
+		}
+
+	return(retval*chans);
+}
+
+void
+pause_alsa( UNUSED(void *handle) )
+{
+}
+
+void
+resume_alsa( UNUSED(void *handle) )
+{
+}
+
+ALfloat
+get_alsachannel( UNUSED(void *handle), UNUSED(ALuint channel) )
+{
+	return 0.0;
+}
+
+int
+set_alsachannel( UNUSED(void *handle), UNUSED(ALuint channel), UNUSED(ALfloat volume) )
+{
+	return 0;
+}
+
Index: /openal-0.0.8/src/backends/alc_backend_arts.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_arts.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_arts.c	(revision 17)
@@ -0,0 +1,285 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * arts.c
+ *
+ * arts backend.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <artsc.h>
+
+#ifdef OPENAL_DLOPEN_ARTS
+#include <dlfcn.h>
+#endif
+
+#include "al_main.h"
+#include "al_debug.h"
+
+#include "backends/alc_backend.h"
+
+#define DEF_SPEED	_ALC_CANON_SPEED
+#define DEF_SIZE	_AL_DEF_BUFSIZ
+#define DEF_SAMPLES     (DEF_SIZE / 2)
+#define DEF_BITS        16
+#define DEF_CHANNELS	2
+
+static int openal_arts_ref_count = 0;
+
+typedef struct {
+	arts_stream_t stream;
+} t_arts_handle;
+
+static const char *genartskey(void);
+static int openal_load_arts_library(void);
+
+/*
+ * aRts library functions.
+ */
+static int (*parts_init)(void);
+static void (*parts_free)(void);
+static int (*parts_suspend)(void);
+static int (*parts_suspended)(void);
+static const char *(*parts_error_text)(int errorcode);
+static arts_stream_t (*parts_play_stream)(int rate, int bits, int channels, const char *name);
+static arts_stream_t (*parts_record_stream)(int rate, int bits, int channels, const char *name);
+static void (*parts_close_stream)(arts_stream_t stream);
+static int (*parts_read)(arts_stream_t stream, void *buffer, int count);
+static int (*parts_write)(arts_stream_t stream, const void *buffer, int count);
+static int (*parts_stream_set)(arts_stream_t stream, arts_parameter_t param, int value);
+static int (*parts_stream_get)(arts_stream_t stream, arts_parameter_t param);
+
+/*
+ * aRts library handle.
+ */
+static void * arts_lib_handle = NULL;
+
+static int openal_load_arts_library(void)
+{
+#ifdef OPENAL_DLOPEN_ARTS
+        char * error = NULL;
+#endif
+    
+	if (arts_lib_handle != NULL)
+		return 1;  /* already loaded. */
+
+	#ifdef OPENAL_DLOPEN_ARTS
+		#define OPENAL_LOAD_ARTS_SYMBOL(x) p##x = dlsym(arts_lib_handle, #x); \
+                                                   error = dlerror(); \
+                                                   if (p##x == NULL) { \
+                                                           fprintf(stderr,"Could not resolve aRts symbol %s: %s\n", #x, ((error!=NULL)?(error):("(null)"))); \
+                                                           dlclose(arts_lib_handle); arts_lib_handle = NULL; \
+                                                           return 0; }
+                dlerror(); /* clear error state */
+		arts_lib_handle = dlopen("libartsc.so", RTLD_LAZY | RTLD_GLOBAL);
+                error = dlerror();
+		if (arts_lib_handle == NULL) {
+                        fprintf(stderr,"Could not open aRts library: %s\n",((error!=NULL)?(error):("(null)")));
+			return 0;
+                }
+	#else
+		#define OPENAL_LOAD_ARTS_SYMBOL(x) p##x = x;
+		arts_lib_handle = (void *) 0xF00DF00D;
+	#endif
+
+        OPENAL_LOAD_ARTS_SYMBOL(arts_init);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_free);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_suspend);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_suspended);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_error_text);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_play_stream);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_record_stream);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_close_stream);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_read);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_write);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_stream_set);
+        OPENAL_LOAD_ARTS_SYMBOL(arts_stream_get);
+
+	return 1;
+}
+
+static void *grab_read_arts(void) {
+	return NULL;
+}
+
+static void *grab_write_arts(void) {
+        int err;
+        t_arts_handle * ahandle;
+
+        if (!openal_load_arts_library()) {
+                return NULL;
+        }
+    
+        if (!(ahandle=malloc(sizeof(t_arts_handle))))
+                return NULL;
+        
+        if (openal_arts_ref_count==0) {
+                err = parts_init();
+
+                if(err < 0) {
+                        fprintf(stderr, "aRTs init failed: %s\n",
+                                parts_error_text(err));
+                        free(ahandle);
+                        return NULL;
+                }
+        }
+
+        openal_arts_ref_count++;
+        
+#if 1
+        ahandle->stream = NULL;
+#else
+        ahandle->stream = parts_play_stream(DEF_SPEED,
+                                            DEF_BITS,
+                                            DEF_CHANNELS,
+				 	    genartskey());
+#endif
+        
+	fprintf(stderr, "arts grab audio ok\n");
+
+	_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+		"arts grab audio ok");
+
+        return ahandle;
+}
+
+void *
+alcBackendOpenARts_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_arts() : grab_write_arts();
+}
+
+
+
+void arts_blitbuffer(void *handle, void *data, int bytes)  {
+	t_arts_handle * ahandle = (t_arts_handle *) handle;
+
+	if ((ahandle == NULL)||(ahandle->stream == NULL)) {
+		return;
+	}
+
+	parts_write(ahandle->stream, data, bytes);
+
+        return;
+}
+
+void release_arts(void *handle) {
+	t_arts_handle * ahandle = (t_arts_handle *) handle;
+
+	if ((ahandle == NULL)||(ahandle->stream == NULL)) {
+		return;
+	}
+
+        openal_arts_ref_count--;
+        
+	parts_close_stream(ahandle->stream);
+        free(ahandle);
+
+        if (openal_arts_ref_count==0)
+                parts_free();
+
+	return;
+}
+
+static const char *genartskey(void) {
+	static char retval[1024];
+
+	snprintf(retval, sizeof(retval), "openal%d", getpid());
+
+	return retval;
+}
+
+static ALboolean set_write_arts(void *handle,
+				ALuint *bufsiz,
+				ALenum *fmt,
+				ALuint *speed) {
+	t_arts_handle * ahandle = (t_arts_handle *) handle;
+
+	if (ahandle == NULL) {
+		return AL_FALSE;
+	}
+
+#if 0
+	fprintf(stderr, "set_arts forcing speed from %d to 44100\n", *speed);
+
+        /* @@@ FIXME: What was this good for?! */
+	*speed = 44100;
+#endif
+
+        if (ahandle->stream != NULL)
+                parts_close_stream(ahandle->stream);
+
+        /* According to the aRtsC library source, this function
+         * returns 0 if it fails.
+         */
+	ahandle->stream = parts_play_stream(*speed,
+					    _alGetBitsFromFormat(*fmt),
+					    _alGetChannelsFromFormat(*fmt),
+                                            genartskey());
+        
+        if (ahandle->stream == 0) {
+                ahandle->stream = NULL;
+                return AL_FALSE;
+        }
+        
+	parts_stream_set(ahandle->stream, ARTS_P_BUFFER_SIZE, *bufsiz);
+	parts_stream_set(ahandle->stream, ARTS_P_BLOCKING, 1);
+
+	*bufsiz = parts_stream_get(ahandle->stream, ARTS_P_BUFFER_SIZE);
+
+        return AL_TRUE;
+}
+
+static ALboolean set_read_arts(UNUSED(void *handle),
+			       UNUSED(ALuint *bufsiz),
+			       UNUSED(ALenum *fmt),
+			       UNUSED(ALuint *speed)) {
+	return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesARts_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_arts(handle, bufsiz, fmt, speed) :
+		set_write_arts(handle, bufsiz, fmt, speed);
+}
+
+void
+pause_arts( UNUSED(void *handle) )
+{
+}
+
+void
+resume_arts( UNUSED(void *handle) )
+{
+}
+
+
+ALsizei
+capture_arts( UNUSED(void *handle), UNUSED(void *capture_buffer), UNUSED(int bufsiz) )
+{
+	return 0;
+}
+
+ALfloat
+get_artschannel( UNUSED(void *handle), UNUSED(ALuint channel) )
+{
+	return 0.0;
+}
+
+int
+set_artschannel( UNUSED(void *handle), UNUSED(ALuint channel), UNUSED(ALfloat volume) )
+{
+	return 0;
+}
Index: /openal-0.0.8/src/backends/alc_backend_bsd.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_bsd.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_bsd.c	(revision 17)
@@ -0,0 +1,395 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * bsd_dsp.c
+ *
+ * functions related to the aquisition and management of /dev/dsp under
+ * bsd.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <sys/soundcard.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "backends/alc_backend.h"
+
+/* is this right? */
+#define _AL_DEF_BUFSIZ _ALC_DEF_BUFSIZ
+
+#include "al_main.h"
+#include "al_debug.h"
+#include "alc/alc_context.h"
+
+#ifdef WORDS_BIGENDIAN
+#define AFMT_S16 AFMT_S16_BE
+#else
+#define AFMT_S16 AFMT_S16_LE
+#endif /* WORDS_BIGENDIAN */
+
+static int grab_mixerfd(void);
+static int alcChannel_to_dsp_channel(ALuint alcc);
+
+/* /dev/dsp variables */
+static fd_set dsp_fd_set;
+static int dsp_fd      = -1; /* /dev/dsp file descriptor */
+static int mixer_fd    = -1; /* /dev/mixer file descriptor */
+
+/* convert the format channel from /dev/dsp to openal format */
+static int BSD2ALFMT(int fmt, int channels) {
+	switch(fmt) {
+		case AFMT_U8:
+			switch(channels)
+			{
+				case 1: return AL_FORMAT_MONO8;
+				case 2: return AL_FORMAT_STEREO8;
+				default: return -1;
+			}
+			break;
+		case AFMT_S16:
+			switch(channels)
+			{
+				case 1: return AL_FORMAT_MONO16;
+				case 2: return AL_FORMAT_STEREO16;
+				default: return -1;
+			}
+			break;
+		default:
+#ifdef DEBUG_MAXIMUS
+			fprintf(stderr, "unsupported dsp format\n");
+#endif
+			return -1;
+			break;
+	}
+
+	return -1;
+}
+
+/* convert the format channel from openal to /dev/dsp format */
+static int AL2BSDFMT(int fmt)
+{
+	switch(fmt)
+	{
+		case AL_FORMAT_MONO16:
+		case AL_FORMAT_STEREO16:
+			return AFMT_S16;
+			break;
+		case AL_FORMAT_MONO8:
+		case AL_FORMAT_STEREO8:
+			return AFMT_U8;
+			break;
+		default:
+#ifdef DEBUG_MAXIMUS
+		  fprintf(stderr, "unknown format 0x%x\n", fmt);
+#endif
+		  break;
+	}
+
+	return -1;
+}
+
+/*
+ *
+ *  Format of divisor is bit field where:
+ *
+ *
+ *         MSHW          LSHW
+ *  [ some big value |     x  ]
+ *
+ *  where x is translated into 2^x, and used as the
+ *  dma buffer size.
+ *
+ */
+static void *grab_write_native(void) {
+	const char *dsppath = "/dev/dsp";
+	int divisor = _alSpot(_AL_DEF_BUFSIZ) | (2<<16);
+
+	dsp_fd = open(dsppath, O_WRONLY | O_NONBLOCK);
+
+	if(dsp_fd < 0) {
+		perror("open /dev/dsp");
+		return NULL;
+	}
+
+	if(fcntl(dsp_fd, F_SETFL, ~O_NONBLOCK) == -1) {
+		perror("fcntl");
+	}
+
+	if(ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
+		perror("ioctl SETFRAGMENT");
+	}
+
+	FD_ZERO(&dsp_fd_set);
+	FD_SET(dsp_fd, &dsp_fd_set);
+
+	/* now get mixer_fd */
+	mixer_fd = grab_mixerfd();
+
+#ifdef DEBUG
+	fprintf(stderr, "Got /dev/dsp\n");
+#endif
+	return &dsp_fd;
+}
+
+int grab_mixerfd(void) {
+	mixer_fd = open("/dev/mixer", O_WRONLY | O_NONBLOCK);
+
+	if(mixer_fd > 0) {
+		if(fcntl(mixer_fd, F_SETFL, ~O_NONBLOCK) == -1) {
+			perror("fcntl");
+		}
+
+		return mixer_fd;
+	} else {
+		perror("open /dev/mixer");
+	}
+
+	return -1;
+}
+
+void native_blitbuffer(void *handle, void *dataptr, int bytes_to_write) {
+	struct timeval tv = { 1, 0 }; /* wait 1 sec max */
+	int iterator = 0;
+	int err;
+	int fd;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	fd = *(int *) handle;
+
+	for(iterator = bytes_to_write; iterator > 0; ) {
+		if(select(fd + 1, NULL, &dsp_fd_set, NULL, &tv) == 0) {
+			/* timeout occured, don't try and write */
+#ifdef DEBUG_MAXIMUS
+			fprintf(stderr, "native_blitbuffer: timeout occured\n");
+#endif
+			return;
+		}
+
+		FD_ZERO(&dsp_fd_set);
+		FD_SET(fd, &dsp_fd_set);
+
+		assert(iterator > 0);
+		assert(iterator <= bytes_to_write);
+
+		err = write(fd,
+			    (char *) dataptr + bytes_to_write - iterator,
+			    iterator);
+		if(err < 0) {
+#ifdef DEBUG_MAXIMUS
+			perror("write");
+#endif
+			return;
+		}
+
+		iterator -= err;
+	};
+
+	return;
+}
+
+void release_native(void *handle) {
+	int handle_fd;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	handle_fd = *(int *) handle;
+
+	if(ioctl(handle_fd, SNDCTL_DSP_RESET) < 0) {
+#ifdef DEBUG_MAXIMUS
+		fprintf(stderr, "Couldn't reset dsp\n");
+#endif
+	}
+
+	ioctl(handle_fd, SNDCTL_DSP_SYNC, NULL);
+	if((close(handle_fd) < 0) || (close(mixer_fd) < 0)) {
+		return;
+	}
+
+	*(int *) handle = -1;
+	mixer_fd        = -1;
+
+	return;
+}
+
+ALfloat get_nativechannel(UNUSED(void *handle), ALuint channel) {
+	int retval = 0;
+
+	channel = alcChannel_to_dsp_channel(channel);
+
+	if(ioctl(mixer_fd, MIXER_READ(channel), &retval) < 0) {
+		return -1;
+	}
+
+	return (retval >> 8) / 100.0;
+}
+
+
+/*
+ * Okay:
+ *
+ * Set audio channel expects an integer, in the range of
+ * 0 - 100.  But wait!  It expects the integer to be
+ * partitioned into a 16bit empty, L/R channel pair (high bits left,
+ * low bits right), each 8 bit pair in the range 0 - 100.
+ *
+ * Kludgey, and obviously not the right way to do this
+ */
+int set_nativechannel(UNUSED(void *handle), ALuint channel, ALfloat volume) {
+	int unnormalizedvolume;
+
+	unnormalizedvolume = volume * 100;
+	unnormalizedvolume <<= 8;
+	unnormalizedvolume += (volume * 100);
+
+	channel = alcChannel_to_dsp_channel(channel);
+
+	if(ioctl(mixer_fd, MIXER_WRITE(channel), &unnormalizedvolume) < 0) {
+		return -1;
+	}
+
+	return 0;
+}
+
+/* convert the mixer channel from ALC to /dev/mixer format */
+static int alcChannel_to_dsp_channel(ALuint alcc) {
+	switch(alcc) {
+		case ALC_CHAN_MAIN_LOKI: return SOUND_MIXER_VOLUME;
+		case ALC_CHAN_CD_LOKI:   return SOUND_MIXER_CD;
+		case ALC_CHAN_PCM_LOKI:  return SOUND_MIXER_PCM;
+		default: return -1;
+	}
+
+	return -1;
+}
+
+void pause_nativedevice(void *handle) {
+	int fd;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	fd = *(int *) handle;
+
+	if(ioctl(fd, SNDCTL_DSP_POST, 0) == -1) {
+		perror("ioctl");
+	}
+
+	return;
+}
+
+void resume_nativedevice(void *handle) {
+	int fd;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	fd = *(int *) handle;
+
+	if(ioctl(fd, SNDCTL_DSP_POST, 0) == -1) {
+		perror("ioctl");
+	}
+
+	return;
+}
+
+ALsizei capture_nativedevice(UNUSED(void *handle),
+			  UNUSED(void *capture_buffer),
+			  UNUSED(int bufsiz)) {
+	/* unimplemented */
+	return 0;
+}
+
+static ALboolean set_write_native(UNUSED(void *handle),
+				  UNUSED(unsigned int *bufsiz),
+				  ALenum *fmt,
+				  unsigned int *speed) {
+	ALuint channels = _alGetChannelsFromFormat(*fmt);
+
+	if(dsp_fd < 0) {
+		return AL_FALSE;
+	}
+
+	*fmt  = AL2BSDFMT(*fmt);
+
+	/* reset card defaults */
+	if(ioctl(dsp_fd, SNDCTL_DSP_RESET, NULL) < 0) {
+#ifdef DEBUG_MAXIMUS
+		perror("set_devsp reset ioctl");
+#endif
+		return AL_FALSE;
+	}
+
+	if(ioctl(dsp_fd, SNDCTL_DSP_SPEED, speed) < 0) {
+#ifdef DEBUG_MAXIMUS
+		fprintf(stderr, "speed %d\n", *speed);
+		perror("set_devsp speed ioctl");
+#endif
+		return AL_FALSE;
+	}
+
+	if(ioctl(dsp_fd, SNDCTL_DSP_SETFMT, fmt) < 0) {
+#ifdef DEBUG_MAXIMUS
+		fprintf(stderr, "fmt %d\n", *fmt);
+		perror("set_devsp format ioctl");
+#endif
+		return AL_FALSE;
+	}
+
+	if(ioctl(dsp_fd, SOUND_PCM_WRITE_CHANNELS, &channels)) {
+#ifdef DEBUG_MAXIMUS
+		fprintf(stderr, "channels %d\n", channels);
+		perror("set_devsp channels ioctl");
+#endif
+		return AL_FALSE;
+	}
+
+
+	*fmt = BSD2ALFMT(*fmt, channels);
+
+	return AL_TRUE;
+}
+
+static ALboolean set_read_native(UNUSED(void *handle),
+				 UNUSED(unsigned int *bufsiz),
+				 UNUSED(ALenum *fmt),
+				 UNUSED(unsigned int *speed)) {
+	return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesNative_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_native(handle, bufsiz, fmt, speed) :
+		set_write_native(handle, bufsiz, fmt, speed);
+}
+
+static void *grab_read_native(void)
+{
+	fprintf(stderr,"grab_read_native Not implemented! (%s:%d)\n",__FILE__,__LINE__);
+	return;
+}
+
+void *
+alcBackendOpenNative_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_native() : grab_write_native();
+}
Index: /openal-0.0.8/src/backends/alc_backend_darwin.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_darwin.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_darwin.c	(revision 17)
@@ -0,0 +1,452 @@
+/* darwin_native.c
+ *
+ * Mac OS X backend for OpenAL
+ * only PowerPC target on MacOS X is supported (Darwin is not supported alone)
+ *
+ * file originally created on jan 2000 by
+ * Guillaume Borios (gborios@free.fr) and Florent Boudet (flobo@ifrance.com)
+ * to help the PineApple project (http://ios.free.fr) run on MOSX
+ *
+ * Version : Alpha 6
+ */
+
+#include <CoreAudio/CoreAudio.h>
+
+#include "backends/alc_backend.h"
+
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "al_main.h"
+#include "al_debug.h"
+#include "al_rcvar.h"
+#include "alc/alc_context.h"
+
+/* Adding buffers improves response to temporary heavy CPU loads but increases latency... */
+
+#define buildID 12
+
+typedef struct {
+    AudioDeviceID	deviceW;		/* the device ID */
+    void *		deviceWBuffer;
+    UInt32		deviceWBufferSize;	/* Buffer size of the audio device */
+    AudioBufferList*	deviceWBufferList;
+    AudioStreamBasicDescription	deviceFormat;	/* format of the default device */
+} globalVars, *globalPtr;
+
+/************************************** GLOBALS *********************************/
+
+static globalVars	libGlobals; /* my globals */
+
+static unsigned int	alWriteFormat;	/* format of data from AL*/
+static unsigned int	alWriteSpeed;	/* speed of data from AL*/
+static unsigned int	nativePreferedBuffSize;
+static void * coreAudioDestination;
+static int ratio;
+static int stillToPlay = 0;
+
+/************************************* PROTOTYPES *********************************/
+
+static void implement_me(const char *fn);
+OSStatus deviceFillingProc (AudioDeviceID  inDevice, const AudioTimeStamp*  inNow, const AudioBufferList*  inInputData, const AudioTimeStamp*  inInputTime, AudioBufferList* outOutputData, const AudioTimeStamp* inOutputTime, void* inClientData);
+
+OSStatus GetAudioDevices (void **devices /*Dev IDs*/, short	*devicesAvailable /*Dev number*/);
+
+int sync_mixer_iterate( void *dummy );
+
+void playABuffer(void *realdata);
+
+/************************************** UTILITIES *********************************/
+
+static int NoPrintf( UNUSED(const char *format), ... )
+{
+	return 0;
+}
+
+/* ToDo: Use vfprintf and nuke buffer */
+static int _alDebugPrintf( const char *format, ... )
+{
+	static char formatbuf[256];
+
+	va_list ap;
+	va_start(ap, format);
+	vsnprintf(formatbuf, sizeof formatbuf, format, ap);
+	va_end(ap);
+
+	return fprintf(stderr, "%s", formatbuf);
+}
+
+static int (*DebugPrintf)( const char *format, ... ) = NoPrintf;
+
+
+static void implement_me(const char *fn)
+{
+	DebugPrintf("[darwin_native.c] : %s is not implemented.\nPlease contact gborios@free.fr for information or help.\n", fn);
+}
+
+/*********************************** OS callback proc *****************************/
+
+OSStatus deviceFillingProc (UNUSED(AudioDeviceID  inDevice), UNUSED(const AudioTimeStamp*  inNow), UNUSED(const AudioBufferList*  inInputData), UNUSED(const AudioTimeStamp*  inInputTime), AudioBufferList*  outOutputData, UNUSED(const AudioTimeStamp* inOutputTime), void* inClientData)
+{
+    coreAudioDestination = (outOutputData->mBuffers[0]).mData;
+
+    if (stillToPlay) playABuffer(NULL);
+    else sync_mixer_iterate(NULL);
+
+    return 0;
+}
+
+/************************************** HAL Routines *********************************/
+
+OSStatus GetAudioDevices (void **devices /*Dev IDs*/, short	*devicesAvailable /*Dev number*/)
+{
+#ifdef DEBUG_MAXIMUS
+    int i;
+    char	cStr[256];
+#endif
+    OSStatus	err = NULL;
+    UInt32 	outSize;
+    Boolean	outWritable;
+
+    DebugPrintf("OpenAL MOSX Backend : Build %d\n",buildID);
+
+    // find out how many audio devices there are, if any
+    err = AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices, &outSize, &outWritable);
+    if (err != NULL) return (err);
+
+    // calculate the number of device available
+    *devicesAvailable = outSize / sizeof(AudioDeviceID);
+    // Bail if there aren't any devices
+    if (*devicesAvailable < 1) return (-1);
+
+    // make space for the devices we are about to get
+    if (*devices != NULL) free(*devices);
+    *devices = malloc(outSize);
+    // get an array of AudioDeviceIDs
+    err = AudioHardwareGetProperty(kAudioHardwarePropertyDevices, &outSize, (void *) *devices);
+    if (err != NULL) free(*devices);
+#ifdef DEBUG_MAXIMUS
+    DebugPrintf("Found %d Audio Device(s)\n",*devicesAvailable);
+
+    for (i=0; i<*devicesAvailable;i++)
+    {
+        UInt32 ID = ((UInt32*)(*devices))[i];
+        err =  AudioDeviceGetPropertyInfo(ID, 0, 0, kAudioDevicePropertyDeviceName,  &outSize, &outWritable);
+        err = AudioDeviceGetProperty(ID, 0, 0, kAudioDevicePropertyDeviceName, &outSize, cStr);
+        DebugPrintf("Device #%d : %s",ID,cStr);
+        err = AudioDeviceGetProperty(ID, 0, 0, kAudioDevicePropertyDeviceManufacturer, &outSize, cStr);
+        DebugPrintf(" (%s)\n",cStr);
+
+    }
+#endif
+    return (err);
+}
+
+
+/************************************** INTERFACE *********************************/
+
+static void *grab_read_native(void)
+{
+    implement_me("void *grab_read_native()");
+    return NULL;
+}
+
+static void *grab_write_native(void)
+{
+    OSStatus	error = 0;
+    UInt32	count;
+    void *	devices = 0;
+    short	devicesAvailable;
+    Boolean	outWritable;
+
+    Rcvar native_debug = rc_lookup("native-backend-debug");
+    if((rc_type(native_debug) == ALRC_BOOL) &&
+       (rc_tobool(native_debug) == AL_TRUE))
+    {
+	    DebugPrintf = _alDebugPrintf;
+    }
+    else
+    {
+	    DebugPrintf = NoPrintf;
+    }
+
+    /* Look for audio devices */
+    error = GetAudioDevices (&devices ,&devicesAvailable);
+    if (error != 0) goto Crash;
+    libGlobals.deviceW = ((AudioDeviceID*)(devices))[0]; /* Selecting first device */
+
+    /* Getting buffer size */
+    error = AudioDeviceGetPropertyInfo(libGlobals.deviceW, 0, 0, kAudioDevicePropertyBufferSize, &count, &outWritable);
+    if (error != 0) goto Crash;
+    error = AudioDeviceGetProperty(libGlobals.deviceW, 0, 0, kAudioDevicePropertyBufferSize, &count, &libGlobals.deviceWBufferSize);
+    if (error != 0) goto Crash;
+    DebugPrintf("IOProperties : Buffersize = %d\n",
+		(int) libGlobals.deviceWBufferSize);
+
+    /* getting streams configs */
+    error = AudioDeviceGetPropertyInfo(libGlobals.deviceW, 0, 0, kAudioDevicePropertyStreamConfiguration,  &count, &outWritable);
+    if (error != 0) goto Crash;
+    {
+        libGlobals.deviceWBufferList = malloc(count);
+
+        error = AudioDeviceGetProperty(libGlobals.deviceW, 0, 0, kAudioDevicePropertyStreamConfiguration, &count, libGlobals.deviceWBufferList);
+        if (error != 0) goto Crash;
+#ifdef DEBUG_MAXIMUS
+       {
+	    unsigned int i;
+            DebugPrintf("IOProperties : Buffer number = %d\n",libGlobals.deviceWBufferList->mNumberBuffers);
+            /*device->outStreamsInfo  = malloc(sizeof(StreamInfo) * device->totalOutputStreams);*/
+            for (i = 0; i < libGlobals.deviceWBufferList->mNumberBuffers; i++)
+            {
+                DebugPrintf("  Buffer %d Properties : DataByteSize = %d\n",i,libGlobals.deviceWBufferList->mBuffers[i].mDataByteSize);
+                DebugPrintf("  Buffer %d Properties : NumberChannels = %d\n",i,libGlobals.deviceWBufferList->mBuffers[i].mNumberChannels);
+                DebugPrintf("  Buffer %d Properties : Data = %d\n",i,libGlobals.deviceWBufferList->mBuffers[i].mData);
+                /*error = GetPhysicalFormatCount(device, i + 1, &device->outStreamsInfo[i].pFormatCount, false);
+                device->outStreamsInfo[i].pFormatMenuSelection = 1;
+
+                error = GetActualFormatCount(device, i + 1, &device->outStreamsInfo[i].aFormatCount, false);
+                device->outStreamsInfo[i].aFormatMenuSelection = 1;*/
+            }
+        }
+#endif
+    }
+
+    error = AudioDeviceGetPropertyInfo(libGlobals.deviceW, 0, 0, kAudioDevicePropertyStreamFormats,  &count, &outWritable);
+    if (error != 0) goto Crash;
+    error = AudioDeviceGetProperty(libGlobals.deviceW, 0, 0, kAudioDevicePropertyStreamFormats, &count, &libGlobals.deviceFormat);
+    if (error != 0) goto Crash;
+
+#ifndef DEBUG_MAXIMUS
+    DebugPrintf("IOProperties : SampleRate = %f\n",libGlobals.deviceFormat.mSampleRate);
+    DebugPrintf("IOProperties : FormatFlags = %d\n",(int)libGlobals.deviceFormat.mFormatFlags);
+    DebugPrintf("IOProperties : BytesPerPacket = %d\n",(int)libGlobals.deviceFormat.mBytesPerPacket);
+    DebugPrintf("IOProperties : FramesPerPacket = %d\n",(int)libGlobals.deviceFormat.mFramesPerPacket);
+    DebugPrintf("IOProperties : BytesPerFrame = %d\n",(int)libGlobals.deviceFormat.mBytesPerFrame);
+    DebugPrintf("IOProperties : ChannelsPerFrame = %d\n",(int)libGlobals.deviceFormat.mChannelsPerFrame);
+    DebugPrintf("IOProperties : BitsPerChannel = %d\n",(int)libGlobals.deviceFormat.mBitsPerChannel);
+#endif
+
+    error = AudioDeviceGetPropertyInfo(libGlobals.deviceW, 0, 0, kAudioDevicePropertyStreamFormat,  &count, &outWritable);
+    if (error != 0) goto Crash;
+    error = AudioDeviceGetProperty(libGlobals.deviceW, 0, 0, kAudioDevicePropertyStreamFormat, &count, &libGlobals.deviceFormat);
+    if (error != 0) goto Crash;
+
+    error = AudioDeviceAddIOProc(libGlobals.deviceW, deviceFillingProc, (void *) &libGlobals);	/* Creates the callback proc */
+    if (error != 0) goto Crash;
+
+    return &libGlobals.deviceW;
+
+Crash :
+    DebugPrintf("An error occured during void *grab_write_native()\n");
+    libGlobals.deviceW = NULL;
+    return NULL;
+}
+
+void *
+alcBackendOpenNative_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_native() : grab_write_native();
+}
+
+static ALboolean set_write_native(UNUSED(void *handle),
+				  unsigned int *bufsiz,
+				  unsigned int *fmt,
+				  unsigned int *speed)
+{
+    OSStatus		error = 0;
+
+    DebugPrintf("Init Speed : %d\n",*speed);
+
+    //*fmt = AL_FORMAT_STEREO16;
+    //*speed = (unsigned int)libGlobals.deviceFormat.mSampleRate;
+
+    alWriteFormat = *fmt;
+
+    /* defines what the AL buffer size should be */
+    switch(alWriteFormat)
+    {
+	case AL_FORMAT_STEREO8:*bufsiz = libGlobals.deviceWBufferSize/4;
+                                DebugPrintf("Init fmt : AL_FORMAT_STEREO8\n");
+        break;
+	case AL_FORMAT_MONO16: *bufsiz = libGlobals.deviceWBufferSize/4;
+                                DebugPrintf("Init fmt : AL_FORMAT_MONO16\n");
+	break;
+
+	case AL_FORMAT_STEREO16: *bufsiz = libGlobals.deviceWBufferSize/2;
+                                DebugPrintf("Init fmt : AL_FORMAT_STEREO16\n");
+	break;
+
+	case AL_FORMAT_MONO8: *bufsiz = libGlobals.deviceWBufferSize/8;
+                                DebugPrintf("Init fmt : AL_FORMAT_MONO8\n");
+	break;
+
+	default: break;
+    }
+    *bufsiz /= ((unsigned int)libGlobals.deviceFormat.mSampleRate) / *speed;
+
+    alWriteSpeed = *speed;
+    ratio = ((unsigned int)libGlobals.deviceFormat.mSampleRate) / *speed;
+    nativePreferedBuffSize = *bufsiz;
+
+    /* start playing sound through the device */
+    error = AudioDeviceStart(libGlobals.deviceW, deviceFillingProc);
+    if (error != 0) return NULL;
+
+    return AL_TRUE;
+}
+
+
+static ALboolean set_read_native(UNUSED(void *handle), UNUSED(unsigned int *bufsiz), UNUSED(unsigned int *fmt), UNUSED(unsigned int *speed))
+{
+    implement_me("ALboolean set_read_native()");
+    return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesNative_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_native(handle, bufsiz, fmt, speed) :
+		set_write_native(handle, bufsiz, fmt, speed);
+}
+
+void  native_blitbuffer(void *handle, void *data, int bytes)
+{
+    stillToPlay = bytes / nativePreferedBuffSize;
+
+    if (handle == NULL) return;
+
+    if (coreAudioDestination == 0)
+    {
+        fprintf(stderr,"Something wrong happened between CoreAudio and OpenAL.\n");
+        return;
+    }
+
+    // Gyom FIXME: Is this useful?
+    assert(nativePreferedBuffSize <= bytes);
+
+    playABuffer(data);
+}
+
+void playABuffer(void *realdata)
+{
+    register unsigned int 	count;
+    register Float32	*outDataPtr = coreAudioDestination;
+    register SInt16	*inDataPtr16;
+    register SInt8	*inDataPtr8;
+    static void * data;
+
+    if (realdata!=NULL) data = realdata;
+
+    inDataPtr16 = (SInt16*)(data);
+    inDataPtr8 = (SInt8*)(data);
+
+    stillToPlay--;
+
+    switch(alWriteFormat)
+    {
+        int i;
+        case AL_FORMAT_STEREO16:
+            assert(nativePreferedBuffSize <= libGlobals.deviceWBufferSize/2);
+            for (count = nativePreferedBuffSize/2; count > 0; count--)
+            {
+                for (i = ratio; i>0; i--)
+                {
+                    *outDataPtr = ((Float32)(*inDataPtr16))/32767.0;
+                    outDataPtr++;
+                }
+                inDataPtr16++;
+            }
+                data = inDataPtr16;
+                break;
+
+        case AL_FORMAT_MONO16:
+            assert(nativePreferedBuffSize <= libGlobals.deviceWBufferSize/2);
+            for (count = nativePreferedBuffSize/2; count >0; count--)
+            {
+                for (i = ratio*2; i>0; i--)
+                {
+                    *outDataPtr = ((Float32)(*inDataPtr16))/32767.0;
+                    outDataPtr++;
+                }
+                inDataPtr16++;
+            }
+                data = inDataPtr16;
+                break;
+
+        case AL_FORMAT_STEREO8:
+            assert(nativePreferedBuffSize <= libGlobals.deviceWBufferSize);
+            for (count = nativePreferedBuffSize; count >0; count--)
+            {
+                for (i = ratio; i>0; i--)
+                {
+                    *outDataPtr = ((Float32)(*inDataPtr8))/32767.0;
+                    outDataPtr++;
+                }
+                inDataPtr8++;
+            }
+                data = inDataPtr8;
+                break;
+
+        case AL_FORMAT_MONO8:
+            assert(nativePreferedBuffSize <= libGlobals.deviceWBufferSize);
+            for (count = nativePreferedBuffSize; count >0; count--)
+            {
+                for (i = ratio*2; i>0; i--)
+                {
+                    *outDataPtr = ((Float32)(*inDataPtr8))/32767.0;
+                    outDataPtr++;
+                }
+                inDataPtr8++;
+            }
+                data = inDataPtr8;
+                break;
+
+        default:
+            DebugPrintf("Format not recognized... Try again ;-)");
+            break;
+    }
+}
+
+
+
+void  release_native(void *handle)
+{
+    if (libGlobals.deviceW == *(AudioDeviceID*)handle)
+    {
+        AudioDeviceStop(libGlobals.deviceW, deviceFillingProc);
+	AudioDeviceRemoveIOProc(libGlobals.deviceW, deviceFillingProc);
+    }
+}
+
+ALfloat get_nativechannel(UNUSED(void *handle), UNUSED(ALuint channel))
+{
+    implement_me("float get_nativechannel()");
+    return 0;
+}
+
+int set_nativechannel(UNUSED(void *handle),UNUSED(ALuint channel),UNUSED(ALfloat volume))
+{
+    implement_me("int set_nativechannel()");
+    return 0;
+}
+
+void pause_nativedevice(void *handle) /* Not tested :-( */
+{
+    if (libGlobals.deviceW == *(AudioDeviceID*)handle)
+	AudioDeviceStop(libGlobals.deviceW, deviceFillingProc);
+}
+
+void resume_nativedevice(void *handle) /* Not tested :-( */
+{
+    if (libGlobals.deviceW == *(AudioDeviceID*)handle)
+	AudioDeviceStart(libGlobals.deviceW, deviceFillingProc);
+}
+
+ALsizei capture_nativedevice(UNUSED(void *handle), UNUSED(void *capture_buffer), UNUSED(int bufsiz))
+{
+    implement_me("void capture_nativedevice()");
+    return NULL;
+}
Index: /openal-0.0.8/src/backends/alc_backend_esd.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_esd.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_esd.c	(revision 17)
@@ -0,0 +1,367 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * esd.c
+ *
+ * esd backend.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "al_main.h"
+#include "al_debug.h"
+
+#include "backends/alc_backend.h"
+
+#include "alc/alc_context.h"
+
+#ifdef OPENAL_DLOPEN_ESD
+#include <dlfcn.h>
+#endif
+
+#include <esd.h>
+
+#define DEF_SPEED	_ALC_CANON_SPEED
+#define DEF_SIZE	_AL_DEF_BUFSIZ
+#define DEF_SAMPLES     (DEF_SIZE / 2)
+#define DEF_CHANNELS	2
+#define DEF_FORMAT      AL_FORMAT_STEREO16
+
+#define ESD_KEY        "openal"
+#define ESD_NAMELEN    1024
+
+static const char *genesdkey(void);
+static int openal_load_esd_library(void);
+
+
+/*
+ * ESD library functions.
+ */
+static int (*pesd_open_sound)( const char *host );
+static int (*pesd_play_stream)( esd_format_t format, int rate, 
+		     const char *host, const char *name );
+static int (*pesd_standby)( int esd );
+static int (*pesd_resume)( int esd );
+static int (*pesd_close)( int esd );
+
+/*
+ * ESD library handle.
+ */
+static void * esd_lib_handle = NULL;
+
+static int openal_load_esd_library(void)
+{
+#ifdef OPENAL_DLOPEN_ESD
+        char * error = NULL;
+#endif
+    
+	if (esd_lib_handle != NULL)
+		return 1;  /* already loaded. */
+
+	#ifdef OPENAL_DLOPEN_ESD
+		#define OPENAL_LOAD_ESD_SYMBOL(x) p##x = dlsym(esd_lib_handle, #x); \
+                                                   error = dlerror(); \
+                                                   if (p##x == NULL) { \
+                                                           fprintf(stderr,"Could not resolve ESoundD symbol %s: %s\n", #x, ((error!=NULL)?(error):("(null)"))); \
+                                                           dlclose(esd_lib_handle); esd_lib_handle = NULL; \
+                                                           return 0; }
+                dlerror(); /* clear error state */
+		esd_lib_handle = dlopen("libesd.so", RTLD_LAZY | RTLD_GLOBAL);
+                error = dlerror();
+		if (esd_lib_handle == NULL) {
+                        fprintf(stderr,"Could not open ESoundD library: %s\n",((error!=NULL)?(error):("(null)")));
+			return 0;
+                }
+        #else
+		#define OPENAL_LOAD_ESD_SYMBOL(x) p##x = x;
+		esd_lib_handle = (void *) 0xF00DF00D;
+	#endif
+
+        OPENAL_LOAD_ESD_SYMBOL(esd_open_sound);
+        OPENAL_LOAD_ESD_SYMBOL(esd_standby);
+        OPENAL_LOAD_ESD_SYMBOL(esd_resume);
+        OPENAL_LOAD_ESD_SYMBOL(esd_play_stream);
+        OPENAL_LOAD_ESD_SYMBOL(esd_close);
+                
+	return 1;
+}
+
+static fd_set esd_fd_set;
+
+typedef struct esd_info_s {
+	esd_format_t fmt;
+	ALuint speed;
+	const char *espeaker;
+	char name[ESD_NAMELEN];
+	int socket;
+
+	ALboolean paused;
+	int esdhandle; /* esd handle */
+} esd_openal_info_t;
+
+static esd_openal_info_t esd_info;
+
+static void *grab_write_esd(void) {
+	esd_format_t fmt;
+	int socket;
+	const char *esdkey = genesdkey();
+	const char *espeaker = getenv("ESPEAKER");
+	int esd;
+
+        if (!openal_load_esd_library()) {
+                return NULL;
+        }
+    
+	esd = pesd_open_sound(espeaker);
+	if(esd < 0) {
+		fprintf(stderr, "esd open sound failed.\n");
+		return NULL;
+	}
+
+	fmt = ESD_STREAM | ESD_PLAY;
+
+	switch(DEF_CHANNELS) {
+		case 1: fmt |= ESD_MONO; break;
+		case 2: fmt |= ESD_STEREO; break;
+		default: break;
+	}
+
+	switch(_alGetBitsFromFormat(DEF_FORMAT)) {
+		case 8:  fmt |= ESD_BITS8; break;
+		case 16: fmt |= ESD_BITS16; break;
+		default: break;
+	}
+
+	socket = pesd_play_stream(fmt, DEF_SPEED, espeaker, esdkey);
+
+	if(socket < 0) {
+		fprintf(stderr, "esd play stream failed.\n");
+		return NULL;
+	}
+
+	fprintf(stderr, "esd grab audio ok\n");
+
+	_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+		"esd grab audio ok");
+
+	esd_info.speed     = DEF_SPEED;
+	esd_info.fmt       = fmt;
+	esd_info.socket    = socket;
+	esd_info.espeaker  = espeaker;
+	esd_info.paused    = AL_FALSE;
+	esd_info.esdhandle = esd;
+
+	strncpy(esd_info.name, esdkey, ESD_NAMELEN);
+
+        return &esd_info;
+}
+
+static void *grab_read_esd(void) {
+	return NULL;
+}
+
+void *
+alcBackendOpenESD_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_esd() : grab_write_esd();
+}
+
+void esd_blitbuffer(void *handle, void *dataptr, int bytes_to_write)  {
+	esd_openal_info_t *eh;
+	struct timeval tv = { 0, 9000000 };
+	int iterator = 0;
+	int err;
+	int fd;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	eh = (esd_openal_info_t *) handle;
+
+	if(eh->paused == AL_TRUE) {
+		/* don't write to paused audio devices, just sleep */
+		tv.tv_usec = 10000;
+
+		select(0, NULL, NULL, NULL, &tv);
+
+		return;
+	}
+
+	fd = eh->socket;
+
+	for(iterator = bytes_to_write; iterator > 0; ) {
+		FD_ZERO(&esd_fd_set);
+		FD_SET(fd, &esd_fd_set);
+
+		err = select(fd + 1, NULL, &esd_fd_set, NULL, &tv);
+		if(FD_ISSET(fd, &esd_fd_set) == 0) {
+			/* timeout occured, don't try and write */
+			fprintf(stderr, "esd_blitbuffer: timeout occured\n");
+
+			assert(0);
+			return;
+		}
+
+		assert(iterator > 0);
+		assert(iterator <= bytes_to_write);
+
+		err = write(fd,
+			    (char *) dataptr + bytes_to_write - iterator,
+			    iterator);
+		if(err < 0) {
+			assert(0);
+#ifdef DEBUG_MAXIMUS
+			perror("write");
+#endif
+			return;
+		}
+
+		iterator -= err;
+	};
+
+        return;
+}
+
+void release_esd(void *handle) {
+	esd_openal_info_t *eh;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	eh = (esd_openal_info_t *) handle;
+
+	pesd_close(eh->esdhandle);
+
+	return;
+}
+
+static const char *genesdkey(void) {
+	static char retval[ESD_NAMELEN];
+
+	snprintf(retval, sizeof(retval), "openal-%d\n", (int) getpid());
+
+	return retval;
+}
+
+void pause_esd(void *handle) {
+	esd_openal_info_t *eh;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	eh = (esd_openal_info_t *) handle;
+
+	eh->paused = AL_TRUE;
+	pesd_standby(eh->esdhandle);
+
+	return;
+}
+
+void resume_esd(void *handle) {
+	esd_openal_info_t *eh;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	eh = (esd_openal_info_t *) handle;
+
+	eh->paused = AL_FALSE;
+	pesd_resume(eh->esdhandle);
+
+	return;
+}
+
+static ALboolean set_write_esd(UNUSED(void *handle),
+			       UNUSED(ALuint *bufsiz),
+			       ALenum *fmt,
+			       ALuint *speed) {
+	esd_openal_info_t *eh;
+	int socket;
+	ALuint chans = _alGetChannelsFromFormat(*fmt);
+
+	if(handle == NULL) {
+		return AL_FALSE;
+	}
+
+	eh = (esd_openal_info_t *) handle;
+
+	close(eh->socket);
+
+	eh->fmt = ESD_STREAM | ESD_PLAY;
+
+	switch(chans) {
+		case 1: eh->fmt |= ESD_MONO; break;
+		case 2: eh->fmt |= ESD_STEREO; break;
+		default: break;
+	}
+
+	switch(_alGetBitsFromFormat(*fmt)) {
+		case 8:  eh->fmt |= ESD_BITS8; break;
+		case 16: eh->fmt |= ESD_BITS16; break;
+		default: break;
+	}
+
+	eh->speed = *speed;
+
+	socket = pesd_play_stream(eh->fmt,
+				 eh->speed,
+				 eh->espeaker,
+				 eh->name);
+	if(socket < 0) {
+		return AL_FALSE;
+	}
+
+	eh->socket = socket;
+	eh->paused = AL_FALSE;
+
+        return AL_TRUE;
+}
+
+static ALboolean set_read_esd(UNUSED(void *handle),
+			      UNUSED(ALuint *bufsiz),
+			      UNUSED(ALenum *fmt),
+			      UNUSED(ALuint *speed)) {
+	return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesESD_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_esd(handle, bufsiz, fmt, speed) :
+		set_write_esd(handle, bufsiz, fmt, speed);
+}
+
+ALsizei
+capture_esd( UNUSED(void *handle), UNUSED(void *capture_buffer), UNUSED(int bufsiz) )
+{
+	return 0;
+}
+
+ALfloat
+get_esdchannel( UNUSED(void *handle), UNUSED(ALuint channel) )
+{
+	return 0.0;
+}
+
+int
+set_esdchannel( UNUSED(void *handle), UNUSED(ALuint channel), UNUSED(ALfloat volume) )
+{
+	return 0;
+}
Index: /openal-0.0.8/src/backends/alc_backend_irix.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_irix.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_irix.c	(revision 17)
@@ -0,0 +1,709 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * iris.c
+ *
+ * functions related to the aquisition and management of the DMedia
+ * audio on IRIX.
+ *
+ * This file is in the Public Domain and comes with no warranty.
+ * Erik Hofman <erik@ehofman.com>
+ *
+ * For more information, please visit:
+ * http://www.sgi.com/tech/faq/audio/general.html
+ *
+ */
+
+/*
+ * Only Indy, Indogo2 and Onyx Audio/Serial Option (ASO) can
+ * natively handle 4 channel (surround sound) audio.
+ *
+ * Adding 4 channel audio support is possible by adding the following
+ * definition to your ~/.openalrc file:
+ *     (define speaker-num 4) 
+ *
+ * It is also possible to specify the default output port by adding
+ * the following definition:
+ *     (define dmedia-out-device "Analog Out")
+ *
+ * When your system doesn't support four channel audio by default, but
+ * it does contain (at least) two different output ports you could
+ * enable four channel audio by difining two separate ports:
+ *     (define dmedia-out-device "Analog Out")
+ *     (define dmedia-rear-out-device "Analog Out 2")
+ *
+ * or alternatively by selecting two different interfaces:
+ *     (define dmedia-out-device "A3.Speaker")
+ *     (define dmedia-rear-out-device "A3.LineOut2")
+ *
+ * see "man 3dm alResources" for more information.
+ */
+
+/*
+ * Known problems:
+ *
+ * 1 channel audio doesn't work as expected.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <dmedia/audio.h>
+#include <errno.h>
+
+/* dmedia complains */
+#define SGI_AL_CHANNELS	AL_CHANNELS
+#define SGI_AL_GAIN	AL_GAIN
+#undef AL_CHANNELS
+#undef AL_GAIN
+#undef AL_VERSION
+#undef AL_INVALID_VALUE
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alext.h>
+
+#include "backends/alc_backend.h"
+
+#include "al_config.h"
+#include "al_main.h"
+#include "al_debug.h"
+
+#include "alc/alc_context.h"
+
+/*
+ * Type definitions
+ */
+typedef struct {
+    ALport port;
+    ALconfig config;
+
+    int device;
+    char *name;
+    unsigned int sampleWidth;
+    unsigned int sampleRate;
+    unsigned int numChannels;
+    stamp_t offset;
+
+    unsigned int _numChannels_init;
+    unsigned int _numChannels_avail;
+} _ALdevice;
+
+typedef struct {
+    _ALdevice input;
+    _ALdevice *output;
+    unsigned int numOutputPorts;
+} _ALhandle;
+
+/* Temporary storage buffer size */
+#define BUF_SIZE	64
+#define MAX_DELTA	8
+#define CHECK_FRAMES	4
+#define MAX_DEVICES	2
+
+/*
+ * Local funtion foreward declaration.
+ */
+static void check_sync(void *handle);
+static void sync_ports(void *handle);
+static int grab_device_byname(const char *name);
+
+
+/*
+ * Fallback function
+ */
+ALC_BackendPrivateData *alcBackendOpenNative_ (ALC_OpenMode mode)
+{
+   return NULL;
+}
+
+
+/*
+ * Driver functions
+ */
+
+static void *grab_read_dmedia(void)
+{
+    _ALhandle *alh;
+
+    alh = (_ALhandle *)calloc(1, sizeof(_ALhandle));
+    if (alh == NULL)
+    {
+        _alDebug(ALD_MAXIMUS, __FILE__, __LINE__, "Insufficient memory.\n");
+        return NULL;
+    }
+
+
+    alh->input.name = "dmedia-in-device";
+    alh->input.device = AL_DEFAULT_INPUT;
+    alh->input.sampleWidth = 16;
+    alh->input._numChannels_avail = 2;
+    alh->input.numChannels = 2;
+
+    alh->input.device = grab_device_byname(alh->input.name);
+    if (alh->input.device <= 0)
+    {
+        release_dmedia(alh);
+        return NULL;
+    }
+
+    return NULL; /* (void *)alh; */
+}
+
+static void *grab_write_dmedia(void)
+{
+    _ALhandle *alh;
+    ALpv params[2];
+    int i, res;
+
+    alh = (_ALhandle *)calloc(1, sizeof(_ALhandle));
+    if (alh == NULL)
+    {
+        _alDebug(ALD_MAXIMUS, __FILE__, __LINE__, "Insufficient memory.\n");
+        return NULL;
+    }
+
+
+    /*
+     * Read the configuration file and request the proper device(s) or
+     * interface(s).
+     */
+    alh->numOutputPorts = 1;
+    alh->output = (_ALdevice *)calloc(MAX_DEVICES, sizeof(_ALdevice));
+    alh->output[0].name = "dmedia-out-device";
+    alh->output[0].sampleWidth = 16;
+    alh->output[0]._numChannels_avail = 2;
+    alh->output[0].numChannels = 2;
+
+    alh->output[0].device = grab_device_byname(alh->output[0].name);
+    if (alh->output[0].device <= 0)
+    {
+       if (alh->output[0].device < 0)
+       {
+           release_dmedia(alh);
+           return NULL;
+       }
+
+        alh->output[0].device = AL_DEFAULT_OUTPUT;
+    }
+
+#if MAX_DEVICES >= 2
+    alh->output[1].name = "dmedia-rear-out-device";
+    alh->output[1].device = grab_device_byname(alh->output[1].name);
+    if (alh->output[1].device < 0)
+    {
+       return AL_FALSE;
+    }
+    if (alh->output[1].device > 0)
+        alh->numOutputPorts++;
+#endif
+
+    for (i=0; i < alh->numOutputPorts; i++)
+    {
+        /*
+         * Store the default configuration to restore it when finished.
+         */
+        params[0].param = AL_CHANNEL_MODE;
+        res = alGetParams(alh->output[i].device, params, 1);
+        if ((res >= 0) && (params[0].sizeOut >= 0))
+            alh->output[i]._numChannels_init = params[0].value.i;
+
+        /*
+         * find out how many channels the device is.
+         */
+        params[0].param = SGI_AL_CHANNELS;
+        res = alGetParams(alh->output[i].device, params, 1);
+        if ((res >= 0) && (params[0].sizeOut >= 0))
+        {
+            alh->output[i]._numChannels_avail = params[0].value.i;
+            alh->output[i].numChannels = params[0].value.i;
+        }
+    }
+
+
+    /*
+     * Create a new config that remains available until exit.
+     * Only the master port has a configurtion assigned to it.
+     * All slave ports share the same config.
+     */
+    
+    alh->output[0].config = alNewConfig();
+    if (alh->output[0].config == NULL)
+    {
+        _alDebug(ALD_MAXIMUS, __FILE__, __LINE__, alGetErrorString(oserror()));
+        return AL_FALSE;
+    }
+
+    return (void *)alh;
+}
+
+void *
+alcBackendOpenDMedia_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_dmedia() : grab_write_dmedia();
+}
+
+void dmedia_blitbuffer(void *handle,
+                      void *dataptr,
+                      int bytes_to_write)
+{
+    static int check_ = CHECK_FRAMES;
+    _ALhandle *alh = (_ALhandle *)handle;
+    int sample_width = (alh->output[0].sampleWidth / 8);
+    int frame_size = sample_width * alh->output[0].numChannels;
+    int frames_to_write, frame_no, i;
+    char **buf, *ptr;
+
+    if (alh->numOutputPorts == 1)
+    {
+        alWriteFrames(alh->output[0].port, dataptr, bytes_to_write/frame_size);
+        return;
+    }
+
+#if MAX_DEVICES >= 2
+    /*
+     * Setup a buffer for each audio port.
+     */
+    frames_to_write = bytes_to_write / alh->numOutputPorts;
+
+    buf = (char **)calloc(alh->numOutputPorts, sizeof(char *));
+    for (i=0; i < alh->numOutputPorts; i++)
+        buf[i] = malloc(frames_to_write);
+
+    /*
+     * Fill the buffers in the appropriate format.
+     */
+    ptr = dataptr;
+    for(frame_no = 0; frame_no < frames_to_write; frame_no += frame_size)
+    {
+        for (i=0; i < alh->numOutputPorts; i++)
+        {
+            memcpy(&buf[i][frame_no], ptr, frame_size);
+            ptr += frame_size;
+        }
+        
+    }
+
+
+    /*
+     * Sent the data to the appropriate output port and clean up the buffers.
+     */
+    for (i=0; i < alh->numOutputPorts; i++)
+    {
+        alWriteFrames(alh->output[i].port, buf[i], frames_to_write/frame_size);
+        free(buf[i]);
+    }
+    free(buf);
+
+    if (! --check_)
+    {
+        check_ = CHECK_FRAMES;
+        check_sync(handle);
+    }
+#endif
+}
+
+void release_dmedia(void *handle)
+{
+    _ALhandle *alh = (_ALhandle *)handle;
+    ALpv params;
+    int i;
+
+    if (alh->output[0].config != NULL) {
+        alFreeConfig(alh->output[0].config);
+        alh->output[0].config = NULL;
+    }
+
+    for (i=0; i < alh->numOutputPorts; i++)
+    {
+        params.param = AL_CHANNEL_MODE;
+        params.value.i = alh->output[i]._numChannels_init;
+        if(alh->output[i]._numChannels_init > 0)
+            alSetParams(alh->output[i].device, &params, 1);
+
+        if (alh->output[i].port != NULL) {
+            alClosePort(alh->output[i].port);
+            alh->output[i].port = NULL;
+        }
+    }
+
+    if (alh->output != NULL) {
+        free(alh->output);
+        alh->output = NULL;
+    }
+
+    if (alh->input.config != NULL) {
+        alFreeConfig(alh->input.config);
+        alh->input.config = NULL;
+    }
+
+    if (alh->input.port != NULL) {
+        alClosePort(alh->input.port);
+        alh->input.port = NULL;
+    }
+
+    if (alh != NULL) {
+        free(alh);
+        alh = NULL;
+    }
+}
+
+int set_dmediachannel(UNUSED(void *handle),
+                      UNUSED(ALuint channel),
+                      UNUSED(ALfloat volume))
+{
+    return 0;
+}
+
+void pause_dmedia(void *handle)
+{
+    _ALhandle *alh = (_ALhandle *)handle;
+    ALpv params;
+    int i;
+
+    params.param = AL_RATE;
+    params.value.i = 0;
+    alSetParams(alh->input.device, &params, 1);
+
+    for (i=0; i < alh->numOutputPorts; i++)
+        alSetParams(alh->output[i].device, &params, 1);
+
+    if (alh->numOutputPorts > 1)
+        sync_ports(handle);
+
+    return;
+}
+
+void resume_dmedia(void *handle)
+{
+    _ALhandle *alh = (_ALhandle *)handle;
+    ALpv params;
+    int i;
+
+    if (alh->numOutputPorts > 1)
+        sync_ports(handle);
+
+    params.param = AL_INPUT_RATE;
+    params.value.i = alh->input.sampleRate;
+    alSetParams(alh->input.device, &params, 1);
+
+    params.param = AL_OUTPUT_RATE;
+    params.value.i = alh->output[0].sampleRate;
+    for (i=0; i < alh->numOutputPorts; i++)
+        alSetParams(alh->output[i].device, &params, 1);
+
+    return;
+}
+
+ALfloat get_dmediachannel(UNUSED(void *handle), UNUSED(ALuint channel))
+{
+    return 0.0;
+}
+
+/* capture data from the audio device */
+ALsizei capture_dmedia(UNUSED(void *handle),
+                             UNUSED(void *capture_buffer),
+                             UNUSED(int bufsiz))
+{
+    return 0;
+}
+
+static ALboolean set_write_dmedia(void *handle,
+				  unsigned int *bufsiz,
+				  ALenum *fmt,
+				  unsigned int *speed)
+{
+    _ALhandle *alh = (_ALhandle *)handle;
+    ALuint channels = _alGetChannelsFromFormat(*fmt);
+    unsigned int data_format;
+    ALpv params[2];
+    int i, result;
+
+    if (alh->output[0]._numChannels_avail >= channels)
+        alh->numOutputPorts = 1;
+
+    switch(*fmt) {
+    case AL_FORMAT_MONO8:
+    case AL_FORMAT_STEREO8:
+    case AL_FORMAT_QUAD8_LOKI:
+        data_format = AL_SAMPLE_8;
+        alh->output[0].sampleWidth = 8;
+        break;
+    case AL_FORMAT_MONO16:
+    case AL_FORMAT_STEREO16:
+    case AL_FORMAT_QUAD16_LOKI:
+        data_format = AL_SAMPLE_16;
+        alh->output[0].sampleWidth = 16;
+        break;
+    default:
+        _alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+                 "Unsuported audio format: %d\n", *fmt);
+        return AL_FALSE;
+    }
+
+    /*
+     * Change the playback sample rate
+     */
+    alh->output[0].sampleRate = *speed;
+    params[0].param = AL_MASTER_CLOCK;
+    params[0].value.i = AL_MCLK_TYPE;
+    params[1].param = AL_RATE;
+    params[1].value.i = alh->output[0].sampleRate;
+    for(i=0; i < alh->numOutputPorts; i++)
+        result = alSetParams(alh->output[i].device, params, 2);
+
+
+    if (alh->output[0].config != NULL)
+    {
+        alFreeConfig(alh->output[0].config);
+        alh->output[0].config = alNewConfig();
+        if (alh->output[0].config == NULL)
+        {
+            _alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+                     alGetErrorString(oserror()));
+            return AL_FALSE;
+        }
+    }
+
+
+    if (alh->output[0].port == NULL) 	/* Only if port not initialized */
+    {
+        alh->output[0].numChannels = channels/alh->numOutputPorts;
+        if (alh->output[0].numChannels <= 1)
+            alh->output[0].numChannels = 2;
+
+        for (i=0; i < alh->numOutputPorts; i++)
+        {
+            params[0].param = AL_CHANNEL_MODE;
+            params[0].value.i = alh->output[0].numChannels;
+            alSetParams(alh->output[i].device,params, 1);
+        }
+
+        /*
+         * Change the size of the audio queue
+         * and the number of audio channels.
+         */
+        result = alSetChannels(alh->output[0].config, alh->output[0].numChannels);
+        alSetQueueSize(alh->output[0].config, alh->output[0].sampleRate*alh->output[0].numChannels/10);
+    }
+
+    alSetSampFmt(alh->output[0].config, AL_SAMPFMT_TWOSCOMP);
+    alSetWidth(alh->output[0].config, data_format);
+
+    /*
+     * Alter configuration parameters, if possible
+     */
+    if (alh->output[0].port == NULL)
+    {
+
+        for (i=0; i < alh->numOutputPorts; i++)
+        {
+            alSetDevice(alh->output[0].config, alh->output[i].device);
+            /*
+             * Now attempt to open an audio output port using this config
+             */
+            alh->output[i].port = alOpenPort(alh->output[i].name, "w",
+                                             alh->output[0].config);
+
+            if (alh->output[i].port == NULL)
+            {
+                _alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+                         alGetErrorString(oserror()));
+                return AL_FALSE;
+            }
+        }
+    }
+    else
+    {
+
+        for (i=0; i < alh->numOutputPorts; i++)
+        {
+            alSetDevice(alh->output[0].config, alh->output[i].device);
+            result = alSetConfig(alh->output[i].port, alh->output[0].config);
+            if (result == NULL)
+            {
+                _alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+                         alGetErrorString(oserror()));
+                return AL_FALSE;
+            }
+        }
+    }
+
+    if (alh->numOutputPorts > 1)
+        sync_ports(alh);
+
+    return AL_TRUE;
+}
+
+static ALboolean set_read_dmedia(UNUSED(void *handle),
+				 UNUSED(unsigned int *bufsiz),
+				 UNUSED(ALenum *fmt),
+				 UNUSED(unsigned int *speed))
+{
+    return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesDMedia_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_dmedia(handle, bufsiz, fmt, speed) :
+		set_write_dmedia(handle, bufsiz, fmt, speed);
+}
+
+/*
+ * Local function definitions
+ */
+static void check_sync(void *handle)
+{
+    _ALhandle *alh = (_ALhandle *)handle;
+    stamp_t msc[MAX_DEVICES];
+    int need_sync = 0;
+    stamp_t buf_delta_msc;
+    stamp_t ref_delta_msc;
+    int i;
+
+    if (alh->numOutputPorts == 1)
+        return;
+
+    /*
+     * Get the sample frame number associated with
+     * each port.
+     */
+    for (i = 0; i < alh->numOutputPorts; i++) {
+        alGetFrameNumber(alh->output[i].port, &msc[i]);
+    }
+
+    ref_delta_msc = msc[0];
+
+    for (i = 0; i < alh->numOutputPorts; i++) {
+        /*
+         * For each port, see how far ahead or behind
+         * the first port we are, and keep track of the
+         * maximum. in a moment, we'll bring all the ports to this
+         * number.
+         */
+        buf_delta_msc = msc[i] - alh->output[i].offset;
+        if (abs(buf_delta_msc - ref_delta_msc) > MAX_DELTA) {
+            need_sync++;
+        }
+    }
+
+    if (need_sync) {
+        sync_ports(handle);
+    }
+}
+
+static void sync_ports(void *handle)
+{
+    _ALhandle *alh = (_ALhandle *)handle;
+    double nanosec_per_frame = (1000000000.0)/alh->output[0].sampleRate;
+    stamp_t buf_delta_msc;
+    stamp_t msc[MAX_DEVICES];
+    stamp_t ust[MAX_DEVICES];
+    int corrected;
+    int i;
+
+    /*
+     * Get UST/MSC (time & sample frame number) pairs for the
+     * device associated with each port.
+     */
+    for (i = 0; i < alh->numOutputPorts; i++) {
+        alGetFrameTime(alh->output[i].port, &msc[i], &ust[i]);
+    }
+
+    /*
+     * We consider the first device to be the "master" and we
+     * calculate, for each other device, the sample frame number
+     * on that device which has the same time as ust[0] (the time
+     * at which sample frame msc[0] went out on device 0).
+     *
+     * From that, we calculate the sample frame offset between
+     * contemporaneous samples on the two devices. This remains
+     * constant as long as the devices don't drift.
+     *
+     * If the port i is connected to the same device as port 0, you should
+     * see offset[i] = 0.
+     */
+
+    /* alh->output[0].offset = 0;         / * by definition */
+    for (i = 0; i < alh->numOutputPorts; i++) {
+        stamp_t msc0 = 
+           msc[i] + (stamp_t)((double) (ust[0] - ust[i]) / (nanosec_per_frame));
+        alh->output[i].offset = msc0 - msc[0];
+    }
+
+    do {
+        stamp_t max_delta_msc;
+        corrected = 0;
+
+        /*
+         * Now get the sample frame number associated with
+         * each port.
+         */
+        for (i = 0; i < alh->numOutputPorts; i++) {
+            alGetFrameNumber(alh->output[i].port, &msc[i]);
+        }
+
+        max_delta_msc = msc[0];
+        for (i = 0; i < alh->numOutputPorts; i++) {
+            /*
+             * For each port, see how far ahead or behind
+             * the furthest port we are, and keep track of the
+             * minimum. in a moment, we'll bring all the ports to this
+             * number.
+             */
+            buf_delta_msc = msc[i] - alh->output[i].offset;
+            if (max_delta_msc < buf_delta_msc) {
+                max_delta_msc = buf_delta_msc;
+            }
+        }
+
+        for (i = 0; i < alh->numOutputPorts; i++) {
+            buf_delta_msc = msc[i] - alh->output[i].offset;
+            if (abs(buf_delta_msc - max_delta_msc) > MAX_DELTA ) {
+                alDiscardFrames(alh->output[i].port,
+                                (int)(max_delta_msc-buf_delta_msc));
+                corrected++;
+            }
+        }
+    } while (corrected);
+}
+
+static int grab_device_byname(const char *name)
+{
+    int device = 0;
+    Rcvar rcv;
+
+    if ((rcv = rc_lookup(name)) != NULL)
+    {
+        char buf[BUF_SIZE];
+        ALpv params[2];
+
+        rc_tostr0(rcv, buf, BUF_SIZE);
+        device = alGetResourceByName(AL_SYSTEM, buf, AL_DEVICE_TYPE);
+        if (device)
+        {
+            int res;
+            /*
+             * if the name refers to an interface, select that interface
+             * on the device
+             */
+            if (res = alGetResourceByName(AL_SYSTEM, buf, AL_INTERFACE_TYPE))
+            {
+                params[0].param = AL_INTERFACE;
+                params[0].value.i = res;
+                alSetParams(device, params, 1);
+            }
+        }
+        else
+        {
+            device = -1;
+            _alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+                     alGetErrorString(oserror()));
+        }
+
+    }
+
+    return device;
+}
Index: /openal-0.0.8/src/backends/alc_backend_linux.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_linux.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_linux.c	(revision 17)
@@ -0,0 +1,704 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * lin_dsp.c
+ *
+ * functions related to the aquisition and management of /dev/dsp under
+ * linux.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alext.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <linux/soundcard.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "al_config.h"
+#include "al_main.h"
+#include "al_debug.h"
+#include "alc/alc_context.h"
+#include "backends/alc_backend.h"
+
+#ifdef WORDS_BIGENDIAN
+#define AFMT_S16 AFMT_S16_BE
+#else
+#define AFMT_S16 AFMT_S16_LE
+#endif /* WORDS_BIGENDIAN */
+
+/*
+ * DONTCARE was (1 << 16), but that breaks 4Front's commercial drivers.
+ *  According to their reference manual, it musts be (2 << 16) or higher
+ *  or it is ignored, which is not good. Thanks to 4Front for tracking this
+ *  down.   --ryan.
+ */
+#define DONTCARE ( 8 << 16)
+
+/* convert an alc channel to a linux dsp channel */
+static int alcChannel_to_dsp_channel(ALCenum alcc);
+
+/* /dev/dsp variables */
+static fd_set dsp_fd_set;
+static int mixer_fd    = -1; /* /dev/mixer file read/write descriptor */
+static ALboolean use_select = AL_TRUE;
+
+/* gets user prefered path */
+static const char *lin_getwritepath(void);
+static const char *lin_getreadpath(void);
+static int aquire_read(void);
+static int grab_mixerfd(void);
+static int try_to_open(const char **paths, int n_paths, const char **used_path, int mode);
+
+/* set the params associated with a file descriptor */
+static int set_fd(int dsp_fd, ALboolean readable,
+			      ALuint *bufsiz,
+			      ALuint *fmt,
+			      ALuint *speed,
+			      ALuint *channels);
+
+
+/* convert the format channel from /dev/dsp to openal format */
+static int LIN2ALFMT(int fmt, int channels)
+{
+	switch(fmt)
+	{
+		case AFMT_U8:
+			switch(channels)
+			{
+				case 1: return AL_FORMAT_MONO8;
+				case 2: return AL_FORMAT_STEREO8;
+				case 4: return AL_FORMAT_QUAD8_LOKI;
+				default: return -1;
+			}
+		case AFMT_S16:
+			switch(channels)
+			{
+				case 1: return AL_FORMAT_MONO16;
+				case 2: return AL_FORMAT_STEREO16;
+				case 4: return AL_FORMAT_QUAD16_LOKI;
+				default: return -1;
+			}
+		default:
+#ifdef DEBUG_MAXIMUS
+			fprintf(stderr, "unsupported dsp format\n");
+#endif
+			return -1;
+	}
+}
+
+/* convert the format channel from openal to /dev/dsp format */
+static int AL2LINFMT(int fmt)
+{
+	switch(fmt) {
+		case AL_FORMAT_MONO16:
+		case AL_FORMAT_STEREO16:
+		case AL_FORMAT_QUAD16_LOKI:
+			return AFMT_S16;
+			break;
+		case AL_FORMAT_MONO8:
+		case AL_FORMAT_STEREO8:
+		case AL_FORMAT_QUAD8_LOKI:
+			return AFMT_U8;
+			break;
+		default:
+#ifdef DEBUG_MAXIMUS
+		  fprintf(stderr, "unknown format 0x%x\n", fmt);
+#endif
+		  break;
+	}
+
+	return -1;
+}
+
+
+/*
+ * Disable non-blocking on a file descriptor. Returns non-zero on
+ *  success, zero on failure.  --ryan.
+ */
+static int toggle_nonblock(int fd, int state)
+{
+	int retval = 0;
+	int flags = fcntl(fd, F_GETFL);
+	if (flags != -1) {
+		if (state) {
+			flags |= O_NONBLOCK;
+		} else {
+			flags &= ~O_NONBLOCK;
+		}
+
+		if(fcntl(fd, F_SETFL, flags) != -1) {
+			retval = 1;
+		}
+	}
+
+	if (!retval) {
+		perror("fcntl");
+	}
+
+	return(retval);
+}
+
+
+/*
+ *
+ *  Format of divisor is bit field where:
+ *
+ *
+ *         MSHW          LSHW
+ *  [ some big value |     x  ]
+ *
+ *  where x is translated into 2^x, and used as the
+ *  dma buffer size.
+ *
+ */
+static void *grab_write_native(void)
+{
+	static int write_fd;
+	Rcvar rc_use_select;
+	const char *writepath = NULL;
+	int divisor = DONTCARE | _alSpot( _ALC_DEF_BUFSIZ );
+	const char *tried_paths[] = {
+		"",
+		"/dev/sound/dsp",
+		"/dev/dsp"
+	};
+	tried_paths[0] = lin_getwritepath();
+	write_fd = try_to_open(tried_paths, 3, &writepath, O_WRONLY | O_NONBLOCK);
+	if(write_fd < 0) {
+		perror("open /dev/[sound/]dsp");
+		return NULL;
+	}
+
+	if(ioctl(write_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
+		perror("ioctl SETFRAGMENT grab");
+	}
+
+	toggle_nonblock(write_fd, 0);
+
+	/* now get mixer_fd */
+	mixer_fd = grab_mixerfd();
+
+	/*
+	 * Some drivers, ie aurreal ones, don't implemented select.
+	 * I like to use select, as it ensures that we don't hang on
+	 * a bum write forever, but if you're in the unadmirable position
+	 * of having one of these cards I'm sure it's a small comfort.
+	 *
+	 * So, we have a special alrc var: native-use-select, that, if
+	 * set to #f, causes us to not do a select on the fd before
+	 * writing to it.
+	 */
+	use_select = AL_TRUE;
+
+	rc_use_select = rc_lookup("native-use-select");
+	if(rc_use_select != NULL) {
+		if(rc_type(rc_use_select) == ALRC_BOOL) {
+			use_select = rc_tobool(rc_use_select);
+		}
+	}
+
+#ifdef DEBUG
+	fprintf(stderr, "grab_native: (path %s fd %d)\n", writepath, write_fd);
+#endif
+
+	return &write_fd;
+}
+
+/*
+ *
+ *  Format of divisor is bit field where:
+ *
+ *
+ *         MSHW          LSHW
+ *  [ some big value |     x  ]
+ *
+ *  where x is translated into 2^x, and used as the
+ *  dma buffer size.
+ *
+ */
+static void *grab_read_native(void)
+{
+	static int read_fd;
+
+	read_fd = aquire_read();
+	if( read_fd < 0) {
+		return NULL;
+	}
+
+	return &read_fd;
+}
+
+void *
+alcBackendOpenNative_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_native() : grab_write_native();
+}
+
+static int grab_mixerfd(void) {
+	const char *tried_paths[] = {
+		"/dev/sound/mixer",
+		"/dev/mixer"
+	};
+	mixer_fd = try_to_open(tried_paths, 2, NULL, O_WRONLY | O_NONBLOCK);
+
+	if(mixer_fd > 0) {
+		toggle_nonblock(mixer_fd, 0);
+		return mixer_fd;
+	} else {
+		perror("open /dev/[sound/]mixer");
+	}
+
+	return -1;
+}
+
+void release_native(void *handle) {
+	int handle_fd;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	handle_fd = *(int *) handle;
+
+	if(ioctl(handle_fd, SNDCTL_DSP_RESET) < 0) {
+#ifdef DEBUG
+		fprintf(stderr, "Couldn't reset dsp\n");
+#endif
+	}
+
+	ioctl(handle_fd, SNDCTL_DSP_SYNC, NULL);
+	if((close(handle_fd) < 0) || (close(mixer_fd) < 0)) {
+		return;
+	}
+
+	*(int *) handle = -1;
+	mixer_fd        = -1;
+
+	return;
+}
+
+ALfloat
+get_nativechannel(UNUSED(void *handle), ALuint channel)
+{
+	int request = alcChannel_to_dsp_channel(channel);
+	int retval;
+	if(ioctl(mixer_fd, MIXER_READ(request), &retval) < 0) {
+		return -1;
+	}
+	return (retval >> 8) / 100.0;
+}
+
+
+/*
+ * Okay:
+ *
+ * Set audio channel expects an integer, in the range of
+ * 0 - 100.  But wait!  It expects the integer to be
+ * partitioned into a 16bit empty, L/R channel pair (high bits left,
+ * low bits right), each 8 bit pair in the range 0 - 100.
+ *
+ * Kludgey, and obviously not the right way to do this
+ */
+int set_nativechannel(UNUSED(void *handle), ALuint channel, ALfloat volume) {
+	int request = alcChannel_to_dsp_channel(channel);
+	int unnormalizedvolume;
+
+	unnormalizedvolume = volume * 100;
+	unnormalizedvolume <<= 8;
+	unnormalizedvolume += (volume * 100);
+
+	if(ioctl(mixer_fd, MIXER_WRITE(request), &unnormalizedvolume) < 0) {
+		return -1;
+	}
+
+	return 0;
+}
+
+/* convert the mixer channel from ALC to /dev/mixer format */
+static int alcChannel_to_dsp_channel(ALCenum alcc) {
+	switch(alcc) {
+		case ALC_CHAN_MAIN_LOKI: return SOUND_MIXER_VOLUME;
+		case ALC_CHAN_CD_LOKI:   return SOUND_MIXER_CD;
+		case ALC_CHAN_PCM_LOKI:  return SOUND_MIXER_PCM;
+		default: return -1;
+	}
+}
+
+void pause_nativedevice(void *handle) {
+	int fd;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	fd = *(int *) handle;
+
+	toggle_nonblock(fd, 1);
+
+#if 0
+	if(ioctl(fd, SNDCTL_DSP_POST, 0) == -1) {
+		perror("ioctl");
+	}
+#endif
+
+	return;
+}
+
+void resume_nativedevice(void *handle) {
+	int fd;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	fd = *(int *) handle;
+
+	toggle_nonblock(fd, 0);
+
+/*
+	if(ioctl(fd, SNDCTL_DSP_SYNC, 0) == -1) {
+		perror("ioctl");
+	}
+ */
+
+	return;
+}
+
+static const char *lin_getwritepath(void) {
+	Rcvar devdsp_path = rc_lookup("lin-dsp-path");
+	static char retval[65]; /* FIXME */
+
+	if(devdsp_path == NULL) {
+		return NULL;
+	}
+
+	switch(rc_type(devdsp_path)) {
+		case ALRC_STRING:
+			rc_tostr0(devdsp_path, retval, 64);
+			break;
+		default:
+			return NULL;
+	}
+
+	return retval;
+}
+
+static const char *lin_getreadpath(void) {
+	Rcvar devdsp_path = rc_lookup("lin-dsp-read-path");
+	static char retval[65]; /* FIXME */
+
+	if(devdsp_path == NULL) {
+		/*
+		 * no explicit read path?  try the default
+		 * path.
+		 */
+		devdsp_path = rc_lookup("lin-dsp-path");
+	}
+
+	if(devdsp_path == NULL) {
+		return NULL;
+	}
+
+	switch(rc_type(devdsp_path)) {
+		case ALRC_STRING:
+			rc_tostr0(devdsp_path, retval, 64);
+			break;
+		default:
+			return NULL;
+	}
+
+
+	/*
+	 * stupid.  /dev/dsp1 cannot be used for reading,
+	 * only /dev/dsp
+	 */
+	if(retval[strlen(retval) - 1] == '1') {
+		retval[strlen(retval) - 1] = '\0';
+	}
+
+	return retval;
+}
+
+/* capture data from the audio device */
+ALsizei capture_nativedevice(void *handle,
+			  void *capture_buffer,
+			  int bufsiz) {
+	int read_fd = *(int *)handle;
+	int retval;
+
+	retval = read(read_fd, capture_buffer, bufsiz);
+	return retval > 0 ? retval : 0;
+}
+
+static int aquire_read(void) {
+	int read_fd;
+	const char *readpath = NULL;
+	int divisor = _alSpot(_ALC_DEF_BUFSIZ) | (1<<16);
+	const char *tried_paths[] = {
+		"",
+		"/dev/sound/dsp",
+		"/dev/dsp"
+	};
+	tried_paths[0] = lin_getreadpath();
+	read_fd = try_to_open(tried_paths, 3, &readpath, O_RDONLY | O_NONBLOCK);
+	if(read_fd >= 0) {
+#if 0 /* Reads should be non-blocking */
+		toggle_nonblock(read_fd, 0);
+#endif
+		if(ioctl(read_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
+			perror("ioctl SETFRAGMENT");
+		}
+	}
+
+	return read_fd;
+}
+
+static ALboolean set_write_native(UNUSED(void *handle),
+				  ALuint *bufsiz,
+				  ALenum *fmt,
+				  ALuint *speed) {
+	int write_fd = *(int *)handle;
+	ALuint linformat;
+	ALuint channels = _alGetChannelsFromFormat(*fmt);
+	int err;
+
+	if(write_fd < 0) {
+		return AL_FALSE;
+	}
+
+	linformat = AL2LINFMT(*fmt);
+
+	err = set_fd(write_fd, AL_FALSE, bufsiz, &linformat, speed, &channels);
+	if(err < 0) {
+#ifdef DEBUG
+		fprintf(stderr, "Could not do write_fd\n");
+#endif
+		return AL_FALSE;
+	}
+
+	/* set format for caller */
+	*fmt = LIN2ALFMT(linformat, channels);
+
+	return AL_TRUE;
+}
+
+static ALboolean set_read_native(UNUSED(void *handle),
+				 ALuint *bufsiz,
+				 ALenum *fmt,
+				 ALuint *speed) {
+	int read_fd = *(int *)handle;
+	ALuint linformat;
+	ALuint channels = 1;
+
+	linformat = AL2LINFMT(*fmt);
+
+	if(set_fd(read_fd, AL_TRUE, bufsiz, &linformat, speed, &channels) >= 0) {
+		/* set format for caller */
+		*fmt = LIN2ALFMT(linformat, channels);
+
+		return AL_TRUE;
+	}
+
+	return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesNative_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_native(handle, bufsiz, fmt, speed) :
+		set_write_native(handle, bufsiz, fmt, speed);
+}
+
+void native_blitbuffer(void *handle, void *dataptr, int bytes_to_write) {
+	struct timeval tv = { 0, 800000 }; /* at most .8 secs */
+	int iterator = 0;
+	int err;
+	int fd;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	fd = *(int *) handle;
+
+	assert( fd >= 0 );
+
+	for(iterator = bytes_to_write; iterator > 0; ) {
+		FD_ZERO(&dsp_fd_set);
+		FD_SET(fd, &dsp_fd_set);
+
+		if(use_select == AL_TRUE) {
+			err = select(fd + 1, NULL, &dsp_fd_set, NULL, &tv);
+			if(FD_ISSET(fd, &dsp_fd_set) == 0) {
+				/*
+				 * error or timeout occured, don't try
+				 * and write.
+				 */
+				fprintf(stderr,
+				"native_blitbuffer: select error occured\n");
+				return;
+			}
+		}
+
+		assert(iterator > 0);
+		assert(iterator <= bytes_to_write);
+
+		err = write(fd,
+			    (char *) dataptr + bytes_to_write - iterator,
+			    iterator);
+
+		if(err < 0) {
+#ifdef DEBUG_MAXIMUS
+			fprintf( stderr, "write error: ( fd %d error %s )\n",
+				fd, strerror(err));
+#endif
+			assert( 0 );
+			return;
+		}
+
+		iterator -= err;
+	};
+
+	return;
+}
+
+static int set_fd(int dsp_fd, ALboolean readable,
+		     ALuint *bufsiz,
+		     ALuint *fmt,
+		     ALuint *speed,
+		     ALuint *channels)
+{
+	struct audio_buf_info info;
+
+	if(dsp_fd < 0) {
+		return -1;
+	}
+
+#ifdef DEBUG
+	fprintf( stderr, "set_fd in: bufsiz %d fmt 0x%x speed %d channels %d\n",
+		 *bufsiz, *fmt, *speed, *channels );
+#endif
+
+
+#if 0 /* This code breaks 4Front's commercial drivers. Just say no. --ryan. */
+{
+	int divisor = DONTCARE | _alSpot( *bufsiz );
+	if( ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor ) < 0) {
+#ifdef DEBUG
+		perror("ioctl SETFRAGMENT");
+#endif
+	}
+}
+#endif
+
+
+	/* reset card defaults */
+	if(ioctl(dsp_fd, SNDCTL_DSP_RESET, NULL) < 0) {
+#ifdef DEBUG
+		perror("set_devsp reset ioctl");
+#endif
+		return AL_FALSE;
+	}
+
+	if(ioctl(dsp_fd, SNDCTL_DSP_SETFMT, fmt) < 0) {
+#ifdef DEBUG
+		fprintf(stderr, "fmt %d\n", *fmt);
+		perror("set_devsp format ioctl");
+#endif
+		return AL_FALSE;
+	}
+
+	if(ioctl(dsp_fd, SNDCTL_DSP_CHANNELS, channels)) {
+#ifdef DEBUG
+		fprintf(stderr, "channels %d\n", *channels);
+		perror("set_devsp channels ioctl");
+#endif
+		return AL_FALSE;
+	}
+
+	if( readable == AL_TRUE ) {
+		/*
+		 * This is for reading.  Don't really use
+		 * the speed argument.
+		 */
+		*speed = 16000;
+
+		/* Try to set the speed (ignore value), then read it back */
+                ioctl(dsp_fd, SNDCTL_DSP_SPEED, speed);
+                if (ioctl(dsp_fd, SOUND_PCM_READ_RATE, speed) < 0) {
+#ifdef DEBUG
+			char errbuf[256];
+
+			snprintf(errbuf, sizeof(errbuf), "(fd %d speed %d)", dsp_fd, *speed);
+
+			perror(errbuf);
+			return AL_FALSE;
+#endif
+                }
+/*printf("Set recording rate: %d\n", *speed);*/
+
+	} else {
+		/* writable, set speed, otherwise no */
+		if(ioctl(dsp_fd, SNDCTL_DSP_SPEED, speed) < 0) {
+#ifdef DEBUG
+			char errbuf[256];
+
+			snprintf(errbuf, sizeof(errbuf), "(fd %d speed %d)", dsp_fd, *speed);
+
+			perror(errbuf);
+			return AL_FALSE;
+#endif
+		}
+
+		if(ioctl(dsp_fd, SNDCTL_DSP_GETOSPACE, &info) < 0) {
+#ifdef DEBUG
+			perror("ioctl SNDCTL_DSP_GETOSPACE");
+#endif
+		}
+
+		/* set bufsiz correctly */
+
+		*bufsiz = info.fragsize;
+
+#ifdef DEBUG
+		if( *bufsiz & (*bufsiz - 1) ) {
+			fprintf( stderr, "Non power-of-two bufsiz %d\n",
+				*bufsiz );
+		}
+#endif
+	}
+
+#ifdef DEBUG
+	fprintf( stderr, "set_fd out: bufsiz %d fmt 0x%x speed %d channels %d\n",
+		 *bufsiz, *fmt, *speed, *channels );
+#endif
+
+	return 0;
+}
+
+int try_to_open(const char **paths, int n_paths, const char **used_path, int mode)
+{
+	int i, fd = -1;
+	for(i = 0; i != n_paths; ++i)
+	{
+		if(paths[i])
+		{
+			if(used_path) *used_path = paths[i];
+			fd = open(paths[i], mode);
+			if(fd >= 0) return fd;
+		}
+	}
+	return fd;
+}
+
Index: /openal-0.0.8/src/backends/alc_backend_morphos.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_morphos.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_morphos.c	(revision 17)
@@ -0,0 +1,641 @@
+/*
+ * morphos_native.c
+ *
+ * MorphOS backend for OpenAL
+ * using AHI for sound output
+ */
+
+#include "al_siteconfig.h"
+#include "backends/alc_backend.h"
+
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "al_main.h"
+#include "al_debug.h"
+#include "al_rcvar.h"
+#include "alc/alc_context.h"
+
+#include <clib/ddebug_protos.h>
+#include <dos/dostags.h>
+
+#include <proto/exec.h>
+#include <proto/dos.h>
+
+#include <devices/ahi.h>
+#include <proto/ahi.h>
+
+#include <exec/lists.h>
+#include <exec/ports.h>
+#include <exec/semaphores.h>
+
+struct DispatcherStartupMsg
+{
+	struct Message dsm_Msg;
+	LONG				dsm_Result;
+};
+
+struct Buffer
+{
+	struct AHISampleInfo    bn_SampleInfo;
+	struct SignalSemaphore  bn_Semaphore;
+	ULONG						   bn_SampleNo;
+	ULONG						   bn_FillSize;
+};
+
+struct MOSWriteHandle
+{
+	ULONG				 wh_SampleType;
+	ULONG				 wh_Frequency;
+	ULONG				 wh_Channels;
+	struct Buffer*  wh_Buffers;
+	ULONG				 wh_BufSize;
+	UWORD				 wh_WriteBuf;
+	UWORD				 wh_ReadBuf;
+	BOOL				 wh_FirstBufSent;
+	struct DispatcherStartupMsg *wh_StartupMsg;
+	struct MsgPort *wh_StartupPort;
+	struct Process *wh_DispatcherThread;
+	struct MsgPort *wh_DispatcherPort;
+	ULONG				 wh_SwitchSignal;
+};
+
+#define Handle(h)		((struct MOSWriteHandle*) h)
+
+struct DispatcherInitReport
+{
+	struct Message dir_Msg;
+	ULONG				dir_RealFrequency;
+	ULONG				dir_RealBufSize;
+};
+
+#define DISPATCHER_CMD_BREAK		1
+#define DISPATCHER_CMD_START		2
+#define DISPATCHER_CMD_PAUSE		3
+#define DISPATCHER_CMD_RESUME		4
+
+struct DispatcherMsg
+{
+	struct Message dm_Msg;
+	ULONG				dm_Command;
+};
+
+#define AHI_BUFFERS		4
+#define AHI_BUF_SIZE    _ALC_DEF_BUFSIZ*4
+
+static VOID DispatcherThread(struct MOSWriteHandle*);
+static BOOL start_sound_thread(struct MOSWriteHandle* h, ALuint *bufsiz, ALuint *speed);
+static void stop_sound_thread(struct MOSWriteHandle* h);
+
+static void do_command(struct MOSWriteHandle* h, ULONG cmd)
+{
+	struct DispatcherMsg msg;
+	struct MsgPort *reply_port = CreateMsgPort();
+
+	if (reply_port)
+	{
+		msg.dm_Msg.mn_Node.ln_Type = NT_MESSAGE;
+		msg.dm_Msg.mn_ReplyPort = reply_port;
+		msg.dm_Msg.mn_Length = sizeof (struct DispatcherMsg);
+		msg.dm_Command = cmd;
+		PutMsg(h->wh_DispatcherPort, (struct Message*) &msg);
+		WaitPort(reply_port);
+		GetMsg(reply_port);
+		DeleteMsgPort(reply_port);
+	}
+}
+
+static void *grab_read_native(void)
+{
+	/* Not implemented yet */
+	return NULL;
+}
+
+static void *grab_write_native(void)
+{
+	struct MOSWriteHandle* h;
+
+	h = Handle(AllocVec(sizeof (struct MOSWriteHandle), MEMF_PUBLIC | MEMF_CLEAR));
+
+	if (h == NULL)
+	{
+		/*dprintf("No handle\n");*/
+		return NULL;
+	}
+
+	h->wh_SampleType = AHIST_S16S;
+	h->wh_Channels = 2;
+	h->wh_Frequency = _ALC_CANON_SPEED;
+	h->wh_Buffers = (struct Buffer*) AllocVec(sizeof (struct Buffer)*AHI_BUFFERS, MEMF_PUBLIC | MEMF_CLEAR);
+	h->wh_BufSize = AHI_BUF_SIZE;
+	h->wh_WriteBuf = 0;
+	h->wh_DispatcherThread = NULL;
+	h->wh_DispatcherPort = NULL;
+	h->wh_FirstBufSent = FALSE;
+	h->wh_StartupMsg = (struct DispatcherStartupMsg *) AllocVec(sizeof (struct DispatcherStartupMsg), MEMF_PUBLIC | MEMF_CLEAR);
+	h->wh_StartupPort = CreateMsgPort();
+
+	if (h->wh_Buffers == NULL || h->wh_StartupMsg == NULL || h->wh_StartupPort == NULL)
+	{
+		/*dprintf("No resources\n");*/
+		release_native(h);
+		return NULL;
+	}
+
+	if (start_sound_thread(h, NULL, NULL))
+		return h;
+	/*dprintf("No sound thread\n");*/
+
+	return NULL;
+}
+
+void *
+alcBackendOpenNative_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_native() : grab_write_native();
+}
+
+static ALboolean set_write_native(void *h,
+				  ALuint *bufsiz,
+				  ALenum *fmt,
+				  ALuint *speed)
+{
+	ULONG sample_type;
+	ULONG channels;
+
+	if (h == NULL)
+		return AL_FALSE;
+
+	/*dprintf("set_write_native(%d, %d, %d)\n", *bufsiz, *fmt, *speed);*/
+
+	switch(*fmt)
+	{
+		case AL_FORMAT_MONO16:
+			sample_type = AHIST_M16S;
+			channels = 1;
+			break;
+		case AL_FORMAT_STEREO16:
+		case AL_FORMAT_QUAD16_LOKI:
+			sample_type = AHIST_S16S;
+			channels = 2;
+			break;
+		case AL_FORMAT_MONO8:
+			sample_type = AHIST_M8S;
+			channels = 1;
+			break;
+		case AL_FORMAT_STEREO8:
+		case AL_FORMAT_QUAD8_LOKI:
+			sample_type = AHIST_S8S;
+			channels = 2;
+			break;
+		default:
+#ifdef DEBUG_MAXIMUS
+			dprintf("OpenAL: unknown format 0x%x\n", fmt);
+#endif
+			sample_type = AHIST_S16S;
+			channels = 2;
+			*fmt = AL_FORMAT_STEREO16;
+			break;
+	}
+
+	stop_sound_thread(Handle(h));
+
+	Handle(h)->wh_SampleType = sample_type;
+	Handle(h)->wh_Frequency = *speed;
+	Handle(h)->wh_BufSize = *bufsiz;
+	Handle(h)->wh_Channels = channels;
+	Handle(h)->wh_ReadBuf = 0;
+	Handle(h)->wh_WriteBuf = 0;
+	Handle(h)->wh_FirstBufSent = FALSE;
+
+	return start_sound_thread(Handle(h), bufsiz, speed);
+}
+
+static BOOL start_sound_thread(struct MOSWriteHandle* h, ALuint *bufsiz, ALuint *speed)
+{
+	h->wh_StartupMsg->dsm_Msg.mn_Node.ln_Type = NT_MESSAGE;
+	h->wh_StartupMsg->dsm_Msg.mn_ReplyPort = h->wh_StartupPort;
+	h->wh_StartupMsg->dsm_Msg.mn_Length = sizeof (struct DispatcherStartupMsg);
+
+	if ((h->wh_DispatcherThread = CreateNewProcTags(NP_CodeType,  CODETYPE_PPC,
+																	NP_Entry, 	  (ULONG) &DispatcherThread,
+																	NP_Name,      (ULONG) "OpenAL Sound Thread",
+																	NP_StackSize, 32000,
+																	NP_StartupMsg,(ULONG) h->wh_StartupMsg,
+																	NP_TaskMsgPort,(ULONG) &h->wh_DispatcherPort,
+																	NP_PPC_Arg1,  (ULONG) h,
+																	TAG_DONE)))
+	{
+		struct DispatcherInitReport *init_report;
+		WaitPort(h->wh_StartupPort);
+		init_report = (struct DispatcherInitReport *) GetMsg(h->wh_StartupPort);
+		if (init_report->dir_Msg.mn_Length == sizeof (struct DispatcherInitReport))
+		{
+			if (bufsiz)	*bufsiz = init_report->dir_RealBufSize;
+			if (speed)	*speed  = init_report->dir_RealFrequency;
+			ReplyMsg((struct Message*) init_report);
+			return AL_TRUE;
+		}
+
+		/*
+		 * Otherwise we got the startup message back.
+		 * This means the thread has exited already because something went wrong
+		 * during initialisation.
+		 */
+		h->wh_DispatcherThread = NULL;
+	}
+
+	release_native(h);
+
+	return AL_FALSE;
+}
+
+static void stop_sound_thread(struct MOSWriteHandle* h)
+{
+	if (h && h->wh_DispatcherThread)
+	{
+		do_command(h, DISPATCHER_CMD_BREAK);
+
+		/* Wait until thread has quit */
+		WaitPort(h->wh_StartupPort);
+		GetMsg(h->wh_StartupPort);
+		h->wh_DispatcherThread = NULL;
+		h->wh_DispatcherPort = NULL;
+	}
+}
+
+void release_native(void *h)
+{
+	if (h)
+	{
+		stop_sound_thread(Handle(h));
+
+		if (Handle(h)->wh_Buffers)
+		{
+			FreeVec(Handle(h)->wh_Buffers);
+			Handle(h)->wh_Buffers = NULL;
+		}
+		if (Handle(h)->wh_StartupMsg)
+		{
+			FreeVec(Handle(h)->wh_StartupMsg);
+			Handle(h)->wh_StartupMsg = NULL;
+		}
+		if (Handle(h)->wh_StartupPort)
+		{
+			DeleteMsgPort(Handle(h)->wh_StartupPort);
+			Handle(h)->wh_StartupPort = NULL;
+		}
+		FreeVec(h);
+	}
+}
+
+static ALboolean set_read_native(UNUSED(void *handle),
+				 UNUSED(ALuint *bufsiz),
+				 UNUSED(ALenum *fmt),
+				 UNUSED(ALuint *speed))
+{
+	/* Not yet implemented */
+	return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesNative_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_native(handle, bufsiz, fmt, speed) :
+		set_write_native(handle, bufsiz, fmt, speed);
+}
+
+void native_blitbuffer(void *h, void *data, int bytes)
+{
+	UWORD next_buf;
+
+	/* Prepare buffer */
+	next_buf = Handle(h)->wh_WriteBuf;
+	ObtainSemaphore(&Handle(h)->wh_Buffers[next_buf].bn_Semaphore);
+	CopyMem(data, Handle(h)->wh_Buffers[next_buf].bn_SampleInfo.ahisi_Address, bytes);
+	Handle(h)->wh_Buffers[next_buf].bn_FillSize = bytes;
+	ReleaseSemaphore(&Handle(h)->wh_Buffers[next_buf].bn_Semaphore);
+
+	if (!Handle(h)->wh_FirstBufSent)
+	{
+		do_command(Handle(h), DISPATCHER_CMD_START);
+		Handle(h)->wh_FirstBufSent = TRUE;
+	}
+	next_buf++;
+	if (next_buf >= AHI_BUFFERS)
+		next_buf = 0;
+	Handle(h)->wh_WriteBuf = next_buf;
+}
+
+ALfloat get_nativechannel(UNUSED(void *h), UNUSED(ALuint channel))
+{
+	/* Not yet implemented */
+	return 0.0;
+}
+
+int set_nativechannel(UNUSED(void *h),UNUSED(ALuint channel),UNUSED(ALfloat volume))
+{
+	/* Not yet implemented */
+	return 0;
+}
+
+void pause_nativedevice(UNUSED(void *h))
+{
+	/* Not tested */
+	dprintf("pause_nativedevice\n");
+//	  do_command(Handle(h), DISPATCHER_CMD_PAUSE);
+}
+
+void resume_nativedevice(UNUSED(void *h))
+{
+	/* Not tested */
+	dprintf("resume_nativedevice\n");
+//	  do_command(Handle(h), DISPATCHER_CMD_RESUME);
+}
+
+ALsizei capture_nativedevice(UNUSED(void *h), UNUSED(void *capture_buffer), UNUSED(int bufsiz))
+{
+	/* Not yet implemented */
+	return NULL;
+}
+
+/******************************************************************************/
+
+static ULONG OpenAL_SoundFunc(VOID)
+{
+	struct AHIAudioCtrl* ctrl = (struct AHIAudioCtrl*) REG_A2;
+	struct AHISoundMessage* sm = (struct AHISoundMessage*) REG_A1;
+	struct MOSWriteHandle* h = Handle(ctrl->ahiac_UserData);
+	struct ExecBase *SysBase = *(struct ExecBase **) 4;
+
+	AHI_SetSound(sm->ahism_Channel, h->wh_ReadBuf, 0, 0, ctrl, 0);
+
+	/* When last channel has been started, request switching to next buffer */
+	if (sm->ahism_Channel == h->wh_Channels-1)
+		Signal((struct Task*) h->wh_DispatcherThread, h->wh_SwitchSignal);
+
+	return 0;
+}
+
+static struct EmulLibEntry OpenAL_SoundGate = { TRAP_LIB, 0, (void (*)(void)) OpenAL_SoundFunc };
+static struct Hook OpenAL_SoundHook = { { NULL, NULL }, (ULONG (*)(void)) &OpenAL_SoundGate, NULL, NULL }; \
+
+struct Library*	  AHIBase = NULL;
+
+static VOID DispatcherThread(struct MOSWriteHandle* h)
+{
+	struct MsgPort*	  ahi_port = NULL;
+	struct AHIRequest*  ahi_request = NULL;
+	struct AHIAudioCtrl*ahi_control = NULL;
+	BYTE*					  sample_bufs = NULL;
+	ULONG					  sample_size = 2;
+	BYTE					  ahi_device = -1;
+	LONG					  switch_sig_bit = -1;
+	LONG				     locked_buf = -1;
+	struct DispatcherStartupMsg *startup_msg;
+	struct DispatcherInitReport *init_report;
+	struct MsgPort     *task_port = NULL;
+	struct ExecBase *SysBase = *(struct ExecBase **) 4;
+
+	init_report = (struct DispatcherInitReport *) AllocVec(sizeof (struct DispatcherInitReport), MEMF_PUBLIC | MEMF_CLEAR);
+	if (init_report == NULL)
+		return;
+
+	NewGetTaskAttrsA(NULL, &task_port, sizeof (task_port), TASKINFOTYPE_TASKMSGPORT, NULL);
+	NewGetTaskAttrsA(NULL, &startup_msg, sizeof (startup_msg), TASKINFOTYPE_STARTUPMSG, NULL);
+
+	if (task_port == NULL || startup_msg == NULL)
+	{
+		FreeVec(init_report);
+		return;
+	}
+
+	startup_msg->dsm_Result = -1;
+	switch_sig_bit = AllocSignal(-1);
+
+	if (switch_sig_bit != -1 && (ahi_port = CreateMsgPort()))
+	{
+		if ((ahi_request = (struct AHIRequest *) CreateIORequest(ahi_port, sizeof (struct AHIRequest))))
+		{
+			ahi_request->ahir_Version = 4;
+			if ((ahi_device = OpenDevice(AHINAME, AHI_NO_UNIT, (struct IORequest *) ahi_request, 0)) == 0)
+			{
+				AHIBase = (struct Library*) ahi_request->ahir_Std.io_Device;
+
+				/*dprintf("AllocAudio with %d channels, %d sounds and frequency %d\n", h->wh_Channels, AHI_BUFFERS, h->wh_Frequency);*/
+				ahi_control = AHI_AllocAudio(AHIA_AudioID,   AHI_DEFAULT_ID,
+													  AHIA_Channels,  h->wh_Channels,
+													  AHIA_Sounds,	   AHI_BUFFERS,
+													  AHIA_MixFreq,   h->wh_Frequency,
+													  AHIA_SoundFunc, (ULONG) &OpenAL_SoundHook,
+													  AHIA_UserData,	(ULONG) h,
+													  TAG_DONE
+													 );
+				if (ahi_control)
+				{
+					ULONG buf_size;
+					ULONG samples, fs, fm;
+
+					AHI_GetAudioAttrs(AHI_INVALID_ID, ahi_control, AHIDB_MaxPlaySamples, (ULONG) &samples, TAG_DONE);
+					AHI_ControlAudio(ahi_control, AHIC_MixFreq_Query, (ULONG) &fm, TAG_DONE);
+					fs = h->wh_Frequency;
+
+					buf_size = samples*fs/fm;
+					/*dprintf("OpenAL: Minimum buffer size is %d, requested buffer size is %d\n", buf_size, h->wh_BufSize);*/
+					if (buf_size > h->wh_BufSize)
+						h->wh_BufSize = buf_size;
+
+					sample_bufs = AllocVec(h->wh_BufSize*AHI_BUFFERS, MEMF_PUBLIC | MEMF_CLEAR);
+					if (sample_bufs)
+					{
+						struct Buffer* bn;
+						ULONG	buf;
+						LONG err = AHIE_OK;
+
+						sample_size = AHI_SampleFrameSize(h->wh_SampleType);
+
+						for (buf = 0; buf < AHI_BUFFERS && err == AHIE_OK; buf++)
+						{
+							bn = &h->wh_Buffers[buf];
+							bn->bn_SampleNo = buf;
+							bn->bn_SampleInfo.ahisi_Type = h->wh_SampleType;
+							bn->bn_SampleInfo.ahisi_Address = &sample_bufs[buf*h->wh_BufSize];
+							bn->bn_SampleInfo.ahisi_Length = h->wh_BufSize/sample_size;
+							InitSemaphore(&bn->bn_Semaphore);
+							bn->bn_FillSize = 0;
+							err = AHI_LoadSound(buf, AHIST_DYNAMICSAMPLE, &bn->bn_SampleInfo, ahi_control);
+						}
+
+						if (err != AHIE_OK)
+						{
+							FreeVec(sample_bufs);
+							sample_bufs = NULL;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	if (sample_bufs)
+	{
+		BOOL dispatcher_running = TRUE;
+		ULONG signal_mask = 1 << task_port->mp_SigBit;
+		ULONG signal_set;
+		struct MsgPort *reply_port;
+
+		reply_port = CreateMsgPort();
+		if (reply_port == NULL)
+			reply_port = task_port;
+
+		if (startup_msg)
+			startup_msg->dsm_Result = 0;
+		init_report->dir_Msg.mn_Node.ln_Type = NT_MESSAGE;
+		init_report->dir_Msg.mn_ReplyPort = reply_port;
+		init_report->dir_Msg.mn_Length = sizeof (struct DispatcherInitReport);
+		AHI_ControlAudio(ahi_control, AHIC_MixFreq_Query, (ULONG) &init_report->dir_RealFrequency, TAG_DONE);
+		init_report->dir_RealBufSize = h->wh_BufSize;
+		PutMsg(startup_msg->dsm_Msg.mn_ReplyPort, (struct Message*) init_report);
+		WaitPort(reply_port);
+		GetMsg(reply_port);
+		FreeVec(init_report);
+		init_report = NULL;
+
+		if (reply_port != task_port)
+			DeleteMsgPort(reply_port);
+
+		h->wh_SwitchSignal = 1UL << switch_sig_bit;
+		h->wh_ReadBuf = 0;
+		while (dispatcher_running)
+		{
+			signal_set = Wait(signal_mask);
+
+			if (signal_set & (1 << task_port->mp_SigBit))
+			{
+				struct DispatcherMsg *msg;
+
+				while ((msg = (struct DispatcherMsg *) GetMsg(task_port)))
+				{
+					if (msg->dm_Msg.mn_Length == sizeof (struct DispatcherMsg))
+					{
+						switch (msg->dm_Command)
+						{
+							case DISPATCHER_CMD_START:
+							{
+								/*
+								 * First buffer has been filled and we were previously not
+								 * playing any sound yet
+								 */
+								ULONG chan;
+								ULONG cur_buf;
+
+								cur_buf = h->wh_ReadBuf;
+								AHI_ControlAudio(ahi_control, AHIC_Play, TRUE, TAG_DONE);
+
+								/* Lock first audio buffer */
+								ObtainSemaphore(&h->wh_Buffers[cur_buf].bn_Semaphore);
+								locked_buf = cur_buf;
+
+								for (chan = 0; chan < h->wh_Channels; chan++)
+								{
+									AHI_SetFreq(chan, h->wh_Frequency, ahi_control, AHISF_IMM);
+									AHI_SetVol(chan, 0x10000L, -0x8000L, ahi_control, AHISF_IMM);
+									AHI_SetSound(chan, cur_buf, 0, 0, ahi_control, AHISF_IMM);
+								}
+
+								Wait(1 << switch_sig_bit);
+								cur_buf++;
+								if (cur_buf >= AHI_BUFFERS)
+									cur_buf = 0;
+								h->wh_ReadBuf = cur_buf;
+
+								signal_mask |= 1UL << switch_sig_bit;
+								break;
+							}
+
+							case DISPATCHER_CMD_PAUSE:
+							case DISPATCHER_CMD_RESUME:
+								AHI_ControlAudio(ahi_control, AHIC_Play, msg->dm_Command == DISPATCHER_CMD_RESUME, TAG_DONE);
+								break;
+
+							case DISPATCHER_CMD_BREAK:
+								/* Break requests and quit */
+								/*dprintf("Dispatcher thread: break requested\n");*/
+								AHI_ControlAudio(ahi_control, AHIC_Play, FALSE, TAG_DONE);
+								dispatcher_running = FALSE;
+								break;
+						}
+					}
+
+					ReplyMsg((struct Message *) msg);
+				}
+			}
+
+			if (signal_set & (1UL << switch_sig_bit))
+			{
+				/* Switch to next read buffer */
+				ULONG cur_buf;
+
+				cur_buf = h->wh_ReadBuf;
+				/*dprintf("Dispatcher thread: buffer switch requested. Releasing lock on %d, locking %d\n", locked_buf, cur_buf);*/
+				memset(h->wh_Buffers[locked_buf].bn_SampleInfo.ahisi_Address, 0, h->wh_BufSize);
+				ReleaseSemaphore(&h->wh_Buffers[locked_buf].bn_Semaphore);
+				cur_buf++;
+				if (cur_buf >= AHI_BUFFERS)
+					cur_buf = 0;
+				ObtainSemaphore(&h->wh_Buffers[cur_buf].bn_Semaphore);
+				locked_buf = cur_buf;
+				h->wh_ReadBuf = cur_buf;
+				/*dprintf("Dispatcher thread: buffer switch done\n");*/
+			}
+		}
+	}
+
+	/* Cleanup */
+	if (init_report)
+	{
+		FreeVec(init_report);
+		init_report = NULL;
+	}
+
+	if (locked_buf != -1)
+	{
+		ReleaseSemaphore(&h->wh_Buffers[locked_buf].bn_Semaphore);
+		locked_buf = -1;
+	}
+
+	if (switch_sig_bit != -1)
+	{
+		FreeSignal(switch_sig_bit);
+		switch_sig_bit = -1;
+	}
+
+	if (ahi_control)
+	{
+		AHI_FreeAudio(ahi_control);  /* Also unloads all sounds */
+		ahi_control = NULL;
+	}
+
+	if (ahi_request)
+	{
+		CloseDevice((struct IORequest*) ahi_request);
+		DeleteIORequest((struct IORequest*) ahi_request);
+		ahi_request = NULL;
+		ahi_device = -1;
+	}
+
+	if (sample_bufs)
+	{
+		FreeVec(sample_bufs);
+		sample_bufs = NULL;
+	}
+
+	if (ahi_port)
+	{
+		DeleteMsgPort(ahi_port);
+		ahi_port = NULL;
+	}
+}
Index: /openal-0.0.8/src/backends/alc_backend_null.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_null.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_null.c	(revision 17)
@@ -0,0 +1,114 @@
+/*
+ * null output. Context writes, we sleep.
+*/
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "al_main.h"
+#include "al_debug.h"
+
+#include "backends/alc_backend.h"
+
+static void *bogus_handle = (void *) 0x4ABAD1;
+static ALuint sleep_usec (ALuint speed, ALuint chunk);
+static ALint nullspeed;
+
+static void *
+grab_write_null (void)
+{
+  return bogus_handle;
+}
+
+static void *
+grab_read_null (void)
+{
+  return NULL;
+}
+
+void *
+alcBackendOpenNull_ (ALC_OpenMode mode)
+{
+  return mode == ALC_OPEN_INPUT_ ? grab_read_null () : grab_write_null ();
+}
+
+static ALboolean
+set_write_null (UNUSED (void *handle), UNUSED (ALuint *bufsiz),
+                UNUSED (ALenum *fmt), ALuint *speed)
+{
+  nullspeed = *speed;
+  return AL_TRUE;
+}
+
+static ALboolean
+set_read_null (UNUSED (void *handle), UNUSED (ALuint *bufsiz),
+               UNUSED (ALenum *fmt), UNUSED (ALuint *speed))
+{
+
+  return AL_TRUE;
+}
+
+ALboolean
+alcBackendSetAttributesNull_ (ALC_OpenMode mode, void *handle, ALuint *bufsiz,
+                              ALenum *fmt, ALuint *speed)
+{
+  return mode == ALC_OPEN_INPUT_ ?
+    set_read_null (handle, bufsiz, fmt, speed) :
+    set_write_null (handle, bufsiz, fmt, speed);
+}
+
+void
+null_blitbuffer (UNUSED (void *handle),
+                 UNUSED (void *dataptr), int bytes_to_write)
+{
+  _alMicroSleep (sleep_usec (nullspeed, bytes_to_write));
+}
+
+void
+release_null (UNUSED (void *handle))
+{
+}
+
+static ALuint
+sleep_usec (ALuint speed, ALuint chunk)
+{
+  return 1000000.0 * chunk / speed;
+}
+
+void
+pause_null (UNUSED (void *handle))
+{
+}
+
+void
+resume_null (UNUSED (void *handle))
+{
+}
+
+ALsizei
+capture_null (UNUSED (void *handle), UNUSED (void *capture_buffer),
+              UNUSED (int bufsiz))
+{
+  return 0;
+}
+
+ALfloat
+get_nullchannel (UNUSED (void *handle), UNUSED (ALuint channel))
+{
+  return 0.0;
+}
+
+int
+set_nullchannel (UNUSED (void *handle), UNUSED (ALuint channel),
+                 UNUSED (ALfloat volume))
+{
+  return 0;
+}
Index: /openal-0.0.8/src/backends/alc_backend_sdl.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_sdl.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_sdl.c	(revision 17)
@@ -0,0 +1,281 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * sdl.c
+ *
+ * SDL backend.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdlib.h>
+#include <string.h>
+#include <SDL.h>
+#include <SDL_audio.h>
+
+#include "al_debug.h"
+#include "al_main.h"
+#include "alc/alc_context.h"
+#include "backends/alc_backend.h"
+
+#ifdef OPENAL_DLOPEN_SDL
+#include <dlfcn.h>
+#endif
+
+
+#define DEF_SPEED	_ALC_CANON_SPEED
+#define DEF_SIZE	_ALC_DEF_BUFSIZ
+#define DEF_SAMPLES     (DEF_SIZE / 2)
+#define DEF_CHANNELS	2
+#define SDL_DEF_FMT	AUDIO_S16
+
+static struct {
+	SDL_AudioSpec spec;
+	ALboolean firstTime;
+} sdl_info;
+
+static void *ringbuffer;
+static Uint32 ringbuffersize;
+static Uint32 readOffset;
+static Uint32 writeOffset;
+
+static int openal_load_sdl_library(void);
+
+/*
+ * sdl library functions.
+ */
+static void SDLCALL (*pSDL_Delay)(Uint32 ms);
+static void SDLCALL (*pSDL_PauseAudio)(int pause_on);
+static void SDLCALL (*pSDL_CloseAudio)(void);
+static int SDLCALL (*pSDL_OpenAudio)(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
+static int SDLCALL (*pSDL_Init)(Uint32 flags);
+static char* SDLCALL (*pSDL_GetError)(void);
+static void SDLCALL (*pSDL_LockAudio)(void);
+static void SDLCALL (*pSDL_UnlockAudio)(void);
+
+/*
+ * sdl library handle.
+ */
+static void * sdl_lib_handle = NULL;
+
+static int openal_load_sdl_library(void)
+{
+#ifdef OPENAL_DLOPEN_SDL
+        char * error = NULL;
+#endif
+    
+	if (sdl_lib_handle != NULL)
+		return 1;  /* already loaded. */
+
+	#ifdef OPENAL_DLOPEN_SDL
+		#define OPENAL_LOAD_SDL_SYMBOL(x) p##x = dlsym(sdl_lib_handle, #x); \
+                                                   error = dlerror(); \
+                                                   if (p##x == NULL) { \
+                                                           fprintf(stderr,"Could not resolve SDL symbol %s: %s\n", #x, ((error!=NULL)?(error):("(null)"))); \
+                                                           dlclose(sdl_lib_handle); sdl_lib_handle = NULL; \
+                                                           return 0; }
+                dlerror(); /* clear error state */
+		sdl_lib_handle = dlopen("libSDL.so", RTLD_LAZY | RTLD_GLOBAL);
+                error = dlerror();
+		if (sdl_lib_handle == NULL) {
+                        fprintf(stderr,"Could not open SDL library: %s\n",((error!=NULL)?(error):("(null)")));
+			return 0;
+                }
+	#else
+		#define OPENAL_LOAD_SDL_SYMBOL(x) p##x = x;
+		sdl_lib_handle = (void *) 0xF00DF00D;
+	#endif
+
+        OPENAL_LOAD_SDL_SYMBOL(SDL_Delay);
+        OPENAL_LOAD_SDL_SYMBOL(SDL_PauseAudio);
+        OPENAL_LOAD_SDL_SYMBOL(SDL_CloseAudio);
+        OPENAL_LOAD_SDL_SYMBOL(SDL_OpenAudio);
+        OPENAL_LOAD_SDL_SYMBOL(SDL_Init);
+        OPENAL_LOAD_SDL_SYMBOL(SDL_GetError);
+        OPENAL_LOAD_SDL_SYMBOL(SDL_LockAudio);
+        OPENAL_LOAD_SDL_SYMBOL(SDL_UnlockAudio);
+
+	return 1;
+}
+
+
+static void
+dummy(UNUSED(void *unused), Uint8 *stream, int len)
+{
+	memcpy_offset(stream, ringbuffer, readOffset, (size_t)len);
+	readOffset += len;
+
+	if(readOffset >= ringbuffersize) {
+		readOffset  = 0;
+		writeOffset = 0;
+	}
+}
+
+static void *
+grab_write_sdl(void)
+{
+	if (!openal_load_sdl_library())
+		return NULL;
+
+        sdl_info.spec.freq     = DEF_SPEED;
+        sdl_info.spec.channels = DEF_CHANNELS;
+        sdl_info.spec.samples  = DEF_SAMPLES;
+        sdl_info.spec.size     = DEF_SIZE;
+        sdl_info.spec.format   = SDL_DEF_FMT;
+        sdl_info.spec.callback = dummy;
+	sdl_info.firstTime     = AL_TRUE;
+
+        if(pSDL_OpenAudio(&sdl_info.spec, NULL) < 0) {
+		/* maybe we need SDL_Init? */
+		pSDL_Init(SDL_INIT_AUDIO);
+
+		if(pSDL_OpenAudio(&sdl_info.spec, NULL) < 0) {
+			_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+				"No SDL: %s", pSDL_GetError());
+			return NULL;
+		}
+        }
+
+	if(ringbuffer != NULL) {
+		free(ringbuffer);
+	}
+
+	ringbuffersize = 2 * sdl_info.spec.size;
+	ringbuffer     = malloc(ringbuffersize);
+	readOffset      = 0;
+	writeOffset     = 0;
+
+	_alDebug(ALD_CONTEXT, __FILE__, __LINE__, "SDL grab audio ok");
+
+        return &sdl_info.spec;
+}
+
+static void *
+grab_read_sdl(void)
+{
+	return NULL;
+}
+
+void *
+alcBackendOpenSDL_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_sdl() : grab_write_sdl();
+}
+
+void
+sdl_blitbuffer(UNUSED(void *handle), void *data, int bytes)
+{
+	if (sdl_info.firstTime == AL_TRUE) {
+		sdl_info.firstTime = AL_FALSE;
+		offset_memcpy(ringbuffer, writeOffset, data, (size_t)bytes);
+		writeOffset = bytes;
+		/* start SDL callback mojo */
+		pSDL_PauseAudio(0);
+	} else {
+		pSDL_LockAudio();
+		while(writeOffset >= ringbuffersize) {
+			pSDL_UnlockAudio();
+			pSDL_Delay(1);
+			pSDL_LockAudio();
+		}
+
+		offset_memcpy(ringbuffer, writeOffset, data, (size_t)bytes);
+		writeOffset += bytes;
+
+		pSDL_UnlockAudio();
+	}
+}
+
+void
+release_sdl(UNUSED(void *handle))
+{
+	pSDL_CloseAudio();
+}
+
+static ALboolean
+set_write_sdl(UNUSED(void *handle), ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	ALuint bytesPerSample   = _alGetBitsFromFormat(*fmt) >> 3;
+	ALuint channels = _alGetChannelsFromFormat(*fmt);
+
+        memset(&sdl_info, '\0', sizeof (sdl_info));
+        sdl_info.spec.freq     = *speed;
+        sdl_info.spec.channels = channels;
+        sdl_info.spec.samples  = *bufsiz / bytesPerSample;
+        sdl_info.spec.format   = _al_AL2ACFMT(*fmt);
+        sdl_info.spec.callback = dummy;
+	sdl_info.firstTime     = AL_TRUE;
+
+        pSDL_CloseAudio();
+
+        if(pSDL_OpenAudio(&sdl_info.spec, NULL) < 0) {
+		fprintf(stderr,
+			"No SDL: %s\n", pSDL_GetError());
+
+                return AL_FALSE;
+        }
+
+	*bufsiz = sdl_info.spec.size;
+
+	if(ringbuffer != NULL) {
+		free(ringbuffer);
+	}
+
+	ringbuffersize = 2 * sdl_info.spec.size;
+	ringbuffer     = malloc(ringbuffersize);
+	readOffset      = 0;
+	writeOffset     = 0;
+
+	memset(ringbuffer, 0, ringbuffersize);
+
+	/* FIXME: should remove extraneous *channels and rely only on format */
+	*fmt      = _al_AC2ALFMT(sdl_info.spec.format, sdl_info.spec.channels);
+	*speed    = sdl_info.spec.freq;
+
+	_alDebug(ALD_CONTEXT, __FILE__, __LINE__, "set_write_sdl ok");
+
+        return AL_TRUE;
+}
+
+static ALboolean
+set_read_sdl(UNUSED(void *handle), UNUSED(ALuint *bufsiz), UNUSED(ALenum *fmt),
+	     UNUSED(ALuint *speed))
+{
+	return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesSDL_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_sdl(handle, bufsiz, fmt, speed) :
+		set_write_sdl(handle, bufsiz, fmt, speed);
+}
+
+void
+pause_sdl( UNUSED(void *handle) )
+{
+}
+
+void
+resume_sdl( UNUSED(void *handle) )
+{
+}
+
+ALsizei
+capture_sdl( UNUSED(void *handle), UNUSED(void *capture_buffer), UNUSED(int bufsiz) )
+{
+	return 0;
+}
+
+ALfloat
+get_sdlchannel( UNUSED(void *handle), UNUSED(ALuint channel) )
+{
+	return 0.0;
+}
+
+int
+set_sdlchannel( UNUSED(void *handle), UNUSED(ALuint channel), UNUSED(ALfloat volume) )
+{
+	return 0;
+}
Index: /openal-0.0.8/src/backends/alc_backend_solaris.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_solaris.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_solaris.c	(revision 17)
@@ -0,0 +1,279 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * solaris_native.c
+ *
+ * functions related to the aquisition and management of the native
+ * audio on Solaris.
+ *
+ * This is a second-cut implementation.  Playback is well
+ * supported.  Still no recording.
+ *   Yotam Gingold, April 28, 2001
+ *   <ygingold@cs.brown.edu>
+ *   <ygingold@stat.wvu.edu>
+ *
+ *
+ * This is a crude first-cut implementation, which doesn't do any
+ * sophisticated error handling at all yet.
+ *   John E. Stone, September 13, 2000
+ *   <johns@megapixel.com>
+ *   <j.stone@acm.org>
+ */
+#include <AL/al.h>
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "backends/alc_backend.h"
+
+#include "al_main.h"
+#include "al_debug.h"
+#include "alc/alc_context.h"
+#include "audioconvert/ac_endian.h"
+
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/audioio.h>  /* Sun's audio system headers */
+
+typedef struct {
+  int fd;                /* file descriptor of audio device          */
+  audio_info_t ainfo;    /* audio info structure used in ioctl calls */
+} solaris_audio;
+
+
+#define EMAIL_ADDRESS "ygingold@stat.wvu.edu"
+#define EMAIL_ADDRESS2 "j.stone@acm.org"
+
+
+static const char *implement_me(const char *fn) {
+	static char retval[2048];
+
+	snprintf(retval, sizeof(retval),
+	"%s is not implemented under Solaris.  Please contact %s for\n"
+	"information on how you can help get %s implemented on Solaris.\n",
+	fn, EMAIL_ADDRESS, fn);
+
+	return retval;
+}
+
+static void *grab_read_native(void) {
+  return NULL ;
+}
+
+static void *grab_write_native(void) {
+  int fd ;
+  solaris_audio* saudio ;
+  fprintf(stderr, "solaris_native: opening /dev/audio\n");
+
+  fd = open("/dev/audio", O_WRONLY | O_NONBLOCK );
+  if (fd < 0) {
+    perror("open /dev/audio");
+    return NULL;
+  }
+
+  if(fcntl(fd, F_SETFL, ~O_NONBLOCK) == -1) {
+	  perror("fcntl");
+	  fprintf(stderr,"fnctl error \n");
+  }
+
+  fprintf(stderr, "Opened /dev/audio successfully\n");
+
+  saudio = (solaris_audio*) malloc( sizeof( solaris_audio ) ) ;
+  if( saudio == NULL ) {
+	  close( fd ) ;
+	  return NULL ;
+  }
+  saudio -> fd = fd ;
+  AUDIO_INITINFO( &(saudio->ainfo) ) ;
+
+  return saudio ;
+}
+
+void *
+alcBackendOpenNative_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_native() : grab_write_native();
+}
+
+void native_blitbuffer(void *handle,
+		       void *dataptr,
+		       int bytes_to_write) {
+	solaris_audio* sa ;
+
+	/* arch/bsd graft */
+	struct timeval tv = { 1, 0 }; /* wait 1 sec max */
+	int iterator = 0;
+	int err;
+	fd_set sa_fd_set ;
+
+
+	/*fprintf(stderr, "Writing to audio device bytes_to_write{ %d }...\n", bytes_to_write );*/
+
+	if( handle == NULL )
+		return ;
+	sa = (solaris_audio*) handle ;
+	if( sa->fd == NULL )
+		return ;
+
+	/* This is the original write. */
+	/* write(sa->fd, (char *) dataptr, bytes_to_write);*/
+
+	/* This is the write() adapted from arch/bsd */
+
+	FD_SET(sa->fd, &sa_fd_set);
+
+	for(iterator = bytes_to_write; iterator > 0; ) {
+		if(select(sa->fd + 1, NULL, &sa_fd_set, NULL, &tv) == 0) {
+			/* timeout occured, don't try and write */
+#ifdef DEBUG_MAXIMUS
+			fprintf(stderr, "native_blitbuffer: timeout occured\n");
+#endif
+			return;
+		}
+
+		FD_ZERO(&sa_fd_set);
+		FD_SET(sa->fd, &sa_fd_set);
+
+		assert(iterator > 0);
+		assert(iterator <= bytes_to_write);
+
+		err = write(sa->fd,
+			    (char *) dataptr + bytes_to_write - iterator,
+			    iterator);
+		if(err < 0) {
+#ifdef DEBUG_MAXIMUS
+			perror("write");
+#endif
+			return;
+		}
+
+		iterator -= err;
+	};
+
+	return;
+}
+
+void release_native(void *handle) {
+  solaris_audio* sa ;
+
+  fprintf(stderr, "Closing audio device...\n");
+
+  if( handle == NULL )
+	  return ;
+  sa = (solaris_audio*) handle ;
+  if( sa->fd == NULL )
+	  return ;
+
+  close(sa->fd);
+
+  free( sa ) ;
+
+  return;
+}
+
+int set_nativechannel(UNUSED(void *handle),
+		      UNUSED(ALuint channel),
+		      UNUSED(ALfloat volume)) {
+	fprintf(stderr,  implement_me("set_nativechannel"));
+
+	return 0;
+}
+
+void pause_nativedevice(UNUSED(void *handle)) {
+	fprintf(stderr,  implement_me("pause_nativedevice"));
+
+	return;
+}
+
+void resume_nativedevice(UNUSED(void *handle)) {
+	fprintf(stderr,  implement_me("resume_nativedevice"));
+
+	return;
+}
+
+ALfloat get_nativechannel(UNUSED(void *handle), UNUSED(ALuint channel)) {
+	fprintf(stderr,  implement_me("get_nativechannel"));
+
+	return 0.0;
+}
+
+ALsizei capture_nativedevice(UNUSED(void *handle),
+			  UNUSED(void *capture_buffer),
+			  UNUSED(int bufsiz)) {
+	return 0; /* unimplemented */
+}
+
+static ALboolean set_write_native(void *handle,
+				  unsigned int *bufsiz,
+				  ALenum *fmt,
+				  unsigned int *speed) {
+  solaris_audio* sa ;
+
+  ALuint channels = _alGetChannelsFromFormat(*fmt);
+
+  if( handle == NULL )
+	  return AL_FALSE ;
+  sa = (solaris_audio*) handle ;
+
+  if( sa->fd == NULL )
+	  return AL_FALSE ;
+
+  AUDIO_INITINFO(&(sa->ainfo));
+  /*if( ioctl(gaudio.fd, AUDIO_GETINFO, &(gaudio.ainfo)) < 0 )
+    return AL_FALSE ; */
+
+  fprintf(stderr, "Setting audio device...\n");
+  sa->ainfo.play.sample_rate = *speed;
+  sa->ainfo.play.channels = channels;
+  /*fprintf(stderr, "solaris: set_write_native speed{ %d }, channels{ %d }, format{ %d }, buffer_size{ %u } \n", *speed, channels, *fmt, *bufsiz ) ;*/
+  switch (*fmt) {
+    case AL_FORMAT_MONO8:
+    case AL_FORMAT_STEREO8:
+            /*fprintf(stderr, "Setting Mono8/Stereo8... \n");*/
+      sa->ainfo.play.precision = 8;
+      sa->ainfo.play.encoding = AUDIO_ENCODING_LINEAR8;
+      break;
+    case AL_FORMAT_MONO16:
+    case AL_FORMAT_STEREO16:
+      sa->ainfo.play.precision = 16;
+      /*#ifdef WORDS_BIGENDIAN*/
+      /*fprintf( stderr, "WORDS BIGENDIAN" ) ;*/
+      sa->ainfo.play.encoding = AUDIO_ENCODING_LINEAR;
+      /*#else
+       fprintf( stderr, "WORDS LITTLEENDIAN" ) ;
+       sa->ainfo.play.encoding = AUDIO_ENCODING_LINEAR;*/
+      /* #endif*/ /* WORDS_BIGENDIAN */
+      break;
+
+    default:
+      fprintf(stderr, "Unsuported audio format:%d\n", *fmt);
+      return AL_FALSE;
+  }
+
+  sa->ainfo.play.buffer_size = *bufsiz;
+
+  /*if (ioctl(gaudio.fd, AUDIO_SETINFO, &gaudio.ainfo) < 0)*/
+  if (ioctl(sa->fd, AUDIO_SETINFO, &(sa->ainfo)) < 0)
+    return AL_FALSE;
+  else
+    return AL_TRUE;
+}
+
+static ALboolean set_read_native(UNUSED(void *handle),
+				 UNUSED(unsigned int *bufsiz),
+				 UNUSED(ALenum *fmt),
+				 UNUSED(unsigned int *speed)) {
+	return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesNative_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_native(handle, bufsiz, fmt, speed) :
+		set_write_native(handle, bufsiz, fmt, speed);
+}
Index: /openal-0.0.8/src/backends/alc_backend_wave.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_wave.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_wave.c	(revision 17)
@@ -0,0 +1,390 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * waveout.c
+ *
+ * WAVE file output.  Context writes, we save and sleep.
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "al_main.h"
+#include "al_debug.h"
+#include "backends/alc_backend.h"
+#include "audioconvert/ac_endian.h"
+
+#define WAVEOUT_NAMELEN 16
+#define HEADERSIZE      28
+#define DATAADJUSTMENT  44
+
+
+#ifdef WORDS_BIGENDIAN
+#define RIFFMAGIC       0x52494646
+#define WAVEMAGIC       0x57415645
+#define FMTMAGIC        0x666D7420
+#define DATAMAGIC	0x64617461
+#else
+#define RIFFMAGIC       0x46464952
+#define WAVEMAGIC       0x45564157
+#define FMTMAGIC        0x20746D66
+#define DATAMAGIC	0x61746164
+#endif /* WORDS_BIGENDIAN */
+
+/* better wart needed? JIV FIXME */
+#ifdef MAXNAMELEN
+#undef MAXNAMELEN
+#endif /* MAXNAMELEN */
+
+#define MAXNAMELEN      1024
+
+typedef struct waveout_s {
+	FILE *fh;
+
+	ALuint format;
+	ALuint speed;
+	ALuint channels;
+
+	ALuint length;
+
+	ALushort bitspersample;
+
+	char name[WAVEOUT_NAMELEN];
+} waveout_t;
+
+static ALuint sleep_usec(ALuint speed, ALuint chunk);
+static void apply_header(waveout_t *wave);
+static const char *waveout_unique_name(char *template);
+
+/*
+ * convert_to_little_endian( ALuint bps, void *data, int nbytes )
+ *
+ * Convert data in place to little endian format.  NOP on little endian
+ * machines.
+ */
+static void convert_to_little_endian( ALuint bps, void *data, int nbytes );
+
+static void *grab_write_waveout(void) {
+	FILE *fh;
+	waveout_t *retval = NULL;
+	char template[MAXNAMELEN] = "openal-";
+
+	if(waveout_unique_name(template) == NULL) {
+		perror("tmpnam");
+	}
+
+	fh = fopen(template, "w+b");
+	if(fh == NULL) {
+		fprintf(stderr,
+			"waveout grab audio %s failed\n", template);
+		return NULL;
+	}
+
+	retval = malloc(sizeof *retval);
+	if(retval == NULL) {
+		fclose(fh);
+		return NULL;
+	}
+
+	memset(retval, 0, sizeof *retval);
+
+	/* set to return params */
+	retval->fh = fh;
+	strncpy(retval->name, template, WAVEOUT_NAMELEN);
+
+	retval->length = 0;
+
+	fprintf(stderr, "waveout grab audio %s\n", template);
+
+	_alDebug(ALD_CONTEXT, __FILE__, __LINE__,
+		"waveout grab audio ok");
+
+	fseek(retval->fh, SEEK_SET, HEADERSIZE); /* leave room for header */
+        return retval;
+}
+
+static void *grab_read_waveout(void) {
+	return NULL;
+}
+
+void *
+alcBackendOpenWAVE_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_waveout() : grab_write_waveout();
+}
+
+void waveout_blitbuffer(void *handle, void *dataptr, int bytes_to_write) {
+	waveout_t *whandle = NULL;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	whandle = handle;
+
+	if(whandle->fh == NULL) {
+		return;
+	}
+
+	whandle->length += bytes_to_write;
+
+	/*
+	 * WAV files expect their PCM data in LE format.  If we are on
+	 * big endian host, we need to convert the data in place.
+	 *
+	 */
+	convert_to_little_endian( whandle->bitspersample,
+				  dataptr,
+				  bytes_to_write );
+
+	fwrite(dataptr, 1, bytes_to_write, whandle->fh);
+
+	_alMicroSleep(sleep_usec(whandle->speed, bytes_to_write));
+
+        return;
+}
+
+/*
+ *  close file, free data
+ */
+void release_waveout(void *handle) {
+	waveout_t *closer;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	closer = handle;
+
+	fprintf(stderr, "releasing waveout file %s\n",
+		closer->name);
+
+	fflush( closer->fh );
+	apply_header( closer );
+
+	fclose( closer->fh );
+	free( closer );
+
+	return;
+}
+
+static ALuint sleep_usec(ALuint speed, ALuint chunk) {
+	ALuint retval;
+
+	retval = 1000000.0 * chunk / speed;
+
+#if 0
+	fprintf(stderr,
+		"(speed %d chunk %d retval = %d)\n",
+		speed,
+		chunk,
+		retval);
+#endif
+
+	return retval;
+}
+
+/*
+ *  FIXME: make endian correct
+ */
+static void apply_header(waveout_t *wave) {
+	ALushort writer16;
+	ALuint   writer32;
+
+	/* go to beginning */
+	if(fseek(wave->fh, SEEK_SET, 0) != 0) {
+		fprintf(stderr,
+			"Couldn't reset %s\n", wave->name);
+	}
+
+        /* 'RIFF' */
+	writer32 = RIFFMAGIC;
+	fwrite(&writer32, 1, sizeof writer32, wave->fh);
+
+	/* total length */
+	writer32 = swap32le(wave->length);
+	fwrite(&writer32, 1, sizeof writer32, wave->fh);
+
+        /* 'WAVE' */
+	writer32 = WAVEMAGIC;
+	fwrite(&writer32, 1, sizeof writer32, wave->fh);
+
+        /* 'fmt ' */
+	writer32 = FMTMAGIC;
+	fwrite(&writer32, 1, sizeof writer32, wave->fh);
+
+        /* fmt chunk length */
+	writer32 = swap32le(16);
+	fwrite(&writer32, 1, sizeof writer32, wave->fh);
+
+        /* ALushort encoding */
+	writer16 = swap16le(1);
+	fwrite(&writer16, 1, sizeof writer16, wave->fh);
+
+	/* Alushort channels */
+	writer16 = swap16le(wave->channels);
+	fwrite(&writer16, 1, sizeof writer16, wave->fh);
+
+	/* ALuint frequency */
+	writer32 = swap32le(wave->speed);
+	fwrite(&writer32, 1, sizeof writer32, wave->fh);
+
+	/* ALuint byterate  */
+	writer32 = swap32le(wave->speed / sizeof (ALshort)); /* FIXME */
+	fwrite(&writer32, 1, sizeof writer32, wave->fh);
+
+	/* ALushort blockalign */
+	writer16 = 0;
+	fwrite(&writer16, 1, sizeof writer16, wave->fh);
+
+	/* ALushort bitspersample */
+	writer16 = swap16le(wave->bitspersample);
+	fwrite(&writer16, 1, sizeof writer16, wave->fh);
+
+        /* 'data' */
+	writer32 = DATAMAGIC;
+	fwrite(&writer32, 1, sizeof writer32, wave->fh);
+
+	/* data length */
+	writer32 = swap32le(wave->length - DATAADJUSTMENT); /* samples */
+	fwrite(&writer32, 1, sizeof writer32, wave->fh);
+
+	fprintf(stderr, "waveout length %d\n", wave->length);
+
+	return;
+}
+
+static const char *waveout_unique_name(char *template) {
+	static char retval[MAXNAMELEN];
+	int template_offset;
+	static int sequence = 0;
+	struct stat buf;
+
+	strncpy(retval, template, MAXNAMELEN - 2);
+	retval[MAXNAMELEN - 1] = '\0';
+
+	template_offset = strlen(retval);
+
+	if(template_offset >= MAXNAMELEN - 28) { /* kludgey */
+		/* template too big */
+		return NULL;
+	}
+
+	do {
+		/* repeat until we have a unique name */
+		snprintf(&retval[template_offset], sizeof(retval) - template_offset, "%d.wav", sequence++);
+		strncpy(template, retval, MAXNAMELEN);
+	} while(stat(retval, &buf) == 0);
+
+	return retval;
+}
+
+static ALboolean set_write_waveout(void *handle,
+				   UNUSED(ALuint *bufsiz),
+				   ALenum *fmt,
+				   ALuint *speed) {
+	waveout_t *whandle;
+	ALuint chans = _alGetChannelsFromFormat( *fmt );
+
+	if(handle == NULL) {
+		return AL_FALSE;
+	}
+
+	whandle = handle;
+
+	whandle->speed    = *speed;
+	whandle->format   = *fmt;
+	whandle->channels = chans;
+	whandle->bitspersample = _alGetBitsFromFormat(*fmt);
+
+        return AL_TRUE;
+}
+
+static ALboolean set_read_waveout(UNUSED(void *handle),
+				  UNUSED(ALuint *bufsiz),
+				  UNUSED(ALenum *fmt),
+				  UNUSED(ALuint *speed)) {
+
+	return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesWAVE_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_waveout(handle, bufsiz, fmt, speed) :
+		set_write_waveout(handle, bufsiz, fmt, speed);
+}
+
+/*
+ * convert_to_little_endian( ALuint bps, void *data, int nbytes )
+ *
+ * Convert data in place to little endian format.  bps is the bits per
+ * sample in data, nbytes is the length of data in bytes.  If bps is 8,
+ * or the machine is little endian, this is a nop.
+ *
+ * FIXME:
+ *	We only handle 16-bit signed formats for now.  Should fix this.
+ */
+static void convert_to_little_endian( ALuint bps, void *data, int nbytes )
+{
+	assert( data );
+	assert( nbytes > 0 );
+
+	if( bps == 8 ) {
+		/* 8-bit samples don't need to be converted */
+		return;
+	}
+
+	assert( bps == 16 );
+
+#ifdef WORDS_BIGENDIAN
+	/* do the conversion */
+	{
+		ALshort *outp = data;
+		ALuint i;
+		for( i = 0; i < nbytes/sizeof(ALshort); i++ ) {
+			outp[i] = swap16le( outp[i] );
+		}
+	}
+#else
+	(void)data; (void)nbytes;
+#endif /* WORDS_BIG_ENDIAN */
+}
+
+void
+pause_waveout( UNUSED(void *handle) )
+{
+}
+
+void
+resume_waveout( UNUSED(void *handle) )
+{
+}
+
+ALsizei
+capture_waveout( UNUSED(void *handle), UNUSED(void *capture_buffer), UNUSED(int bufsiz) )
+{
+	return 0;
+}
+
+ALfloat
+get_waveoutchannel( UNUSED(void *handle), UNUSED(ALuint channel) )
+{
+	return 0.0;
+}
+
+int
+set_waveoutchannel( UNUSED(void *handle), UNUSED(ALuint channel), UNUSED(ALfloat volume) )
+{
+	return 0;
+}
Index: /openal-0.0.8/src/backends/alc_backend_windows.c
===================================================================
--- /openal-0.0.8/src/backends/alc_backend_windows.c	(revision 17)
+++ /openal-0.0.8/src/backends/alc_backend_windows.c	(revision 17)
@@ -0,0 +1,310 @@
+/* vi:set ts=8:
+ *
+ * windows_native.c
+ *
+ * functions related to the aquisition and management of the native
+ * audio on Windows.
+ *
+ */
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
+#include <mmsystem.h>
+
+#include "backends/alc_backend.h"
+
+#include "al_main.h"
+#include "al_debug.h"
+
+#include "alc/alc_context.h"
+
+#include "al_mutexlib.h"
+
+#define DEF_BITSPERSAMPLE 16
+#define DEF_SPEED         44100
+#define DEF_FORMAT        WAVE_FORMAT_PCM
+#define DEF_CHANNELS      2
+#define DEF_CBSIZE        0
+
+#define MAX_AUDIOBUFS     8
+#define MAX_PCMDATA       (DEF_SPEED * DEF_CHANNELS)
+#define EMAIL_ADDRESS     "tsaotsao@lokigames.com"
+
+static MutexID mutex;
+
+static struct {
+	WAVEHDR whdrs[MAX_AUDIOBUFS];
+	int index;
+} audiobufs;
+
+static struct {
+        HWAVEOUT hwo;
+	WAVEFORMATEX pwfx;
+} WinAudioHandle;
+
+static char pcmdata[MAX_PCMDATA];
+static int scalesize = 0;
+
+
+static void CALLBACK WinFillAudio(UNUSED(HWAVEOUT hwo),
+	UNUSED(UINT uMsg),
+	UNUSED(DWORD dwInstance),
+	UNUSED(DWORD dwParam1),
+	UNUSED(DWORD dwParam2)) {
+
+        /* Only service "buffer done playing" messages */
+        if( uMsg == WOM_DONE ) {
+		_alUnlockMutex(mutex);
+	}
+
+	return;
+}
+
+
+static const char *implement_me(const char *fn) {
+	static char retval[2048];
+
+	snprintf(retval, sizeof(retval),
+	"%s is not implemented under Windows.  Please contact %s for\n"
+	"information on how you can help get %s implemented on Windows.\n",
+	fn, EMAIL_ADDRESS, fn);
+
+	return retval;
+}
+
+static void *grab_read_native(void) {
+	return NULL;
+}
+
+static void *grab_write_native(void) {
+	MMRESULT err;
+	LPWAVEFORMATEX pwfx = &WinAudioHandle.pwfx;
+	int i;
+
+	audiobufs.index = 0;
+	mutex = _alCreateMutex();
+
+	for(i = 0; i < MAX_AUDIOBUFS; i++) {
+		audiobufs.whdrs[i].lpData  = NULL;
+		audiobufs.whdrs[i].dwBufferLength = 0;
+		audiobufs.whdrs[i].dwFlags = WHDR_DONE;
+	}
+
+	memset(pwfx, 0, sizeof *pwfx);
+
+	pwfx->wFormatTag      = DEF_FORMAT;
+	pwfx->nChannels       = DEF_CHANNELS;
+	pwfx->wBitsPerSample  = DEF_BITSPERSAMPLE;
+	pwfx->nBlockAlign     = DEF_CHANNELS * (pwfx->wBitsPerSample / 8);
+	pwfx->nSamplesPerSec  = DEF_SPEED;
+	pwfx->nAvgBytesPerSec = pwfx->nSamplesPerSec * pwfx->nBlockAlign;
+ 	pwfx->cbSize          = DEF_CBSIZE;
+
+	err = waveOutOpen(&WinAudioHandle.hwo, WAVE_MAPPER, pwfx,
+		(DWORD) WinFillAudio,
+		0,
+		CALLBACK_FUNCTION);
+
+	if(err == MMSYSERR_NOERROR) {
+		fprintf(stderr, "got Windows native audio\n");
+
+		return &WinAudioHandle.hwo;
+	}
+
+	fprintf(stderr, "Could not open Windows native audio: %d\n",
+		err);
+
+	return NULL;
+}
+
+void *
+alcBackendOpenNative_( ALC_OpenMode mode )
+{
+	return mode == ALC_OPEN_INPUT_ ? grab_read_native() : grab_write_native();
+}
+
+void native_blitbuffer(void *handle, void *dataptr, int bytes_to_write) {
+	WAVEHDR *whdr;
+	MMRESULT err;
+        HWAVEOUT hwo;
+	char *bufptr;
+	char errmsg[256];
+
+	if(handle == NULL) {
+		return;
+	}
+
+	hwo = WinAudioHandle.hwo;
+
+	_alLockMutex(mutex);
+
+	whdr   = &audiobufs.whdrs[audiobufs.index];
+
+	do {
+		/* busy wait, ouch */
+		_alMicroSleep(0);
+	} while((whdr->dwFlags & WHDR_DONE) == 0);
+
+	bufptr = pcmdata + audiobufs.index * scalesize;
+	memcpy(bufptr, dataptr, bytes_to_write);
+
+	audiobufs.index = (audiobufs.index + 1) % MAX_AUDIOBUFS;
+
+	err = waveOutWrite(hwo, whdr, sizeof *whdr);
+	if(err != MMSYSERR_NOERROR) {
+		waveOutGetErrorText(err, errmsg, 256);
+		fprintf(stderr, "native_blitbuffer: write error %s\n",
+			errmsg);
+	}
+
+	return;
+}
+
+/*
+ * FIXME: unprepare whdrs
+ */
+void release_native(void *handle) {
+	WAVEHDR *whdr;
+	HWAVEOUT hwo;
+	int i;
+
+	_alDestroyMutex(mutex);
+	mutex = NULL;
+
+	if(handle == NULL) {
+		return;
+	}
+
+	hwo = WinAudioHandle.hwo;
+	whdr = &audiobufs.whdrs[audiobufs.index];
+
+	for(i = 0; i < MAX_AUDIOBUFS; i++) {
+		/* not first time */
+		waveOutUnprepareHeader(hwo, whdr, sizeof *whdr);
+	}
+
+	waveOutClose(hwo);
+
+	return;
+}
+
+int set_nativechannel(UNUSED(void *handle),
+		      UNUSED(ALuint channel),
+		      UNUSED(ALfloat volume)) {
+	fprintf(stderr,  implement_me("set_nativechannel"));
+
+	return 0;
+}
+
+void pause_nativedevice(UNUSED(void *handle)) {
+	fprintf(stderr,  implement_me("pause_nativedevice"));
+
+	return;
+}
+
+void resume_nativedevice(UNUSED(void *handle)) {
+	fprintf(stderr,  implement_me("resume_nativedevice"));
+
+	return;
+}
+
+ALfloat get_nativechannel(UNUSED(void *handle), UNUSED(ALuint channel)) {
+	fprintf(stderr,  implement_me("get_nativechannel"));
+
+	return 0.0;
+}
+
+ALsizei capture_nativedevice(UNUSED(void *handle),
+			  UNUSED(void *capture_buffer),
+			  UNUSED(int bufsiz)) {
+	return 0; /* unimplemented */
+}
+
+
+static ALboolean set_write_native(UNUSED(void *handle),
+				  UNUSED(unsigned int *bufsiz),
+				  UNUSED(ALenum *fmt),
+				  UNUSED(unsigned int *speed)) {
+	WAVEHDR *whdr;
+	MMRESULT err;
+	LPWAVEFORMATEX pwfx = &WinAudioHandle.pwfx;
+	int i;
+	char *bufptr;
+        HWAVEOUT hwo;
+	ALuint channels = _alGetChannelsFromFormat(*fmt);
+
+	/* close previous instance */
+	waveOutClose(WinAudioHandle.hwo);
+
+	memset(pwfx, 0, sizeof *pwfx);
+
+	pwfx->wFormatTag      = DEF_FORMAT;
+	pwfx->nChannels       = channels;
+	pwfx->wBitsPerSample  = _alGetBitsFromFormat(*fmt);
+	pwfx->nBlockAlign     = pwfx->nChannels * (pwfx->wBitsPerSample / 8);
+	pwfx->nSamplesPerSec  = *speed;
+	pwfx->nAvgBytesPerSec = pwfx->nSamplesPerSec * pwfx->nBlockAlign;
+ 	pwfx->cbSize          = DEF_CBSIZE;
+
+	fprintf(stderr, "chans %d bps %d bal %d sps %d abs %d cbs %d\n",
+		pwfx->nChannels,
+		pwfx->wBitsPerSample,
+		pwfx->nBlockAlign,
+		(int) pwfx->nSamplesPerSec,
+		(int) pwfx->nAvgBytesPerSec,
+		(int) pwfx->cbSize);
+
+	err = waveOutOpen(&WinAudioHandle.hwo, WAVE_MAPPER, pwfx,
+		(DWORD) WinFillAudio,
+		0,
+		CALLBACK_FUNCTION);
+
+	if(err != MMSYSERR_NOERROR) {
+		fprintf(stderr, "Could not setfmt: %d\n", err);
+		return AL_FALSE;
+	}
+
+	fprintf(stderr, "setfmt okay\n");
+
+	hwo = WinAudioHandle.hwo;
+
+	scalesize = *bufsiz;
+
+	for(i = 0; i < MAX_AUDIOBUFS; i++) {
+		whdr   = &audiobufs.whdrs[i];
+		bufptr = pcmdata + i * scalesize;
+
+		whdr->lpData  = (LPSTR) bufptr;
+		whdr->dwBufferLength = *bufsiz;
+		whdr->dwFlags = WHDR_DONE;
+
+		err = waveOutPrepareHeader(hwo, whdr, sizeof *whdr);
+
+		if(err != MMSYSERR_NOERROR) {
+			fprintf(stderr, "Could not prepare header: %d\n", err);
+
+			return AL_FALSE;
+		}
+	}
+
+	return AL_TRUE;
+}
+
+static ALboolean set_read_native(UNUSED(void *handle),
+				 UNUSED(unsigned int *bufsiz),
+				 UNUSED(ALenum *fmt),
+				 UNUSED(unsigned int *speed)) {
+	return AL_FALSE;
+}
+
+ALboolean
+alcBackendSetAttributesNative_(ALC_OpenMode mode, void *handle, ALuint *bufsiz, ALenum *fmt, ALuint *speed)
+{
+	return mode == ALC_OPEN_INPUT_ ?
+		set_read_native(handle, bufsiz, fmt, speed) :
+		set_write_native(handle, bufsiz, fmt, speed);
+}
Index: /openal-0.0.8/src/extensions/al_ext_capture.c
===================================================================
--- /openal-0.0.8/src/extensions/al_ext_capture.c	(revision 17)
+++ /openal-0.0.8/src/extensions/al_ext_capture.c	(revision 17)
@@ -0,0 +1,204 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext_capture.c
+ *
+ * audio recording extension
+ *
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "al_ext_needed.h"
+#include "al_ext_capture.h"
+
+#include "al_buffer.h"
+#include "al_error.h"
+#include "al_debug.h"
+#include "al_mixer.h"
+#include "al_source.h"
+#include "alc/alc_device.h"
+#include "alc/alc_context.h"
+#include "al_types.h"
+
+#include "audioconvert/audioconvert.h"
+
+#include "backends/alc_backend.h"
+#include "al_mutexlib.h"
+
+#ifdef OPENAL_EXTENSION
+
+/*
+ * we are not being build into the library, therefore define the
+ * table that informs openal how to register the extensions upon
+ * dlopen.
+ */
+struct { ALubyte *name; void *addr; } alExtension_03222001 [] = {
+	AL_EXT_PAIR(alCaptureInit_EXT),
+	AL_EXT_PAIR(alCaptureStart_EXT),
+	AL_EXT_PAIR(alCaptureStop_EXT),
+	AL_EXT_PAIR(alCaptureGetData_EXT),
+	AL_EXT_PAIR(alCaptureDestroy_EXT),
+	{ NULL, NULL }
+};
+
+/*
+ *  We don't need init or fini functions, but we might as well
+ *  keep them in place if, in some distant future, they turn out
+ *  to be useful.
+ */
+void alExtInit_03282000(void) {
+	fprintf(stderr, "alExtInit_03282000 STUB\n");
+	return;
+}
+
+void alExtFini_03282000(void) {
+	fprintf(stderr, "alExtFini_03282000 STUB\n");
+	return;
+}
+#endif /* OPENAL_EXTENSION */
+
+void alInitCapture(void) {
+	return;
+}
+
+void alFiniCapture(void) {
+	return;
+}
+
+ALboolean alCaptureInit_EXT( UNUSED(ALenum format),
+                             UNUSED(ALuint rate),
+                             UNUSED(ALsizei bufferSize) )
+{
+	ALuint cid;
+	AL_context *cc;
+	AL_device *capture_device;
+
+	/* get the current context */
+	capture_device = NULL;
+	cid = _alcCCId;
+	_alcLockContext( cid );
+	cc = _alcGetContext(cid);
+	if ( cc != NULL ) {
+		capture_device = cc->read_device;
+		if ( capture_device == NULL ) {
+			char spec[1024];
+			const char *fmt="'( (direction \"read\") (sampling-rate %d))";
+
+			snprintf(spec, sizeof(spec), fmt, rate);
+			capture_device = alcOpenDevice((ALchar *)spec);
+			if ( capture_device ) {
+				_alcSetContext(NULL, cid, capture_device);
+				_alcDeviceSet(capture_device);
+			}
+		}
+	}
+	_alcUnlockContext( cid );
+
+	return (capture_device != NULL);
+}
+
+ALboolean alCaptureDestroy_EXT( void )
+{
+	ALuint cid;
+	AL_context *cc;
+
+	/* get the current context */
+	cid = _alcCCId;
+	_alcLockContext( cid );
+	cc = _alcGetContext(cid);
+	if ( cc == NULL ) {
+		_alcUnlockContext( cid );
+		return AL_FALSE;
+	}
+
+	if ( cc->read_device ) {
+		/* Only close it if we opened it originally */
+		if (cc->write_device && (cc->read_device != cc->write_device)) {
+			alcCloseDevice(cc->read_device);
+			cc->read_device = NULL;
+		}
+	}
+	_alcUnlockContext( cid );
+
+	return AL_TRUE;
+}
+
+ALboolean alCaptureStart_EXT( void )
+{
+	return AL_FALSE;
+}
+
+ALboolean alCaptureStop_EXT( void )
+{
+	return AL_FALSE;
+}
+
+ALsizei alCaptureGetData_EXT( UNUSED(ALvoid* data),
+                              ALsizei n,
+                              UNUSED(ALenum format),
+                              UNUSED(ALuint rate) )
+{
+	AL_device *dev;
+	ALuint size;
+	ALuint cid;
+	AL_context *cc;
+
+	/* get the read device */
+	cid = _alcCCId;
+	cc = _alcGetContext(cid);
+	if ( cc == NULL ) {
+		return 0;
+	}
+	dev = cc->read_device;
+
+	if ( (dev->format == format) && (dev->speed == rate) ) {
+		size = _alcDeviceRead(cid, data, (ALuint)n);
+	} else {
+		ALuint samples;
+		void *temp;
+
+		samples = n / (_alGetBitsFromFormat(format) / 8);
+
+		/* Set size to the bytes of raw audio data we need */
+		size = _al_PCMRatioify(rate, dev->speed,
+		                       format, dev->format, samples);
+		size *= (_alGetBitsFromFormat(dev->format) / 8);
+
+        	if ( n > (ALsizei)size )
+			temp = malloc( (size_t)n );
+		else
+			temp = malloc( (size_t)size );
+
+		if ( size > 0 ) {
+			size = _alcDeviceRead(cid, temp, size);
+
+			temp = (void *)_alBufferCanonizeData(dev->format,
+						     temp,
+						     size,
+						     dev->speed,
+						     format,
+						     rate,
+						     &size,
+						     AL_TRUE);
+		} else {
+			/* Hmm, zero size in record.. */
+			memset(temp, 0, (size_t)n);
+			size = n;
+		}
+		if(temp == NULL) {
+			fprintf(stderr, "could not canonize data\n");
+			return 0;
+		}
+
+		memcpy(data, temp, size);
+
+		free( temp );
+	}
+	return size;
+}
Index: /openal-0.0.8/src/extensions/al_ext_capture.h
===================================================================
--- /openal-0.0.8/src/extensions/al_ext_capture.h	(revision 17)
+++ /openal-0.0.8/src/extensions/al_ext_capture.h	(revision 17)
@@ -0,0 +1,55 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext_capture.h
+ *
+ * Prototypes for audio recording extension
+ */
+#ifndef AL_EXT_CAPTURE_H_
+#define AL_EXT_CAPTURE_H_
+
+#include "al_ext_needed.h"
+#include "al_types.h"
+
+#include <AL/alext.h>
+
+/*
+ * alInitCapture( void )
+ *
+ * Initializes data structures needed by all captures.
+ */
+void alInitCapture( void );
+
+/*
+ * alFiniCapture( void )
+ *
+ * Finalizes all things needing finalization by all captures.
+ */
+void alFiniCapture( void );
+
+#ifndef OPENAL_EXTENSION
+
+/*
+ * we are being built into the standard library, so inform
+ * the extension registrar
+ */
+#define BUILTIN_EXT_CAPTURE                                        \
+	AL_EXT_PAIR(alCaptureInit_EXT),                            \
+	AL_EXT_PAIR(alCaptureStart_EXT),                           \
+	AL_EXT_PAIR(alCaptureStop_EXT),                            \
+	AL_EXT_PAIR(alCaptureGetData_EXT),                         \
+	AL_EXT_PAIR(alCaptureDestroy_EXT)                         \
+
+/* initialization and destruction functions */
+
+#define BUILTIN_EXT_CAPTURE_INIT  alInitCapture()
+#define BUILTIN_EXT_CAPTURE_FINI  alFiniCapture()
+
+#else
+
+#define BUILTIN_EXT_CAPTURE_INIT
+#define BUILTIN_EXT_CAPTURE_FINI
+
+#endif /* OPENAL_EXTENSION */
+
+#endif /* AL_EXT_CAPTURE_H_ */
Index: /openal-0.0.8/src/extensions/al_ext_loki.c
===================================================================
--- /openal-0.0.8/src/extensions/al_ext_loki.c	(revision 17)
+++ /openal-0.0.8/src/extensions/al_ext_loki.c	(revision 17)
@@ -0,0 +1,1213 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext_loki.c
+ *
+ * (semi) standard Loki extensions.
+ *
+ * For more information about extensions, please check the documentation,
+ * and visit al_ext.c.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "al_ext_needed.h"
+#include "al_ext_loki.h"
+
+#include "al_buffer.h"
+#include "al_error.h"
+#include "al_debug.h"
+#include "al_source.h"
+#include "alc/alc_context.h"
+#include "alc/alc_speaker.h"
+
+#include "audioconvert/audioconvert.h"
+
+#include "backends/alc_backend.h"
+
+#ifndef elementsof
+#define elementsof(a) ((sizeof(a)) / (sizeof *(a)))
+#endif
+
+static ALfloat _alcGetAudioChannel_LOKI(ALuint channel);
+static void _alcSetAudioChannel_LOKI(ALuint channel, ALfloat volume);
+
+/* BufferAppendData defines */
+#define MINSTREAMCHUNKSIZE  32768 /* minimum reasonable size */
+#define EXPANDSTREAMBUFSIZE 262144 /* expand buffer with reckless
+				    * abandon until this point, then
+				    * avoid it if possible
+				    */
+
+static struct {
+	void *data;
+	ALuint size;
+} scratch = { NULL, 0 };
+
+#if 0
+static void *bufferAppendScratch = NULL; /* scratch space for BufferAppendData */
+#endif
+
+#ifdef OPENAL_EXTENSION
+
+/*
+ * we are not being build into the library, therefore define the
+ * table that informs openal how to register the extensions upon
+ * dlopen.
+ */
+struct { ALubyte *name; void *addr; } alExtension_03282000 [] = {
+	AL_EXT_PAIR(alutLoadMS_ADPCMData_LOKI),
+	AL_EXT_PAIR(alutLoadRAW_ADPCMData_LOKI),
+	AL_EXT_PAIR(alutLoadIMA_ADPCMData_LOKI),
+	AL_EXT_PAIR(alGenStreamingBuffers_LOKI),
+	AL_EXT_PAIR(alcGetAudioChannel_LOKI),
+	AL_EXT_PAIR(alcSetAudioChannel_LOKI),
+	AL_EXT_PAIR(alBombOnError_LOKI),
+	AL_EXT_PAIR(alReverbScale_LOKI),
+	AL_EXT_PAIR(alReverbDelay_LOKI),
+	AL_EXT_PAIR(alBufferi_LOKI),
+	AL_EXT_PAIR(alBufferDataWithCallback_LOKI),
+	AL_EXT_PAIR(alBufferAppendData_LOKI),
+	AL_EXT_PAIR(alBufferWriteData_LOKI),
+	AL_EXT_PAIR(alBufferAppendWriteData_LOKI),
+	AL_EXT_PAIR(alutLoadRAW_ADPCMData_LOKI),
+	{ NULL, NULL }
+};
+
+
+/*
+ *  We don't need init or fini functions, but we might as well
+ *  keep them in place if, in some distant future, they turn out
+ *  to be useful.
+ */
+void alExtInit_03282000(void) {
+	fprintf(stderr, "alExtInit_03282000 STUB\n");
+	return;
+}
+
+void alExtFini_03282000(void) {
+	if(bufferAppendScratch != NULL) {
+		free(bufferAppendScratch);
+	}
+
+	bufferAppendScratch = NULL;
+
+	return;
+}
+#endif /* OPENAL_EXTENSION */
+
+ALfloat alcGetAudioChannel_LOKI(ALuint channel) {
+	ALfloat retval;
+
+	_alcDCLockContext();
+
+	retval = _alcGetAudioChannel_LOKI(channel);
+
+	_alcDCUnlockContext();
+
+	return retval;
+}
+
+void alcSetAudioChannel_LOKI(ALuint channel, ALfloat volume) {
+	_alcDCLockContext();
+
+	_alcSetAudioChannel_LOKI(channel, volume);
+
+	_alcDCUnlockContext();
+}
+
+static void _alcSetAudioChannel_LOKI(ALuint channel, ALfloat volume) {
+	AL_context *cc;
+
+	cc = _alcDCGetContext();
+	if(cc == NULL) {
+		return;
+	}
+
+	alcBackendSetAudioChannel_(cc->write_device->handle, channel, volume);
+
+	return;
+}
+
+static ALfloat _alcGetAudioChannel_LOKI(ALuint channel) {
+	AL_context *cc = _alcDCGetContext();
+
+	if(cc == NULL) {
+		return 0;
+	}
+
+	return alcBackendGetAudioChannel_( cc->write_device->handle, channel);
+}
+
+/* 0.0 - 1.0 */
+void alReverbScale_LOKI(ALuint sid, ALfloat param) {
+	AL_source *src;
+
+	if((param < 0.0) || (param > 1.0)) {
+		/*
+		 * For this kludge, the scale is normalized.
+		 */
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+		      "alReverbScale: invalid value %f",
+		      param);
+
+		_alDCSetError(AL_INVALID_VALUE);
+		return;
+	}
+
+	_alcDCLockContext();
+
+	src = _alDCGetSource(sid);
+	if(src == NULL) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+		      "alReverbScale: invalid source id %d",
+		      sid);
+
+		_alDCSetError(AL_INVALID_NAME);
+		return;
+	}
+
+	src->reverb_scale = param;
+	src->flags       |= ALS_REVERB;
+
+	_alcDCUnlockContext();
+
+	return;
+}
+
+/* 0.0 - 2.0 in seconds */
+void alReverbDelay_LOKI(ALuint sid, ALfloat param) {
+	AL_source *src;
+
+	if((param < 0.0) || (param > 2.0)) {
+		/*
+		 * For this kludge, the scale is 2 * normalized.
+		 */
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+		      "alReverbDelay: invalid value %f",
+		      param);
+
+		_alDCSetError(AL_INVALID_VALUE);
+		return;
+	}
+
+	_alcDCLockContext();
+
+	src = _alDCGetSource(sid);
+	if(src == NULL) {
+		_alDebug(ALD_MAXIMUS, __FILE__, __LINE__,
+		      "alReverbScale: invalid source id %d",
+		      sid);
+
+		_alDCSetError(AL_INVALID_NAME);
+		return;
+	}
+
+	src->reverb_delay = param * canon_speed * _alGetChannelsFromFormat(canon_format);
+
+	src->flags |= ALS_REVERB;
+
+	_alcDCUnlockContext();
+
+	return;
+}
+
+void alBombOnError_LOKI(void) {
+	_alShouldBombOnError_LOKI = AL_TRUE;
+
+	return;
+}
+
+void alBufferi_LOKI(ALuint buffer, ALenum param, ALint value) {
+	AL_buffer *buf = NULL;
+
+	_alLockBuffer();
+	buf = _alGetBuffer(buffer);
+
+	if(buf == NULL) {
+		_alUnlockBuffer();
+
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+			"buffer id %d is a bad index", buffer);
+
+		_alDCSetError(AL_INVALID_NAME);
+		return;
+	}
+
+	switch(param) {
+		case AL_FREQUENCY:
+		  buf->frequency = value;
+		  break;
+		case AL_BITS:
+		  switch(value) {
+		      case 8:
+			switch(_alGetChannelsFromFormat(buf->format)) {
+			    case 1:
+			      buf->format = AL_FORMAT_MONO8;
+			      break;
+			    case 2:
+			      buf->format = AL_FORMAT_STEREO8;
+			      break;
+			    default:
+			      break;
+			}
+			break;
+		      case 16:
+			switch(_alGetChannelsFromFormat(buf->format)) {
+			    case 1:
+			      buf->format = AL_FORMAT_MONO16;
+			      break;
+			    case 2:
+			      buf->format = AL_FORMAT_STEREO16;
+			      break;
+			    default:
+			      break;
+			}
+			break;
+		  }
+		  break;
+		case AL_CHANNELS:
+		  switch(value) {
+		      case 1:
+			switch(_alGetBitsFromFormat(buf->format)) {
+			    case 8:
+			      buf->format = AL_FORMAT_MONO8;
+			      break;
+			    case 16:
+			      buf->format = AL_FORMAT_MONO16;
+			      break;
+			    default: break;
+			}
+			break;
+		      case 2:
+			switch(_alGetBitsFromFormat(buf->format)) {
+			    case 8:
+			      buf->format = AL_FORMAT_STEREO8;
+			      break;
+			    case 16:
+			      buf->format = AL_FORMAT_STEREO16;
+			      break;
+			}
+			break;
+		  }
+		  break;
+		case AL_SIZE:
+		  buf->size = value;
+		  break;
+		default:
+		  _alDebug(ALD_BUFFER, __FILE__, __LINE__,
+			"alBufferi bad param 0x%x", param);
+
+		  _alDCSetError(AL_INVALID_ENUM);
+		  break;
+	}
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/*
+ *  Just a thin wrapper around our internal use callback interface.
+ *  Applications that rely on the callback know when to delete sources
+ *  and buffers, so the additional callback are not needed.
+ */
+void alBufferDataWithCallback_LOKI(ALuint bid,
+		int (*Callback)(ALuint, ALuint, ALshort *, ALenum, ALint, ALint)) {
+
+	_alBufferDataWithCallback_LOKI(bid, Callback, NULL, NULL);
+
+	return;
+}
+
+void alInitLoki(void) {
+	return;
+}
+
+void alFiniLoki(void) {
+	if(scratch.size != 0) {
+		free(scratch.data);
+	}
+
+	scratch.size = 0;
+	scratch.data = NULL;
+
+	return;
+}
+
+/**
+ *
+ * alBufferWriteData_LOKI( ALuint  bid,
+ *               ALenum  format,
+ *               ALvoid  *data,
+ *               ALsizei size,
+ *               ALsizei freq
+ *               ALenum  internalFormat )
+ *
+ * associates data with bid, with format hint
+ *
+ * If format is invalid, set AL_INVALID_ENUM.  If bid is not a valid buffer
+ * name, set AL_INVALID_NAME.  If not enough memory is available to make a
+ * copy of this data, set AL_OUT_OF_MEMORY.
+ */
+void alBufferWriteData_LOKI( ALuint  bid,
+		   ALenum  format,
+                   void   *data,
+		   ALsizei size,
+		   ALsizei freq,
+		   ALenum internalFormat ) {
+	AL_buffer *buf;
+	unsigned int retsize;
+	void *cdata;
+	ALuint i;
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer(bid);
+	if(buf == NULL) {
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+		      "alBufferData: buffer id %d not valid",
+		      bid);
+
+		_alDCSetError(AL_INVALID_NAME);
+
+		_alUnlockBuffer();
+		return;
+	}
+
+	cdata = _alBufferCanonizeData(format,
+				      data,
+				      size,
+				      freq,
+				      internalFormat,
+				      buf->frequency,
+				      &retsize,
+				      AL_FALSE);
+
+	if(cdata == NULL) {
+		/*  _alBufferCanonize Data should set error */
+		_alUnlockBuffer();
+		return;
+	}
+
+	if(buf->flags & ALB_STREAMING) {
+		/* Streaming buffers cannot use alBufferData */
+		_alDCSetError(AL_INVALID_OPERATION);
+
+		free(cdata);
+
+		_alUnlockBuffer();
+
+		return;
+	}
+
+	buf->format = internalFormat;
+
+	if(buf->size < retsize)
+	{
+		void *temp_copies[_ALC_MAX_CHANNELS] = { NULL };
+		ALboolean success = AL_TRUE;
+
+		/* don't use realloc */
+		_alBufferFreeOrigBuffers(buf);
+
+		for(i = 0; i < _alGetChannelsFromFormat(buf->format); i++)
+		{
+			temp_copies[i] = malloc(retsize);
+			success = (temp_copies[i] != NULL) ? AL_TRUE : AL_FALSE;
+		}
+
+		if(!success)
+		{
+			free(cdata);
+
+			for(i = 0; i < _alGetChannelsFromFormat(buf->format); i++)
+			{
+				free(temp_copies[i]);
+			}
+
+			/* JIV FIXME: lock context */
+			_alcDCLockContext();
+			_alDCSetError(AL_OUT_OF_MEMORY);
+			_alcDCUnlockContext();
+
+			_alUnlockBuffer();
+
+			return;
+		}
+
+		switch(_alGetChannelsFromFormat(buf->format))
+		{
+			case 1:
+			  for(i = 0; i < elementsof(buf->orig_buffers); i++)
+			  {
+				  buf->orig_buffers[i] = temp_copies[0];
+			  }
+
+			  break;
+			case 2:
+			  for(i = 0; i < elementsof(buf->orig_buffers); i += 2)
+			  {
+				  buf->orig_buffers[i]   = temp_copies[0];
+				  buf->orig_buffers[i+1] = temp_copies[1];
+			  }
+
+			  break;
+			case 4:
+			  assert(elementsof(buf->orig_buffers) >= 4);
+			  for(i = 0; i < elementsof(buf->orig_buffers); i += 4)
+			  {
+				  buf->orig_buffers[i]   = temp_copies[0];
+				  buf->orig_buffers[i+1] = temp_copies[1];
+				  buf->orig_buffers[i+2] = temp_copies[2];
+				  buf->orig_buffers[i+3] = temp_copies[3];
+			  }
+			  break;
+			case 6:
+			  assert(elementsof(buf->orig_buffers) >= 6);
+			  for(i = 0; i < elementsof(buf->orig_buffers); i += 6)
+			  {
+				  buf->orig_buffers[i]   = temp_copies[0];
+				  buf->orig_buffers[i+1] = temp_copies[1];
+				  buf->orig_buffers[i+2] = temp_copies[2];
+				  buf->orig_buffers[i+3] = temp_copies[3];
+				  buf->orig_buffers[i+4] = temp_copies[4];
+				  buf->orig_buffers[i+5] = temp_copies[5];
+			  }
+
+			  break;
+			default:
+			  /* well this is weird */
+			  assert(0);
+			  break;
+		}
+	}
+
+
+	_alMonoify((ALshort **) buf->orig_buffers,
+		   cdata,
+		   retsize / _alGetChannelsFromFormat(buf->format),
+		   buf->num_buffers, _alGetChannelsFromFormat(buf->format));
+
+	free(cdata);
+
+	buf->size = retsize / _alGetChannelsFromFormat(buf->format);
+
+	_alUnlockBuffer();
+
+	return;
+}
+
+/**
+ * Specify data to be filled into a looping buffer.
+ * This takes the current position at the time of the
+ *  call, and returns the number of samples written.
+ *
+ *  FIXME: this version is not as stingy about memory as
+ *         it could be.
+ *
+ *  FIXME: move convert to the bottom of the testing, so
+ *   	   that only as much data as is being used will be
+ *   	   converted.
+ *
+ *  FIXME: mostly untested
+ *
+ *  FIXME: this is the most horrible function ever.  I can only
+ *  	   claim responsibility for 50% of the hideous horror that
+ *  	   is this function.  Before you smite me to eternal damnation
+ *  	   for the monstrosity that follows, please keep in mind that
+ *  	   the remaining half of the horror belongs squarely on those
+ *  	   who defined the semantics and side effects of this disgusting
+ *  	   monster.
+ *
+ */
+ALsizei alBufferAppendWriteData_LOKI( ALuint   buffer,
+                            ALenum   format,
+                            ALvoid*    data,
+		            ALsizei  osamps,
+                            ALsizei  freq,
+			    ALenum internalFormat) {
+	AL_buffer *buf;
+	ALuint osize;  /* old size */
+	ALuint csize;  /* converted size */
+	ALuint retval; /* our return value: number of samples we can use */
+	ALuint csamps; /* number of samples to convert */
+	ALuint psize;  /* predicted size of passed data after conversion */
+	ALuint orig_csamps; /* original number of samples to convert, pre truncation */
+	unsigned int remainingspace = 0;
+	unsigned int copyoffset = 0;
+	unsigned int copysize   = 0;
+	ALenum tformat = 0; /* buffer's target format */
+	ALuint tfreq = 0;   /* buffer's target frequency */
+	void *temp = NULL;
+	ALuint i;
+	ALuint bufchan = _alGetChannelsFromFormat(internalFormat); /* channels in internal format */
+	int formatWidth = _alGetBitsFromFormat(format) / 8;
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer(buffer);
+	if(buf == NULL) {
+		/* invalid buffers go */
+		_alUnlockBuffer();
+
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+			"buffer id %d is invalid",
+			buffer);
+
+		_alDCSetError( AL_INVALID_NAME );
+
+		return 0;
+	}
+
+	/*
+	 * Non streaming buffers go bye bye
+	 */
+	if(!(buf->flags & ALB_STREAMING)) {
+		_alUnlockBuffer();
+
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"buffer id %d not created with alGenStreamingBuffer",
+			buffer);
+
+		_alDCSetError( AL_INVALID_OPERATION );
+
+		return 0;
+	}
+
+	buf->format = internalFormat;
+
+	/* initialize stuff */
+	osize = buf->size;
+
+	/*
+	 * Set csamps to the size of osamps in bytes.
+	 *
+	 * make sure that csamps contains an even multiple of
+	 * the number of channels
+	 */
+	csamps  = osamps;
+	csamps -= (csamps % _alGetChannelsFromFormat(format));
+	csamps *= formatWidth;
+
+	orig_csamps = csamps;
+
+	/* Set psize to the value that csamps would be in converted format */
+	psize = _al_PCMRatioify( freq, buf->frequency, format, buf->format, csamps );
+
+	/* set retval.  We'll scale it later */
+	retval = osamps;
+
+	if(buf->streampos > buf->size) {
+		/* underflow! */
+		_alDebug(ALD_STREAMING,
+			__FILE__, __LINE__, "underflow! sp|size %d|%d",
+			buf->streampos, buf->size);
+
+		buf->streampos = buf->appendpos = 0;
+		remainingspace = bufchan * buf->size;
+	} else if(buf->appendpos > buf->streampos) {
+		remainingspace = bufchan * (buf->size - buf->appendpos);
+	} else if(buf->size != 0) {
+		remainingspace = bufchan * (buf->streampos - buf->appendpos);
+	} else {
+		remainingspace = 0;
+	}
+
+	if((remainingspace >= MINSTREAMCHUNKSIZE) ||
+	   (psize <= remainingspace)) {
+		/* only take enough space to fill buffer. */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+		"fill data to end: rs|sp|ap. %d|%d|%d",
+			remainingspace, buf->streampos, buf->appendpos);
+
+		if(remainingspace < psize) {
+			copysize = remainingspace;
+		} else {
+			copysize = psize;
+		}
+
+		/* scale samples */
+		retval *= (float) copysize / (float) psize;
+
+		/* remember to set copyoffset for offset_memcpy below */
+		copyoffset = buf->appendpos;
+
+		buf->appendpos += copysize / bufchan;
+	} else if((osize > EXPANDSTREAMBUFSIZE)                   &&
+		  (buf->streampos > MINSTREAMCHUNKSIZE / bufchan) &&
+	          (buf->appendpos > buf->streampos)) {
+		/*
+		 *  Okay:
+		 *
+		 *  Since streampos is after append pos, and
+		 *  streampos is less than the min stream chunk
+		 *  size, we can safely wrap around and put the
+		 *  data at the beginning (the WRAP flag gets
+		 *  removed elsewhere.
+		 *
+		 *  The only thing is, if the buffer is still
+		 *  fairly small, it would be nice to expand it
+		 *  so that it can accomodate more data (within
+		 *  reason).  So we check to see if the size
+		 *  greater than a certain threshold (expandbuffersize),
+		 *  below which we defer to allow BufferAppendData to
+		 *  expand the buffer.
+		 */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"reset offset 0 osize|psize|sp|ap|rs %d|%d|%d|%d|%d",
+			osize, psize, buf->streampos, buf->appendpos,
+			remainingspace);
+
+		if(buf->streampos < psize / bufchan) {
+			copysize = bufchan * buf->streampos;
+		} else {
+			copysize = psize;
+		}
+
+		/* scale samples */
+		retval *= (float) copysize / (float) psize;
+
+		copyoffset = 0;
+
+		buf->appendpos = copysize / bufchan;
+
+		/* we can wrap. */
+		buf->flags |= ALB_STREAMING_WRAP;
+	} else if((osize < EXPANDSTREAMBUFSIZE)  && (buf->streampos < buf->appendpos)) {
+		unsigned int newsize;
+
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"eb time: size|rs|ap|sp      %d|%d|%d|%d",
+			osize, remainingspace, buf->appendpos, buf->streampos);
+
+		/* we must expand the size of our buffer */
+		newsize = buf->appendpos + psize / bufchan;
+
+		assert(newsize >= osize);
+
+		for(i = 0; i < buf->num_buffers; i++) {
+			temp = realloc(buf->orig_buffers[i], newsize);
+			if(temp == NULL) {
+				_alUnlockBuffer();
+
+				return 0;
+			}
+
+			buf->orig_buffers[i] = temp;
+		}
+
+		/* set copy params for offset_memcpy below */
+		copyoffset = buf->appendpos;
+		copysize   = psize;
+
+		/* reset size */
+		buf->size = newsize;
+
+		/*
+		 * set append
+		 */
+		buf->appendpos += psize / bufchan;
+	}  else if(buf->size > 0) {
+		/* not ready to accept data */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"no room: (osize %d sp %d ap %d rs %d)",
+			osize,
+			buf->streampos,
+			buf->appendpos,
+			remainingspace);
+
+		_alUnlockBuffer();
+		return 0;
+	}
+
+	/*
+	 * unlock buffer for time intensive stuff, but
+	 * get buffer params first
+	 */
+	tformat = buf->format;
+	tfreq = buf->frequency;
+
+	_alUnlockBuffer();
+
+	/*
+	 *  Recompute csamps to reflect a decrease of the amount of
+	 *  data that we will use.
+	 */
+	csamps  = retval;
+	csamps -= (csamps % _alGetChannelsFromFormat(format));
+	csamps *= formatWidth;
+
+	/*
+	 * We should decide how much data to use such that csize is
+	 * a reasonable number.
+	 *
+	 * bufferAppendScratch = converted data scratch space
+	 * csize = converted data's size
+	 *
+	 * retval = number of samples that csize represents
+	 */
+	if(scratch.size < (ALuint) osamps * formatWidth) {
+		temp = realloc(scratch.data, osamps * formatWidth);
+		if(temp == NULL) {
+			_alUnlockBuffer();
+			return 0;
+		}
+
+		scratch.data = temp;
+		scratch.size = osamps * formatWidth;
+	}
+
+	memcpy(scratch.data, data, osamps * formatWidth);
+
+	temp = _alBufferCanonizeData(format,
+				     scratch.data,
+				     csamps,
+				     freq,
+				     tformat,
+				     tfreq,
+				     &csize,
+				     AL_TRUE);
+	if(temp == NULL) {
+		/* conversion problem */
+		_alDCSetError(AL_OUT_OF_MEMORY);
+
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"streaming buffer id %d: could not convert",
+			buffer);
+
+		return 0;
+	}
+
+
+	/* lock buffer again, as we are about to make changes */
+	_alLockBuffer();
+
+	if(buf->size == 0) {
+		/* first time: copy data */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__, "first time!");
+
+		/* first time */
+		buf->size = csize / bufchan;
+
+		for(i = 0; i < buf->num_buffers; i++) {
+			temp = realloc(buf->orig_buffers[i], csize / bufchan);
+
+			if(temp == NULL) {
+				/* FIXME: do something */
+				_alUnlockBuffer();
+
+				return 0;
+			}
+
+			buf->orig_buffers[i] = temp;
+		}
+
+		_alMonoify((ALshort **) buf->orig_buffers,
+			   scratch.data,
+			   csize / bufchan,
+			   buf->num_buffers, bufchan);
+
+		buf->appendpos  = csize / bufchan;
+
+		_alUnlockBuffer();
+
+		return osamps;
+	}
+
+	_alMonoifyOffset((ALshort **) buf->orig_buffers,
+			 copyoffset,
+			 scratch.data,
+			 csize / bufchan,
+			 buf->num_buffers, bufchan);
+
+	_alUnlockBuffer();
+
+	return retval;
+}
+
+/**
+ * Specify data to be filled into a looping buffer.
+ * This takes the current position at the time of the
+ *  call, and returns the number of samples written.
+ *
+ *  FIXME: this version is not as stingy about memory as
+ *         it could be.
+ *
+ *  FIXME: move convert to the bottom of the testing, so
+ *   	   that only as much data as is being used will be
+ *   	   converted.
+ *
+ *  FIXME: mostly untested
+ *
+ *  FIXME: this is the most horrible function ever.  I can only
+ *  	   claim responsibility for 50% of the hideous horror that
+ *  	   is this function.  Before you smite me to eternal damnation
+ *  	   for the monstrosity that follows, please keep in mind that
+ *  	   the remaining half of the horror belongs squarely on those
+ *  	   who defined the semantics and side effects of this disgusting
+ *  	   monster.
+ *
+ */
+ALsizei alBufferAppendData_LOKI( ALuint   buffer,
+                            ALenum   format,
+                            void*    data,
+		            ALsizei  osamps,
+                            ALsizei  freq ) {
+	AL_buffer *buf;
+	ALuint osize;  /* old size */
+	ALuint csize;  /* converted size */
+	ALuint nsamps; /* number of samples that csize represents */
+	ALuint csamps; /* number of samples to convert */
+	ALuint psize;  /* predicted size of passed data after conversion */
+	ALuint orig_csamps; /* original number of samples to convert, pre truncation */
+	unsigned int remainingspace = 0;
+	unsigned int copyoffset = 0;
+	unsigned int copysize   = 0;
+	ALenum tformat = 0; /* buffer's target format */
+	ALuint tfreq = 0;   /* buffer's target frequency */
+	void *temp = NULL;
+	ALuint i;
+
+	_alLockBuffer();
+
+	buf = _alGetBuffer(buffer);
+	if(buf == NULL) {
+		/* invalid buffers go */
+		_alUnlockBuffer();
+
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+			"buffer id %d is invalid",
+			buffer);
+
+		_alDCSetError(AL_INVALID_NAME);
+
+		return 0;
+	}
+
+	/*
+	 * Non streaming buffers go bye bye
+	 */
+	if(!(buf->flags & ALB_STREAMING)) {
+		_alUnlockBuffer();
+
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"buffer id %d not created with alGenStreamingBuffer",
+			buffer);
+
+		_alDCSetError(AL_INVALID_OPERATION);
+
+		return 0;
+	}
+
+	/* initialize stuff */
+
+	osize = buf->size;
+
+	/*
+	 * Set csamps to the size of osamps in bytes.
+	 *
+	 * make sure that csamps contains an even multiple of
+	 * the number of channels
+	 */
+	csamps  = osamps;
+	csamps -= (csamps % _alGetChannelsFromFormat(format));
+	csamps *= (_alGetBitsFromFormat(format) / 8);
+
+	orig_csamps = csamps;
+
+	/* Set psize to the value that csamps would be in converted format */
+	psize = _al_PCMRatioify(freq, buf->frequency, format, buf->format, csamps);
+
+	/* set nsamps */
+	nsamps = osamps;
+
+	if(buf->streampos > buf->size) {
+		/* underflow! */
+		_alDebug(ALD_STREAMING,
+			__FILE__, __LINE__, "underflow! sp|size %d|%d",
+			buf->streampos, buf->size);
+
+		buf->streampos = buf->appendpos = 0;
+		remainingspace = buf->size;
+	} else if(buf->appendpos > buf->streampos) {
+		remainingspace = buf->size - buf->appendpos;
+	} else if(buf->size != 0) {
+		remainingspace = buf->streampos - buf->appendpos;
+	} else {
+		remainingspace = 0;
+	}
+
+	if((remainingspace >= MINSTREAMCHUNKSIZE) ||
+	   (psize <= remainingspace)) {
+		/* only take enough space to fill buffer. */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+		"fill data to end: rs|sp|ap. %d|%d|%d",
+			remainingspace, buf->streampos, buf->appendpos);
+
+		if(remainingspace < psize) {
+			copysize = remainingspace;
+		} else {
+			copysize = psize;
+		}
+
+		/* scale samples */
+		nsamps *= copysize;
+		nsamps /= psize;
+
+		/* remember to set copyoffset for offset_memcpy below */
+		copyoffset = buf->appendpos;
+
+		buf->appendpos += copysize;
+	} else if((osize > EXPANDSTREAMBUFSIZE)         &&
+		  (buf->streampos > MINSTREAMCHUNKSIZE) &&
+	          (buf->appendpos > buf->streampos)) {
+		/*
+		 *  Okay:
+		 *
+		 *  Since streampos is after append pos, and
+		 *  streampos is less than the min stream chunk
+		 *  size, we can safely wrap around and put the
+		 *  data at the beginning (the WRAP flag gets
+		 *  removed elsewhere.
+		 *
+		 *  The only thing is, if the buffer is still
+		 *  fairly small, it would be nice to expand it
+		 *  so that it can accomodate more data (within
+		 *  reason).  So we check to see if the size
+		 *  greater than a certain threshold (expandbuffersize),
+		 *  below which we defer to allow BufferAppendData to
+		 *  expand the buffer.
+		 */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"reset offset 0 osize|psize|sp|ap|rs %d|%d|%d|%d|%d",
+			osize, psize, buf->streampos, buf->appendpos,
+			remainingspace);
+
+		if(buf->streampos < psize) {
+			copysize = buf->streampos;
+		} else {
+			copysize = psize;
+		}
+
+		/* scale samples */
+		nsamps *= copysize;
+		nsamps /= psize;
+
+		copyoffset = 0;
+
+		buf->appendpos = copysize;
+
+		/* we can wrap. */
+		buf->flags |= ALB_STREAMING_WRAP;
+	} else if(buf->streampos < buf->appendpos) {
+		unsigned int newsize;
+
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"eb time: size|rs|ap|sp      %d|%d|%d|%d",
+			osize, remainingspace, buf->appendpos, buf->streampos);
+
+		/* we must expand the size of our buffer */
+		newsize = buf->appendpos + psize;
+
+		assert(newsize >= osize);
+
+		for(i = 0; i < buf->num_buffers; i++) {
+			temp = realloc(buf->orig_buffers[i], newsize);
+			if(temp == NULL) {
+				_alUnlockBuffer();
+
+				return 0;
+			}
+
+			buf->orig_buffers[i] = temp;
+		}
+
+		/* set copy params for offset_memcpy below */
+		copyoffset = buf->appendpos;
+		copysize   = psize;
+
+		/* reset size */
+		buf->size = newsize;
+
+		/*
+		 * set append
+		 */
+		buf->appendpos += psize;
+	}  else if(buf->size > 0) {
+		/* not ready to accept data */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"osize|sp|ap|rs %d|%d|%d|%d",
+			osize,
+			buf->streampos,
+			buf->appendpos,
+			remainingspace);
+
+		_alUnlockBuffer();
+		return 0;
+	}
+
+	/*
+	 * unlock buffer for time intensive stuff, but
+	 * get buffer params first
+	 */
+	tformat = buf->format;
+	tfreq   = buf->frequency;
+
+	_alUnlockBuffer();
+
+	/*
+	 *  Recompute csamps to reflect a decrease of the amount of
+	 *  data that we will use.
+	 */
+	csamps  = nsamps;
+	csamps -= (csamps % _alGetChannelsFromFormat(format));
+	csamps *= (_alGetBitsFromFormat(format) / 8);
+
+	/*
+	 * We should decide how much data to use such that csize is
+	 * a reasonable number.
+	 *
+	 * bufferAppendScratch = converted data scratch space
+	 * csize = converted data's size
+	 *
+	 * nsamps = number of samples that csize represents
+	 */
+	if(scratch.size < csamps * (_alGetBitsFromFormat(format)/8)) {
+		temp = realloc(scratch.data, csamps * (_alGetBitsFromFormat(format)/8));
+		if(temp == NULL) {
+			/* oops */
+			return 0;
+		}
+
+		scratch.data = temp;
+		scratch.size = csamps * (_alGetBitsFromFormat(format)/8);
+	}
+
+	memcpy(scratch.data, data, csamps * (_alGetBitsFromFormat(format)>>3));
+
+	temp = _alBufferCanonizeData(format,
+				     scratch.data,
+				     csamps,
+				     freq,
+				     tformat,
+				     tfreq,
+				     &csize,
+				     AL_TRUE);
+	if(temp == NULL) {
+		/* conversion problem */
+		_alDCSetError(AL_OUT_OF_MEMORY);
+
+		_alDebug(ALD_CONVERT, __FILE__, __LINE__,
+			"streaming buffer id %d: could not convert",
+			buffer);
+
+		return 0;
+	}
+
+	/* lock buffer again, as we are about to make changes */
+	_alLockBuffer();
+
+	if(buf->size == 0) {
+		/* first time: copy data */
+		_alDebug(ALD_STREAMING, __FILE__, __LINE__,
+			"first time!");
+
+		/* first time */
+		buf->size = csize / _alGetChannelsFromFormat(buf->format);
+
+		for(i = 0; i < buf->num_buffers; i++) {
+			temp = realloc(buf->orig_buffers[i], csize / _alGetChannelsFromFormat(buf->format));
+			if(temp == NULL) {
+				_alUnlockBuffer();
+
+				return 0;
+			}
+
+			buf->orig_buffers[i] = temp;
+		}
+
+		_alMonoify((ALshort **) buf->orig_buffers,
+			   scratch.data,
+			   csize / _alGetChannelsFromFormat(buf->format),
+			   buf->num_buffers, _alGetChannelsFromFormat(buf->format));
+
+		buf->appendpos    = csize;
+
+		_alUnlockBuffer();
+
+		return osamps;
+	}
+
+	_alMonoifyOffset((ALshort **) buf->orig_buffers,
+			 copyoffset,
+			 scratch.data,
+			 csize / _alGetChannelsFromFormat(buf->format),
+			 buf->num_buffers, _alGetChannelsFromFormat(buf->format));
+
+/*
+	offset_memcpy(buf->_orig_buffer, copyoffset, bufferAppendScratch, copysize);
+ */
+
+	_alUnlockBuffer();
+
+	return nsamps;
+}
+
+/*
+ * alGenStreamingBuffers_LOKI
+ *
+ * Perform full allocation in buffers[0..n-1].  If full allocation
+ * is not possible, the appropriate error is set and the function
+ * returns.  Each buffer id in a sucessful call can be used with
+ * BufferAppendData.
+ *
+ * If n is 0, legal nop.  If n < 0, set INVALID_VALUE and nop.
+ *
+ */
+void alGenStreamingBuffers_LOKI( ALsizei n, ALuint *buffer) {
+	AL_buffer *buf;
+	int i;
+
+	if(n == 0) {
+		/* silently return */
+		return;
+	}
+
+	if(n < 0) {
+		_alDebug(ALD_BUFFER, __FILE__, __LINE__,
+		      "alGenStreamingBuffers_LOKI: invalid n %d\n", n);
+
+		_alcDCLockContext();
+		_alDCSetError( AL_INVALID_VALUE );
+		_alcDCUnlockContext();
+
+		return;
+	}
+
+	/* generate normal buffers */
+	alGenBuffers( n, buffer );
+
+	_alLockBuffer();
+
+	for( i = 0; i < n; i++ ) {
+		buf = _alGetBuffer( buffer[i] );
+		if( buf == NULL ) {
+			/* allocation must have failed */
+			_alUnlockBuffer();
+
+			return;
+		}
+
+		/* make sure to set the streaming flag */
+		buf->flags |= ALB_STREAMING;
+	}
+
+	_alUnlockBuffer();
+
+	return;
+}
Index: /openal-0.0.8/src/extensions/al_ext_loki.h
===================================================================
--- /openal-0.0.8/src/extensions/al_ext_loki.h	(revision 17)
+++ /openal-0.0.8/src/extensions/al_ext_loki.h	(revision 17)
@@ -0,0 +1,60 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext_loki.h
+ *
+ * Prototypes for (semi) standard loki extensions
+ */
+#ifndef AL_EXT_LOKI_H_
+#define AL_EXT_LOKI_H_
+
+#include "al_ext_needed.h"
+#include <AL/alext.h>
+
+/*
+ * alInitLoki( void )
+ *
+ * Initializes data structures needed by the loki extensions.
+ */
+void alInitLoki( void );
+
+/*
+ * alFiniLoki( void )
+ *
+ * Finalizes data structures needed by the loki extensions.
+ */
+void alFiniLoki( void );
+
+#ifndef OPENAL_EXTENSION
+
+/*
+ * we are being built into the standard library, so inform
+ * the extension registrar
+ */
+#define BUILTIN_EXT_LOKI                                      \
+	AL_EXT_PAIR(alBufferAppendData_LOKI),                 \
+	AL_EXT_PAIR(alBufferWriteData_LOKI),                  \
+	AL_EXT_PAIR(alBufferAppendWriteData_LOKI),            \
+	AL_EXT_PAIR(alReverbScale_LOKI),                      \
+	AL_EXT_PAIR(alReverbDelay_LOKI),                      \
+	AL_EXT_PAIR(alBombOnError_LOKI),                      \
+	AL_EXT_PAIR(alBufferi_LOKI),                          \
+	AL_EXT_PAIR(alBufferDataWithCallback_LOKI),           \
+	AL_EXT_PAIR(alGenStreamingBuffers_LOKI),              \
+	AL_EXT_PAIR(alcGetAudioChannel_LOKI),                 \
+	AL_EXT_PAIR(alcSetAudioChannel_LOKI)
+
+
+/* initialization and destruction functions */
+
+#define BUILTIN_EXT_LOKI_INIT  alInitLoki()
+#define BUILTIN_EXT_LOKI_FINI  alFiniLoki()
+
+#else
+
+#define BUILTIN_EXT_LOKI_INIT
+#define BUILTIN_EXT_LOKI_FINI
+
+#endif /* OPENAL_EXTENSION */
+
+#endif /* AL_EXT_LOKI_H_ */
Index: /openal-0.0.8/src/extensions/al_ext_mp3.c
===================================================================
--- /openal-0.0.8/src/extensions/al_ext_mp3.c	(revision 17)
+++ /openal-0.0.8/src/extensions/al_ext_mp3.c	(revision 17)
@@ -0,0 +1,400 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext_mp3.c
+ *
+ * Temporary hack.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "al_ext_needed.h"
+#include "al_ext_mp3.h"
+
+#include "al_buffer.h"
+#include "al_ext.h"
+#include "alc/alc_context.h"
+
+#define MAX_MP3 64
+#define MAX_MPEG_READ 512
+
+#ifdef ENABLE_EXTENSION_AL_EXT_MP3
+
+#include <SDL/SDL.h>
+#include <smpeg.h>
+
+#ifdef OPENAL_DLOPEN_MP3
+#include <dlfcn.h>
+#endif
+
+
+/* maximum MAX_MP3 simultaneous sid/offset */
+static struct {
+	ALuint bid;
+	SMPEG *mpeg;
+} mp3bid[MAX_MP3];
+
+static struct {
+	ALuint sid;
+	ALuint offset;
+} mp3map[MAX_MP3];
+
+
+static int openal_load_smpeg_library(void);
+
+/*
+ * smpeg library functions.
+ */
+static void (*pSMPEG_enablevideo)( SMPEG* mpeg, int enable );
+static SMPEGstatus (*pSMPEG_status)( SMPEG* mpeg );
+static int (*pSMPEG_wantedSpec)( SMPEG *mpeg, SDL_AudioSpec *wanted );
+static void (*pSMPEG_enableaudio)( SMPEG* mpeg, int enable );
+static void (*pSMPEG_actualSpec)( SMPEG *mpeg, SDL_AudioSpec *spec );
+static void (*pSMPEG_rewind)( SMPEG* mpeg );
+static int (*pSMPEG_playAudio)( SMPEG *mpeg, Uint8 *stream, int len );
+static void (*pSMPEG_stop)( SMPEG* mpeg );
+static SMPEG* (*pSMPEG_new_data)(void *data, int size, SMPEG_Info* info, int sdl_audio);
+static void (*pSMPEG_play)( SMPEG* mpeg );
+static void (*pSMPEG_delete)( SMPEG* mpeg );
+
+/*
+ * smpeg library handle.
+ */
+static void * smpeg_lib_handle = NULL;
+
+static int openal_load_smpeg_library(void)
+{
+#ifdef OPENAL_DLOPEN_MP3
+        char * error = NULL;
+#endif
+    
+	if (smpeg_lib_handle != NULL)
+		return 1;  /* already loaded. */
+
+	#ifdef OPENAL_DLOPEN_MP3
+		#define OPENAL_LOAD_SMPEG_SYMBOL(x) p##x = dlsym(smpeg_lib_handle, #x); \
+                                                   error = dlerror(); \
+                                                   if (p##x == NULL) { \
+                                                           fprintf(stderr,"Could not resolve smpeg symbol %s: %s\n", #x, ((error!=NULL)?(error):("(null)"))); \
+                                                           dlclose(smpeg_lib_handle); smpeg_lib_handle = NULL; \
+                                                           return 0; }
+                dlerror(); /* clear error state */
+		smpeg_lib_handle = dlopen("libsmpeg.so", RTLD_LAZY | RTLD_GLOBAL);
+                error = dlerror();
+		if (smpeg_lib_handle == NULL) {
+                        fprintf(stderr,"Could not open smpeg library: %s\n",((error!=NULL)?(error):("(null)")));
+			return 0;
+                }
+	#else
+		#define OPENAL_LOAD_SMPEG_SYMBOL(x) p##x = x;
+		smpeg_lib_handle = (void *) 0xF00DF00D;
+	#endif
+
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_enablevideo);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_status);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_wantedSpec);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_enableaudio);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_actualSpec);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_rewind);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_playAudio);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_stop);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_new_data);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_play);
+        OPENAL_LOAD_SMPEG_SYMBOL(SMPEG_delete);
+
+	return 1;
+}
+
+
+#ifdef OPENAL_EXTENSION
+
+/*
+ * we are not being build into the library, therefore define the
+ * table that informs openal how to register the extensions upon
+ * dlopen.
+ */
+struct { ALubyte *name; void *addr; } alExtension_03282000 [] = {
+	AL_EXT_PAIR(alutLoadMP3_LOKI),
+	{ NULL, NULL }
+};
+
+void alExtInit_03282000(void) {
+	int i;
+
+	for(i = 0; i < MAX_MP3; i++) {
+		mp3map[i].sid    = 0;
+		mp3map[i].offset = 0;
+
+		mp3bid[i].bid  = 0;
+		mp3bid[i].mpeg = NULL;
+	}
+
+	return;
+}
+
+void alExtFini_03282000(void) {
+	int i;
+
+	fprintf(stderr, "alExtFini_03282000 STUB\n");
+
+	for(i = 0; i < MAX_MP3; i++) {
+		if(mp3bid[i].mpeg != NULL) {
+			/* Do something */
+		}
+	}
+
+	return;
+}
+
+#endif
+
+void MP3_DestroyCallback_Sid(ALuint sid);
+void MP3_DestroyCallback_Bid(ALuint bid);
+
+static int  mp3bid_get(ALuint bid, SMPEG **mpegp);
+static int  mp3bid_insert(ALuint bid, SMPEG *mpeg);
+static void mp3bid_remove(ALuint bid);
+
+static int  mp3map_get(ALuint sid, ALuint *offset);
+static int  mp3map_insert(ALuint sid);
+static void mp3map_update(int i, ALuint offset);
+static void mp3map_remove(ALuint sid);
+
+ALboolean alutLoadMP3_LOKI(ALuint bid, ALvoid *data, ALint size) {
+	static void (*palBufferi_LOKI)(ALuint, ALenum, ALint) = NULL;
+	SMPEG *newMpeg;
+	SDL_AudioSpec spec;
+
+	if(palBufferi_LOKI == NULL) {
+		palBufferi_LOKI = (void (*)(ALuint, ALenum, ALint))
+			    alGetProcAddress((const ALchar *) "alBufferi_LOKI");
+
+		if(palBufferi_LOKI == NULL) {
+			fprintf(stderr, "Need alBufferi_LOKI\n");
+			return AL_FALSE;
+		}
+		
+		if (!openal_load_smpeg_library())
+			return AL_FALSE;
+
+	}
+
+	newMpeg = pSMPEG_new_data( data, size, NULL, 0 );
+
+	pSMPEG_wantedSpec( newMpeg, &spec );
+
+	_alcDCLockContext();
+
+	spec.freq     = canon_speed;
+	spec.format   = AUDIO_S16; /* FIXME */
+
+	_alcDCUnlockContext();
+
+	/* implicitly multichannel */
+	palBufferi_LOKI( bid, AL_CHANNELS, spec.channels );
+
+	pSMPEG_actualSpec( newMpeg, &spec );
+
+	/* insert new bid */
+	mp3bid_insert( bid, newMpeg );
+
+	_alBufferDataWithCallback_LOKI(bid,
+				MP3_Callback,
+				mp3map_remove,
+				mp3bid_remove);
+
+	return AL_TRUE;
+}
+
+
+ALint MP3_Callback(ALuint sid,
+		ALuint bid,
+		ALshort *outdata,
+		ALenum format,
+		UNUSED(ALint freq),
+		ALint samples) {
+	int first;
+	int second;
+	SMPEG *mpeg;
+	ALuint offset;
+	int bytesRequested = samples * sizeof( ALshort );
+	int bytesPlayed;
+	int bps; /* bytes per sample */
+	int i;
+
+	if(samples > MAX_MPEG_READ) {
+		first  = MP3_Callback(sid, bid, outdata, format, freq, MAX_MPEG_READ);
+		second = MP3_Callback(sid, bid, outdata + MAX_MPEG_READ, format, freq, samples - MAX_MPEG_READ);
+		return first + second;
+
+	}
+
+	bps = _alGetBitsFromFormat( format );
+
+	/* get buffer specific information */
+	i = mp3bid_get( bid, &mpeg );
+	if(i == -1) {
+		fprintf(stderr, "No buffer id %d in data structures\n", bid);
+
+		return -1; /* weird */
+	}
+
+	/* get source specific information */
+	i = mp3map_get( sid, &offset );
+	if(i == -1) {
+		i = mp3map_insert( sid );
+
+		offset = AL_FALSE;
+
+		pSMPEG_enableaudio( mpeg, 1 );
+		pSMPEG_enablevideo( mpeg, 0 ); /* sanity check */
+	}
+
+	if( pSMPEG_status(mpeg) != SMPEG_PLAYING ) {
+		pSMPEG_play( mpeg );
+	}
+
+	memset( outdata, 0, (size_t)bytesRequested );
+
+	bytesPlayed = pSMPEG_playAudio( mpeg, (ALubyte *) outdata, bytesRequested );
+	bytesPlayed /= 2;
+
+	if(bytesPlayed < samples) {
+		pSMPEG_stop( mpeg );
+		pSMPEG_rewind( mpeg );
+
+		return bytesPlayed;
+	}
+
+	mp3map_update(i, offset + samples);
+
+	return samples;
+}
+
+static int mp3bid_get(ALuint bid, SMPEG **mpegp) {
+	int i;
+
+	for(i = 0; i < MAX_MP3; i++) {
+		if(mp3bid[i].bid == bid) {
+			*mpegp = mp3bid[i].mpeg;
+
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+static int mp3bid_insert(ALuint bid, SMPEG *mpeg) {
+	int i;
+
+	for(i = 0; i < MAX_MP3; i++) {
+		if(mp3bid[i].bid == bid) {
+			if(mp3bid[i].mpeg != NULL) {
+				pSMPEG_stop( mp3bid[i].mpeg );
+				pSMPEG_delete( mp3bid[i].mpeg );
+				mp3bid[i].mpeg = NULL;
+			}
+
+			mp3bid[i].bid = 0; /* flag for next */
+		}
+
+		if(mp3bid[i].bid == 0) {
+			mp3bid[i].bid  = bid;
+			mp3bid[i].mpeg = mpeg;
+
+			return i;
+		}
+	}
+
+	return 0;
+}
+
+static void mp3bid_remove( ALuint bid ) {
+	int i = 0;
+
+	for(i = 0; i < MAX_MP3; i++) {
+		if(mp3bid[i].bid == (ALuint) bid) {
+			if(mp3bid[i].mpeg != NULL) {
+				pSMPEG_stop( mp3bid[i].mpeg );
+				pSMPEG_delete(mp3bid[i].mpeg);
+				mp3bid[i].mpeg = NULL;
+			}
+
+			mp3bid[i].bid = 0;
+			return;
+		}
+	}
+
+	return;
+}
+
+/* FIXME: make binary search */
+static int mp3map_get(ALuint sid, ALuint *offset) {
+	int i;
+
+	for(i = 0; i < MAX_MP3; i++) {
+		if(mp3map[i].sid == sid) {
+			*offset = mp3map[i].offset;
+
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+/* FIXME: sorted insert for binary search */
+static int mp3map_insert(ALuint sid) {
+	int i;
+
+	for(i = 0; i < MAX_MP3; i++) {
+		if((mp3map[i].sid == 0) ||
+		   (mp3map[i].sid == sid)) {
+			mp3map[i].sid    = sid;
+			mp3map[i].offset  = AL_FALSE;
+
+			return i;
+		}
+	}
+
+	return 0;
+}
+
+static void mp3map_update(int i, ALuint offset) {
+	if(i < 0) {
+		return;
+	}
+
+	if(i >= MAX_MP3) {
+		return;
+	}
+
+	mp3map[i].offset = offset;
+
+	return;
+}
+
+static void mp3map_remove(ALuint sid) {
+	int i;
+
+	for(i = 0; i < MAX_MP3; i++) {
+		if(mp3map[i].sid == sid) {
+			mp3map[i].sid   = 0;
+			mp3map[i].offset = AL_FALSE;
+
+			return;
+		}
+	}
+
+	return;
+}
+
+#else
+
+/* without smpeg support, we don't do jack */
+
+#endif /* ENABLE_EXTENSION_AL_EXT_MP3 */
Index: /openal-0.0.8/src/extensions/al_ext_mp3.h
===================================================================
--- /openal-0.0.8/src/extensions/al_ext_mp3.h	(revision 17)
+++ /openal-0.0.8/src/extensions/al_ext_mp3.h	(revision 17)
@@ -0,0 +1,55 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext_mp3.h
+ *
+ * Hack.
+ */
+#ifndef AL_EXT_MP3
+#define AL_EXT_MP3
+
+#include <AL/alext.h>
+
+/*
+ *  MP3_Callback( ALuint sid, ALuint bid,
+ *                ALshort *outdata,
+ *                ALenum format, ALint freq, ALint samples);
+ *
+ * Callback function implementing mp3 decoding.
+ */
+ALint MP3_Callback(ALuint sid, ALuint bid,
+			     ALshort *outdata,
+			     ALenum format, ALint freq, ALint samples);
+
+#ifndef OPENAL_EXTENSION
+
+#ifdef ENABLE_EXTENSION_AL_EXT_MP3
+
+
+/*
+ * we are being built into the standard library, so inform
+ * the extension registrar
+ */
+#define BUILTIN_EXT_MP3                                       \
+	AL_EXT_PAIR(alutLoadMP3_LOKI)
+
+/* initialization and destruction functions */
+
+#define BUILTIN_EXT_MP3_INIT
+#define BUILTIN_EXT_MP3_FINI
+
+#else
+
+/*
+ * Without smpeg support (--enable-smpeg) we can't do mp3s, so we
+ * don't define any extensions.
+ */
+
+#define BUILTIN_EXT_MP3_INIT
+#define BUILTIN_EXT_MP3_FINI
+
+#endif /* ENABLE_EXTENSION_AL_EXT_MP3 */
+
+#endif /* OPENAL_EXTENSION */
+
+#endif /* AL_EXT_MP3 */
Index: /openal-0.0.8/src/extensions/al_ext_needed.h
===================================================================
--- /openal-0.0.8/src/extensions/al_ext_needed.h	(revision 17)
+++ /openal-0.0.8/src/extensions/al_ext_needed.h	(revision 17)
@@ -0,0 +1,32 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * Plugins should include this header.
+ *
+ */
+#ifndef AL_EXT_NEEDED_H_
+#define AL_EXT_NEEDED_H_
+
+#include "al_main.h" /* for UNUSED macro */
+
+/*
+ * alExtInit_03282000(void)
+ *
+ * Called by the regular library to initialize plugin data structures.
+ */
+void alExtInit_03282000( void );
+
+/*
+ * alExtFini_03282000(void)
+ *
+ * Called by the regular library to finalize plugin data structures.
+ */
+void alExtFini_03282000( void );
+
+/*
+ * AL_EXT_PAIR is a macro that expands to a name, address pair
+ * for use in the extension table.
+ */
+#define AL_EXT_PAIR(x) { (const ALubyte *) #x, (AL_funcPtr) x }
+
+#endif /* AL_EXT_NEEDED_H_ */
Index: /openal-0.0.8/src/extensions/al_ext_vorbis.c
===================================================================
--- /openal-0.0.8/src/extensions/al_ext_vorbis.c	(revision 17)
+++ /openal-0.0.8/src/extensions/al_ext_vorbis.c	(revision 17)
@@ -0,0 +1,532 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext_vorbis.c
+ *
+ * Temporary hack.
+ */
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+
+/* for alutLoadVorbis_LOKI */
+#include "AL/alext.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "al_ext_needed.h"
+#include "al_ext_vorbis.h"
+
+#include "al_buffer.h"
+#include "al_ext.h"
+
+#include "alc/alc_context.h"
+
+#define MAX_VORBIS 64
+
+#ifdef ENABLE_EXTENSION_AL_EXT_VORBIS
+#include <vorbis/vorbisfile.h>
+
+#ifdef OPENAL_DLOPEN_VORBIS
+#include <dlfcn.h>
+#endif
+
+
+static size_t ovfd_read(void *ptr, size_t size, size_t nmemb, void *datasource);
+static int ovfd_seek(void *datasource, int64_t offset, int whence);
+static int ovfd_close(void *datasource);
+static long ovfd_tell(void *datasource);
+
+typedef struct {
+	OggVorbis_File of;
+
+	void *data;
+
+	struct {
+		int size;
+		int offset; /* set by the source */
+	} fh;
+} VorbHandle;
+
+static ov_callbacks ov_fromdata = {
+	ovfd_read,
+	ovfd_seek,
+	ovfd_close,
+	ovfd_tell
+};
+
+/* maximum MAX_VORBIS simultaneous sid/offset */
+static struct {
+	ALuint bid;
+	VorbHandle *vorb;
+} vorbid[MAX_VORBIS];
+
+static struct {
+	ALuint sid;
+	ALuint offset;
+	ALint current_section;
+} vorbmap[MAX_VORBIS];
+
+#ifdef OPENAL_EXTENSION
+
+/*
+ * we are not being build into the library, therefore define the
+ * table that informs openal how to register the extensions upon
+ * dlopen.
+ */
+struct { ALubyte *name; void *addr; } alExtension_03282000 [] = {
+	AL_EXT_PAIR(alutLoadVorbis_LOKI),
+	{ NULL, NULL }
+};
+
+void alExtInit_03282000(void) {
+	int i;
+
+	for(i = 0; i < MAX_VORBIS; i++) {
+		vorbmap[i].sid     = 0;
+		vorbmap[i].offset  = 0;
+
+		vorbid[i].bid  = 0;
+		vorbid[i].vorbis = NULL;
+	}
+
+	return;
+}
+
+void alExtFini_03282000(void) {
+	int i;
+
+	fprintf(stderr, "alExtFini_03282000 STUB\n");
+
+	for(i = 0; i < MAX_VORBIS; i++) {
+		if(vorbid[i].vorbis != NULL) {
+			/* Do something */
+		}
+	}
+
+	return;
+}
+
+#endif
+
+static int signed_format(ALenum format);
+
+static void VorbHandle_delete(VorbHandle *vorb);
+
+static int  vorbid_get(ALuint bid, VorbHandle **vorbp);
+static int  vorbid_insert(ALuint bid, VorbHandle *vorb);
+static void vorbid_remove(ALuint bid);
+
+static int  vorbmap_get(ALuint sid, ALuint *offset, ALint *current_section);
+static int  vorbmap_insert(ALuint sid);
+static void vorbmap_update(int i, ALuint offset, ALint current_section);
+static void vorbmap_remove(ALuint sid);
+
+
+static int openal_load_vorbisfile_library(void);
+
+/*
+ * vorbisfile library functions.
+ */
+static int (*pov_clear)(OggVorbis_File *vf);
+static int (*pov_open_callbacks)(void *datasource, OggVorbis_File *vf,
+		char *initial, long ibytes, ov_callbacks callbacks);
+static vorbis_info* (*pov_info)(OggVorbis_File *vf,int link);
+static long (*pov_read)(OggVorbis_File *vf,char *buffer,int length,
+		    int bigendianp,int word,int sgned,int *bitstream);
+
+/*
+ * vorbisfile library handle.
+ */
+static void * vorbisfile_lib_handle = NULL;
+
+static int openal_load_vorbisfile_library(void)
+{
+#ifdef OPENAL_DLOPEN_VORBIS
+        char * error = NULL;
+#endif
+    
+	if (vorbisfile_lib_handle != NULL)
+		return 1;  /* already loaded. */
+
+	#ifdef OPENAL_DLOPEN_VORBIS
+		#define OPENAL_LOAD_VORBISFILE_SYMBOL(x) p##x = dlsym(vorbisfile_lib_handle, #x); \
+                                                   error = dlerror(); \
+                                                   if (p##x == NULL) { \
+                                                           fprintf(stderr,"Could not resolve vorbisfile symbol %s: %s\n", #x, ((error!=NULL)?(error):("(null)"))); \
+                                                           dlclose(vorbisfile_lib_handle); vorbisfile_lib_handle = NULL; \
+                                                           return 0; }
+                dlerror(); /* clear error state */
+		vorbisfile_lib_handle = dlopen("libvorbisfile.so", RTLD_LAZY | RTLD_GLOBAL);
+                error = dlerror();
+		if (vorbisfile_lib_handle == NULL) {
+                        fprintf(stderr,"Could not open vorbisfile library: %s\n",((error!=NULL)?(error):("(null)")));
+			return 0;
+                }
+	#else
+		#define OPENAL_LOAD_VORBISFILE_SYMBOL(x) p##x = x;
+		vorbisfile_lib_handle = (void *) 0xF00DF00D;
+	#endif
+
+        OPENAL_LOAD_VORBISFILE_SYMBOL(ov_clear);
+        OPENAL_LOAD_VORBISFILE_SYMBOL(ov_open_callbacks);
+        OPENAL_LOAD_VORBISFILE_SYMBOL(ov_info);
+        OPENAL_LOAD_VORBISFILE_SYMBOL(ov_read);
+
+	return 1;
+}
+
+
+ALboolean alutLoadVorbis_LOKI(ALuint bid,
+			      const ALvoid *data,
+			      ALint size) {
+	static void (*palBufferi_LOKI)(ALuint, ALenum, ALint) = NULL;
+	VorbHandle *vorb;
+	int err;
+	vorbis_info *vi;
+
+	if(palBufferi_LOKI == NULL) {
+		palBufferi_LOKI = (void (*)(ALuint, ALenum, ALint))
+			alGetProcAddress((const ALchar *) "alBufferi_LOKI");
+
+		if(palBufferi_LOKI == NULL) {
+			fprintf(stderr, "Need alBufferi_LOKI\n");
+			return AL_FALSE;
+		}
+		
+		if (!openal_load_vorbisfile_library())
+			return AL_FALSE;
+	}
+
+	vorb = malloc(sizeof *vorb);
+	if(vorb == NULL) {
+		fprintf(stderr, "vorbis problems\n");
+
+		return AL_FALSE;
+	}
+
+	vorb->data = malloc(size);
+	if(vorb->data == NULL) {
+		fprintf(stderr, "vorbis out of memory \n");
+		free(vorb);
+		return AL_FALSE;
+	}
+
+	memcpy(vorb->data, data, size);
+
+	vorb->fh.offset = 0;
+	vorb->fh.size   = size;
+
+	/* NOTE: Ogg Vorbis' header are not const-correct, so we get a warning for "data" below! */
+	err = pov_open_callbacks(vorb, &vorb->of, data, size, ov_fromdata);
+	if(err < 0) {
+		fprintf(stderr, "vorbis problems\n");
+		free(vorb->data);
+		free(vorb);
+		return AL_FALSE;
+	}
+
+	/* set multi channel stuff */
+	vi = pov_info(&vorb->of, 0);
+	if(vi != NULL) {
+		palBufferi_LOKI(bid, AL_CHANNELS, vi->channels);
+	}
+
+	/* insert new bid */
+	vorbid_insert(bid, vorb);
+
+	_alBufferDataWithCallback_LOKI(bid,
+				Vorbis_Callback,
+				vorbmap_remove,
+				vorbid_remove);
+
+	return AL_TRUE;
+}
+
+
+ALint Vorbis_Callback(UNUSED(ALuint sid),
+		ALuint bid,
+		ALshort *outdata,
+		ALenum format,
+		UNUSED(ALint freq),
+		ALint samples) {
+	VorbHandle *vorb;
+	int index;
+	ALuint offset;
+	long ret = 0;
+	int bps = _alGetBitsFromFormat(format)>>3; /* bytes per sample */
+	int bytesToRead = samples * bps;
+	ALint current_section;
+	ALint retval = 0;
+	char *datap;
+
+	datap = (char *) outdata;
+
+	index = vorbid_get(bid, &vorb);
+	if(index == -1) {
+		fprintf(stderr, "weird vorbid_get\n");
+		return -1;
+	}
+
+	index = vorbmap_get(sid, &offset, &current_section);
+	if(index == -1) {
+		/* first time */
+		index = vorbmap_insert(sid);
+
+		offset = 0;
+		current_section = 0;
+	}
+
+	vorb->fh.offset = offset; /* set per sid offset */
+
+	while(bytesToRead > 0) {
+		/* FIXME: handle format differences etc
+		 *
+		 * should be below VDRATB now */
+		ret = pov_read(&vorb->of,
+			      datap,
+			      bytesToRead,
+#ifdef WORDS_BIGENDIAN
+			      1,
+#else
+			      0,
+#endif
+			      bps,
+			      signed_format(format),
+			      &current_section);
+
+		if(ret == OV_HOLE)
+			continue;
+
+		if(ret <= 0) {
+			/* eof or error */
+			vorbmap_update(index, 0, 0);
+			return 0;
+		}
+
+		bytesToRead -= ret;
+		retval      += ret;
+		datap       += ret;
+	}
+
+	vorbmap_update(index, vorb->fh.offset, current_section);
+
+	return retval / bps;
+}
+
+static int vorbid_get(ALuint bid, VorbHandle **vorbp) {
+	int i;
+
+	for(i = 0; i < MAX_VORBIS; i++) {
+		if(vorbid[i].bid == bid) {
+			*vorbp = vorbid[i].vorb;
+
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+static int vorbid_insert(ALuint bid, VorbHandle *vorb) {
+	int i;
+
+	for(i = 0; i < MAX_VORBIS; i++) {
+		if(vorbid[i].bid == bid) {
+			if(vorbid[i].vorb != NULL) {
+				VorbHandle_delete(vorbid[i].vorb);
+				vorbid[i].vorb = NULL;
+			}
+
+			vorbid[i].bid = 0; /* flag for next */
+		}
+
+		if(vorbid[i].bid == 0) {
+			vorbid[i].bid  = bid;
+			vorbid[i].vorb = vorb;
+
+			return i;
+		}
+	}
+
+	return 0;
+}
+
+static void vorbid_remove(ALuint bid) {
+	int i = 0;
+
+	for(i = 0; i < MAX_VORBIS; i++) {
+		if(vorbid[i].bid == (ALuint) bid) {
+			if(vorbid[i].vorb != NULL) {
+				VorbHandle_delete(vorbid[i].vorb);
+				vorbid[i].vorb = NULL;
+			}
+
+			vorbid[i].bid = 0;
+			return;
+		}
+	}
+
+	return;
+}
+
+/* FIXME: make binary search */
+static int vorbmap_get(ALuint sid, ALuint *offset, ALint *current_section) {
+	int i;
+
+	for(i = 0; i < MAX_VORBIS; i++) {
+		if(vorbmap[i].sid == sid) {
+			*offset		 = vorbmap[i].offset;
+			*current_section = vorbmap[i].current_section;
+
+			return i;
+		}
+	}
+
+	return -1;
+}
+
+/* FIXME: sorted insert for binary search */
+static int vorbmap_insert(ALuint sid) {
+	int i;
+
+	for(i = 0; i < MAX_VORBIS; i++) {
+		if((vorbmap[i].sid == 0) ||
+		   (vorbmap[i].sid == sid)) {
+			vorbmap[i].sid    = sid;
+			vorbmap[i].offset  = AL_FALSE;
+
+			return i;
+		}
+	}
+
+	return 0;
+}
+
+static void vorbmap_update(int i, ALuint offset, ALint current_section) {
+	if(i < 0) {
+		return;
+	}
+
+	if(i >= MAX_VORBIS) {
+		return;
+	}
+
+	vorbmap[i].offset          = offset;
+	vorbmap[i].current_section = current_section;
+
+	return;
+}
+
+static void vorbmap_remove(ALuint sid) {
+	int i;
+
+	for(i = 0; i < MAX_VORBIS; i++) {
+		if(vorbmap[i].sid == sid) {
+			vorbmap[i].sid   = 0;
+			vorbmap[i].offset = AL_FALSE;
+
+			return;
+		}
+	}
+
+	return;
+}
+
+static void VorbHandle_delete(VorbHandle *vorb) {
+	pov_clear(&vorb->of);
+	free(vorb->data);
+	free(vorb);
+
+	return;
+}
+
+static size_t ovfd_read(void *ptr, size_t size, size_t nmemb, void *datasource){
+	VorbHandle *vb = datasource;
+	int bytesToRead;
+	char *datap;
+
+	bytesToRead = size * nmemb;
+	datap = vb->data;
+
+	if(vb->fh.offset >= vb->fh.size) {
+		/* no more reading, we're at the end */
+		return 0;
+	}
+
+	if(vb->fh.offset + bytesToRead >= vb->fh.size) {
+		bytesToRead = vb->fh.size - vb->fh.offset;
+	}
+
+	datap += vb->fh.offset;
+
+	memcpy(ptr, datap, bytesToRead);
+
+	vb->fh.offset += bytesToRead;
+
+	return bytesToRead;
+}
+
+static int ovfd_seek(void *datasource, int64_t offset, int whence) {
+	VorbHandle *vb = datasource;
+
+	switch(whence) {
+		case SEEK_SET:
+			if(vb->fh.size < offset) {
+				return -1;
+			}
+			vb->fh.offset = offset;
+			break;
+		case SEEK_CUR:
+			if(vb->fh.size < vb->fh.offset + offset) {
+				return -1;
+			}
+
+			vb->fh.offset += offset;
+			break;
+		case SEEK_END:
+			if(vb->fh.size < vb->fh.size + offset) {
+				return -1;
+			}
+
+			vb->fh.offset = vb->fh.size + offset;
+			break;
+	}
+
+	return 0;
+}
+
+static int ovfd_close(void *datasource) {
+	VorbHandle *vb = datasource;
+
+	vb->fh.offset = 0;
+
+	return 0;
+}
+
+static long ovfd_tell(void *datasource) {
+	VorbHandle *vb = datasource;
+
+	return vb->fh.offset;
+}
+
+static int signed_format(ALenum format) {
+	switch(format) {
+		case AL_FORMAT_MONO16:
+		case AL_FORMAT_STEREO16:
+			return 1;
+			break;
+		default:
+			break;
+	}
+
+	return 0;
+}
+
+#else
+
+/* without vorbis support, we don't do jack */
+
+#endif /* ENABLE_EXTENSION_AL_EXT_VORBIS */
Index: /openal-0.0.8/src/extensions/al_ext_vorbis.h
===================================================================
--- /openal-0.0.8/src/extensions/al_ext_vorbis.h	(revision 17)
+++ /openal-0.0.8/src/extensions/al_ext_vorbis.h	(revision 17)
@@ -0,0 +1,59 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * al_ext_vorbis.h
+ *
+ * Hack.
+ */
+#ifndef AL_EXT_VORBIS
+#define AL_EXT_VORBIS
+
+#include <AL/al.h>
+
+/*
+ * Vorbis_Callback( ALuint sid, ALuint bid,
+ *                  ALshort *outdata,
+ *                  ALenum format, ALint freq, ALint samples )
+ *
+ * Callback which enabled alutLoadVorbis_LOKI to work.
+ *
+ */
+ALint Vorbis_Callback(ALuint sid, ALuint bid,
+			     ALshort *outdata,
+			     ALenum format, ALint freq, ALint samples);
+
+#ifndef OPENAL_EXTENSION
+
+#ifdef ENABLE_EXTENSION_AL_EXT_VORBIS
+
+
+/*
+ * we are being built into the standard library, so inform
+ * the extension registrar
+ */
+#define BUILTIN_EXT_VORBIS                                       \
+	AL_EXT_PAIR(alutLoadVorbis_LOKI)
+
+/* initialization and destruction functions
+ *
+ * none needed for vorbis
+ */
+
+#define BUILTIN_EXT_VORBIS_INIT
+#define BUILTIN_EXT_VORBIS_FINI
+
+#else
+
+/*
+ * Without libvorvis (--enable-vorbis) we can't do vorbis, so we
+ * don't define any extensions, or init/fini functions.
+ */
+
+#define BUILTIN_EXT_VORBIS_INIT
+#define BUILTIN_EXT_VORBIS_FINI
+
+#endif /* ENABLE_EXTENSION_AL_EXT_VORBIS */
+
+#endif /* OPENAL_EXTENSION */
+
+#endif /* AL_EXT_VORBIS */
Index: /openal-0.0.8/src/mixaudio16.c
===================================================================
--- /openal-0.0.8/src/mixaudio16.c	(revision 17)
+++ /openal-0.0.8/src/mixaudio16.c	(revision 17)
@@ -0,0 +1,9152 @@
+
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * mixaudio16.c
+ *
+ * Where the mixing gets done.
+ */
+
+#include "al_siteconfig.h"
+
+#include <AL/al.h>
+#include <string.h>
+#include <assert.h>
+
+#include "al_debug.h"
+#include "al_main.h"
+#include "al_types.h"
+#include "mixaudio16.h"
+
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+
+
+/*
+ * MixAudio16_n( ALshort *dst, alMixEntry *entries, ALuint numents );
+ *
+ * Mix a numents number of streams into dst, clamping above by max_audioval
+ * and below by min_audioval to prevent overflow.
+ *
+ * FIXME: could be optimized to bisect the data until an "optimized"
+ * MixAudio func could be used on it.
+ */
+void MixAudio16_n( ALshort *dst, alMixEntry *entries, ALuint numents ) {
+	int sample;
+	ALuint i;
+	int si = 0; /* source iterator */
+	int len;
+
+	if(numents == 0)
+	{
+		return;
+	}
+
+	len = entries[0].bytes; /* sure hope all the same */
+	len /= sizeof(ALshort);     /* len is in bytes */
+
+	while(len--) {
+		sample = 0;
+
+		for(i = 0; i < numents; i++)
+		{
+			assert(entries[i].bytes >= si * (ALint)sizeof(ALshort));
+			sample += ((ALshort *) entries[i].data)[si];
+		}
+
+		if(sample > max_audioval )
+		{
+			*dst = max_audioval;
+		}
+		else if(sample < min_audioval )
+		{
+			*dst = min_audioval;
+		}
+		else
+		{
+			*dst = sample;
+		}
+
+		dst++;
+		si++;
+	}
+	return;
+}
+
+/*
+ * Mixing functions.
+ *
+ * These are specialized functions which mix each entry in entries to
+ * destination.  They are called using a dispatch table generating by the
+ * ALMixManager and ALMixFuncs.
+ *
+ * The number in the function name refers to the number of entries which the
+ * function can handle.  This number is exact, not an upperbound, so the
+ * number of streams in entries must match the function exactly.
+ */
+void MixAudio16_0(UNUSED(ALshort *dst), UNUSED(alMixEntry *entries)) {
+	return;
+}
+
+void MixAudio16_1(ALshort *dst, alMixEntry *entries) {
+	memcpy(dst, entries->data, (size_t)entries->bytes);
+
+	return;
+}
+
+void MixAudio16_2(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_3(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1    = entries[2].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_4(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_5(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2    = entries[4].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_6(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_7(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3    = entries[6].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_8(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+#ifndef USE_LIGHT_GEN_MIXING
+void MixAudio16_9(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4    = entries[8].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_10(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_11(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5    = entries[10].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_12(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_13(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6    = entries[12].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_14(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_15(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7    = entries[14].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_16(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_17(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8    = entries[16].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_18(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_19(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9    = entries[18].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_20(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_21(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10    = entries[20].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_22(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_23(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11    = entries[22].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_24(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_25(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12    = entries[24].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_26(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_27(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13    = entries[26].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_28(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_29(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14    = entries[28].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_30(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_31(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15    = entries[30].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_32(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_33(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16    = entries[32].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_34(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_35(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17    = entries[34].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_36(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_37(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18    = entries[36].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_38(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_39(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19    = entries[38].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_40(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_41(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20    = entries[40].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_42(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_43(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21    = entries[42].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_44(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_45(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22    = entries[44].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_46(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_47(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23    = entries[46].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_48(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_49(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24    = entries[48].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_50(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_51(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25    = entries[50].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_52(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_53(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26    = entries[52].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_54(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_55(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27    = entries[54].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_56(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27[0] = entries[54].data;
+	srcs27[1] = entries[55].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27[0];
+		sample += *srcs27[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27[0]++;
+		srcs27[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_57(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27[2];
+	ALshort *srcs28;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27[0] = entries[54].data;
+	srcs27[1] = entries[55].data;
+	srcs28    = entries[56].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27[0];
+		sample += *srcs27[1];
+		sample += *srcs28;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27[0]++;
+		srcs27[1]++;
+		srcs28++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_58(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27[2];
+	ALshort *srcs28[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27[0] = entries[54].data;
+	srcs27[1] = entries[55].data;
+	srcs28[0] = entries[56].data;
+	srcs28[1] = entries[57].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27[0];
+		sample += *srcs27[1];
+		sample += *srcs28[0];
+		sample += *srcs28[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27[0]++;
+		srcs27[1]++;
+		srcs28[0]++;
+		srcs28[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_59(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27[2];
+	ALshort *srcs28[2];
+	ALshort *srcs29;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27[0] = entries[54].data;
+	srcs27[1] = entries[55].data;
+	srcs28[0] = entries[56].data;
+	srcs28[1] = entries[57].data;
+	srcs29    = entries[58].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27[0];
+		sample += *srcs27[1];
+		sample += *srcs28[0];
+		sample += *srcs28[1];
+		sample += *srcs29;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27[0]++;
+		srcs27[1]++;
+		srcs28[0]++;
+		srcs28[1]++;
+		srcs29++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_60(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27[2];
+	ALshort *srcs28[2];
+	ALshort *srcs29[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27[0] = entries[54].data;
+	srcs27[1] = entries[55].data;
+	srcs28[0] = entries[56].data;
+	srcs28[1] = entries[57].data;
+	srcs29[0] = entries[58].data;
+	srcs29[1] = entries[59].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27[0];
+		sample += *srcs27[1];
+		sample += *srcs28[0];
+		sample += *srcs28[1];
+		sample += *srcs29[0];
+		sample += *srcs29[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27[0]++;
+		srcs27[1]++;
+		srcs28[0]++;
+		srcs28[1]++;
+		srcs29[0]++;
+		srcs29[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_61(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27[2];
+	ALshort *srcs28[2];
+	ALshort *srcs29[2];
+	ALshort *srcs30;
+
+	int len;int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27[0] = entries[54].data;
+	srcs27[1] = entries[55].data;
+	srcs28[0] = entries[56].data;
+	srcs28[1] = entries[57].data;
+	srcs29[0] = entries[58].data;
+	srcs29[1] = entries[59].data;
+	srcs30    = entries[60].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27[0];
+		sample += *srcs27[1];
+		sample += *srcs28[0];
+		sample += *srcs28[1];
+		sample += *srcs29[0];
+		sample += *srcs29[1];
+		sample += *srcs30;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27[0]++;
+		srcs27[1]++;
+		srcs28[0]++;
+		srcs28[1]++;
+		srcs29[0]++;
+		srcs29[1]++;
+		srcs30++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_62(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27[2];
+	ALshort *srcs28[2];
+	ALshort *srcs29[2];
+	ALshort *srcs30[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27[0] = entries[54].data;
+	srcs27[1] = entries[55].data;
+	srcs28[0] = entries[56].data;
+	srcs28[1] = entries[57].data;
+	srcs29[0] = entries[58].data;
+	srcs29[1] = entries[59].data;
+	srcs30[0] = entries[60].data;
+	srcs30[1] = entries[61].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27[0];
+		sample += *srcs27[1];
+		sample += *srcs28[0];
+		sample += *srcs28[1];
+		sample += *srcs29[0];
+		sample += *srcs29[1];
+		sample += *srcs30[0];
+		sample += *srcs30[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27[0]++;
+		srcs27[1]++;
+		srcs28[0]++;
+		srcs28[1]++;
+		srcs29[0]++;
+		srcs29[1]++;
+		srcs30[0]++;
+		srcs30[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_63(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27[2];
+	ALshort *srcs28[2];
+	ALshort *srcs29[2];
+	ALshort *srcs30[2];
+	ALshort *srcs31;
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27[0] = entries[54].data;
+	srcs27[1] = entries[55].data;
+	srcs28[0] = entries[56].data;
+	srcs28[1] = entries[57].data;
+	srcs29[0] = entries[58].data;
+	srcs29[1] = entries[59].data;
+	srcs30[0] = entries[60].data;
+	srcs30[1] = entries[61].data;
+	srcs31    = entries[62].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27[0];
+		sample += *srcs27[1];
+		sample += *srcs28[0];
+		sample += *srcs28[1];
+		sample += *srcs29[0];
+		sample += *srcs29[1];
+		sample += *srcs30[0];
+		sample += *srcs30[1];
+		sample += *srcs31;
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27[0]++;
+		srcs27[1]++;
+		srcs28[0]++;
+		srcs28[1]++;
+		srcs29[0]++;
+		srcs29[1]++;
+		srcs30[0]++;
+		srcs30[1]++;
+		srcs31++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+
+void MixAudio16_64(ALshort *dst, alMixEntry *entries) {
+	ALshort *srcs0[2];
+	ALshort *srcs1[2];
+	ALshort *srcs2[2];
+	ALshort *srcs3[2];
+	ALshort *srcs4[2];
+	ALshort *srcs5[2];
+	ALshort *srcs6[2];
+	ALshort *srcs7[2];
+	ALshort *srcs8[2];
+	ALshort *srcs9[2];
+	ALshort *srcs10[2];
+	ALshort *srcs11[2];
+	ALshort *srcs12[2];
+	ALshort *srcs13[2];
+	ALshort *srcs14[2];
+	ALshort *srcs15[2];
+	ALshort *srcs16[2];
+	ALshort *srcs17[2];
+	ALshort *srcs18[2];
+	ALshort *srcs19[2];
+	ALshort *srcs20[2];
+	ALshort *srcs21[2];
+	ALshort *srcs22[2];
+	ALshort *srcs23[2];
+	ALshort *srcs24[2];
+	ALshort *srcs25[2];
+	ALshort *srcs26[2];
+	ALshort *srcs27[2];
+	ALshort *srcs28[2];
+	ALshort *srcs29[2];
+	ALshort *srcs30[2];
+	ALshort *srcs31[2];
+
+	int len;
+	int sample;
+
+	len = entries[0].bytes;
+	len /= sizeof(ALshort);
+
+	srcs0[0] = entries[0].data;
+	srcs0[1] = entries[1].data;
+	srcs1[0] = entries[2].data;
+	srcs1[1] = entries[3].data;
+	srcs2[0] = entries[4].data;
+	srcs2[1] = entries[5].data;
+	srcs3[0] = entries[6].data;
+	srcs3[1] = entries[7].data;
+	srcs4[0] = entries[8].data;
+	srcs4[1] = entries[9].data;
+	srcs5[0] = entries[10].data;
+	srcs5[1] = entries[11].data;
+	srcs6[0] = entries[12].data;
+	srcs6[1] = entries[13].data;
+	srcs7[0] = entries[14].data;
+	srcs7[1] = entries[15].data;
+	srcs8[0] = entries[16].data;
+	srcs8[1] = entries[17].data;
+	srcs9[0] = entries[18].data;
+	srcs9[1] = entries[19].data;
+	srcs10[0] = entries[20].data;
+	srcs10[1] = entries[21].data;
+	srcs11[0] = entries[22].data;
+	srcs11[1] = entries[23].data;
+	srcs12[0] = entries[24].data;
+	srcs12[1] = entries[25].data;
+	srcs13[0] = entries[26].data;
+	srcs13[1] = entries[27].data;
+	srcs14[0] = entries[28].data;
+	srcs14[1] = entries[29].data;
+	srcs15[0] = entries[30].data;
+	srcs15[1] = entries[31].data;
+	srcs16[0] = entries[32].data;
+	srcs16[1] = entries[33].data;
+	srcs17[0] = entries[34].data;
+	srcs17[1] = entries[35].data;
+	srcs18[0] = entries[36].data;
+	srcs18[1] = entries[37].data;
+	srcs19[0] = entries[38].data;
+	srcs19[1] = entries[39].data;
+	srcs20[0] = entries[40].data;
+	srcs20[1] = entries[41].data;
+	srcs21[0] = entries[42].data;
+	srcs21[1] = entries[43].data;
+	srcs22[0] = entries[44].data;
+	srcs22[1] = entries[45].data;
+	srcs23[0] = entries[46].data;
+	srcs23[1] = entries[47].data;
+	srcs24[0] = entries[48].data;
+	srcs24[1] = entries[49].data;
+	srcs25[0] = entries[50].data;
+	srcs25[1] = entries[51].data;
+	srcs26[0] = entries[52].data;
+	srcs26[1] = entries[53].data;
+	srcs27[0] = entries[54].data;
+	srcs27[1] = entries[55].data;
+	srcs28[0] = entries[56].data;
+	srcs28[1] = entries[57].data;
+	srcs29[0] = entries[58].data;
+	srcs29[1] = entries[59].data;
+	srcs30[0] = entries[60].data;
+	srcs30[1] = entries[61].data;
+	srcs31[0] = entries[62].data;
+	srcs31[1] = entries[63].data;
+
+
+	while(len--) {
+		sample = *srcs0[0];
+		sample += *srcs0[1];
+		sample += *srcs1[0];
+		sample += *srcs1[1];
+		sample += *srcs2[0];
+		sample += *srcs2[1];
+		sample += *srcs3[0];
+		sample += *srcs3[1];
+		sample += *srcs4[0];
+		sample += *srcs4[1];
+		sample += *srcs5[0];
+		sample += *srcs5[1];
+		sample += *srcs6[0];
+		sample += *srcs6[1];
+		sample += *srcs7[0];
+		sample += *srcs7[1];
+		sample += *srcs8[0];
+		sample += *srcs8[1];
+		sample += *srcs9[0];
+		sample += *srcs9[1];
+		sample += *srcs10[0];
+		sample += *srcs10[1];
+		sample += *srcs11[0];
+		sample += *srcs11[1];
+		sample += *srcs12[0];
+		sample += *srcs12[1];
+		sample += *srcs13[0];
+		sample += *srcs13[1];
+		sample += *srcs14[0];
+		sample += *srcs14[1];
+		sample += *srcs15[0];
+		sample += *srcs15[1];
+		sample += *srcs16[0];
+		sample += *srcs16[1];
+		sample += *srcs17[0];
+		sample += *srcs17[1];
+		sample += *srcs18[0];
+		sample += *srcs18[1];
+		sample += *srcs19[0];
+		sample += *srcs19[1];
+		sample += *srcs20[0];
+		sample += *srcs20[1];
+		sample += *srcs21[0];
+		sample += *srcs21[1];
+		sample += *srcs22[0];
+		sample += *srcs22[1];
+		sample += *srcs23[0];
+		sample += *srcs23[1];
+		sample += *srcs24[0];
+		sample += *srcs24[1];
+		sample += *srcs25[0];
+		sample += *srcs25[1];
+		sample += *srcs26[0];
+		sample += *srcs26[1];
+		sample += *srcs27[0];
+		sample += *srcs27[1];
+		sample += *srcs28[0];
+		sample += *srcs28[1];
+		sample += *srcs29[0];
+		sample += *srcs29[1];
+		sample += *srcs30[0];
+		sample += *srcs30[1];
+		sample += *srcs31[0];
+		sample += *srcs31[1];
+
+		if(sample > max_audioval ) {
+			*dst = max_audioval;
+		} else if(sample < min_audioval ) {
+			*dst = min_audioval;
+		} else {
+			*dst = sample;
+		}
+
+		srcs0[0]++;
+		srcs0[1]++;
+		srcs1[0]++;
+		srcs1[1]++;
+		srcs2[0]++;
+		srcs2[1]++;
+		srcs3[0]++;
+		srcs3[1]++;
+		srcs4[0]++;
+		srcs4[1]++;
+		srcs5[0]++;
+		srcs5[1]++;
+		srcs6[0]++;
+		srcs6[1]++;
+		srcs7[0]++;
+		srcs7[1]++;
+		srcs8[0]++;
+		srcs8[1]++;
+		srcs9[0]++;
+		srcs9[1]++;
+		srcs10[0]++;
+		srcs10[1]++;
+		srcs11[0]++;
+		srcs11[1]++;
+		srcs12[0]++;
+		srcs12[1]++;
+		srcs13[0]++;
+		srcs13[1]++;
+		srcs14[0]++;
+		srcs14[1]++;
+		srcs15[0]++;
+		srcs15[1]++;
+		srcs16[0]++;
+		srcs16[1]++;
+		srcs17[0]++;
+		srcs17[1]++;
+		srcs18[0]++;
+		srcs18[1]++;
+		srcs19[0]++;
+		srcs19[1]++;
+		srcs20[0]++;
+		srcs20[1]++;
+		srcs21[0]++;
+		srcs21[1]++;
+		srcs22[0]++;
+		srcs22[1]++;
+		srcs23[0]++;
+		srcs23[1]++;
+		srcs24[0]++;
+		srcs24[1]++;
+		srcs25[0]++;
+		srcs25[1]++;
+		srcs26[0]++;
+		srcs26[1]++;
+		srcs27[0]++;
+		srcs27[1]++;
+		srcs28[0]++;
+		srcs28[1]++;
+		srcs29[0]++;
+		srcs29[1]++;
+		srcs30[0]++;
+		srcs30[1]++;
+		srcs31[0]++;
+		srcs31[1]++;
+
+
+		dst++;
+	}
+	
+	return;
+}
+#endif /* USE_LIGHT_GEN_MIXING */
Index: /openal-0.0.8/src/mixaudio16.h
===================================================================
--- /openal-0.0.8/src/mixaudio16.h	(revision 17)
+++ /openal-0.0.8/src/mixaudio16.h	(revision 17)
@@ -0,0 +1,113 @@
+/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
+ * vi:set ts=8:
+ *
+ * mixaudio16.h
+ *
+ * Mixing functions for signed, 16-bit PCM streams.
+ */
+#ifndef _MIX_AUDIO16_H_
+#define _MIX_AUDIO16_H_
+
+#include <AL/al.h>
+#include "al_types.h"
+#include "al_siteconfig.h"
+
+#ifdef __MMX__
+#include "mixaudio16_mmx_prk.h"
+#endif /* __MMX__ */
+
+/*
+ * max_audioval is the maximum value of a signed short.
+ */
+#define max_audioval ((1<<(16-1))-1)
+
+/*
+ * min_audioval is the minimum value of a signed short.
+ */
+#define min_audioval -(1<<(16-1))
+
+/*
+ * Mix a numents number of streams into dst, clamping above by max_audioval
+ * and below by min_audioval to prevent overflow.
+ */
+void MixAudio16_n( ALshort *dst, alMixEntry *entries, ALuint numents );
+
+/*
+ * Mixing functions.
+ *
+ * These are specialized functions which mix each entry in entries to
+ * destination.  They are called using a dispatch table generating by the
+ * ALMixManager and ALMixFuncs.
+ *
+ * The number in the function name refers to the number of entries which the
+ * function can handle.  This number is exact, not an upperbound, so the
+ * number of streams in entries must match the function exactly.
+ */
+void MixAudio16_0( ALshort *dst, alMixEntry *entries );
+void MixAudio16_1( ALshort *dst, alMixEntry *entries );
+void MixAudio16_2( ALshort *dst, alMixEntry *entries );
+void MixAudio16_3( ALshort *dst, alMixEntry *entries );
+void MixAudio16_4( ALshort *dst, alMixEntry *entries );
+void MixAudio16_5( ALshort *dst, alMixEntry *entries );
+void MixAudio16_6( ALshort *dst, alMixEntry *entries );
+void MixAudio16_7( ALshort *dst, alMixEntry *entries );
+void MixAudio16_8( ALshort *dst, alMixEntry *entries );
+#ifndef USE_LIGHT_GEN_MIXING
+void MixAudio16_9( ALshort *dst, alMixEntry *entries );
+void MixAudio16_10( ALshort *dst, alMixEntry *entries );
+void MixAudio16_11( ALshort *dst, alMixEntry *entries );
+void MixAudio16_12( ALshort *dst, alMixEntry *entries );
+void MixAudio16_13( ALshort *dst, alMixEntry *entries );
+void MixAudio16_14( ALshort *dst, alMixEntry *entries );
+void MixAudio16_15( ALshort *dst, alMixEntry *entries );
+void MixAudio16_16( ALshort *dst, alMixEntry *entries );
+void MixAudio16_17( ALshort *dst, alMixEntry *entries );
+void MixAudio16_18( ALshort *dst, alMixEntry *entries );
+void MixAudio16_19( ALshort *dst, alMixEntry *entries );
+void MixAudio16_20( ALshort *dst, alMixEntry *entries );
+void MixAudio16_21( ALshort *dst, alMixEntry *entries );
+void MixAudio16_22( ALshort *dst, alMixEntry *entries );
+void MixAudio16_23( ALshort *dst, alMixEntry *entries );
+void MixAudio16_24( ALshort *dst, alMixEntry *entries );
+void MixAudio16_25( ALshort *dst, alMixEntry *entries );
+void MixAudio16_26( ALshort *dst, alMixEntry *entries );
+void MixAudio16_27( ALshort *dst, alMixEntry *entries );
+void MixAudio16_28( ALshort *dst, alMixEntry *entries );
+void MixAudio16_29( ALshort *dst, alMixEntry *entries );
+void MixAudio16_30( ALshort *dst, alMixEntry *entries );
+void MixAudio16_31( ALshort *dst, alMixEntry *entries );
+void MixAudio16_32( ALshort *dst, alMixEntry *entries );
+void MixAudio16_33( ALshort *dst, alMixEntry *entries );
+void MixAudio16_34( ALshort *dst, alMixEntry *entries );
+void MixAudio16_35( ALshort *dst, alMixEntry *entries );
+void MixAudio16_36( ALshort *dst, alMixEntry *entries );
+void MixAudio16_37( ALshort *dst, alMixEntry *entries );
+void MixAudio16_38( ALshort *dst, alMixEntry *entries );
+void MixAudio16_39( ALshort *dst, alMixEntry *entries );
+void MixAudio16_40( ALshort *dst, alMixEntry *entries );
+void MixAudio16_41( ALshort *dst, alMixEntry *entries );
+void MixAudio16_42( ALshort *dst, alMixEntry *entries );
+void MixAudio16_43( ALshort *dst, alMixEntry *entries );
+void MixAudio16_44( ALshort *dst, alMixEntry *entries );
+void MixAudio16_45( ALshort *dst, alMixEntry *entries );
+void MixAudio16_46( ALshort *dst, alMixEntry *entries );
+void MixAudio16_47( ALshort *dst, alMixEntry *entries );
+void MixAudio16_48( ALshort *dst, alMixEntry *entries );
+void MixAudio16_49( ALshort *dst, alMixEntry *entries );
+void MixAudio16_50( ALshort *dst, alMixEntry *entries );
+void MixAudio16_51( ALshort *dst, alMixEntry *entries );
+void MixAudio16_52( ALshort *dst, alMixEntry *entries );
+void MixAudio16_53( ALshort *dst, alMixEntry *entries );
+void MixAudio16_54( ALshort *dst, alMixEntry *entries );
+void MixAudio16_55( ALshort *dst, alMixEntry *entries );
+void MixAudio16_56( ALshort *dst, alMixEntry *entries );
+void MixAudio16_57( ALshort *dst, alMixEntry *entries );
+void MixAudio16_58( ALshort *dst, alMixEntry *entries );
+void MixAudio16_59( ALshort *dst, alMixEntry *entries );
+void MixAudio16_60( ALshort *dst, alMixEntry *entries );
+void MixAudio16_61( ALshort *dst, alMixEntry *entries );
+void MixAudio16_62( ALshort *dst, alMixEntry *entries );
+void MixAudio16_63( ALshort *dst, alMixEntry *entries );
+void MixAudio16_64( ALshort *dst, alMixEntry *entries );
+#endif /* USE_LIGHT_GEN_MIXING */
+#endif /* _MIX_AUDIO16_H_ */
