#include <unistd.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
-#include <linux/sound.h>
 
 #include <errno.h>
 
 #endif
 #include <time.h>
 
-#include <sys/soundlib.h>
+#include <sys/asoundlib.h>
 
 /* example compilation commandline:
  * clear; gcc -Wall -pipe -O2 alsamixer.c -o alsamixer -lncurses
 
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_CONFIG_HEADER(include/config.h)
-AC_CHECK_HEADERS(linux/sound.h sys/soundlib.h)
+AC_CHECK_HEADERS(linux/asound.h sys/asoundlib.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
   myprefix=$ac_default_prefix
 fi
 CFLAGS="-I$myprefix/include"
-LIBS="-L$myprefix/lib -lsound"
+LIBS="-L$myprefix/lib -lasound"
 #echo "CFLAGS=$CFLAGS"
 #echo "LIBS=$LIBS"
 AC_MSG_CHECKING(for alsa-lib package)
 AC_TRY_RUN([
-#include <sys/soundlib.h>
+#include <sys/asoundlib.h>
 void main(void)
 {
   snd_cards();