2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([jack-smf-utils], [1.0], [trasz@FreeBSD.org])
6 AM_INIT_AUTOMAKE([-Wall foreign])
7 AC_CONFIG_SRCDIR([src/jack-smf-player.c])
8 AC_CONFIG_HEADER([config.h])
10 # Checks for programs.
15 # Checks for libraries.
16 AC_CHECK_LIB([m], [pow])
17 AC_ARG_WITH([readline],
18 [AS_HELP_STRING([--with-readline],
19 [support fancy command line editing @<:@default=check@:>@])],
21 [with_readline=check])
23 AS_IF([test "x$with_readline" != xno],
24 [AC_CHECK_LIB([readline], [main],
25 [AC_SUBST([READLINE_LIBS], ["-lreadline -lncurses"])
26 AC_DEFINE([HAVE_LIBREADLINE], [1], [Define if you have libreadline])],
27 [if test "x$with_readline" != xcheck; then
29 [--with-readline was given, but test for readline failed])
33 # Checks for header files.
35 AC_CHECK_HEADERS([arpa/inet.h stdlib.h string.h sys/time.h unistd.h])
37 # Checks for typedefs, structures, and compiler characteristics.
45 # Checks for library functions.
51 AC_CHECK_FUNCS([gettimeofday memset pow strdup strerror strtol])
53 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.2)
57 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.2)
58 AC_SUBST(GTHREAD_CFLAGS)
59 AC_SUBST(GTHREAD_LIBS)
61 PKG_CHECK_MODULES(JACK, jack >= 0.102.0)
65 PKG_CHECK_MODULES(JACK_MIDI_NEEDS_NFRAMES, jack < 0.105.00,
66 AC_DEFINE(JACK_MIDI_NEEDS_NFRAMES, 1, [whether or not JACK routines need nframes parameter]), true)
69 [AS_HELP_STRING([--with-lash],
70 [support LASH @<:@default=check@:>@])],
74 AS_IF([test "x$with_lash" != xno],
75 [PKG_CHECK_MODULES(LASH, lash-1.0, AC_DEFINE([HAVE_LASH], [], [Defined if we have LASH support.]),
76 [if test "x$with_lash" != xcheck; then
77 AC_MSG_FAILURE([--with-lash was given, but LASH was not found])
84 AC_CONFIG_FILES([Makefile libsmf/Makefile man/Makefile src/Makefile])