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

Annotation of /linuxsampler/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 497 - (hide annotations) (download)
Sun Apr 10 11:55:44 2005 UTC (14 years, 6 months ago) by persson
File size: 5169 byte(s)
* removed some build warnings
* fixed a bug with hanging notes when using sustain pedal
* release samples are not triggered anymore when sustain pedal is down

1 schoenebeck 9 AC_INIT(configure.in)
2 schoenebeck 12 AC_C_BIGENDIAN
3 schoenebeck 9 AC_CANONICAL_SYSTEM
4    
5 schoenebeck 80 AC_SUBST(target)
6     AC_SUBST(target_alias)
7     AC_SUBST(target_cpu)
8     AC_SUBST(target_os)
9     AC_SUBST(target_vendor)
10 schoenebeck 18
11 schoenebeck 275
12    
13 schoenebeck 18 echo -n "checking whether x86 architecture... "
14 schoenebeck 9 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 schoenebeck 18
25 schoenebeck 288 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 schoenebeck 18 AC_CHECK_HEADER(alsa/asoundlib.h,
64     AC_CHECK_LIB(asound, main,
65 schoenebeck 291 have_alsa=1
66 schoenebeck 18 ,
67 schoenebeck 291 have_alsa=0
68 schoenebeck 18 )
69     ,
70 schoenebeck 291 have_alsa=0
71 schoenebeck 18 )
72 schoenebeck 291 if test "$have_alsa" = "1"; then
73 schoenebeck 288 have_midi_input_driver="true"
74     have_audio_output_driver="true";
75 schoenebeck 18 fi
76 schoenebeck 291 AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
77 schoenebeck 288 AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.])
78 schoenebeck 18
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 schoenebeck 31 # JACK
133     PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)
134     AC_SUBST(JACK_LIBS)
135     AC_SUBST(JACK_CFLAGS)
136 schoenebeck 33 if test $HAVE_JACK = false; then
137     HAVE_JACK=0;
138     else
139 schoenebeck 288 HAVE_JACK=1
140     have_audio_output_driver="true";
141 persson 379 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 schoenebeck 33 fi
143 schoenebeck 288 AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)
144 schoenebeck 31 AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.])
145    
146 senkov 397 # 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 schoenebeck 31
158 senkov 397
159 schoenebeck 291 if test "$have_midi_input_driver" = "false"; then
160 schoenebeck 288 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 schoenebeck 291 if test "$have_audio_output_driver" = "false"; then
165 schoenebeck 288 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 schoenebeck 9 AM_CONFIG_HEADER(config.h)
172 schoenebeck 411 AM_INIT_AUTOMAKE(linuxsampler, 0.3.0)
173 schoenebeck 9
174     AC_LANG_CPLUSPLUS
175     AC_PROG_CXX
176 persson 497
177     # autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like
178     # this, the dlfcn.h check in am_prog_libtool may fail.
179     AC_CHECK_HEADER(stdlib.h)
180    
181 schoenebeck 9 AM_PROG_LIBTOOL
182    
183 schoenebeck 204 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