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

Annotation of /libgig/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3778 - (hide annotations) (download)
Sun May 24 11:20:11 2020 UTC (3 years, 9 months ago) by schoenebeck
File size: 4919 byte(s)
Serialization.cpp: Fix compatibility issues with new 2nd custom data type

* When encoding serialised data stream: always write 2nd custom data type
  name to data type blob, and append it actually to the end of the data
  type blob (not somewhere in the middle), no matter if a 2nd custom type
  is actually present (i.e. empty string) in object's data type or not.

* When decoding a serialised data stream: check the size of the data type
  blob, if the blob size is longer than a Srx v1.0 format data type blob,
  then assume there is a 2nd custom data type name, so read it (it might
  be an empty string if 2nd custom data type was not present on encoding
  side's object).

* Bumped version (4.2.0.svn16).

1 schoenebeck 186 #------------------------------------------------------------------------------------
2 schoenebeck 646 # Library's "official" release version:
3    
4 schoenebeck 2785 m4_define(libgig_release_major, 4)
5 schoenebeck 3524 m4_define(libgig_release_minor, 2)
6 schoenebeck 3778 m4_define(libgig_release_build, 0.svn16)
7 schoenebeck 646
8 persson 2364
9     AC_INIT([libgig],[libgig_release_major.libgig_release_minor.libgig_release_build])
10 persson 2367 AC_CONFIG_SRCDIR([configure.ac])
11 persson 2364
12 schoenebeck 646 #------------------------------------------------------------------------------------
13     # 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 schoenebeck 186 #
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 schoenebeck 3524 LIBGIG_LT_CURRENT=9
30 schoenebeck 646 LIBGIG_LT_REVISION=0
31 schoenebeck 2785 LIBGIG_LT_AGE=0
32 schoenebeck 2572 LIBGIG_SHARED_VERSION_INFO="$LIBGIG_LT_CURRENT:$LIBGIG_LT_REVISION:$LIBGIG_LT_AGE"
33 schoenebeck 186
34 schoenebeck 2572 LIBAKAI_LT_CURRENT=0
35     LIBAKAI_LT_REVISION=0
36     LIBAKAI_LT_AGE=0
37     LIBAKAI_SHARED_VERSION_INFO="$LIBAKAI_LT_CURRENT:$LIBAKAI_LT_REVISION:$LIBAKAI_LT_AGE"
38 schoenebeck 186
39 schoenebeck 2572
40 persson 2364 AC_LANG([C++])
41 schoenebeck 2 AC_PROG_CXX
42 persson 1894 AC_LIBTOOL_WIN32_DLL
43 persson 2364 AC_PROG_LIBTOOL
44 schoenebeck 2
45 persson 1417 AC_C_BIGENDIAN
46    
47 schoenebeck 2572 AC_SUBST(LIBGIG_SHLIB_VERSION_ARG)
48     AC_SUBST(LIBGIG_SHARED_VERSION_INFO)
49 persson 2364 AC_SUBST(LIBGIG_RELEASE_MAJOR, libgig_release_major)
50     AC_SUBST(LIBGIG_RELEASE_MINOR, libgig_release_minor)
51     AC_SUBST(LIBGIG_RELEASE_BUILD, libgig_release_build)
52 schoenebeck 186
53 schoenebeck 2572 AC_SUBST(LIBAKAI_SHLIB_VERSION_ARG)
54     AC_SUBST(LIBAKAI_SHARED_VERSION_INFO)
55     AC_SUBST(LIBAKAI_RELEASE_MAJOR, libakai_release_major)
56     AC_SUBST(LIBAKAI_RELEASE_MINOR, libakai_release_minor)
57     AC_SUBST(LIBAKAI_RELEASE_BUILD, libakai_release_build)
58    
59 schoenebeck 3623 # make sure C++11 is supported by compiler
60     # (add CXXFLAGS if required [e.g. -std=c++11])
61     m4_ifdef([m4_include(m4/ax_cxx_compile_stdcxx.m4)],,
62     [sinclude([m4/ax_cxx_compile_stdcxx.m4])])
63     AX_CXX_COMPILE_STDCXX(11, [], mandatory)
64    
65 schoenebeck 383 have_audio_file_lib="false"
66    
67 persson 496 # check for presence of libsndfile
68 schoenebeck 220 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, ac_cv_sndfile=1, ac_cv_sndfile=0)
69 schoenebeck 383 AM_CONDITIONAL(HAVE_SNDFILE, test $ac_cv_sndfile = "1")
70 schoenebeck 220 AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile}, [Set to 1 if you have libsndfile.])
71     AC_SUBST(SNDFILE_CFLAGS)
72     AC_SUBST(SNDFILE_LIBS)
73 schoenebeck 383 if test "$ac_cv_sndfile" = "1"; then
74     have_audio_file_lib="true";
75 schoenebeck 546 else
76     # no libsndfile? then check for presence of libaudiofile
77     PKG_CHECK_MODULES(AUDIOFILE, audiofile >= 0.2.3, ac_cv_audiofile=1, ac_cv_audiofile=0)
78     AC_DEFINE_UNQUOTED([HAVE_AUDIOFILE],${ac_cv_audiofile}, [Set to 1 if you have libaudiofile.])
79     AC_SUBST(AUDIOFILE_CFLAGS)
80     AC_SUBST(AUDIOFILE_LIBS)
81     if test "$ac_cv_audiofile" = "1"; then
82     have_audio_file_lib="true";
83     fi
84 schoenebeck 383 fi
85     if test "$have_audio_file_lib" = "false"; then
86     echo "No audio file library found!"
87     echo "Sorry, you need either libsndfile or libaudiofile to compile libgig."
88     echo "This is needed for the gigextract utility to write audio files."
89     exit -1;
90     fi
91    
92 persson 1209 AC_CHECK_HEADERS(uuid/uuid.h)
93     AC_SEARCH_LIBS(uuid_generate, uuid)
94 persson 2182 AC_CHECK_FUNCS(uuid_generate)
95 schoenebeck 3199 AC_CHECK_FUNCS(vasprintf)
96 persson 1209
97 persson 1330 case "$host" in
98     *mingw*|*cygwin*)
99     win32=yes
100     ;;
101     *)
102     win32=no
103     ;;
104     esac
105     AM_CONDITIONAL(WIN32, test "$win32" = "yes")
106    
107 persson 2182 case "$host" in
108     *-*-darwin*)
109     mac=yes
110     ;;
111     *)
112     mac=no
113     ;;
114     esac
115     AM_CONDITIONAL(MAC, test "$mac" = "yes")
116    
117     if test "$ac_cv_func_uuid_generate" = no -a "$mac" = no -a "$win32" = no; then
118     AC_MSG_WARN([No UUID generate function found.
119 persson 1209 *** libgig will not be able to create DLSIDs in DLS and gig files.
120     *** Install libuuid from e2fsprogs to solve this. Package might be called
121     *** uuid-dev, libext2fs2-devel or e2fsprogs-devel.])
122     fi
123    
124 persson 2364 AC_CONFIG_HEADERS([config.h])
125     AM_INIT_AUTOMAKE
126 schoenebeck 518
127 persson 2364 AC_CONFIG_FILES([\
128 schoenebeck 1186 Doxyfile \
129     gig.pc \
130 schoenebeck 2572 akai.pc \
131 schoenebeck 1186 libgig.spec \
132     Makefile \
133     src/Makefile \
134     src/testcases/Makefile \
135 schoenebeck 2571 src/tools/Makefile \
136 schoenebeck 1186 doc/Makefile \
137     man/Makefile \
138     man/dlsdump.1 \
139     man/gigdump.1 \
140     man/gigextract.1 \
141 schoenebeck 2482 man/gigmerge.1 \
142 schoenebeck 2484 man/gig2mono.1 \
143 schoenebeck 2685 man/gig2stereo.1 \
144 schoenebeck 1186 man/rifftree.1 \
145 schoenebeck 2495 man/sf2dump.1 \
146 schoenebeck 2780 man/sf2extract.1 \
147 schoenebeck 2543 man/korgdump.1 \
148     man/korg2gig.1 \
149 schoenebeck 2572 man/akaidump.1 \
150     man/akaiextract.1 \
151 schoenebeck 1186 debian/Makefile \
152     osx/Makefile \
153     osx/libgig.xcodeproj/Makefile \
154     win32/Makefile \
155     win32/libgig.dev \
156 persson 2364 ])
157     AC_OUTPUT

  ViewVC Help
Powered by ViewVC