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

Annotation of /gigedit/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1809 - (hide annotations) (download)
Sun Dec 14 15:52:10 2008 UTC (15 years, 3 months ago) by persson
File size: 7413 byte(s)
* fixes for building the plugin with MinGW

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

  ViewVC Help
Powered by ViewVC