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