952fc4c02df9ea8fe0526d2aca385a877950de9a
[aseqjoy.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(aseqjoy.c)
3 AM_INIT_AUTOMAKE(aseqjoy, 0.0.2)
4 AM_CONFIG_HEADER(config.h)
5
6 dnl Checks for programs.
7 AC_PROG_AWK
8 AC_PROG_CC
9
10 dnl Check for headers
11 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h alsa/asoundlib.h linux/joystick.h unistd.h)
12
13 dnl Checks for typedefs, structures, and compiler characteristics.
14 AC_TYPE_SIZE_T
15
16 dnl Check for ALSA
17 AC_CHECK_LIB(asound, snd_seq_event_output_direct,alsalib=yes,alsalib=no)
18 AC_CHECK_HEADERS(alsa/asoundlib.h,alsaheader=yes,alsaheader=no)
19
20 if test "$alsalib" = "yes"; then
21         if test "$alsaheader" = "yes"; then
22                 LIBS="$LIBS -lasound"
23         else 
24             AC_MSG_ERROR([** Coulnd't find ALSA header file sys/asoundlib.h **])
25     fi
26 else
27     AC_MSG_ERROR([** Coulnd'f find ALSA library libasound. **])
28 fi
29
30 AC_OUTPUT(Makefile aseqjoy.1)