AC_INIT([LASH],[0.5.2pre]) AC_CONFIG_SRCDIR([lash/types.h]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE ### Check for programs ### AC_LANG([C]) AC_PROG_CC AC_PROG_LIBTOOL ################# ### texi2html ### ################# AC_CHECK_PROG(lash_texi2html, texi2html, "yes", "no") if test x$lash_texi2html = xyes; then AC_MSG_NOTICE([texi2html found, building manual]) else AC_MSG_WARN([texi2html not found, manual will not be built]) fi AM_CONDITIONAL(HAVE_TEXI2HTML, test x$lash_texi2html = xyes) ############ ### JACK ### ############ PKG_CHECK_MODULES(JACK, jack >= 0.50.0, true, AC_MSG_ERROR([you need jack >= 0.50.0. see http://sf.net/projects/jackit])) JACK_VERSION=$( pkg-config --modversion jack ) AC_SUBST(JACK_CFLAGS) AC_SUBST(JACK_LIBS) AC_DEFINE_UNQUOTED(JACK_VERSION, "$JACK_VERSION", [The version of jack we're compiling against]) ############ ### ALSA ### ############ lash_alsa_midi="yes" AC_ARG_ENABLE(alsa-midi, [AS_HELP_STRING(--enable-alsa-midi, [Enable Alsa sequencer support (true)])], [ if test x$enable_alsa_midi = xno ; then lash_alsa_midi=no ; fi ]) if test "x$lash_alsa_midi" = "xyes"; then PKG_CHECK_MODULES(ALSA, alsa >= 0.9, ALSA_FOUND="yes", ALSA_FOUND="no") if test "x$ALSA_FOUND" = "xyes"; then # Check that there's seq functions in the library ORIG_LIBS="$LIBS" LIBS="$LIBS $ALSA_LIBS" ORIG_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $ALSA_CFLAGS" AC_CHECK_FUNC(snd_seq_open, true, AC_MSG_ERROR([The Alsa library you're using doesn't have sequencer functions])) LIBS="$ORIG_LIBS" CFLAGS="$ORIG_CFLAGS" ALSA_VERSION=$( pkg-config --modversion alsa ) AC_SUBST(ALSA_CFLAGS) AC_SUBST(ALSA_LIBS) AC_DEFINE(HAVE_ALSA, 1, [Alsa sequencer support]) AC_DEFINE_UNQUOTED(ALSA_VERSION, "$ALSA_VERSION", [The version of alsa we're compiling against]) else AC_MSG_WARN([You don't have ALSA >= 0.9. See http://www.alsa-project.org/]) AC_MSG_WARN([ALSA support not being built.]) fi fi AM_CONDITIONAL(WITH_ALSA, [test "x$ALSA_FOUND" = "xyes"]) ############### ### libxml2 ### ############### PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.0.0, true, AC_MSG_ERROR([you need libxml2 >= 2.0.0. see http://xmlsoft.org/])) JACK_VERSION=$( pkg-config --modversion libxml-2.0 ) AC_SUBST(XML2_CFLAGS) AC_SUBST(XML2_LIBS) AC_DEFINE_UNQUOTED(XML2_VERSION, "$XML2_VERSION", [The version of libxml2 we're compiling against]) ############ ### uuid ### ############ AC_CHECK_HEADER(uuid/uuid.h, UUID_FOUND="yes", UUID_FOUND="no") if test x$UUID_FOUND = xno; then AC_MSG_ERROR([libuuid, from the e2fsprogs prackage, is required for lashd. see http://e2fsprogs.sourceforge.net/]) fi AC_CHECK_LIB(uuid, uuid_generate, UUID_FOUND="yes", UUID_FOUND="no") if test x$UUID_FOUND = xno; then AC_MSG_ERROR([libuuid, from the e2fsprogs prackage, is required for lashd. see http://e2fsprogs.sourceforge.net/]) fi UUID_LIBS="-luuid" AC_SUBST(UUID_CFLAGS) AC_SUBST(UUID_LIBS) ############## ### GTK+ 2 ### ############## lash_gtk2="yes" AC_ARG_ENABLE(gtk2, [AS_HELP_STRING(--disable-gtk2, Disable all clients that require GTK)],[ case "$enableval" in "yes") ;; "no") lash_gtk2="no"; ;; *) AC_MSG_ERROR([must use --enable-gtk2(=yes/no) or --disable-gtk2]) ;; esac ]) if test x$lash_gtk2 = xyes; then PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0, GTK2_FOUND="yes", GTK2_FOUND="no") AC_SUBST(GTK2_CFLAGS) AC_SUBST(GTK2_LIBS) if test x$GTK2_FOUND = xyes; then AC_DEFINE(HAVE_GTK2, 1, "whether or not we have gtk 2 support") fi else GTK2_FOUND="no" fi lash_gtk2=$GTK2_FOUND AM_CONDITIONAL(HAVE_GTK2, test x$GTK2_FOUND = xyes) ################ ### readline ### ################ lash_readline="yes" #VL_LIB_READLINE AC_CHECK_READLINE AC_SUBST(READLINE_INCLUDES) AC_SUBST(READLINE_LIBS) AC_MSG_CHECKING([whether to enable readline]) if test "x$vl_cv_lib_readline" != "xno"; then AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_READLINE, 1, [whether readline library is available]) else AC_MSG_RESULT([no]) lash_readline="no" fi AM_CONDITIONAL(HAVE_READLINE, test "x$lash_readline" != "xno") ###################### ### --enable-debug ### ###################### AC_MSG_CHECKING([whether to enable debugging output]) lash_debug="no" AC_ARG_ENABLE(debug, [AS_HELP_STRING(--enable-debug, enable debugging output (from everything))],[ case "$enableval" in "yes") lash_debug="yes" AC_DEFINE(LASH_DEBUG, 1, [whether or not to enable debugging output]) ;; "no") ;; *) AC_MSG_ERROR([must use --enable-debug(=yes/no) or --disable-debug]) ;; esac ]) if test x$lash_debug = xyes; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ########################## ### --with-default-dir ### ########################## AC_MSG_CHECKING([where to create projects]) AC_ARG_WITH(default-dir, [AS_HELP_STRING(--with-default-dir=DIR, [tell the server to use $HOME/DIR to store project directories in])],[ if test x$withval = xno; then AC_MSG_ERROR([use --with-default-dir=DIR, not --without-default-dir]) fi DEFAULT_PROJECT_DIR="$withval"; ],[ DEFAULT_PROJECT_DIR="audio-projects"; ]) AC_DEFINE_UNQUOTED(DEFAULT_PROJECT_DIR, "$DEFAULT_PROJECT_DIR", [Where to store projects]) AC_MSG_RESULT($DEFAULT_PROJECT_DIR) ###################### ### default CFLAGS ### ###################### LASH_CFLAGS="-DLASH_BUILD -DHAVE_LASH" LASH_LIBS="" if test x$lash_debug = xyes; then LASH_CFLAGS="$LASH_CFLAGS -g" LASH_LIBS="" # LASH_LIBS="/usr/lib/gcrt1.o -lc_p" fi AC_SUBST(LASH_CFLAGS) AC_SUBST(LASH_LIBS) AC_MSG_CHECKING(LASH_CFLAGS) AC_MSG_RESULT($LASH_CFLAGS) AC_MSG_CHECKING(LASH_LIBS) AC_MSG_RESULT($LASH_LIBS) # For the manual DATE="`date -u`" AC_SUBST(DATE) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([lash-1.0.pc]) AC_CONFIG_FILES([m4/Makefile]) AC_CONFIG_FILES([docs/lash-manual.texi]) AC_CONFIG_FILES([docs/Makefile]) AC_CONFIG_FILES([docs/lash-manual-html-one-page/Makefile]) AC_CONFIG_FILES([docs/lash-manual-html-split/Makefile]) AC_CONFIG_FILES([lash/Makefile]) AC_CONFIG_FILES([liblash/Makefile]) AC_CONFIG_FILES([lashd/Makefile]) AC_CONFIG_FILES([clients/Makefile]) AC_CONFIG_FILES([clients/simple_client/Makefile]) AC_CONFIG_FILES([clients/control/Makefile]) AC_CONFIG_FILES([clients/synth/Makefile]) AC_CONFIG_FILES([clients/save_button/Makefile]) AC_CONFIG_FILES([clients/panel/Makefile]) AC_CONFIG_FILES([icons/Makefile]) AC_OUTPUT if test "$lash_readline" = "no"; then lash_readline="no (lash-control will not be built)" fi if test "$lash_gtk2" = "no"; then lash_gtk2="no (gtk 2 clients will not be built)" fi if test "$lash_gtk" = "no"; then lash_gtk="no (gtk 1 clients will not be built)" fi if test "$lash_texi2html" = "no"; then lash_texi2html="no (html manual will not be built)" fi AC_MSG_RESULT([ LASH Configured Alsa support: $lash_alsa_midi Readline support: $lash_readline Gtk support: $lash_gtk2 Debugging output: $lash_debug Building manual: $lash_texi2html JACK_CFLAGS: $JACK_CFLAGS ALSA_CFLAGS: $ALSA_CFLAGS XML2_CFLAGS: $XML2_CFLAGS ]) if test x$GTK2_FOUND = xyes; then AC_MSG_RESULT([ GTK2_CFLAGS: $GTK2_CFLAGS ]) fi AC_MSG_RESULT([ JACK_LIBS: $JACK_LIBS ]) AC_MSG_RESULT([ ALSA_LIBS: $ALSA_LIBS ]) AC_MSG_RESULT([ XML2_LIBS: $XML2_LIBS ]) if test x$GTK2_FOUND = xyes; then AC_MSG_RESULT([ GTK2_LIBS: $GTK2_LIBS ]) fi if test x$lash_readline = xyes; then AC_MSG_RESULT([ READLINE_LIBS: $READLINE_LIBS]) fi AC_MSG_RESULT([ Default project store: $DEFAULT_PROJECT_DIR Installation prefix: $prefix ])