]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't worry about pre-1.0.0 alsa-lib include
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Aug 2019 18:34:48 +0000 (11:34 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Aug 2019 18:35:19 +0000 (11:35 -0700)
Problem reported by Ergus in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00563.html
* configure.ac (ALSA_SUBDIR_INCLUDE): Do not define.
* src/sound.c: Assume ALSA_SUBDIR_INCLUDE.

configure.ac
src/sound.c

index 6c83d61921ed4b8c56963a619421ecb219b3de3d..e39a4380523e24f1a7965bb683ce2051734dea11 100644 (file)
@@ -1731,26 +1731,6 @@ if test "${with_sound}" != "no"; then
     ALSA_MODULES="alsa >= $ALSA_REQUIRED"
     EMACS_CHECK_MODULES([ALSA], [$ALSA_MODULES])
     if test $HAVE_ALSA = yes; then
-      SAVE_CFLAGS="$CFLAGS"
-      SAVE_LIBS="$LIBS"
-      CFLAGS="$ALSA_CFLAGS $CFLAGS"
-      LIBS="$ALSA_LIBS $LIBS"
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], [[snd_lib_error_set_handler (0);]])],
-                      emacs_alsa_normal=yes,
-                   emacs_alsa_normal=no)
-      if test "$emacs_alsa_normal" != yes; then
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alsa/asoundlib.h>]],
-                       [[snd_lib_error_set_handler (0);]])],
-                       emacs_alsa_subdir=yes,
-                    emacs_alsa_subdir=no)
-        if test "$emacs_alsa_subdir" != yes; then
-          AC_MSG_ERROR([pkg-config found alsa, but it does not compile.  See config.log for error messages.])
-        fi
-        ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
-      fi
-
-      CFLAGS="$SAVE_CFLAGS"
-      LIBS="$SAVE_LIBS"
       LIBSOUND="$LIBSOUND $ALSA_LIBS"
       CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
       AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.])
index 4ba826e82c41207703f1fad4c38b8ae0a704dfc3..44d4cbc6d5632224537fb83492799a7be936a1f2 100644 (file)
@@ -72,12 +72,8 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 #include <soundcard.h>
 #endif
 #ifdef HAVE_ALSA
-#ifdef ALSA_SUBDIR_INCLUDE
 #include <alsa/asoundlib.h>
-#else
-#include <asoundlib.h>
-#endif /* ALSA_SUBDIR_INCLUDE */
-#endif /* HAVE_ALSA */
+#endif
 
 /* END: Non Windows Includes */