Chris@636
|
1
|
Chris@803
|
2 AC_INIT([SVcore], [2.1], cannam@all-day-breakfast.com)
|
Chris@636
|
3
|
Chris@648
|
4 AC_CONFIG_SRCDIR(base/Pitch.h)
|
Chris@636
|
5
|
Chris@636
|
6 # Autoconf will set CXXFLAGS; we don't usually want it to, because we
|
Chris@636
|
7 # either define our own flags (at least if GCC is in use) or else use
|
Chris@636
|
8 # the user's preferences. We need to ensure CXXFLAGS is only set if
|
Chris@636
|
9 # the user has expressly set it. So, save the user's (or empty)
|
Chris@636
|
10 # setting now and restore it after Autoconf has done its bit of
|
Chris@636
|
11 # piddling about.
|
Chris@636
|
12 USER_CXXFLAGS="$CXXFLAGS"
|
Chris@636
|
13
|
Chris@670
|
14 # If the user supplied CFLAGS but not CXXFLAGS, use CFLAGS instead
|
Chris@670
|
15 if test x"$USER_CXXFLAGS" = x; then
|
Chris@670
|
16 if test x"$CFLAGS" != x; then
|
Chris@670
|
17 USER_CXXFLAGS="$CFLAGS"
|
Chris@670
|
18 fi
|
Chris@670
|
19 fi
|
Chris@670
|
20
|
Chris@636
|
21 AC_LANG_CPLUSPLUS
|
Chris@636
|
22
|
Chris@636
|
23 AC_PROG_CC
|
Chris@636
|
24 AC_PROG_CXX
|
Chris@636
|
25 AC_PROG_INSTALL
|
Chris@636
|
26 AC_PROG_MKDIR_P
|
Chris@636
|
27
|
Chris@1011
|
28 # We are daringly making use of C++11 now
|
Chris@1011
|
29 AX_CXX_COMPILE_STDCXX_11(noext)
|
Chris@1011
|
30
|
Chris@636
|
31 AC_HEADER_STDC
|
Chris@636
|
32
|
Chris@636
|
33 # These are the flags Autoconf guesses for us; we use them later if
|
Chris@636
|
34 # the user has set none and we are not using GCC (so lack our own
|
Chris@636
|
35 # preferred flags)
|
Chris@636
|
36 AUTOCONF_CXXFLAGS="$CXXFLAGS"
|
Chris@636
|
37
|
Chris@636
|
38 PKG_PROG_PKG_CONFIG
|
Chris@636
|
39
|
Chris@636
|
40 SV_CHECK_QT
|
Chris@636
|
41
|
Chris@636
|
42 SV_DEFINES_DEBUG="-DDEBUG -DBUILD_DEBUG -DWANT_TIMING"
|
Chris@636
|
43 SV_DEFINES_RELEASE="-DNDEBUG -DBUILD_RELEASE -DNO_TIMING"
|
Chris@636
|
44 SV_DEFINES_MINIMAL="$SV_DEFINES_RELEASE"
|
Chris@636
|
45
|
Chris@636
|
46 # Now we have: USER_CXXFLAGS contains any flags the user set
|
Chris@636
|
47 # explicitly; AUTOCONF_CXXFLAGS contains flags that Autoconf thought
|
Chris@636
|
48 # we should use. If we have GCC, we override the latter but then
|
Chris@636
|
49 # allow ourselves to be overridden (later) by the former
|
Chris@636
|
50
|
Chris@636
|
51 CXXFLAGS_DEBUG="$AUTOCONF_CXXFLAGS"
|
Chris@636
|
52 CXXFLAGS_RELEASE="$AUTOCONF_CXXFLAGS"
|
Chris@636
|
53 CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS"
|
Chris@636
|
54
|
Chris@636
|
55 if test "x$GCC" = "xyes"; then
|
Chris@1011
|
56 CXXFLAGS_DEBUG="-std=c++11 -Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe"
|
Chris@1011
|
57 CXXFLAGS_RELEASE="-std=c++11 -g0 -O2 -Wall -pipe"
|
Chris@1011
|
58 CXXFLAGS_MINIMAL="-std=c++11 -g0 -O0"
|
Chris@636
|
59 fi
|
Chris@636
|
60
|
Chris@636
|
61 CXXFLAGS_BUILD="$CXXFLAGS_RELEASE"
|
Chris@636
|
62 SV_DEFINES_BUILD="$SV_DEFINES_RELEASE"
|
Chris@636
|
63
|
Chris@657
|
64 QMAKE_CONFIG="release"
|
Chris@657
|
65
|
Chris@636
|
66 AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[enable debug support [default=no]])],[AC_MSG_NOTICE([enabling debug build])
|
Chris@657
|
67 QMAKE_CONFIG="debug"
|
Chris@636
|
68 CXXFLAGS_BUILD="$CXXFLAGS_DEBUG"
|
Chris@636
|
69 SV_DEFINES_BUILD="$SV_DEFINES_DEBUG"])
|
Chris@636
|
70
|
Chris@636
|
71 if test x"$USER_CXXFLAGS" != x; then
|
Chris@636
|
72 AC_MSG_NOTICE([The CXXFLAGS environment variable is set to "$USER_CXXFLAGS".])
|
Chris@636
|
73 AC_MSG_NOTICE(Overriding default compiler flags with the above user setting.)
|
Chris@636
|
74 CXXFLAGS_BUILD="$USER_CXXFLAGS"
|
Chris@636
|
75 CXXFLAGS_MINIMAL="$USER_CXXFLAGS"
|
Chris@636
|
76 fi
|
Chris@636
|
77
|
Chris@636
|
78 CXXFLAGS="$CXXFLAGS_BUILD $SV_DEFINES_BUILD"
|
Chris@636
|
79
|
Chris@637
|
80 SV_MODULE_REQUIRED([bz2],[],[bzlib.h],[bz2],[BZ2_bzReadOpen])
|
Chris@637
|
81 SV_MODULE_REQUIRED([fftw3],[fftw3 >= 3.0.0],[fftw3.h],[fftw3],[fftw_execute])
|
Chris@637
|
82 SV_MODULE_REQUIRED([fftw3f],[fftw3f >= 3.0.0],[fftw3.h],[fftw3f],[fftwf_execute])
|
Chris@637
|
83 SV_MODULE_REQUIRED([sndfile],[sndfile >= 1.0.16],[sndfile.h],[sndfile],[sf_open])
|
Chris@637
|
84 SV_MODULE_REQUIRED([samplerate],[samplerate >= 0.1.2],[samplerate.h],[samplerate],[src_new])
|
Chris@637
|
85 SV_MODULE_REQUIRED([vamp],[vamp >= 2.1],[vamp/vamp.h],[],[])
|
Chris@798
|
86 SV_MODULE_REQUIRED([vamphostsdk],[vamp-hostsdk >= 2.5],[vamp-hostsdk/PluginLoader.h],[vamp-hostsdk],[libvamphostsdk_v_2_5_present])
|
Chris@637
|
87 SV_MODULE_REQUIRED([rubberband],[rubberband],[rubberband/RubberBandStretcher.h],[rubberband],[rubberband_new])
|
Chris@637
|
88
|
Chris@637
|
89 SV_MODULE_OPTIONAL([liblo],[],[lo/lo.h],[lo],[lo_address_new])
|
Chris@654
|
90 SV_MODULE_OPTIONAL([portaudio_2_0],[portaudio-2.0 >= 19],[portaudio.h],[portaudio],[Pa_IsFormatSupported])
|
Chris@637
|
91 SV_MODULE_OPTIONAL([JACK],[jack >= 0.100],[jack/jack.h],[jack],[jack_client_open])
|
Chris@637
|
92 SV_MODULE_OPTIONAL([libpulse],[libpulse >= 0.9],[pulse/pulseaudio.h],[pulse],[pa_stream_new])
|
Chris@637
|
93 SV_MODULE_OPTIONAL([lrdf],[lrdf >= 0.2],[lrdf.h],[lrdf],[lrdf_init])
|
Chris@637
|
94 SV_MODULE_OPTIONAL([oggz],[oggz >= 1.0.0],[oggz/oggz.h],[oggz],[oggz_run])
|
Chris@637
|
95 SV_MODULE_OPTIONAL([fishsound],[fishsound >= 1.0.0],[fishsound/fishsound.h],[fishsound],[fish_sound_new])
|
Chris@637
|
96 SV_MODULE_OPTIONAL([mad],[mad >= 0.15.0],[mad.h],[mad],[mad_decoder_init])
|
Chris@637
|
97 SV_MODULE_OPTIONAL([id3tag],[id3tag >= 0.15.0],[id3tag.h],[id3tag],[id3_tag_new])
|
Chris@636
|
98
|
Chris@636
|
99 AC_SUBST(PERL)
|
Chris@636
|
100 AC_SUBST(XARGS)
|
Chris@636
|
101 AC_SUBST(MAKEDEPEND)
|
Chris@636
|
102 AC_SUBST(SHA1SUM)
|
Chris@636
|
103 AC_SUBST(CUT)
|
Chris@636
|
104
|
Chris@636
|
105 AC_SUBST(CFLAGS)
|
Chris@636
|
106 AC_SUBST(CXXFLAGS)
|
Chris@636
|
107 AC_SUBST(CXXFLAGS_MINIMAL)
|
Chris@636
|
108 AC_SUBST(HAVES)
|
Chris@637
|
109 AC_SUBST(LIBS)
|
Chris@636
|
110
|
Chris@636
|
111 AC_SUBST(CC)
|
Chris@636
|
112 AC_SUBST(CXX)
|
Chris@636
|
113
|
Chris@657
|
114 AC_SUBST(QMAKE_CONFIG)
|
Chris@657
|
115
|
Chris@746
|
116 AC_CONFIG_FILES([config.pri])
|
Chris@636
|
117
|
Chris@746
|
118 AC_OUTPUT
|
Chris@636
|
119
|
Chris@803
|
120 if ! $QMAKE -r svcore.pro; then
|
Chris@642
|
121 AC_MSG_ERROR([qmake failed: Command was "$QMAKE -r"])
|
Chris@642
|
122 fi
|
Chris@637
|
123
|
Chris@637
|
124 AC_MSG_NOTICE([
|
Chris@637
|
125
|
Chris@637
|
126 Configuration complete.
|
Chris@637
|
127 Please check the above messages for any warnings that you
|
Chris@637
|
128 might care about, and then run "make".
|
Chris@637
|
129
|
Chris@637
|
130 The file config.pri contains the configuration settings for
|
Chris@637
|
131 qmake. If you want to adjust these by hand, edit config.pri
|
Chris@803
|
132 and run "$QMAKE -r" again to regenerate the Makefile.
|
Chris@637
|
133 ])
|