aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rwxr-xr-xconfigure.in465
1 files changed, 465 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100755
index 0000000..288c400
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,465 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl AC_INIT(src/easytag.h)
+
+AC_PREREQ(2.53)
+
+AC_INIT(easytag, 2.1.1) dnl defines ($PACKAGE, $VERSION) - To set also in config.h.mingw
+
+AC_CONFIG_SRCDIR(src/easytag.h)
+dnl -------------------------------
+dnl Init automake
+dnl -------------------------------
+AM_INIT_AUTOMAKE(foreign)
+
+dnl -------------------------------
+dnl Translation files
+dnl -------------------------------
+ALL_LINGUAS="bg cs da de el es fr he hu it ja nl pl pt_BR ro ru sv uk zh_CN"
+GETTEXT_PACKAGE=easytag
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
+
+dnl -------------------------------
+dnl Checks for programs.
+dnl -------------------------------
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_CXXCPP
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_DISABLE_SHARED
+AC_PROG_LIBTOOL
+AC_ISC_POSIX
+AM_MAINTAINER_MODE
+
+
+dnl -------------------------------
+dnl Configure switches.
+dnl -------------------------------
+AC_ARG_ENABLE(mp3,
+ AC_HELP_STRING([--disable-mp3], [Disable support for MP3 files (default=enabled)]),
+ , enable_mp3=yes)
+
+AC_ARG_ENABLE(id3v23,
+ AC_HELP_STRING([--disable-id3v23], [Disable support for writing id3v2.3 tags (default=enabled)]),
+ , enable_id3v23=yes)
+
+AC_ARG_ENABLE(ogg,
+ AC_HELP_STRING([--disable-ogg], [Disable support for Ogg Vorbis files (default=enabled)]),
+ , enable_ogg=yes)
+
+AC_ARG_ENABLE(speex,
+ AC_HELP_STRING([--disable-speex], [Disable support for Ogg Speex files (default=enabled)]),
+ , enable_speex=yes)
+
+AC_ARG_ENABLE(flac,
+ AC_HELP_STRING([--disable-flac],[Disable support for FLAC files (default=enabled)]),
+ , enable_flac=yes)
+
+AC_ARG_ENABLE(mp4,
+ AC_HELP_STRING([--disable-mp4],[Disable support for MP4 files (default=enabled)]),
+ , enable_mp4=yes)
+
+AC_ARG_ENABLE(wavpack,
+ AC_HELP_STRING([--disable-wavpack],[Disable support for Wavpack files (default=enabled)]),
+ , enable_wavpack=yes)
+
+
+dnl -------------------------------
+dnl Checks for libraries.
+dnl -------------------------------
+
+dnl GTK+-2 libraries
+AM_PATH_GLIB_2_0(2.8.0,, AC_MSG_ERROR([*** GLIB >= 2.8.0 not installed! ***]))
+AM_PATH_GTK_2_0(2.4.1,, AC_MSG_ERROR([*** GTK >= 2.4.1 not installed! ***]))
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4.1 glib-2.0 >= 2.4.1)
+
+
+dnl Patch from Ben Taylor to fix a Solaris bug (for CDDB)
+AC_CHECK_LIB(socket, recv)
+
+
+dnl ################################################
+dnl # Ogg Vorbis librairies (rq : needed also for libFLAC)
+dnl ################################################
+dnl XIPH_PATH_OGG(enable_ogg="yes",enable_ogg="no")
+
+if test "x$enable_ogg" = "xyes" -o "x$enable_flac" = "xyes"; then
+ PKG_CHECK_MODULES(OGG, ogg >= 1.0, , ogg_available=no)
+ if test "x$ogg_available" = "xno"; then
+ echo "***"
+ echo "*** Warning: libogg >= 1.0 needed"
+ echo "***"
+ fi
+ PKG_CHECK_MODULES(VORBIS, vorbis >= 1.0.1, , ogg_available=no)
+ if test "x$ogg_available" = "xno"; then
+ echo "***"
+ echo "*** Warning: libvorbis >= 1.0.1 needed"
+ echo "***"
+ fi
+ AC_CHECK_LIB(m, cos) dnl Patch from Christian Weisgerber
+ AC_CHECK_LIB(ogg, ogg_sync_init, , ogg_available=no)
+ AC_CHECK_LIB(vorbis, vorbis_comment_init, , ogg_available=no)
+ AC_CHECK_LIB(vorbisfile, ov_open, , ogg_available=no)
+fi
+
+AC_MSG_CHECKING(for Ogg Vorbis file support)
+if test "x$enable_ogg" = "xyes"; then
+ if test "x$ogg_available" = "xno"; then
+ AC_MSG_RESULT(no)
+ enable_ogg="no"
+ echo "***"
+ echo "*** Warning: Ogg Vorbis file support disabled"
+ echo "*** (Install libogg and libvorbis libraries to enable it)"
+ echo "***"
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_OGG,1,[Define for Ogg Vorbis support])
+ fi
+else
+ echo "***"
+ echo "*** Ogg Vorbis file support disabled on commandline"
+ echo "*** (Install libogg and libvorbis libraries, and use --enable-ogg to enable it)"
+ echo "***"
+fi
+
+
+dnl ################################################
+dnl # libSpeex library
+dnl ################################################
+dnl check for system libspeex
+dnl Note that libvorbis is required for speex support, even if the user chooses --disable-speex
+
+if test "x$enable_speex" = "xyes"; then
+ dnl Library required for speex files, if not found 'enable_speex' is disabled
+ AC_CHECK_LIB(m, cos) dnl Patch from Christian Weisgerber
+ AC_CHECK_LIB(speex, speex_packet_to_header, , speex_available=no)
+
+ AC_MSG_CHECKING(for Speex file support)
+ if test "x$speex_available" = "xno"; then
+ AC_MSG_RESULT(no)
+ enable_speex="no"
+ echo "***"
+ echo "*** Warning: Speex file support disabled, speex missing"
+ echo "*** (Install speex, libogg and libvorbis libraries to enable it)"
+ echo "***"
+ elif test "x$ogg_available" = "xno"; then
+ AC_MSG_RESULT(no)
+ enable_speex="no"
+ echo "***"
+ echo "*** Warning: Speex file support disabled, libvorbis missing"
+ echo "*** (Install speex, libogg and libvorbis libraries to enable it)"
+ echo "***"
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_SPEEX,1,[Define for Speex support])
+ fi
+else
+ AC_MSG_CHECKING(for Speex file support)
+ AC_MSG_RESULT(no)
+ echo "***"
+ echo "*** Speex file support disabled on commandline"
+ echo "*** (Install speex, libogg and libvorbis libraries, and use --enable-speex to enable it)"
+ echo "***"
+fi
+
+
+dnl ################################################
+dnl # libFLAC library
+dnl ################################################
+dnl check for system libflac
+dnl Note that libvorbis is required for flac support, even if the user chooses --disable-ogg
+
+if test "x$enable_flac" = "xyes"; then
+ dnl Library required for flac files, if not found 'enable_flac' is disabled
+ AC_CHECK_LIB(m, cos) dnl Patch from Christian Weisgerber
+ AC_CHECK_LIB(FLAC, FLAC__metadata_simple_iterator_new, , flac_available=no)
+
+ AC_MSG_CHECKING(for FLAC file support)
+ if test "x$flac_available" = "xno"; then
+ AC_MSG_RESULT(no)
+ enable_flac="no"
+ echo "***"
+ echo "*** Warning: FLAC file support disabled, libflac missing"
+ echo "*** (Install libflac, libogg and libvorbis libraries to enable it)"
+ echo "***"
+ elif test "x$ogg_available" = "xno"; then
+ AC_MSG_RESULT(no)
+ enable_flac="no"
+ echo "***"
+ echo "*** Warning: FLAC file support disabled, libvorbis missing"
+ echo "*** (Install libflac, libogg and libvorbis libraries to enable it)"
+ echo "***"
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_FLAC,1,[Define for FLAC support])
+ fi
+else
+ AC_MSG_CHECKING(for FLAC file support)
+ AC_MSG_RESULT(no)
+ echo "***"
+ echo "*** FLAC file support disabled on commandline"
+ echo "*** (Install libflac, libogg and libvorbis libraries, and use --enable-flac to enable it)"
+ echo "***"
+fi
+
+dnl Check version of libFLAC installed
+dnl version of libFLAC must be at least 1.1.0
+if test "x$enable_flac" = "xyes"; then
+ LIBS_SAVE="$LIBS"
+ CFLAGS_SAVE="$CFLAGS"
+ LIBS="$LIBS $LIBFLAC_LIBS"
+ CFLAGS="$CFLAGS $LIBFLAC_CFLAGS"
+ AC_MSG_CHECKING(for libFLAC version)
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <FLAC/format.h>
+int
+main (void)
+{
+ FILE *output;
+ char tmp[16];
+ int libflac_major, libflac_minor, libflac_patch;
+
+ sprintf(tmp,"%s",FLAC__VERSION_STRING);
+ libflac_major = atoi( (char *)strtok(tmp,".") );
+ libflac_minor = atoi( (char *)strtok(NULL,".") );
+ libflac_patch = atoi( (char *)strtok(NULL,".") );
+ output=fopen("conftest.flac","w");
+ fprintf(output,"LIBFLAC_MAJOR=%d\nLIBFLAC_MINOR=%d\nLIBFLAC_PATCH=%d\n",libflac_major,libflac_minor,libflac_patch);
+ fclose(output);
+ exit(0);
+}
+], . ./conftest.flac; echo "${LIBFLAC_MAJOR}.${LIBFLAC_MINOR}.${LIBFLAC_PATCH}", AC_MSG_WARN(could not determine libFLAC version),[echo $ac_n "cross compiling; assuming ${LIBFLAC_MAJOR}.${LIBFLAC_MINOR}.${LIBFLAC_PATCH} $ac_c"])
+ LIBS="$LIBS_SAVE"
+ CFLAGS="$CFLAGS_SAVE"
+ LIBFLAC_VERSION="(flac-$LIBFLAC_MAJOR.$LIBFLAC_MINOR.$LIBFLAC_PATCH)"
+fi
+AC_DEFINE_UNQUOTED(LIBFLAC_MAJOR, $LIBFLAC_MAJOR, [libflac major version])
+AC_DEFINE_UNQUOTED(LIBFLAC_MINOR, $LIBFLAC_MINOR, [libflac minor version])
+AC_DEFINE_UNQUOTED(LIBFLAC_PATCH, $LIBFLAC_PATCH, [libflac patch version])
+
+
+dnl ################################################
+dnl # libid3tag and Id3lib libraries
+dnl ################################################
+if test "x$enable_mp3" = "xyes"; then
+ AC_MSG_CHECKING(for MP3 file support)
+ AC_CHECK_HEADER(id3tag.h, [], [libid3tag_available=no])
+ AC_CHECK_LIB(id3tag, id3_frame_field, [], [libid3tag_available=no], [-lz])
+ if test "x$libid3tag_available" = "xno"; then
+ AC_MSG_RESULT(no)
+ enable_mp3="no"
+ echo "***"
+ echo "*** Warning: MP3 file support disabled, libid3tag missing"
+ echo "***"
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_MP3,1,[Define for MP3 support])
+ fi
+
+ if test "x$enable_id3v23" == "xyes"; then
+ dnl Check which libs are required by id3lib, libid3.la is fucked up
+ AC_SEARCH_LIBS(ID3Tag_Link,"id3" "id3 -lstdc++" "id3 -lz" "id3 -lz -lstdc++",,AC_MSG_WARN(id3lib not found); id3lib_available=no)
+
+ dnl Needed to link correctly with id3lib 3.8.0
+ LIBS="-lz -lstdc++ $LIBS"
+ dnl AC_CHECK_LIB(z,uncompress,AC_DEFINE_UNQUOTED(HAVE_ZLIB))
+
+ dnl expected version for cross compiling
+ ID3LIB_MAJOR=3
+ ID3LIB_MINOR=8
+ ID3LIB_PATCH=0
+
+ AC_MSG_CHECKING(for id3lib version)
+ AC_TRY_RUN([
+ #include <id3.h>
+ #include <stdio.h>
+ int
+ main ()
+ {
+ FILE *output;
+ output=fopen("conftest.id3","w");
+ fprintf(output,"ID3LIB_MAJOR=%d\nID3LIB_MINOR=%d\nID3LIB_PATCH=%d\n",ID3LIB_MAJOR_VERSION,ID3LIB_MINOR_VERSION,ID3LIB_PATCH_VERSION);
+ fclose(output);
+ exit(0);
+ }
+ ], . ./conftest.id3; echo "${ID3LIB_MAJOR}.${ID3LIB_MINOR}.${ID3LIB_PATCH}", AC_MSG_WARN(could not determine id3lib version); id3lib_available=no,[echo $ac_n "cross compiling; assuming ${ID3LIB_MAJOR}.${ID3LIB_MINOR}.${ID3LIB_PATCH} $ac_c"])
+ AC_DEFINE_UNQUOTED(ID3LIB_MAJOR, $ID3LIB_MAJOR, [id3lib major version])
+ AC_DEFINE_UNQUOTED(ID3LIB_MINOR, $ID3LIB_MINOR, [id3lib minor version])
+ AC_DEFINE_UNQUOTED(ID3LIB_PATCH, $ID3LIB_PATCH, [id3lib patch level])
+
+ AC_MSG_CHECKING(for MP3 file support)
+ if test "x$id3lib_available" = "xno"; then
+ AC_MSG_RESULT(no)
+ echo "***"
+ echo "*** Warning: id3v23 tags support disabled, id3lib missing"
+ echo "***"
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_ID3LIB,1,[Define for id3v23 support])
+ ID3LIB_VERSION="(id3lib-$ID3LIB_MAJOR.$ID3LIB_MINOR.$ID3LIB_PATCH)"
+ fi
+ fi
+fi
+
+
+dnl ################################################
+dnl # libmp4v2 library
+dnl ################################################
+if test "x$enable_mp4" = "xyes"; then
+ dnl Librairies required for mp4 files, if not found 'enable_mp4' is disabled
+ AC_CHECK_LIB(m, cos)
+ dnl AC_CHECK_LIB(mp4v2, MP4Read, , mp4_available=no)
+ AC_CHECK_LIB(mp4v2, MP4GetTrackMediaDataName, , mp4_available=no)
+fi
+
+AC_MSG_CHECKING(for MP4/AAC file support)
+if test "x$enable_mp4" = "xyes"; then
+ if test "x$mp4_available" = "xno"; then
+ AC_MSG_RESULT(no)
+ enable_mp4="no"
+ echo "***"
+ echo "*** Warning: MP4 file support disabled"
+ echo "*** (Install libmp4v2 to enable it)"
+ echo "***"
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_MP4,1,[Define for MP4 support])
+ fi
+else
+ AC_MSG_RESULT(no)
+ enable_mp4="no"
+ echo "***"
+ echo "*** MP4 file support disabled on commandline"
+ echo "*** (Install libmp4v2 and use --enable-mp4 to enable it)"
+ echo "***"
+fi
+
+
+dnl ################################################
+dnl # WavPack library
+dnl ################################################
+if test "x$enable_wavpack" = "xyes"; then
+ dnl Librairies required for wavpack files, if not found 'enable_wavpack' is disabled
+ PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.40, , wavpack_available=no)
+ if test "x$wavpack_available" = "xno"; then
+ echo "***"
+ echo "*** Warning: wavpack >= 4.40 needed"
+ echo "***"
+ fi
+ AC_CHECK_LIB(m, cos)
+ AC_CHECK_LIB(wavpack, WavpackOpenFileInput, , wavpack_available=no)
+fi
+
+AC_MSG_CHECKING(for Wavpack file support)
+if test "x$enable_wavpack" = "xyes"; then
+ if test "x$wavpack_available" = "xno"; then
+ AC_MSG_RESULT(no)
+ enable_wavpack="no"
+ echo "***"
+ echo "*** Warning: Wavpack file support disabled"
+ echo "*** (Install libwavpack to enable it)"
+ echo "***"
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_WAVPACK,1,[Define for Wavpack support])
+ fi
+else
+ AC_MSG_RESULT(no)
+ enable_wavpack="no"
+ echo "***"
+ echo "*** Wavpack file support disabled on commandline"
+ echo "*** (Install libwavpack, and use --enable-wavpack to enable it)"
+ echo "***"
+fi
+
+dnl Use -Wall if we have gcc.
+changequote(,)dnl
+if test "x$GCC" = "xyes"; then
+ case " $CFLAGS " in
+ *[\ \ ]-Wall[\ \ ]*) ;;
+ *) CFLAGS="$CFLAGS -Wall" ;;
+ esac
+fi
+changequote([,])
+
+dnl To enable 'gprof' profiling
+dnl CFLAGS="$CFLAGS -pg"
+
+
+dnl -------------------------------
+dnl Checks for header files.
+dnl -------------------------------
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_CHECK_HEADERS(fcntl.h unistd.h)
+
+
+dnl -------------------------------
+dnl Checks for typedefs, structures, and compiler characteristics.
+dnl -------------------------------
+AC_C_CONST
+AC_TYPE_MODE_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_STRUCT_TM
+
+
+dnl -------------------------------
+dnl Checks for library functions.
+dnl -------------------------------
+AC_FUNC_FORK
+AC_FUNC_STAT
+AC_TYPE_SIGNAL
+AC_CHECK_FUNCS(mkdir strstr strtol mkstemp)
+
+
+dnl -------------------------------
+dnl check for NLS
+dnl -------------------------------
+AM_GLIB_GNU_GETTEXT
+dnl AM_GNU_GETTEXT_VERSION(0.10.40)
+
+
+dnl -------------------------------
+dnl config header
+dnl -------------------------------
+AM_CONFIG_HEADER(config.h)
+
+
+AC_OUTPUT([ Makefile
+ easytag.spec
+ doc/easytag.1
+ src/Makefile
+ src/id3lib/Makefile
+ src/libapetag/Makefile
+ src/libmpg123/Makefile
+ po/Makefile.in
+ ])
+
+echo
+echo Configuration for $PACKAGE $VERSION :
+echo --------------------------------
+echo
+echo Source code location ....: $srcdir
+echo Host System Type ........: $host
+echo Preprocessor ............: $CC $CPPFLAGS
+echo Compiler ................: $CC $CFLAGS
+echo Linker ..................: $CC $LDFLAGS $LIBS
+echo GTK2 version ............: `pkg-config --modversion gtk+-2.0`
+echo MP3 file support ........: $enable_mp3
+echo ID3v2.3 tags support ....: $enable_id3v23 $ID3LIB_VERSION
+echo Ogg Vorbis file support .: $enable_ogg
+echo Speex file support ......: $enable_speex
+echo FLAC file support .......: $enable_flac $LIBFLAC_VERSION
+echo MP4 file support ........: $enable_mp4 $MPEG4IP_VERSION
+echo WavPack support .........: $enable_wavpack
+echo NLS/gettext .............: $USE_NLS
+echo Install path ............: $prefix
+echo
+echo Now type 'make' to build $PACKAGE $VERSION,
+echo and then 'make install' for installation.
+echo