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

Diff of /linuxsampler/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by schoenebeck, Wed Nov 5 14:47:10 2003 UTC revision 379 by persson, Sun Feb 13 18:02:29 2005 UTC
# Line 1  Line 1 
1  AC_INIT(configure.in)  AC_INIT(configure.in)
2    AC_C_BIGENDIAN
3  AC_CANONICAL_SYSTEM  AC_CANONICAL_SYSTEM
4    
5  echo -n "Checking whether x86 architecture... "  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  def_arch_x86=0
15  case $target_cpu in  case $target_cpu in
16    "i386" | "i486" | "i586" | "i686" | "i786")    "i386" | "i486" | "i586" | "i686" | "i786")
# Line 13  case $target_cpu in Line 21  case $target_cpu in
21  esac  esac
22  AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.])  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    
147    if test "$have_midi_input_driver" = "false"; then
148        echo "No supported MIDI input system found!"
149        echo "Sorry, LinuxSampler only supports ALSA as MIDI input driver at the moment!"
150        exit -1;
151    fi
152    if test "$have_audio_output_driver" = "false"; then
153        echo "No supported audio output system found!"
154        echo "Sorry, LinuxSampler only supports ALSA and JACK as audio output driver at the moment!"
155        exit -1;
156    fi
157    
158    
159  AM_CONFIG_HEADER(config.h)  AM_CONFIG_HEADER(config.h)
160  AM_INIT_AUTOMAKE(linuxsampler, 0.1)  AM_INIT_AUTOMAKE(linuxsampler, 0.2)
161    
162  AC_LANG_CPLUSPLUS  AC_LANG_CPLUSPLUS
163  AC_PROG_CXX  AC_PROG_CXX
164  AM_PROG_LIBTOOL  AM_PROG_LIBTOOL
165    
166  AC_OUTPUT(Makefile src/Makefile)  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)

Legend:
Removed from v.9  
changed lines
  Added in v.379

  ViewVC Help
Powered by ViewVC