1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/elements.c)
dnl
dnl Set versions
dnl
PMIDI_MAJOR_VERSION=1
PMIDI_MINOR_VERSION=5
PMIDI_MICRO_VERSION=5
PMIDI_INTERFACE_AGE=0
PMIDI_BINARY_AGE=0
PMIDI_VERSION=$PMIDI_MAJOR_VERSION.$PMIDI_MINOR_VERSION.$PMIDI_MICRO_VERSION
AC_SUBST(PMIDI_MAJOR_VERSION)
AC_SUBST(PMIDI_MINOR_VERSION)
AC_SUBST(PMIDI_MICRO_VERSION)
AC_SUBST(PMIDI_INTERFACE_AGE)
AC_SUBST(PMIDI_BINARY_AGE)
AC_SUBST(PMIDI_VERSION)
dnl
dnl Detect the canonical host and target build environment
dnl
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
dnl
dnl Setup for automake
dnl
AM_INIT_AUTOMAKE(pmidi, $PMIDI_VERSION)
dnl
dnl Checks for programs.
dnl
AC_PROG_CC
AC_PROG_INSTALL
dnl
dnl Checks for libraries.
dnl
dnl
dnl Initial values for exported symbols.
dnl
WITH_ALSA=1
WITH_INCLUDED_GLIB=1
AC_SUBST(WITH_ALSA)
AM_PATH_ALSA
dnl AC_CHECK_LIB(m,main)
dnl AC_CHECK_LIB(asound, snd_seq_open, [LIBS="$LIBS -lasound"])
AC_CHECK_LIB(asound, snd_seq_drain_output,AC_DEFINE(USE_DRAIN,1),,$ALSA_LIBS)
dnl
dnl Check for parameters to configure
dnl
AC_ARG_WITH(included_glib,
[ --with-included-glib build with included GLIB [default=auto]],
[included_glib="$withval"],
[included_glib=auto])
dnl
dnl Check the system header files for glib.h
dnl and set the parameters accordingly.
dnl
if test "$included_glib" = "auto" || test "$included_glib" = "no"; then
AC_PATH_PROG(GLIBCNF, glib-config, true, $PATH)
CFLAGS="$CFLAGS `$GLIBCNF --cflags`"
LIBS="$LIBS `$GLIBCNF --libs`"
WITH_INCLUDED_GLIB=0
AC_SUBST(GLIBCNF)
fi
dnl
dnl If using the system's GLIB library, setup
dnl will exclude the included GLIB
dnl
AM_CONDITIONAL(GLIB, test x$WITH_INCLUDED_GLIB = x1)
AC_SUBST(WITH_INCLUDED_GLIB)
dnl
dnl Checks for header files.
dnl
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h alsa/asoundlib.h)
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_C_CONST
dnl
dnl Checks for library functions.
dnl
AC_FUNC_VPRINTF
AC_OUTPUT([ \
man/Makefile \
src/Makefile \
Makefile \
pmidi.spec \
])
|