dnl Process this file with autoconf to produce a configure script. AC_INIT(src) AM_INIT_AUTOMAKE(denemo, 0.7.6) AM_CONFIG_HEADER(config.h) AC_CANONICAL_SYSTEM AM_MAINTAINER_MODE dnl AM_BINRELOC ALL_LINGUAS="es fr sv" AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_INSTALL AC_PROG_YACC AM_PROG_LEX dnl AM_DISABLE_STATIC AM_PROG_LIBTOOL dnl GTK_DOC_CHECK([1.0]) dnl AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [ dnl default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) dnl if test x$enable_gtk_doc = xauto ; then dnl if test x$GTKDOC = xtrue ; then dnl enable_gtk_doc=yes dnl else dnl enable_gtk_doc=no dnl fi dnl fi dnl AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) dnl AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, no) dnl turnoff binreloc by default dnl $br_cv_binreloc=no dnl Checks for libraries. usegtk2=yes AC_ARG_ENABLE(gtk2, [--enable-gtk2 Use GTK2 "[default=yes]"], [if test "x$enable_gtk2" != "xno"; then usegtk2=yes fi ] ) #if test "x$usegtk2" = "xyes"; then PKG_CHECK_MODULES(DENEMO, gtk+-2.0 >= 2.0.3) CFLAGS="$DENEMO_CFLAGS" LIBS="$DENEMO_LIBS" #else #AM_PATH_GTK(1.2.0, [LIBS="$LIBS $GTK_LIBS" # CFLAGS="$CFLAGS $GTK_CFLAGS" # LDFLAGS="$LDFLAGS $GTK_LDFLAGS"], # AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)) #fi AM_PATH_XML2(2.0.0, [LIBS="$LIBS $XML_LIBS" CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" LIBS="$LIBS $XML_LIBS"], AC_MSG_ERROR(Cannot find libxml: Is xml-config in path?)) usealsa=no AC_ARG_ENABLE(alsa, [--enable-alsa Use ALSA "[default=no]"], [if test "x$enable_alsa" != "xno"; then usealsa=yes fi ] ) if test "x$usealsa" = "xyes"; then AM_PATH_ALSA(0.9.0, [LIBS="$LIBS $ALSA_LIBS" CFLAGS="$CFLAGS -DHAVEALSA $ALSA_CFLAGS" LDFLAGS="$LDFLAGS $ALSA_LDFLAGS"], AC_MSG_ERROR(Cannot find Alsa)) AC_DEFINE(HAVEALSA, 1,[Use alsa]) fi dnl Options for configuration build_debug=no AC_ARG_ENABLE(debug, [ --enable-debug Enable Debug Code "[default=no]"], CFLAGS="$CFLAGS -DDEBUG -g" CXXFLAGS="$CXXFLAGS -DDEBUG -g") echo $CXXFLAGS dnl Memory Debugging mem_debug=no AC_ARG_ENABLE(mem, [ --enable-mem Enable Memory Debugging "[default=no]"], [if test "x$mem_debug" != "xno"; then mem_debug=yes fi ] ) if test "x$mem_debug" = "xyes"; then LDFLAGS="$LDFLAGS -lefence"; fi build_doc=no AC_ARG_ENABLE(doc, [ --enable-doc Enable Documentation Build "[default=no]"], [if test "x$build_doc" != "xno"; then build_doc = yes fi] ) AM_CONDITIONAL(DENEMO_BUILD_DOC,[test "$build_doc" = "yes"]) DENEMO_PLUGINS_ALL="analysis rumour midiinput" AC_SUBST(DENEMO_PLUGINS_ALL) DENEMO_PLUGINS_SELECTED="" AC_ARG_WITH(plugins, AC_HELP_STRING([--with-plugins],[comma-separated list of plug-ins to compile ]), [for i in `echo $withval | tr , ' '`; do if test -n `echo $i | grep $DENEMO_PLUGINS_ALL`; then DENEMO_PLUGINS_SELECTED="$DENEMO_PLUGINS_SELECTED $i" else echo "plug-in $i not recognized, ignoring..." fi done], [DENEMO_PLUGINS_SELECTED=""]) AC_SUBST(DENEMO_PLUGINS_SELECTED) dnl Replace `main' with a function in -libs: dnl Checks for header files. AC_CHECK_HEADERS(sys/soundcard.h) AC_CHECK_HEADERS(errno.h) AC_CHECK_HEADERS(getopt.h sys/wait.h wait.h sys/time.h sys/resource.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_HEADER_TIME dnl Checks for library functions. dnl Set PACKAGE_LOCALE_DIR in config.h. if test "${prefix}" == "NONE"; then prefix=${ac_default_prefix} AC_SUBST(prefix) fi pkgdatadir=${datadir}/${PACKAGE} AC_SUBST(pkgdatadir) #AC_SUBST(PACKAGE_DATA_DIR) dnl Set PACKAGE_PLUGIN_DIR in Makefiles and config.h. PACKAGE_PLUGIN_DIR=$libdir/denemo AC_SUBST(PACKAGE_PLUGIN_DIR) #if test "x${prefix}" = xNONE; then # denemo_plugin_dir="${ac_default_prefix}/lib/${PACKAGE}" #else denemo_plugin_dir="${prefix}/lib/${PACKAGE}" #fi AC_DEFINE_UNQUOTED(PACKAGE_PLUGIN_DIR, "$denemo_plugin_dir", [set plugin dir]) dnl Set PACKAGE_SOURCE_DIR in config.h. packagesrcdir=`cd $srcdir && pwd` AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [set package source dir]) dnl GTK_DOC_CHECK([1.4]) dnl Gettext stuff AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) CXXFLAGS="$CFLAGS -Wall -O2" AC_SUBST(CXXFLAGS) AC_OUTPUT([ m4/Makefile Makefile denemo.spec src/Makefile include/Makefile include/denemo/Makefile plugins/Makefile plugins/analysis/Makefile plugins/midiinput/Makefile plugins/rumour/Makefile pixmaps/Makefile doc/Makefile doc/transformations/Makefile doc/templates/Makefile doc/templates/mixed/Makefile doc/templates/Orchestral_Templates/Makefile doc/templates/strings/Makefile doc/templates/church/Makefile doc/templates/educational/Makefile doc/templates/band/Makefile doc/templates/general/Makefile doc/templates/orchestral/Makefile doc/images/Makefile keymaps/Makefile po/Makefile.in ])