# $Id$ # Cantus Tag Editor # Copyright © 2002-2004 by Samuel Abels # Copyright © 2007 by Tim Huetz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see # # define some needed m4 macros # m4_define([cantus_major_version], [3]) m4_define([cantus_minor_version], [0]) m4_define([cantus_micro_version], [2]) m4_define([cantus_version_suffix], [testing]) m4_define([cantus_version], [cantus_major_version.cantus_minor_version.cantus_micro_version]) m4_define([cantus_lib_version], [cantus_major_version:cantus_minor_version:cantus_micro_version]) m4_define([cantus_display_version], cantus_version[]m4_ifdef([cantus_version_suffix],-[cantus_version_suffix])) # # initialize the system # AC_INIT(cantus,[cantus_display_version],,cantus-[cantus_display_version].tar) AM_INIT_AUTOMAKE(cantus,[cantus_display_version]) AC_CONFIG_HEADER(include/config.h) # # checks for programs # AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LIBTOOL # # enable the maintainer mode option # AM_MAINTAINER_MODE # # checks for typedefs, structures, and compiler characteristics # AC_C_CONST AC_C_CHAR_UNSIGNED AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_HEADER_TIME # # some gettext stuff # GETTEXT_PACKAGE=cantus ALL_LINGUAS=de es fr it nl pl AC_SUBST(GETTEXT_PACKAGE) AC_SUBST(ALL_LINGUAS) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) AM_GLIB_GNU_GETTEXT # # check for some needed modules which couldn't be checked through AC_CHECK_LIB # PKG_CHECK_MODULES(libgtkmm, gtkmm-2.4 >= 1.2.10) PKG_CHECK_MODULES(libsigcxx, sigc++-2.0 >= 2.0.17) PKG_CHECK_MODULES(libglademm, libglademm-2.4 >= 2.6.3) PKG_CHECK_MODULES(libglib, glib-2.0 >= 2.12.11) AC_SUBST(libgtkmm_CFLAGS) AC_SUBST(libgtkmm_LIBS) AC_SUBST(libsigcxx_CFLAGS) AC_SUBST(libsigcxx_LIBS) AC_SUBST(libglademm_CFLAGS) AC_SUBST(libglademm_LIBS) AC_SUBST(libglib_CFLAGS) AC_SUBST(libglib_LIBS) # # some stuff which has to been substituted # AC_SUBST(cantus_lib_version) AC_SUBST(libgtkmm_CFLAGS) AC_SUBST(libgtkmm_LIBS) AC_SUBST(libsigcxx_CFLAGS) AC_SUBST(libsigcxx_LIBS) AC_SUBST(libglademm_CFLAGS) AC_SUBST(libglademm_LIBS) AC_SUBST(libglib_CFLAGS) AC_SUBST(libglib_LIBS) # # check for some libraries we're using and which usage could not be disabled # AC_CHECK_LIB(dl, dlsym,,[AC_ERROR([Failed to locate the required libdl library.])]) AC_CHECK_LIB(gthread-2.0, main,,[AC_ERROR([Failed to locate the required libgthread-2.0 library.])]) AC_CHECK_LIB(vorbis, main,,[AC_ERROR([Failed to locate the required libvorbis library.])]) # # check which stuff should be enabled and which not # AC_ARG_ENABLE( debug, [AC_HELP_STRING( [--enable-debug], [compile with debugging support] ) ], [ AC_DEFINE(DEBUG, [1], [If this macro is set, debug mode is enabled!]) AC_DEFINE(_DEBUG_, [1], [The old debugging macro. Should be replaced with the new one!]) if test x"$GXX" = x"yes"; then CFLAGS="$CFLAGS -g -O0" CXXFLAGS="$CXXFLAGS -g -O0" fi ], enable_debug=no ) # # some macros which are needed inside the source code # AC_DEFINE_UNQUOTED(BUILD_DATE, "`date +%m/%d/%Y`", [The date when Cantus was build.]) AC_DEFINE_UNQUOTED(BUILD_TIME, "`date +%H:%M:%S`", [The time when Cantus was build.]) # # the file which should be generated # AC_OUTPUT([Makefile dist/Makefile dist/pixmaps/Makefile dist/glade/Makefile source/Makefile source/cantus/Makefile source/cantusplugins/Makefile source/cantusplugins/id3v1/Makefile source/cantusplugins/id3v2/Makefile source/cantusplugins/id3copier/Makefile source/cantusplugins/vorbis/Makefile source/cantusplugins/mpegheader/Makefile source/cantusplugins/tag2filename/Makefile include/Makefile include/cantus/Makefile include/cantusplugins/Makefile include/cantusplugins/id3v1/Makefile include/cantusplugins/id3v2/Makefile include/cantusplugins/id3copier/Makefile include/cantusplugins/vorbis/Makefile include/cantusplugins/mpegheader/Makefile include/cantusplugins/tag2filename/Makefile po/Makefile.in]) # # just output some stuff about the stuff we've configured # echo echo $PACKAGE $VERSION echo echo echo Build with MP3 support........... : yes echo Build with Ogg support........... : no echo echo Plugins which will be compiled... : id3v1,id3v2,id3copier,vorbis,mpegheader,tag2filename echo echo Print debugging messages......... : $enable_debug echo echo Build for cpu architecture....... : $build_cpu echo Build for operating system....... : $build_os echo echo eval eval echo Cantus binaries will be installed in $bindir. eval eval echo Cantus libraries will be installed in $libdir. eval eval echo Cantus data files will be installed in $datadir. eval eval echo Cantus locales will be installed in $localedir. echo echo configure complete, now type \'make\' echo