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

Annotation of /gigedit/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2366 - (hide annotations) (download)
Sat Sep 8 17:21:48 2012 UTC (11 years, 7 months ago) by persson
File size: 8010 byte(s)
* modernized configure script

1 persson 1052 dnl Process this file with autoconf to produce a configure script.
2 schoenebeck 1213
3     #------------------------------------------------------------------------------------
4 schoenebeck 1396 # The following is the current, official release version of gigedit:
5    
6 persson 2366 m4_define(gigedit_ver_major, 0)
7     m4_define(gigedit_ver_minor, 2)
8     m4_define(gigedit_ver_release, 0)
9 schoenebeck 1396
10 persson 2366 AC_INIT([gigedit], [gigedit_ver_major.gigedit_ver_minor.gigedit_ver_release])
11     AC_CONFIG_SRCDIR([configure.ac])
12     AC_CONFIG_AUX_DIR([.])
13    
14 schoenebeck 1396 #------------------------------------------------------------------------------------
15 schoenebeck 1213 # The following is the libtool / shared library version. This doesn't have to
16     # do anything with the release version. It MUST conform to the following rules:
17     #
18     # 1. Start with version information of `0:0:0' for each libtool library.
19     # 2. Update the version information only immediately before a public release of
20     # your software. More frequent updates are unnecessary, and only guarantee
21     # that the current interface number gets larger faster.
22     # 3. If the library source code has changed at all since the last update, then
23     # increment revision (`c:r:a' becomes `c:r+1:a').
24     # 4. If any interfaces have been added, removed, or changed since the last update,
25     # increment current, and set revision to 0.
26     # 5. If any interfaces have been added since the last public release, then increment
27     # age.
28     # 6. If any interfaces have been removed since the last public release, then set age
29     # to 0.
30    
31 persson 1959 LIBGIGEDIT_LT_CURRENT=2
32 schoenebeck 1213 LIBGIGEDIT_LT_REVISION=0
33     LIBGIGEDIT_LT_AGE=0
34 schoenebeck 1396
35 schoenebeck 1213 SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE"
36 persson 2366 AC_LANG([C++])
37 schoenebeck 1396 AC_PROG_CXX
38 persson 1809 AC_LIBTOOL_WIN32_DLL
39 schoenebeck 1213 AC_PROG_LIBTOOL
40     AC_SUBST(SHLIB_VERSION_ARG)
41     AC_SUBST(SHARED_VERSION_INFO)
42 persson 2366 AC_SUBST(GIGEDIT_VER_MAJOR, gigedit_ver_major)
43     AC_SUBST(GIGEDIT_VER_MINOR, gigedit_ver_minor)
44     AC_SUBST(GIGEDIT_VER_RELEASE, gigedit_ver_release)
45 schoenebeck 1213
46 schoenebeck 1228 # configure checks for the following file's existence to make sure that
47     # the directory that it is told contains the source code in fact does.
48     # Occasionally people accidentally specify the wrong directory with
49     # `--srcdir'; this is a safety check.
50     AC_CONFIG_SRCDIR(src/gigedit/main.cpp)
51    
52 persson 1052 GETTEXT_PACKAGE=gigedit
53     AC_SUBST([GETTEXT_PACKAGE])
54     AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
55    
56 persson 1331 # the libgig header files need this
57     AC_C_BIGENDIAN
58    
59 persson 1052 AC_PROG_CXX
60    
61 persson 1073 IT_PROG_INTLTOOL(0.35.0)
62 persson 1052 AM_GLIB_GNU_GETTEXT
63    
64 persson 1823 case $host in
65     *mingw*|*cygwin*) windows=yes ;;
66     *) windows=no ;;
67     esac
68     AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")
69    
70 persson 2169 PKG_PROG_PKG_CONFIG
71 persson 2344 have_gtk3=no
72 persson 2169 PKG_CHECK_EXISTS(gtkmm-3.0 >= 2.99,
73 persson 2344 [PKG_CHECK_MODULES(GTKMM, gtkmm-3.0, have_gtk3=yes)],
74 persson 2169 [PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)])
75 persson 2344 AM_CONDITIONAL(HAVE_GTK3, [test "$have_gtk3" = "yes"])
76 persson 2169
77 persson 2359 PKG_CHECK_MODULES(SIGC, sigc++-2.0)
78     AC_SUBST(SIGC_CFLAGS)
79     AC_SUBST(SIGC_LIBS)
80    
81 schoenebeck 1961 PKG_CHECK_MODULES(GIG, gig >= 3.3.0)
82 persson 2359 AC_SUBST(GIG_CFLAGS)
83     AC_SUBST(GIG_LIBS)
84 persson 1052
85 schoenebeck 1085 # check for presence of libsndfile
86     PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)
87     AC_SUBST(SNDFILE_CFLAGS)
88     AC_SUBST(SNDFILE_LIBS)
89    
90 persson 1303 # check for loop functionality in libsndfile
91 persson 1793 gigedit_save_CXXFLAGS=$CXXFLAGS
92     CXXFLAGS="$SNDFILE_CFLAGS $CXXFLAGS"
93 persson 1303 AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,
94     [AC_MSG_WARN([Your version of libsndfile does not support
95     reading of loop information. Gigedit will not be able to
96     extract loop information from sample files.])],
97     [#include <sndfile.h>])
98 persson 1793 CXXFLAGS=$gigedit_save_CXXFLAGS
99 persson 1303
100 schoenebeck 1213 # check for (optional) presence of liblinuxsampler
101 persson 1441 liblinuxsampler_version="0.5.0"
102 schoenebeck 1213 PKG_CHECK_MODULES(
103     LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,
104     have_linuxsampler=1, have_linuxsampler=0
105     )
106 schoenebeck 1230 LINUXSAMPLER_PLUGIN_DIR=
107 schoenebeck 1213 if test "$have_linuxsampler" = "0"; then
108     echo "Required liblinuxsampler version not found!"
109     echo "You need to have liblinuxsampler version ${liblinuxsampler_version}"
110     echo "installed. Support for on-the-fly editing with LinuxSampler will"
111     echo "be disabled."
112     else
113 schoenebeck 1230 echo "Found linuxsampler $liblinuxsampler_version"
114     echo -n "Retrieving LinuxSampler's plugin dir... "
115 persson 2129 LINUXSAMPLER_PLUGIN_DIR=`$PKG_CONFIG --variable plugindir linuxsampler`
116 schoenebeck 1230 if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then
117     have_linuxsampler=0
118     echo "Error"
119     echo "Could not retrieve LinuxSampler's plugin directory. Support"
120     echo "for on-the-fly editing with LinuxSampler will be disabled."
121     else
122     echo "${LINUXSAMPLER_PLUGIN_DIR} "
123 schoenebeck 1322 # convert absolute LS plugin dir into relative dir
124     # (see ch 27.10 of the automake manual,
125     # "Installing to Hard-Coded Locations")
126 schoenebeck 1645 # this one is extended to work with digit postfixed lib directories
127     # (e.g. "/usr/lib64/linuxsampler") as well
128     LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib[[0-9]]*\//\${libdir}\//g'`
129     if echo "${LINUXSAMPLER_PLUGIN_DIR}" | grep "\${libdir}" > /dev/null; then
130     echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"
131     else
132     echo "*********************************************************"
133     echo "* ! WARNING ! : Could not resolve LinuxSampler's plugin"
134     echo "* directory as relative path. This is probably not an"
135     echo "* issue if you're just going to install gigedit by"
136     echo "* 'make install', but it IS a problem if you're"
137     echo "* installing to a certain destination directory and/or"
138     echo "* compile in sandbox (e.g. Debian package or Gentoo emerge)"
139     echo "*********************************************************"
140     fi
141 schoenebeck 1230 fi
142 schoenebeck 1213 fi
143     AC_SUBST(LINUXSAMPLER_CFLAGS)
144     AC_SUBST(LINUXSAMPLER_LIBS)
145 schoenebeck 1230 AC_SUBST(LINUXSAMPLER_PLUGIN_DIR)
146 schoenebeck 1213 AM_CONDITIONAL(HAVE_LINUXSAMPLER, test $have_linuxsampler = "1")
147     AC_DEFINE_UNQUOTED(
148     HAVE_LINUXSAMPLER, $have_linuxsampler,
149     [Define to 1 if you have LinuxSampler installed.]
150     )
151    
152 schoenebeck 1679 have_ls_vmidi=0
153     if test $have_linuxsampler = "1"; then
154     AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices])
155 persson 2366 AC_LANG_PUSH([C++])
156 schoenebeck 1679 LIBS="$LINUXSAMPLER_LIBS $LIBS"
157     CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"
158     CXXFLAGS="$CXXFLAGS $CFLAGS"
159 persson 2366 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
160 schoenebeck 1679 #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>
161     using namespace LinuxSampler;
162 persson 2366 ]], [[
163 schoenebeck 1679 bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;
164     bool (VirtualMidiDevice::*ptr2)() = 0;
165     bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;
166     uint8_t (VirtualMidiDevice::*ptr4)(uint8_t) = 0;
167     ptr1 = &VirtualMidiDevice::SendNoteOnToSampler;
168     ptr2 = &VirtualMidiDevice::NotesChanged;
169     ptr3 = &VirtualMidiDevice::NoteChanged;
170     ptr4 = &VirtualMidiDevice::NoteOffVelocity;
171 persson 2366 ]])],[
172 schoenebeck 1679 AC_MSG_RESULT(yes)
173     have_ls_vmidi=1
174 persson 2366 ],[
175 schoenebeck 1679 AC_MSG_RESULT(no)
176     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
177     echo "! Support for the virtual MIDI keyboard in gigedit will"
178     echo "! be disabled. You'll see the keyboard in gigedit, but"
179     echo "! you won't be able to trigger notes with it nor see"
180     echo "! active notes caused by external MIDI sources of LS."
181     echo "! Update LinuxSampler and recompile gigedit if you want"
182     echo "! this feature."
183     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
184 persson 2366 ])
185     AC_LANG_POP([C++])
186 schoenebeck 1679 fi
187     AC_DEFINE_UNQUOTED(
188     HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,
189     [Define to 1 if LinuxSampler supports virtual MIDI devices.]
190     )
191    
192 schoenebeck 1396 AC_CONFIG_HEADERS(config.h)
193 persson 2366 AM_INIT_AUTOMAKE
194 schoenebeck 1396
195 persson 1052 AC_CONFIG_FILES([
196 schoenebeck 1213 Makefile
197     src/Makefile
198 schoenebeck 1226 src/gigedit/Makefile
199 schoenebeck 1213 src/plugin/Makefile
200 schoenebeck 1411 gfx/Makefile
201 schoenebeck 1213 po/Makefile.in
202     debian/Makefile
203 schoenebeck 1396 doc/Makefile
204     doc/quickstart/Makefile
205     win32/libgigedit.dev
206     win32/gigedit.dev
207 schoenebeck 1451 win32/gigedit.nsi
208 schoenebeck 1396 win32/Makefile
209 schoenebeck 1824 gigedit.spec
210 persson 1052 ])
211     AC_OUTPUT

  ViewVC Help
Powered by ViewVC