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

Diff of /gigedit/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2344 by persson, Sun Apr 29 16:15:45 2012 UTC revision 3123 by schoenebeck, Tue Apr 25 20:45:54 2017 UTC
# Line 1  Line 1 
1  dnl Process this file with autoconf to produce a configure script.  dnl Process this file with autoconf to produce a configure script.
 AC_INIT(configure.ac)  
 AC_CONFIG_AUX_DIR([.])  
2    
3  #------------------------------------------------------------------------------------  #------------------------------------------------------------------------------------
4  # The following is the current, official release version of gigedit:  # The following is the current, official release version of gigedit:
5    
6  GIGEDIT_VER_MAJOR=0  m4_define(gigedit_ver_major, 1)
7  GIGEDIT_VER_MINOR=2  m4_define(gigedit_ver_minor, 0)
8  GIGEDIT_VER_RELEASE=0  m4_define(gigedit_ver_release, 0.svn29)
9    
10    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  #------------------------------------------------------------------------------------  #------------------------------------------------------------------------------------
15  # The following is the libtool / shared library version. This doesn't have to  # The following is the libtool / shared library version. This doesn't have to
# Line 26  GIGEDIT_VER_RELEASE=0 Line 28  GIGEDIT_VER_RELEASE=0
28  #  6. If any interfaces have been removed since the last public release, then set age  #  6. If any interfaces have been removed since the last public release, then set age
29  #     to 0.  #     to 0.
30    
31  LIBGIGEDIT_LT_CURRENT=2  LIBGIGEDIT_LT_CURRENT=3
32  LIBGIGEDIT_LT_REVISION=0  LIBGIGEDIT_LT_REVISION=0
33  LIBGIGEDIT_LT_AGE=0  LIBGIGEDIT_LT_AGE=0
34    
35  SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE"  SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE"
36  AC_LANG_CPLUSPLUS  AC_LANG([C++])
37  AC_PROG_CXX  AC_PROG_CXX
38  AC_LIBTOOL_WIN32_DLL  AC_LIBTOOL_WIN32_DLL
39  AC_PROG_LIBTOOL  AC_PROG_LIBTOOL
40  AC_SUBST(SHLIB_VERSION_ARG)  AC_SUBST(SHLIB_VERSION_ARG)
41  AC_SUBST(SHARED_VERSION_INFO)  AC_SUBST(SHARED_VERSION_INFO)
42  AC_SUBST(GIGEDIT_VER_MAJOR)  AC_SUBST(GIGEDIT_VER_MAJOR, gigedit_ver_major)
43  AC_SUBST(GIGEDIT_VER_MINOR)  AC_SUBST(GIGEDIT_VER_MINOR, gigedit_ver_minor)
44  AC_SUBST(GIGEDIT_VER_RELEASE)  AC_SUBST(GIGEDIT_VER_RELEASE, gigedit_ver_release)
45    
46  # configure checks for the following file's existence to make sure that  # 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.  # the directory that it is told contains the source code in fact does.
# Line 59  AC_PROG_CXX Line 61  AC_PROG_CXX
61  IT_PROG_INTLTOOL(0.35.0)  IT_PROG_INTLTOOL(0.35.0)
62  AM_GLIB_GNU_GETTEXT  AM_GLIB_GNU_GETTEXT
63    
64    windows=no
65    mac=no
66  case $host in  case $host in
67      *mingw*|*cygwin*) windows=yes ;;      *mingw*|*cygwin*) windows=yes ;;
68      *)                windows=no ;;      *-*-darwin*) mac=yes ;;
69  esac  esac
70  AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")  AM_CONDITIONAL(WINDOWS, test "$windows" = "yes")
71    AM_CONDITIONAL(MAC, test "$mac" = "yes")
72    
73    # 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    
82  PKG_PROG_PKG_CONFIG  PKG_PROG_PKG_CONFIG
83  have_gtk3=no  have_gtk3=no
# Line 72  PKG_CHECK_EXISTS(gtkmm-3.0 >= 2.99, Line 86  PKG_CHECK_EXISTS(gtkmm-3.0 >= 2.99,
86          [PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)])          [PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.8 gthread-2.0 cairomm-1.0)])
87  AM_CONDITIONAL(HAVE_GTK3, [test "$have_gtk3" = "yes"])  AM_CONDITIONAL(HAVE_GTK3, [test "$have_gtk3" = "yes"])
88    
89  PKG_CHECK_MODULES(GIG, gig >= 3.3.0)  PKG_CHECK_MODULES(SIGC, sigc++-2.0)
90    AC_SUBST(SIGC_CFLAGS)
91    AC_SUBST(SIGC_LIBS)
92    
93    PKG_CHECK_MODULES(GIG, gig >= 4.0.0)
94    AC_SUBST(GIG_CFLAGS)
95    AC_SUBST(GIG_LIBS)
96    
97  # check for presence of libsndfile  # check for presence of libsndfile
98  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.11)
99  AC_SUBST(SNDFILE_CFLAGS)  AC_SUBST(SNDFILE_CFLAGS)
100  AC_SUBST(SNDFILE_LIBS)  AC_SUBST(SNDFILE_LIBS)
101    
 # check for loop functionality in libsndfile  
 gigedit_save_CXXFLAGS=$CXXFLAGS  
 CXXFLAGS="$SNDFILE_CFLAGS $CXXFLAGS"  
 AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,  
                  [AC_MSG_WARN([Your version of libsndfile does not support  
     reading of loop information. Gigedit will not be able to  
     extract loop information from sample files.])],  
                  [#include <sndfile.h>])  
 CXXFLAGS=$gigedit_save_CXXFLAGS  
   
102  # check for (optional) presence of liblinuxsampler  # check for (optional) presence of liblinuxsampler
103  liblinuxsampler_version="0.5.0"  liblinuxsampler_version="2.0.0"
104  PKG_CHECK_MODULES(  PKG_CHECK_MODULES(
105      LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,      LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,
106      have_linuxsampler=1, have_linuxsampler=0      have_linuxsampler=1, have_linuxsampler=0
# Line 144  AC_DEFINE_UNQUOTED( Line 154  AC_DEFINE_UNQUOTED(
154  have_ls_vmidi=0  have_ls_vmidi=0
155  if test $have_linuxsampler = "1"; then  if test $have_linuxsampler = "1"; then
156      AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices])      AC_MSG_CHECKING([whether LinuxSampler supports virtual MIDI devices])
157      AC_LANG_SAVE      AC_LANG_PUSH([C++])
     AC_LANG_CPLUSPLUS  
158      LIBS="$LINUXSAMPLER_LIBS $LIBS"      LIBS="$LINUXSAMPLER_LIBS $LIBS"
159      CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"      CFLAGS="$CFLAGS $LINUXSAMPLER_CFLAGS"
160      CXXFLAGS="$CXXFLAGS $CFLAGS"      CXXFLAGS="$CXXFLAGS $CFLAGS"
161      AC_TRY_COMPILE([      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
162              #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>              #include <linuxsampler/drivers/midi/VirtualMidiDevice.h>
163              using namespace LinuxSampler;              using namespace LinuxSampler;
164          ], [          ]], [[
165              bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;              bool (VirtualMidiDevice::*ptr1)(uint8_t, uint8_t) = 0;
166              bool (VirtualMidiDevice::*ptr2)() = 0;              bool (VirtualMidiDevice::*ptr2)() = 0;
167              bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;              bool (VirtualMidiDevice::*ptr3)(uint8_t) = 0;
# Line 161  if test $have_linuxsampler = "1"; then Line 170  if test $have_linuxsampler = "1"; then
170              ptr2 = &VirtualMidiDevice::NotesChanged;              ptr2 = &VirtualMidiDevice::NotesChanged;
171              ptr3 = &VirtualMidiDevice::NoteChanged;              ptr3 = &VirtualMidiDevice::NoteChanged;
172              ptr4 = &VirtualMidiDevice::NoteOffVelocity;              ptr4 = &VirtualMidiDevice::NoteOffVelocity;
173          ], [          ]])],[
174              AC_MSG_RESULT(yes)              AC_MSG_RESULT(yes)
175              have_ls_vmidi=1              have_ls_vmidi=1
176          ], [          ],[
177              AC_MSG_RESULT(no)              AC_MSG_RESULT(no)
178              echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"              echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
179              echo "! Support for the virtual MIDI keyboard in gigedit will"              echo "! Support for the virtual MIDI keyboard in gigedit will"
# Line 174  if test $have_linuxsampler = "1"; then Line 183  if test $have_linuxsampler = "1"; then
183              echo "! Update LinuxSampler and recompile gigedit if you want"              echo "! Update LinuxSampler and recompile gigedit if you want"
184              echo "! this feature."              echo "! this feature."
185              echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"              echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
186          ]      ])
187      )      AC_LANG_POP([C++])
     AC_LANG_RESTORE  
188  fi  fi
189  AC_DEFINE_UNQUOTED(  AC_DEFINE_UNQUOTED(
190      HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,      HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE, $have_ls_vmidi,
# Line 184  AC_DEFINE_UNQUOTED( Line 192  AC_DEFINE_UNQUOTED(
192  )  )
193    
194  AC_CONFIG_HEADERS(config.h)  AC_CONFIG_HEADERS(config.h)
195  AM_INIT_AUTOMAKE(gigedit, "$GIGEDIT_VER_MAJOR.$GIGEDIT_VER_MINOR.$GIGEDIT_VER_RELEASE")  AM_INIT_AUTOMAKE
196    
197  AC_CONFIG_FILES([  AC_CONFIG_FILES([
198          Makefile          Makefile
199          src/Makefile          src/Makefile
200          src/gigedit/Makefile          src/gigedit/Makefile
201        src/gigedit/gfx/Makefile
202          src/plugin/Makefile          src/plugin/Makefile
203          gfx/Makefile          gfx/Makefile
204          po/Makefile.in          po/Makefile.in

Legend:
Removed from v.2344  
changed lines
  Added in v.3123

  ViewVC Help
Powered by ViewVC