Mercurial > hg > svcore
comparison configure.ac @ 637:465f769ccad0
* More updates to build system, intended to support platforms both with and without pkg-config (though we really want to be able to switch pkg-config off)
author | Chris Cannam |
---|---|
date | Thu, 16 Sep 2010 14:40:52 +0100 |
parents | 1a4c76e0f7c5 |
children | 6f6aa00a404c |
comparison
equal
deleted
inserted
replaced
636:1a4c76e0f7c5 | 637:465f769ccad0 |
---|---|
1 | 1 |
2 AC_INIT(SVcore, 1.8, cannam@all-day-breakfast.com) | 2 AC_INIT(SVcore, 1.8, cannam@all-day-breakfast.com) |
3 | 3 |
4 AC_CONFIG_SRCDIR(base/AudioLevel.cpp) | 4 AC_CONFIG_SRCDIR(base/base.pro) |
5 | 5 |
6 # Autoconf will set CXXFLAGS; we don't usually want it to, because we | 6 # Autoconf will set CXXFLAGS; we don't usually want it to, because we |
7 # either define our own flags (at least if GCC is in use) or else use | 7 # either define our own flags (at least if GCC is in use) or else use |
8 # the user's preferences. We need to ensure CXXFLAGS is only set if | 8 # the user's preferences. We need to ensure CXXFLAGS is only set if |
9 # the user has expressly set it. So, save the user's (or empty) | 9 # the user has expressly set it. So, save the user's (or empty) |
16 AC_PROG_CC | 16 AC_PROG_CC |
17 AC_PROG_CXX | 17 AC_PROG_CXX |
18 AC_PROG_INSTALL | 18 AC_PROG_INSTALL |
19 AC_PROG_MKDIR_P | 19 AC_PROG_MKDIR_P |
20 | 20 |
21 AC_PATH_X | |
22 AC_HEADER_STDC | 21 AC_HEADER_STDC |
23 | 22 |
24 # These are the flags Autoconf guesses for us; we use them later if | 23 # These are the flags Autoconf guesses for us; we use them later if |
25 # the user has set none and we are not using GCC (so lack our own | 24 # the user has set none and we are not using GCC (so lack our own |
26 # preferred flags) | 25 # preferred flags) |
27 AUTOCONF_CXXFLAGS="$CXXFLAGS" | 26 AUTOCONF_CXXFLAGS="$CXXFLAGS" |
28 | 27 |
29 PKG_PROG_PKG_CONFIG | 28 PKG_PROG_PKG_CONFIG |
30 | 29 |
31 SV_CHECK_QT | 30 SV_CHECK_QT |
32 | |
33 AC_CHECK_LIB([bz2],[BZ2_bzReadOpen],[LIBS="$LIBS -lbz2"],[AC_MSG_ERROR(Failed to find required bzip2 library)]) | |
34 | |
35 PKG_CHECK_MODULES([JACK],[jack >= 0.100],[HAVES="$HAVES HAVE_LIBJACK"],[ | |
36 AC_MSG_WARN(No JACK library found)]) | |
37 | |
38 PKG_CHECK_MODULES([libpulse],[libpulse >= 0.9],[HAVES="$HAVES HAVE_LIBPULSE"],[ | |
39 AC_MSG_WARN(No PulseAudio library found)]) | |
40 | |
41 # bit messy this | |
42 PKG_CHECK_MODULES([fftw3],[fftw3 >= 3.0.0],[HAVES="$HAVES HAVE_FFTW3"],[]) | |
43 PKG_CHECK_MODULES([fftw3f],[fftw3f >= 3.0.0],[HAVES="$HAVES HAVE_FFTW3F"],[]) | |
44 PKG_CHECK_MODULES([sndfile],[sndfile >= 1.0.16],[HAVES="$HAVES HAVE_SNDFILE"],[]) | |
45 PKG_CHECK_MODULES([liblo],[liblo >= 0.7],[HAVES="$HAVES HAVE_LIBLO"],[]) | |
46 PKG_CHECK_MODULES([lrdf],[lrdf >= 0.2],[HAVES="$HAVES HAVE_LRDF"],[]) | |
47 PKG_CHECK_MODULES([samplerate],[samplerate >= 0.1.2],[HAVES="$HAVES HAVE_SAMPLERATE"],[]) | |
48 PKG_CHECK_MODULES([vamp],[vamp >= 2.1],[HAVES="$HAVES HAVE_VAMP"],[]) | |
49 PKG_CHECK_MODULES([vamphostsdk],[vamp-hostsdk >= 2.1],[HAVES="$HAVES HAVE_VAMP_HOSTSDK"],[]) | |
50 PKG_CHECK_MODULES([oggz],[oggz >= 1.0.0],[HAVES="$HAVES HAVE_OGGZ"],[]) | |
51 PKG_CHECK_MODULES([fishsound],[fishsound >= 1.0.0],[HAVES="$HAVES HAVE_FISHSOUND"],[]) | |
52 PKG_CHECK_MODULES([mad],[fishsound >= 0.15.0],[HAVES="$HAVES HAVE_MAD"],[]) | |
53 PKG_CHECK_MODULES([id3tag],[id3tag >= 0.15.0],[HAVES="$HAVES HAVE_ID3TAG"],[]) | |
54 PKG_CHECK_MODULES([raptor],[raptor >= 1.4.20],[HAVES="$HAVES HAVE_RAPTOR"],[]) | |
55 PKG_CHECK_MODULES([rasqal],[rasqal >= 0.9.19],[HAVES="$HAVES HAVE_RASQAL"],[]) | |
56 PKG_CHECK_MODULES([redland],[redland >= 1.0.10],[HAVES="$HAVES HAVE_REDLAND"],[]) | |
57 | |
58 AC_PATH_PROG([PERL],[perl]) | |
59 if test x$PERL = x ; then | |
60 AC_MSG_ERROR([Failed to find required perl program.]) | |
61 fi | |
62 | |
63 AC_PATH_PROG([XARGS],[xargs]) | |
64 if test x$XARGS = x ; then | |
65 AC_MSG_ERROR([Failed to find required xargs program.]) | |
66 fi | |
67 | |
68 AC_PATH_PROG([MAKEDEPEND],[makedepend]) | |
69 if test x$MAKEDEPEND = x ; then | |
70 AC_MSG_ERROR([Failed to find required makedepend program.]) | |
71 fi | |
72 | |
73 AC_PATH_PROG([SHA1SUM],[sha1sum]) | |
74 AC_PATH_PROG([SHA1SUM],[sha1 -q]) | |
75 if test x$SHA1SUM = x ; then | |
76 AC_MSG_ERROR([Failed to find required sha1sum or sha1 program.]) | |
77 fi | |
78 | |
79 AC_PATH_PROG([CUT],[cut]) | |
80 if test x$CUT = x ; then | |
81 AC_MSG_ERROR([Failed to find required cut program.]) | |
82 fi | |
83 | 31 |
84 SV_DEFINES_DEBUG="-DDEBUG -DBUILD_DEBUG -DWANT_TIMING" | 32 SV_DEFINES_DEBUG="-DDEBUG -DBUILD_DEBUG -DWANT_TIMING" |
85 SV_DEFINES_RELEASE="-DNDEBUG -DBUILD_RELEASE -DNO_TIMING" | 33 SV_DEFINES_RELEASE="-DNDEBUG -DBUILD_RELEASE -DNO_TIMING" |
86 SV_DEFINES_MINIMAL="$SV_DEFINES_RELEASE" | 34 SV_DEFINES_MINIMAL="$SV_DEFINES_RELEASE" |
87 | 35 |
114 CXXFLAGS_MINIMAL="$USER_CXXFLAGS" | 62 CXXFLAGS_MINIMAL="$USER_CXXFLAGS" |
115 fi | 63 fi |
116 | 64 |
117 CXXFLAGS="$CXXFLAGS_BUILD $SV_DEFINES_BUILD" | 65 CXXFLAGS="$CXXFLAGS_BUILD $SV_DEFINES_BUILD" |
118 | 66 |
119 #if test -z "$JACK_CFLAGS" ; then | 67 SV_MODULE_REQUIRED([bz2],[],[bzlib.h],[bz2],[BZ2_bzReadOpen]) |
120 # AC_MSG_WARN([Required JACK library not found, building with no audio!]) | 68 SV_MODULE_REQUIRED([fftw3],[fftw3 >= 3.0.0],[fftw3.h],[fftw3],[fftw_execute]) |
121 #fi | 69 SV_MODULE_REQUIRED([fftw3f],[fftw3f >= 3.0.0],[fftw3.h],[fftw3f],[fftwf_execute]) |
122 #if test -z "$ALSA_CFLAGS" ; then | 70 SV_MODULE_REQUIRED([sndfile],[sndfile >= 1.0.16],[sndfile.h],[sndfile],[sf_open]) |
123 # AC_MSG_WARN([Required ALSA library not found, building with no MIDI!]) | 71 SV_MODULE_REQUIRED([samplerate],[samplerate >= 0.1.2],[samplerate.h],[samplerate],[src_new]) |
124 #fi | 72 SV_MODULE_REQUIRED([vamp],[vamp >= 2.1],[vamp/vamp.h],[],[]) |
73 SV_MODULE_REQUIRED([vamphostsdk],[vamp-hostsdk >= 2.0],[vamp-hostsdk/PluginLoader.h],[],[]) | |
74 SV_MODULE_REQUIRED([rubberband],[rubberband],[rubberband/RubberBandStretcher.h],[rubberband],[rubberband_new]) | |
75 SV_MODULE_REQUIRED([raptor],[raptor >= 1.4.20],[raptor.h],[raptor],[raptor_new_world]) | |
76 SV_MODULE_REQUIRED([rasqal],[rasqal >= 0.9.19],[rasqal/rasqal.h],[rasqal],[rasqal_new_world]) | |
77 SV_MODULE_REQUIRED([redland],[redland >= 1.0.10],[librdf.h],[rdf],[librdf_new_world]) | |
78 | |
79 SV_MODULE_OPTIONAL([liblo],[],[lo/lo.h],[lo],[lo_address_new]) | |
80 SV_MODULE_OPTIONAL([JACK],[jack >= 0.100],[jack/jack.h],[jack],[jack_client_open]) | |
81 SV_MODULE_OPTIONAL([libpulse],[libpulse >= 0.9],[pulse/pulseaudio.h],[pulse],[pa_stream_new]) | |
82 SV_MODULE_OPTIONAL([lrdf],[lrdf >= 0.2],[lrdf.h],[lrdf],[lrdf_init]) | |
83 SV_MODULE_OPTIONAL([oggz],[oggz >= 1.0.0],[oggz/oggz.h],[oggz],[oggz_run]) | |
84 SV_MODULE_OPTIONAL([fishsound],[fishsound >= 1.0.0],[fishsound/fishsound.h],[fishsound],[fish_sound_new]) | |
85 SV_MODULE_OPTIONAL([mad],[mad >= 0.15.0],[mad.h],[mad],[mad_decoder_init]) | |
86 SV_MODULE_OPTIONAL([id3tag],[id3tag >= 0.15.0],[id3tag.h],[id3tag],[id3_tag_new]) | |
125 | 87 |
126 AC_SUBST(PERL) | 88 AC_SUBST(PERL) |
127 AC_SUBST(XARGS) | 89 AC_SUBST(XARGS) |
128 AC_SUBST(MAKEDEPEND) | 90 AC_SUBST(MAKEDEPEND) |
129 AC_SUBST(SHA1SUM) | 91 AC_SUBST(SHA1SUM) |
131 | 93 |
132 AC_SUBST(CFLAGS) | 94 AC_SUBST(CFLAGS) |
133 AC_SUBST(CXXFLAGS) | 95 AC_SUBST(CXXFLAGS) |
134 AC_SUBST(CXXFLAGS_MINIMAL) | 96 AC_SUBST(CXXFLAGS_MINIMAL) |
135 AC_SUBST(HAVES) | 97 AC_SUBST(HAVES) |
136 #AC_SUBST(DSSI_LOCALFLAGS) | 98 AC_SUBST(LIBS) |
137 | 99 |
138 AC_SUBST(CC) | 100 AC_SUBST(CC) |
139 AC_SUBST(CXX) | 101 AC_SUBST(CXX) |
140 | 102 |
141 AC_SUBST(CODENAME) | 103 AC_SUBST(CODENAME) |
142 | 104 |
143 AC_OUTPUT([config.pri]) | 105 AC_OUTPUT([config.pri]) |
106 | |
107 $QMAKE -r | |
144 | 108 |
145 # qmake builds our static libraries, which is fine -- what we'd really | 109 # qmake builds our static libraries, which is fine -- what we'd really |
146 # like to do afterwards is bundle them into a single .so with e.g. | 110 # like to do afterwards is bundle them into a single .so with e.g. |
147 | 111 |
148 # gcc -Wl,--whole-archive */*.a -Wl,--no-whole-archive -o libsvcore.so | 112 # gcc -Wl,--whole-archive */*.a -Wl,--no-whole-archive -o libsvcore.so |
149 | 113 |
150 # but how best to arrange this? if it's not possible, we'll presumably | 114 # but how best to arrange this? if it's not possible, we'll presumably |
151 # just have to use a single (q)make(project)file instead. | 115 # just have to use a single (q)make(project)file instead. |
152 | 116 |
117 AC_MSG_NOTICE([ | |
118 | |
119 Configuration complete. | |
120 Please check the above messages for any warnings that you | |
121 might care about, and then run "make". | |
122 | |
123 The file config.pri contains the configuration settings for | |
124 qmake. If you want to adjust these by hand, edit config.pri | |
125 and run "qmake -r" again to regenerate the Makefile. | |
126 ]) |