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

Contents of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 275 - (show annotations) (download)
Sat Oct 9 15:40:35 2004 UTC (14 years, 7 months ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 3083 byte(s)
src/common/Mutex.cpp only compiles on UNIX98 compatible systems

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 # TODO: Check for UNIX98 compatibility (needed for pthread_mutexattr_settype() call in Mutex.cpp)
13 # checking macro _XOPEN_SOURCE >= 500 from features.h recommended for this
14
15
16 echo -n "checking whether x86 architecture... "
17 def_arch_x86=0
18 case $target_cpu in
19 "i386" | "i486" | "i586" | "i686" | "i786")
20 echo "yes"
21 def_arch_x86=1;;
22 *)
23 echo "no";;
24 esac
25 AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.])
26
27
28 AC_CHECK_HEADER(alsa/asoundlib.h,
29 AC_CHECK_LIB(asound, main,
30 have_alsa="true"
31 ,
32 have_alsa="false"
33 )
34 ,
35 have_alsa="false"
36 )
37 if test "$have_alsa" = "false"; then
38 echo "Alsa not installed!"
39 echo "Sorry, LinuxSampler only supports Alsa sound drivers at the moment!"
40 exit -1;
41 fi
42
43
44 echo -n "checking Alsa version... "
45 AC_LANG_SAVE
46 AC_LANG_C
47 AC_TRY_RUN([
48 #include <alsa/asoundlib.h>
49 void main(void) {
50 /* ensure backward compatibility */
51 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
52 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
53 #endif
54 exit(SND_LIB_MAJOR);
55 }
56 ],
57 alsa_major=0,
58 alsa_major=$?,
59 alsa_major=0
60 )
61 AC_TRY_RUN([
62 #include <alsa/asoundlib.h>
63 void main(void) {
64 /* ensure backward compatibility */
65 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
66 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
67 #endif
68 exit(SND_LIB_MINOR);
69 }
70 ],
71 alsa_minor=0,
72 alsa_minor=$?,
73 alsa_minor=0
74 )
75 AC_TRY_RUN([
76 #include <alsa/asoundlib.h>
77 void main(void) {
78 /* ensure backward compatibility */
79 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
80 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
81 #endif
82 exit(SND_LIB_SUBMINOR);
83 }
84 ],
85 alsa_subminor=0,
86 alsa_subminor=$?,
87 alsa_subminor=0
88 )
89 AC_LANG_RESTORE
90 echo "$alsa_major.$alsa_minor.$alsa_subminor";
91 AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])
92 AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
93 AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])
94
95
96 # JACK
97 PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)
98 AC_SUBST(JACK_LIBS)
99 AC_SUBST(JACK_CFLAGS)
100 if test $HAVE_JACK = false; then
101 HAVE_JACK=0;
102 else
103 HAVE_JACK=1;
104 fi
105 AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.])
106
107
108 AM_CONFIG_HEADER(config.h)
109 AM_INIT_AUTOMAKE(linuxsampler, 0.2)
110
111 AC_LANG_CPLUSPLUS
112 AC_PROG_CXX
113 AM_PROG_LIBTOOL
114
115 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