/[svn]/linuxsampler/trunk/configure.ac
ViewVC logotype

Contents of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 411 - (show annotations) (download)
Sat Feb 26 02:01:14 2005 UTC (19 years ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 5016 byte(s)
* design change: using now one sampler engine instance and one disk thread
  instance for all sampler channels that are connected to the same audio
  output device (and are using the same engine type of course)
* added EngineFactory / EngineChannelFactory to remove the annoying build
  dependencies e.g. of the lscpserver to the actual sampler engine
  implementations
* bumped version to 0.3.0 (current CVS state is still quite broken,
  previous, stable CVS version was tagged as "v0_2_0" and is also available
  as source tarball)

1 AC_INIT(configure.in)
2 AC_C_BIGENDIAN
3 AC_CANONICAL_SYSTEM
4
5 AC_SUBST(target)
6 AC_SUBST(target_alias)
7 AC_SUBST(target_cpu)
8 AC_SUBST(target_os)
9 AC_SUBST(target_vendor)
10
11
12
13 echo -n "checking whether x86 architecture... "
14 def_arch_x86=0
15 case $target_cpu in
16 "i386" | "i486" | "i586" | "i686" | "i786")
17 echo "yes"
18 def_arch_x86=1;;
19 *)
20 echo "no";;
21 esac
22 AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.])
23
24
25 AC_MSG_CHECKING([whether UNIX98 compatible])
26 AC_LANG_SAVE
27 AC_LANG_C
28 AC_TRY_RUN([
29 #ifndef _GNU_SOURCE
30 #define _GNU_SOURCE 1
31 #endif
32 #include <features.h>
33 void main(void) {
34 #if _XOPEN_SOURCE >= 500
35 exit(0); /* UNIX98 compatible */
36 #else
37 exit(-1); /* not UNIX98 compatible */
38 #endif
39 }
40 ],
41 have_unix98="yes",
42 have_unix98="no",
43 have_unix98="no"
44 )
45 AC_LANG_RESTORE
46 AC_MSG_RESULT([$have_unix98])
47 if test "$have_unix98" = "no"; then
48 if test "x$HAVE_UNIX98" = "x"; then
49 echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"
50 echo "pthread_mutexattr_settype() call in Mutex.cpp. You may want to run
51 echo "./configure with environment variable HAVE_UNIX98=1 in case you think you
52 echo "have a UNIX98 compatible system."
53 exit -1;
54 fi
55 fi
56
57
58 # Checks for available audio and MIDI systems / drivers
59 # (we throw an error if there's not at least one system for audio output and MIDI input available)
60 have_midi_input_driver="false"
61 have_audio_output_driver="false"
62
63 AC_CHECK_HEADER(alsa/asoundlib.h,
64 AC_CHECK_LIB(asound, main,
65 have_alsa=1
66 ,
67 have_alsa=0
68 )
69 ,
70 have_alsa=0
71 )
72 if test "$have_alsa" = "1"; then
73 have_midi_input_driver="true"
74 have_audio_output_driver="true";
75 fi
76 AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
77 AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.])
78
79
80 echo -n "checking Alsa version... "
81 AC_LANG_SAVE
82 AC_LANG_C
83 AC_TRY_RUN([
84 #include <alsa/asoundlib.h>
85 void main(void) {
86 /* ensure backward compatibility */
87 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
88 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
89 #endif
90 exit(SND_LIB_MAJOR);
91 }
92 ],
93 alsa_major=0,
94 alsa_major=$?,
95 alsa_major=0
96 )
97 AC_TRY_RUN([
98 #include <alsa/asoundlib.h>
99 void main(void) {
100 /* ensure backward compatibility */
101 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
102 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
103 #endif
104 exit(SND_LIB_MINOR);
105 }
106 ],
107 alsa_minor=0,
108 alsa_minor=$?,
109 alsa_minor=0
110 )
111 AC_TRY_RUN([
112 #include <alsa/asoundlib.h>
113 void main(void) {
114 /* ensure backward compatibility */
115 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
116 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
117 #endif
118 exit(SND_LIB_SUBMINOR);
119 }
120 ],
121 alsa_subminor=0,
122 alsa_subminor=$?,
123 alsa_subminor=0
124 )
125 AC_LANG_RESTORE
126 echo "$alsa_major.$alsa_minor.$alsa_subminor";
127 AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])
128 AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
129 AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])
130
131
132 # JACK
133 PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)
134 AC_SUBST(JACK_LIBS)
135 AC_SUBST(JACK_CFLAGS)
136 if test $HAVE_JACK = false; then
137 HAVE_JACK=0;
138 else
139 HAVE_JACK=1
140 have_audio_output_driver="true";
141 AC_CHECK_LIB(jack, jack_client_name_size, [AC_DEFINE(HAVE_JACK_CLIENT_NAME_SIZE, 1, [Define to 1 if you have the `jack_client_name_size' function.])], , $JACK_LIBS)
142 fi
143 AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)
144 AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.])
145
146 # SQLITE3
147 PKG_CHECK_MODULES(SQLITE3, sqlite3, HAVE_SQLITE3=true, HAVE_SQLITE3=false)
148 AC_SUBST(SQLITE3_LIBS)
149 AC_SUBST(SQLITE3_CFLAGS)
150 if test $HAVE_SQLITE3 = false; then
151 HAVE_SQLITE3=0;
152 else
153 HAVE_SQLITE3=1
154 fi
155 AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)
156 AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.])
157
158
159 if test "$have_midi_input_driver" = "false"; then
160 echo "No supported MIDI input system found!"
161 echo "Sorry, LinuxSampler only supports ALSA as MIDI input driver at the moment!"
162 exit -1;
163 fi
164 if test "$have_audio_output_driver" = "false"; then
165 echo "No supported audio output system found!"
166 echo "Sorry, LinuxSampler only supports ALSA and JACK as audio output driver at the moment!"
167 exit -1;
168 fi
169
170
171 AM_CONFIG_HEADER(config.h)
172 AM_INIT_AUTOMAKE(linuxsampler, 0.3.0)
173
174 AC_LANG_CPLUSPLUS
175 AC_PROG_CXX
176 AM_PROG_LIBTOOL
177
178 AC_OUTPUT(Makefile src/Makefile src/network/Makefile src/engines/Makefile src/engines/gig/Makefile src/engines/common/Makefile src/common/Makefile src/lib/Makefile src/lib/fileloader/Makefile src/lib/fileloader/libgig/Makefile src/testcases/Makefile src/drivers/Makefile src/drivers/audio/Makefile src/drivers/midi/Makefile)

  ViewVC Help
Powered by ViewVC