]> git.mxchange.org Git - simgear.git/blobdiff - configure.ac
Add default openal libs for cygwin.
[simgear.git] / configure.ac
index 9d448213a0bca1f2abb0befe32a1798ed45dd79a..0e9bdd915533c00d7350e79b18f5fae2974045f8 100644 (file)
@@ -270,7 +270,33 @@ esac
 opengl_LIBS="$LIBS"
 LIBS="$base_LIBS"
 
+dnl check for OpenAL libraries
+case "${host}" in
+*-*-cygwin* | *-*-mingw32*)
+    dnl CygWin under Windoze.
+
+    LIBS="$LIBS -lopenal32 -lwinmm -ldsound -ldxguid -lole32"
+    ;;
+
+*-apple-darwin*)
+    dnl Mac OS X
+
+    LIBS="$LIBS -framework IOKit -framework OpenAL"
+    ;;
+
+*)
+    dnl default unix style machines
+
+    AC_SEARCH_LIBS(alGenBuffers, openal)
+    ;;
+
+esac
+
+openal_LIBS="$LIBS"
+LIBS="$base_LIBS"
+
 AC_SUBST(base_LIBS)
+AC_SUBST(openal_LIBS)
 AC_SUBST(opengl_LIBS)
 AC_SUBST(thread_LIBS)
 AC_SUBST(network_LIBS)