1 |
AC_INIT(configure.in) |
#------------------------------------------------------------------------------------ |
2 |
AM_CONFIG_HEADER(config.h) |
# Library's "official" release version: |
3 |
|
|
4 |
AM_INIT_AUTOMAKE(libgig, 1.0.0, cuse@users.sourceforge.net) |
m4_define(libgig_release_major, 3) |
5 |
AC_PROG_LIBTOOL |
m4_define(libgig_release_minor, 3) |
6 |
|
m4_define(libgig_release_build, 0.svn7) |
7 |
|
|
8 |
|
|
9 |
|
AC_INIT([libgig],[libgig_release_major.libgig_release_minor.libgig_release_build]) |
10 |
|
AC_CONFIG_SRCDIR([configure.ac]) |
11 |
|
|
12 |
#------------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------------ |
13 |
# Rules for library version information: |
# 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. |
# 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 |
# 2. Update the version information only immediately before a public release of |
26 |
# 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 |
27 |
# to 0. |
# to 0. |
28 |
|
|
29 |
SHARED_VERSION_INFO="1:0:0" |
LIBGIG_LT_CURRENT=10 |
30 |
|
LIBGIG_LT_REVISION=0 |
31 |
|
LIBGIG_LT_AGE=4 |
32 |
|
SHARED_VERSION_INFO="$LIBGIG_LT_CURRENT:$LIBGIG_LT_REVISION:$LIBGIG_LT_AGE" |
33 |
|
|
|
AC_C_BIGENDIAN |
|
34 |
|
|
35 |
AC_LANG_CPLUSPLUS |
AC_LANG([C++]) |
36 |
AC_PROG_CXX |
AC_PROG_CXX |
37 |
AM_PROG_LIBTOOL |
AC_LIBTOOL_WIN32_DLL |
38 |
|
AC_PROG_LIBTOOL |
39 |
|
|
40 |
|
AC_C_BIGENDIAN |
41 |
|
|
42 |
AC_SUBST(SHLIB_VERSION_ARG) |
AC_SUBST(SHLIB_VERSION_ARG) |
43 |
AC_SUBST(SHARED_VERSION_INFO) |
AC_SUBST(SHARED_VERSION_INFO) |
44 |
|
AC_SUBST(LIBGIG_RELEASE_MAJOR, libgig_release_major) |
45 |
|
AC_SUBST(LIBGIG_RELEASE_MINOR, libgig_release_minor) |
46 |
|
AC_SUBST(LIBGIG_RELEASE_BUILD, libgig_release_build) |
47 |
|
|
48 |
have_audio_file_lib="false" |
have_audio_file_lib="false" |
49 |
|
|
50 |
// check for presence of libsndfile |
# check for presence of libsndfile |
51 |
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, ac_cv_sndfile=1, ac_cv_sndfile=0) |
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, ac_cv_sndfile=1, ac_cv_sndfile=0) |
52 |
AM_CONDITIONAL(HAVE_SNDFILE, test $ac_cv_sndfile = "1") |
AM_CONDITIONAL(HAVE_SNDFILE, test $ac_cv_sndfile = "1") |
53 |
AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile}, [Set to 1 if you have libsndfile.]) |
AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile}, [Set to 1 if you have libsndfile.]) |
55 |
AC_SUBST(SNDFILE_LIBS) |
AC_SUBST(SNDFILE_LIBS) |
56 |
if test "$ac_cv_sndfile" = "1"; then |
if test "$ac_cv_sndfile" = "1"; then |
57 |
have_audio_file_lib="true"; |
have_audio_file_lib="true"; |
58 |
|
else |
59 |
|
# no libsndfile? then check for presence of libaudiofile |
60 |
|
PKG_CHECK_MODULES(AUDIOFILE, audiofile >= 0.2.3, ac_cv_audiofile=1, ac_cv_audiofile=0) |
61 |
|
AC_DEFINE_UNQUOTED([HAVE_AUDIOFILE],${ac_cv_audiofile}, [Set to 1 if you have libaudiofile.]) |
62 |
|
AC_SUBST(AUDIOFILE_CFLAGS) |
63 |
|
AC_SUBST(AUDIOFILE_LIBS) |
64 |
|
if test "$ac_cv_audiofile" = "1"; then |
65 |
|
have_audio_file_lib="true"; |
66 |
|
fi |
67 |
fi |
fi |
|
|
|
|
// check for presence of libaudiofile |
|
|
PKG_CHECK_MODULES(AUDIOFILE, audiofile >= 0.2.3, ac_cv_audiofile=1, ac_cv_audiofile=0) |
|
|
AC_DEFINE_UNQUOTED([HAVE_AUDIOFILE],${ac_cv_audiofile}, [Set to 1 if you have libaudiofile.]) |
|
|
AC_SUBST(AUDIOFILE_CFLAGS) |
|
|
AC_SUBST(AUDIOFILE_LIBS) |
|
|
if test "$ac_cv_audiofile" = "1"; then |
|
|
have_audio_file_lib="true"; |
|
|
fi |
|
|
|
|
68 |
if test "$have_audio_file_lib" = "false"; then |
if test "$have_audio_file_lib" = "false"; then |
69 |
echo "No audio file library found!" |
echo "No audio file library found!" |
70 |
echo "Sorry, you need either libsndfile or libaudiofile to compile libgig." |
echo "Sorry, you need either libsndfile or libaudiofile to compile libgig." |
72 |
exit -1; |
exit -1; |
73 |
fi |
fi |
74 |
|
|
75 |
AC_OUTPUT(Makefile doc/Makefile man/Makefile src/Makefile libgig.spec gig.pc Doxyfile) |
AC_CHECK_HEADERS(uuid/uuid.h) |
76 |
|
AC_SEARCH_LIBS(uuid_generate, uuid) |
77 |
|
AC_CHECK_FUNCS(uuid_generate) |
78 |
|
|
79 |
|
case "$host" in |
80 |
|
*mingw*|*cygwin*) |
81 |
|
win32=yes |
82 |
|
;; |
83 |
|
*) |
84 |
|
win32=no |
85 |
|
;; |
86 |
|
esac |
87 |
|
AM_CONDITIONAL(WIN32, test "$win32" = "yes") |
88 |
|
|
89 |
|
case "$host" in |
90 |
|
*-*-darwin*) |
91 |
|
mac=yes |
92 |
|
;; |
93 |
|
*) |
94 |
|
mac=no |
95 |
|
;; |
96 |
|
esac |
97 |
|
AM_CONDITIONAL(MAC, test "$mac" = "yes") |
98 |
|
|
99 |
|
if test "$ac_cv_func_uuid_generate" = no -a "$mac" = no -a "$win32" = no; then |
100 |
|
AC_MSG_WARN([No UUID generate function found. |
101 |
|
*** libgig will not be able to create DLSIDs in DLS and gig files. |
102 |
|
*** Install libuuid from e2fsprogs to solve this. Package might be called |
103 |
|
*** uuid-dev, libext2fs2-devel or e2fsprogs-devel.]) |
104 |
|
fi |
105 |
|
|
106 |
|
AC_CONFIG_HEADERS([config.h]) |
107 |
|
AM_INIT_AUTOMAKE |
108 |
|
|
109 |
|
AC_CONFIG_FILES([\ |
110 |
|
Doxyfile \ |
111 |
|
gig.pc \ |
112 |
|
libgig.spec \ |
113 |
|
Makefile \ |
114 |
|
src/Makefile \ |
115 |
|
src/testcases/Makefile \ |
116 |
|
doc/Makefile \ |
117 |
|
man/Makefile \ |
118 |
|
man/dlsdump.1 \ |
119 |
|
man/gigdump.1 \ |
120 |
|
man/gigextract.1 \ |
121 |
|
man/gigmerge.1 \ |
122 |
|
man/gig2mono.1 \ |
123 |
|
man/rifftree.1 \ |
124 |
|
debian/Makefile \ |
125 |
|
osx/Makefile \ |
126 |
|
osx/libgig.xcodeproj/Makefile \ |
127 |
|
win32/Makefile \ |
128 |
|
win32/libgig.dev \ |
129 |
|
]) |
130 |
|
AC_OUTPUT |