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

Annotation of /gigedit/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3151 - (hide annotations) (download)
Fri May 5 18:44:59 2017 UTC (2 years, 1 month ago) by schoenebeck
File size: 8138 byte(s)
* WIP: Added initial draft implementation of macro editor
  (accessible for copied clipboard content via Alt+x).
* Bumped version (1.0.0.svn35).

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 schoenebeck 2795 m4_define(gigedit_ver_major, 1)
7     m4_define(gigedit_ver_minor, 0)
8 schoenebeck 3151 m4_define(gigedit_ver_release, 0.svn35)
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 schoenebeck 2795 LIBGIGEDIT_LT_CURRENT=3
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 2472 windows=no
65     mac=no
66 persson 1823 case $host in
67     *mingw*|*cygwin*) windows=yes ;;
68 persson 2472 *-*-darwin*) mac=yes ;;
69 persson 1823 esac
70     AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")
71 persson 2472 AM_CONDITIONAL(MAC, test "$mac" = "yes")
72 persson 1823
73 schoenebeck 3071 # Note: even though Objective-C sources are just compiled for Mac, the
74     # following AC macros though must not be embedded into a shell check
75     # (if test "$mac" = "yes" ...), because those AC macros themselves are
76     # expanded before any shell code is executed, the generated configure
77     # code though would then not be executed and would lead to interesting
78     # libtool errors on non-Mac systems due to this.
79     AC_PROG_OBJC
80     AC_PROG_OBJCXX
81 schoenebeck 2475
82 persson 2169 PKG_PROG_PKG_CONFIG
83 persson 2344 have_gtk3=no
84 persson 2169 PKG_CHECK_EXISTS(gtkmm-3.0 >= 2.99,
85 persson 2344 [PKG_CHECK_MODULES(GTKMM, gtkmm-3.0, have_gtk3=yes)],
86 persson 2169 [PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)])
87 persson 2344 AM_CONDITIONAL(HAVE_GTK3, [test "$have_gtk3" = "yes"])
88 persson 2169
89 persson 2359 PKG_CHECK_MODULES(SIGC, sigc++-2.0)
90     AC_SUBST(SIGC_CFLAGS)
91     AC_SUBST(SIGC_LIBS)
92    
93 schoenebeck 2795 PKG_CHECK_MODULES(GIG, gig >= 4.0.0)
94 persson 2359 AC_SUBST(GIG_CFLAGS)
95     AC_SUBST(GIG_LIBS)
96 persson 1052
97 schoenebeck 1085 # check for presence of libsndfile
98 persson 2398 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.11)
99 schoenebeck 1085 AC_SUBST(SNDFILE_CFLAGS)
100     AC_SUBST(SNDFILE_LIBS)
101    
102 schoenebeck 1213 # check for (optional) presence of liblinuxsampler
103 schoenebeck 2795 liblinuxsampler_version="2.0.0"
104 schoenebeck 1213 PKG_CHECK_MODULES(
105     LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,
106     have_linuxsampler=1, have_linuxsampler=0
107     )
108 schoenebeck 1230 LINUXSAMPLER_PLUGIN_DIR=
109 schoenebeck 1213 if test "$have_linuxsampler" = "0"; then
110     echo "Required liblinuxsampler version not found!"
111     echo "You need to have liblinuxsampler version ${liblinuxsampler_version}"
112     echo "installed. Support for on-the-fly editing with LinuxSampler will"
113     echo "be disabled."
114     else
115 schoenebeck 1230 echo "Found linuxsampler $liblinuxsampler_version"
116     echo -n "Retrieving LinuxSampler's plugin dir... "
117 persson 2129 LINUXSAMPLER_PLUGIN_DIR=`$PKG_CONFIG --variable plugindir linuxsampler`
118 schoenebeck 1230 if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then
119     have_linuxsampler=0
120     echo "Error"
121     echo "Could not retrieve LinuxSampler's plugin directory. Support"
122     echo "for on-the-fly editing with LinuxSampler will be disabled."
123     else
124     echo "${LINUXSAMPLER_PLUGIN_DIR} "
125 schoenebeck 1322 # convert absolute LS plugin dir into relative dir
126     # (see ch 27.10 of the automake manual,
127     # "Installing to Hard-Coded Locations")
128 schoenebeck 1645 # this one is extended to work with digit postfixed lib directories
129     # (e.g. "/usr/lib64/linuxsampler") as well
130     LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib[[0-9]]*\//\${libdir}\//g'`
131     if echo "${LINUXSAMPLER_PLUGIN_DIR}" | grep "\${libdir}" > /dev/null; then
132     echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"
133     else
134     echo "*********************************************************"
135     echo "* ! WARNING ! : Could not resolve LinuxSampler's plugin"
136     echo "* directory as relative path. This is probably not an"
137     echo "* issue if you're just going to install gigedit by"
138     echo "* 'make install', but it IS a problem if you're"
139     echo "* installing to a certain destination directory and/or"
140     echo "* compile in sandbox (e.g. Debian package or Gentoo emerge)"
141     echo "*********************************************************"
142     fi
143 schoenebeck 1230 fi
144 schoenebeck 1213 fi
145     AC_SUBST(LINUXSAMPLER_CFLAGS)
146     AC_SUBST(LINUXSAMPLER_LIBS)
147 schoenebeck 1230 AC_SUBST(LINUXSAMPLER_PLUGIN_DIR)
148 schoenebeck 1213 AM_CONDITIONAL(HAVE_LINUXSAMPLER, test $have_linuxsampler = "1")
149     AC_DEFINE_UNQUOTED(
150     HAVE_LINUXSAMPLER, $have_linuxsampler,
151     [Define to 1 if you have LinuxSampler installed.]
152     )
153    
154 schoenebeck 1679 have_ls_vmidi=0
155     if test $have_linuxsampler = "1"; then
156     AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices])
157 persson 2366 AC_LANG_PUSH([C++])
158 schoenebeck 1679 LIBS="$LINUXSAMPLER_LIBS $LIBS"
159     CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"
160     CXXFLAGS="$CXXFLAGS $CFLAGS"
161 persson 2366 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
162 schoenebeck 1679 #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>
163     using namespace LinuxSampler;
164 persson 2366 ]], [[
165 schoenebeck 1679 bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;
166     bool (VirtualMidiDevice::*ptr2)() = 0;
167     bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;
168     uint8_t (VirtualMidiDevice::*ptr4)(uint8_t) = 0;
169     ptr1 = &VirtualMidiDevice::SendNoteOnToSampler;
170     ptr2 = &VirtualMidiDevice::NotesChanged;
171     ptr3 = &VirtualMidiDevice::NoteChanged;
172     ptr4 = &VirtualMidiDevice::NoteOffVelocity;
173 persson 2366 ]])],[
174 schoenebeck 1679 AC_MSG_RESULT(yes)
175     have_ls_vmidi=1
176 persson 2366 ],[
177 schoenebeck 1679 AC_MSG_RESULT(no)
178     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
179     echo "! Support for the virtual MIDI keyboard in gigedit will"
180     echo "! be disabled. You'll see the keyboard in gigedit, but"
181     echo "! you won't be able to trigger notes with it nor see"
182     echo "! active notes caused by external MIDI sources of LS."
183     echo "! Update LinuxSampler and recompile gigedit if you want"
184     echo "! this feature."
185     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
186 persson 2366 ])
187     AC_LANG_POP([C++])
188 schoenebeck 1679 fi
189     AC_DEFINE_UNQUOTED(
190     HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,
191     [Define to 1 if LinuxSampler supports virtual MIDI devices.]
192     )
193    
194 schoenebeck 1396 AC_CONFIG_HEADERS(config.h)
195 persson 2366 AM_INIT_AUTOMAKE
196 schoenebeck 1396
197 persson 1052 AC_CONFIG_FILES([
198 schoenebeck 1213 Makefile
199     src/Makefile
200 schoenebeck 1226 src/gigedit/Makefile
201 schoenebeck 3106 src/gigedit/gfx/Makefile
202 schoenebeck 1213 src/plugin/Makefile
203 schoenebeck 1411 gfx/Makefile
204 schoenebeck 1213 po/Makefile.in
205     debian/Makefile
206 schoenebeck 1396 doc/Makefile
207     doc/quickstart/Makefile
208     win32/libgigedit.dev
209     win32/gigedit.dev
210 schoenebeck 1451 win32/gigedit.nsi
211 schoenebeck 1396 win32/Makefile
212 schoenebeck 1824 gigedit.spec
213 persson 1052 ])
214     AC_OUTPUT

  ViewVC Help
Powered by ViewVC