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

Diff of /gigedit/trunk/configure.ac

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

gigedit/branches/linuxsampler_org/configure.ac revision 1052 by persson, Sat Mar 3 12:20:01 2007 UTC gigedit/trunk/configure.ac revision 1356 by persson, Sat Sep 22 07:40:13 2007 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.
2  AC_INIT(gigedit,0.0.3)  AC_INIT(gigedit,0.0.3)
3  AC_CONFIG_SRCDIR(src/main.cpp)  AC_CONFIG_AUX_DIR([.])
4    
5  AC_CONFIG_HEADERS(config.h)  #------------------------------------------------------------------------------------
6    # The following is the libtool / shared library version. This doesn't have to
7    # do anything with the release version. It MUST conform to the following rules:
8    #
9    #  1. Start with version information of `0:0:0' for each libtool library.
10    #  2. Update the version information only immediately before a public release of
11    #     your software. More frequent updates are unnecessary, and only guarantee
12    #     that the current interface number gets larger faster.
13    #  3. If the library source code has changed at all since the last update, then
14    #     increment revision (`c:r:a' becomes `c:r+1:a').
15    #  4. If any interfaces have been added, removed, or changed since the last update,
16    #     increment current, and set revision to 0.
17    #  5. If any interfaces have been added since the last public release, then increment
18    #     age.
19    #  6. If any interfaces have been removed since the last public release, then set age
20    #     to 0.
21    
22    LIBGIGEDIT_LT_CURRENT=0
23    LIBGIGEDIT_LT_REVISION=0
24    LIBGIGEDIT_LT_AGE=0
25    SHARED_VERSION_INFO="$LIBGIGEDIT_LT_CURRENT:$LIBGIGEDIT_LT_REVISION:$LIBGIGEDIT_LT_AGE"
26    AC_PROG_LIBTOOL
27    AC_SUBST(SHLIB_VERSION_ARG)
28    AC_SUBST(SHARED_VERSION_INFO)
29    
30    # configure checks for the following file's existence to make sure that
31    # the directory that it is told contains the source code in fact does.
32    # Occasionally people accidentally specify the wrong directory with
33    # `--srcdir'; this is a safety check.
34    AC_CONFIG_SRCDIR(src/gigedit/main.cpp)
35    
36    AC_CONFIG_HEADERS(config.h)
37  AM_INIT_AUTOMAKE  AM_INIT_AUTOMAKE
38    
39  GETTEXT_PACKAGE=gigedit  GETTEXT_PACKAGE=gigedit
40  AC_SUBST([GETTEXT_PACKAGE])  AC_SUBST([GETTEXT_PACKAGE])
41  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
42    
43    # the libgig header files need this
44    AC_C_BIGENDIAN
45    
46  AC_PROG_CXX  AC_PROG_CXX
 IT_PROG_INTLTOOL(0.35.0)  
47    
48    IT_PROG_INTLTOOL(0.35.0)
49  AM_GLIB_GNU_GETTEXT  AM_GLIB_GNU_GETTEXT
50    
51  PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.6.1 gthread-2.0)  PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4.10 gthread-2.0)
52  PKG_CHECK_MODULES(GIG, gig >= 3.1.0)  PKG_CHECK_MODULES(GIG, gig >= 3.1.1)
53    
54    # check for presence of libsndfile
55    PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2)
56    AC_SUBST(SNDFILE_CFLAGS)
57    AC_SUBST(SNDFILE_LIBS)
58    
59    # check for loop functionality in libsndfile
60    gigedit_save_CFLAGS=$CFLAGS
61    CFLAGS="$SNDFILE_CFLAGS $CFLAGS"
62    AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,
63                     [AC_MSG_WARN([Your version of libsndfile does not support
64        reading of loop information. Gigedit will not be able to
65        extract loop information from sample files.])],
66                     [#include <sndfile.h>])
67    CFLAGS=$gigedit_save_CFLAGS
68    
69    # check for (optional) presence of liblinuxsampler
70    liblinuxsampler_version="0.4.0.5cvs"
71    PKG_CHECK_MODULES(
72        LINUXSAMPLER, linuxsampler >= $liblinuxsampler_version,
73        have_linuxsampler=1, have_linuxsampler=0
74    )
75    LINUXSAMPLER_PLUGIN_DIR=
76    if test "$have_linuxsampler" = "0"; then
77        echo "Required liblinuxsampler version not found!"
78        echo "You need to have liblinuxsampler version ${liblinuxsampler_version}"
79        echo "installed. Support for on-the-fly editing with LinuxSampler will"
80        echo "be disabled."
81    else
82        echo "Found linuxsampler $liblinuxsampler_version"
83        echo -n "Retrieving LinuxSampler's plugin dir... "
84        LINUXSAMPLER_PLUGIN_DIR=`pkg-config --variable plugindir linuxsampler`
85        if test "$LINUXSAMPLER_PLUGIN_DIR" = ""; then
86            have_linuxsampler=0
87            echo "Error"
88            echo "Could not retrieve LinuxSampler's plugin directory. Support"
89            echo "for on-the-fly editing with LinuxSampler will be disabled."
90        else
91            echo "${LINUXSAMPLER_PLUGIN_DIR} "
92            # convert absolute LS plugin dir into relative dir
93            # (see ch 27.10 of the automake manual,
94            #  "Installing to Hard-Coded Locations")
95            LINUXSAMPLER_PLUGIN_DIR=`echo "${LINUXSAMPLER_PLUGIN_DIR}" | sed 's/^.*\/lib\//\${libdir}\//g'`
96            echo "Relative plugin dir: ${LINUXSAMPLER_PLUGIN_DIR}"
97        fi
98    fi
99    AC_SUBST(LINUXSAMPLER_CFLAGS)
100    AC_SUBST(LINUXSAMPLER_LIBS)
101    AC_SUBST(LINUXSAMPLER_PLUGIN_DIR)
102    AM_CONDITIONAL(HAVE_LINUXSAMPLER, test $have_linuxsampler = "1")
103    AC_DEFINE_UNQUOTED(
104        HAVE_LINUXSAMPLER, $have_linuxsampler,
105        [Define to 1 if you have LinuxSampler installed.]
106    )
107    
108  AC_CONFIG_FILES([  AC_CONFIG_FILES([
109  Makefile          Makefile
110  src/Makefile          src/Makefile
111  po/Makefile.in          src/gigedit/Makefile
112            src/plugin/Makefile
113            po/Makefile.in
114            debian/Makefile
115            doc/Makefile
116            doc/quickstart/Makefile
117  ])  ])
118  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.1052  
changed lines
  Added in v.1356

  ViewVC Help
Powered by ViewVC