--- libgig/trunk/configure.in 2004/07/02 19:37:09 168 +++ libgig/trunk/configure.in 2007/05/06 16:20:51 1173 @@ -1,7 +1,34 @@ AC_INIT(configure.in) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libgig, 0.7.1) +#------------------------------------------------------------------------------------ +# Library's "official" release version: + +LIBGIG_RELEASE_MAJOR=3 +LIBGIG_RELEASE_MINOR=1 +LIBGIG_RELEASE_BUILD=1 + +#------------------------------------------------------------------------------------ +# The following is the libtool / shared library version. This doesn't have to +# do anything with the release version. It MUST conform to the following rules: +# +# 1. Start with version information of `0:0:0' for each libtool library. +# 2. Update the version information only immediately before a public release of +# your software. More frequent updates are unnecessary, and only guarantee +# that the current interface number gets larger faster. +# 3. If the library source code has changed at all since the last update, then +# increment revision (`c:r:a' becomes `c:r+1:a'). +# 4. If any interfaces have been added, removed, or changed since the last update, +# increment current, and set revision to 0. +# 5. If any interfaces have been added since the last public release, then increment +# age. +# 6. If any interfaces have been removed since the last public release, then set age +# to 0. + +LIBGIG_LT_CURRENT=7 +LIBGIG_LT_REVISION=0 +LIBGIG_LT_AGE=1 +SHARED_VERSION_INFO="$LIBGIG_LT_CURRENT:$LIBGIG_LT_REVISION:$LIBGIG_LT_AGE" + AC_C_BIGENDIAN @@ -9,4 +36,37 @@ AC_PROG_CXX AM_PROG_LIBTOOL -AC_OUTPUT(Makefile src/Makefile libgig.spec libgig.pc Doxyfile) +AC_SUBST(SHLIB_VERSION_ARG) +AC_SUBST(SHARED_VERSION_INFO) + +have_audio_file_lib="false" + +# check for presence of libsndfile +PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, ac_cv_sndfile=1, ac_cv_sndfile=0) +AM_CONDITIONAL(HAVE_SNDFILE, test $ac_cv_sndfile = "1") +AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile}, [Set to 1 if you have libsndfile.]) +AC_SUBST(SNDFILE_CFLAGS) +AC_SUBST(SNDFILE_LIBS) +if test "$ac_cv_sndfile" = "1"; then + have_audio_file_lib="true"; +else + # no libsndfile? then 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 +fi +if test "$have_audio_file_lib" = "false"; then + echo "No audio file library found!" + echo "Sorry, you need either libsndfile or libaudiofile to compile libgig." + echo "This is needed for the gigextract utility to write audio files." + exit -1; +fi + +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(libgig, "$LIBGIG_RELEASE_MAJOR.$LIBGIG_RELEASE_MINOR.$LIBGIG_RELEASE_BUILD") + +AC_OUTPUT(Makefile doc/Makefile man/Makefile src/Makefile libgig.spec gig.pc Doxyfile man/dlsdump.1 man/gigdump.1 man/gigextract.1 man/rifftree.1 debian/Makefile src/testcases/Makefile win32/Makefile osx/Makefile osx/libgig.xcodeproj/Makefile)