specimen-0.5.2-rc3/0000777000175000017500000000000010575351341011017 500000000000000specimen-0.5.2-rc3/README0000644000175000017500000000256010575117614011621 00000000000000Typing 'make' should compile the program for you. You'll need jack, alsa, libsamplerate, libsndfile, libxml2, gtk-2.0, pthreads, and there associated development files for this to work. Once that's done, run the program, load some samples, connect it to your favorite ALSA sequencer, and have fun. As of version 0.5.2 specimen supports lash and jack midi ports. In order to use jack midi you need jack version 0.102.0 or greater. You set the range of notes a patch listens to with the keyboard; the range is indicated in the trim above the keys, and clicking there adjusts the range. Left click sets the lower note, right click sets the upper note, middle click sets the root note. In the sample editor, left click sets the start loop point, right click sets the stop loop point. Ctrl-left click sets the sample start point, ctrl-right click sets the sample stop point. You can save banks of your patches to be loaded at a later date; I've adopted the convention of ending them with .beef, but do as thou wilt. Left click on the piano to change root note, right click to create a range. If you're interested in writing an output driver, have a look at driver.h, driver.c, and the included alsa and jack drivers. It's not hard, but if you have any questions don't hesitate to contact me. Be sure to read the WARRANTY and COPYING files, and drop me a line if you are so inclined. specimen-0.5.2-rc3/acx_pthread.m40000644000175000017500000001666210466727727013510 00000000000000dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html dnl AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE AC_LANG_C acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_TRY_LINK([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). AC_MSG_CHECKING([for joinable pthread attribute]) AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_JOINABLE;], ok=PTHREAD_CREATE_JOINABLE, ok=unknown) if test x"$ok" = xunknown; then AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_UNDETACHED;], ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, [Define to the necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_RESULT(${ok}) if test x"$ok" = xunknown; then AC_MSG_WARN([we do not know how to create joinable pthreads]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_RESTORE ])dnl ACX_PTHREAD specimen-0.5.2-rc3/configure.ac0000644000175000017500000001356110575351277013237 00000000000000# -*- autoconf -*- # Process this file with autoconf to produce a configure script. AC_INIT(configure.ac) AM_INIT_AUTOMAKE(specimen, 0.5.2-rc3) AM_CONFIG_HEADER(src/config.h) # compilation with_debug="no" AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug], [enable debugging information, accepting a performance penalty (default is NO)])], [if test x$enable_debug = xyes; then with_debug=yes ; fi]) if test x$with_debug = xno; then CFLAGS="-O3" else AC_DEFINE(DEBUG, 1, [[whether to display debugging output or not]]) fi # disable lash support? AC_ARG_ENABLE([lash], [AC_HELP_STRING([--disable-lash], [disable lash support (default is NO)])], disable_lash="yes", []) # LASH have_lash="no" PKG_CHECK_MODULES(LASH, lash-1.0 >= 0.5.0, have_lash="yes", have_lash="no") if test "$have_lash" = "yes"; then AC_DEFINE(HAVE_LASH, 1, [Has lash.h]) AC_SUBST(LASH_CFLAGS) AC_SUBST(LASH_LIBS) else AC_MSG_WARN([LASH not found, session support will not be built.]) fi AM_CONDITIONAL(HAVE_LASH, [test "$have_lash" = "yes"]) # standard autoconf checks AC_PROG_CC AC_PROG_CPP AC_PROG_RANLIB AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h sys/time.h unistd.h]) AC_C_CONST AC_C_INLINE AC_HEADER_TIME AC_FUNC_MALLOC AC_CHECK_FUNCS([floor gettimeofday pow strchr strdup]) # pthreads ACX_PTHREAD SPECIMEN_CFLAGS="-Wall -Werror" AC_SUBST(SPECIMEN_CFLAGS) CFLAGS="$SPECIMEN_CFLAGS $CFLAGS" config_error="no" # gtk PKG_CHECK_MODULES(GTK, gtk+-2.0, HAVE_GTK="yes", config_error="yes") AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) # libxml PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML="yes", config_error="yes") AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_LIBS) # libgnomecanvas PKG_CHECK_MODULES(LIBGNOMECANVAS, libgnomecanvas-2.0, HAVE_LIBGNOMECANVAS="yes", config_error="yes") AC_SUBST(LIBGNOMECANVAS_CFLAGS) AC_SUBST(LIBGNOMECANVAS_LIBS) # alsa PKG_CHECK_MODULES(ALSA, alsa, HAVE_ALSA="yes", config_error="yes") AC_SUBST(ALSA_CFLAGS) AC_SUBST(ALSA_LIBS) # libsndfile PKG_CHECK_MODULES(LIBSNDFILE, sndfile, HAVE_LIBSNDFILE="yes", config_error="yes") AC_SUBST(LIBSNDFILE_CFLAGS) AC_SUBST(LIBSNDFILE_LIBS) # libsamplerate PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, HAVE_LIBSAMPLERATE="yes", config_error="yes") AC_SUBST(LIBSAMPLERATE_CFLAGS) AC_SUBST(LIBSAMPLERATE_LIBS) # jack PKG_CHECK_MODULES(JACK, jack >= 0.99.0, HAVE_JACK="yes", config_error="yes") if test "x$HAVE_JACK" = xyes ; then PKG_CHECK_MODULES(JACK_MIDI, jack >= 0.102.27, HAVE_JACK_MIDI="yes", config_error="no") if test "x$HAVE_JACK_MIDI" = xyes; then AC_DEFINE([HAVE_JACK_MIDI], [], [Define if we have jack midi support.]) else PKG_CHECK_MODULES(OLD_JACK_MIDI, jack >= 0.102.0, HAVE_OLD_JACK_MIDI="yes", config_error="no") if test "x$HAVE_OLD_JACK_MIDI" = xyes; then AC_DEFINE([HAVE_OLD_JACK_MIDI], [], [Define if we have old jack midi support.]) fi fi fi AC_SUBST(JACK_CFLAGS) AC_SUBST(JACK_LIBS) # phat PKG_CHECK_MODULES(PHAT, phat >= 0.3.1, HAVE_PHAT="yes", config_error="yes") AC_SUBST(PHAT_CFLAGS) AC_SUBST(PHAT_LIBS) # optional lash if test x$disable_lash != xyes; then PKG_CHECK_MODULES(LASH, lash-1.0 >= 0.5.0, HAVE_LASH="yes", config_error="no") if test "x$HAVE_LASH" = xyes ; then AC_DEFINE([HAVE_LASH], [], [Define if we have lash.]) AC_SUBST(LASH_CFLAGS) AC_SUBST(LASH_LIBS) else AC_MSG_WARN([LASH not found, session support will not be built.]) fi fi CC="$PTHREAD_CC" # print build summary AC_CONFIG_COMMANDS_POST([ echo echo " BUILD SUMMARY" echo " =============" echo " Compiler full flags: $CFLAGS" echo -n " Build type: " if test x$with_debug = xyes; then echo "debugging" else echo "optimized" fi echo -n " Jack midi support: " if test "x$HAVE_JACK_MIDI" = xyes; then echo "yes with jack >= 0.102.27" elif test "x$HAVE_OLD_JACK_MIDI" = xyes; then echo "yes with jack >= 0.102.0 and < 0.102.27" else echo "no" fi echo echo ]) # are we good to go? if test x$config_error = "xyes"; then AC_MSG_RESULT([ *** ERROR: the following required packages are missing *** ]) if test "x$HAVE_GTK" != xyes ; then AC_MSG_RESULT([ *** GTK+ version 2.2.x or greater, available from : http://www.gtk.org/ ]) fi if test "x$HAVE_LIBGNOMECANVAS" != xyes ; then AC_MSG_RESULT([ *** libgnomecanvas, available from : http://ftp.gnome.org/pub/gnome/sources/libgnomecanvas/ ]) fi if test "x$HAVE_PHAT" != xyes ; then AC_MSG_RESULT([ *** Phat 0.4.0 or greater, available from: http://phat.berlios.de/ ]) fi if test "x$HAVE_JACK" != xyes ; then AC_MSG_RESULT([ *** JACK 0.99.0 or greater, available from: http://www.jackaudio.org/ ]) fi if test "x$HAVE_LIBSAMPLERATE" != xyes ; then AC_MSG_RESULT([ *** libsamplerate, available from: http://www.mega-nerd.com/SRC/ ]) fi if test "x$HAVE_LIBSNDFILE" != xyes ; then AC_MSG_RESULT([ *** libsndfile, available from: http://www.mega-nerd.com/libsndfile/ ]) fi if test "x$HAVE_LIBXML" != xyes ; then AC_MSG_RESULT([ *** libxml2, available from: http://ftp.gnome.org/pub/gnome/sources/libxml2/ ]) fi if test x$disable_lash != xyes; then if test "x$HAVE_LASH" != xyes ; then AC_MSG_RESULT([ *** LASH, available from: http://savannah.nongnu.org/projects/lash Note: you may get this message if jack is not installed since lash requires jack. To disable lash support, add --disable-lash to your configure options.]) fi fi AC_MSG_RESULT([ Please ensure that all the above software is properly installed before running configure again. To do this, use your package manager to install the correct versions of the binary AND development (dev) packages or, download them from the above link(s) and build and install them from source manually. ]) AC_MSG_ERROR([ ************************************************* see ./config.log for full details. ]) else AC_OUTPUT([ Makefile pixmaps/Makefile src/Makefile src/gui/Makefile specimen.spec ]) fi specimen-0.5.2-rc3/aclocal.m40000644000175000017500000010770010575351307012602 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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 2 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acx_pthread.m4]) specimen-0.5.2-rc3/Makefile.am0000644000175000017500000000016110466744417012776 00000000000000SUBDIRS = src pixmaps EXTRA_DIST = acx_pthread.m4 specimen.spec bootstrap BUGS ROADMAP PROFILE STYLE WISHLIST specimen-0.5.2-rc3/Makefile.in0000644000175000017500000004541710575351313013012 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/specimen.spec.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO compile config.guess config.sub depcomp install-sh \ missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acx_pthread.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = specimen.spec SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LASH_FALSE = @HAVE_LASH_FALSE@ HAVE_LASH_TRUE = @HAVE_LASH_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ JACK_MIDI_CFLAGS = @JACK_MIDI_CFLAGS@ JACK_MIDI_LIBS = @JACK_MIDI_LIBS@ LASH_CFLAGS = @LASH_CFLAGS@ LASH_LIBS = @LASH_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNOMECANVAS_CFLAGS = @LIBGNOMECANVAS_CFLAGS@ LIBGNOMECANVAS_LIBS = @LIBGNOMECANVAS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@ LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@ LIBSNDFILE_CFLAGS = @LIBSNDFILE_CFLAGS@ LIBSNDFILE_LIBS = @LIBSNDFILE_LIBS@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OLD_JACK_MIDI_CFLAGS = @OLD_JACK_MIDI_CFLAGS@ OLD_JACK_MIDI_LIBS = @OLD_JACK_MIDI_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PHAT_CFLAGS = @PHAT_CFLAGS@ PHAT_LIBS = @PHAT_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPECIMEN_CFLAGS = @SPECIMEN_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ acx_pthread_config = @acx_pthread_config@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = src pixmaps EXTRA_DIST = acx_pthread.m4 specimen.spec bootstrap BUGS ROADMAP PROFILE STYLE WISHLIST all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) specimen.spec: $(top_builddir)/config.status $(srcdir)/specimen.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ dist-tarZ dist-zip distcheck distclean distclean-generic \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: specimen-0.5.2-rc3/specimen.spec.in0000644000175000017500000000250210467152513014016 00000000000000Summary: A midi controlled audio sampler Name: specimen Version: @VERSION@ Release: 1 License: GPL Group: Applications/Multimedia URL: http://www.gazuga.net Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Requires: libsamplerate libsndfile gtk2 libxml2 alsa-lib jack-audio-connection-kit BuildPrereq: libsamplerate-devel libsndfile-devel gtk2-devel libxml2-devel alsa-lib-devel jack-audio-connection-kit-devel %description Specimen is a midi controlled audio sampler for GNU/Linux systems. It allows you to create music using various sound files, or "samples", in tandem with a midi sequencer. %prep %setup -q %build %configure make %makeinstall %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_bindir}/specimen %dir %{_datadir}/specimen %{_datadir}/specimen/pixmaps/play.png %{_datadir}/specimen/pixmaps/stop.png %{_datadir}/specimen/pixmaps/open.png %{_datadir}/specimen/pixmaps/panic.png %doc AUTHORS ChangeLog COPYING NEWS README TODO %changelog * Sat Jun 12 2004 Pete Bessman - added jack and alsa-lib dependencies * Thu Mar 11 2004 - rebuilt for v0.2.4 * Mon Feb 23 2004 - modified and rebuilt for v0.2.2-1 * Thu Feb 19 2004 Florin Andrei - initial package, v0.2.0-1 specimen-0.5.2-rc3/configure0000755000175000017500000070004710575351312012650 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="configure.ac" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar PKG_CONFIG LASH_CFLAGS LASH_LIBS HAVE_LASH_TRUE HAVE_LASH_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP RANLIB GREP EGREP LIBOBJS build build_cpu build_vendor build_os host host_cpu host_vendor host_os acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS SPECIMEN_CFLAGS GTK_CFLAGS GTK_LIBS LIBXML_CFLAGS LIBXML_LIBS LIBGNOMECANVAS_CFLAGS LIBGNOMECANVAS_LIBS ALSA_CFLAGS ALSA_LIBS LIBSNDFILE_CFLAGS LIBSNDFILE_LIBS LIBSAMPLERATE_CFLAGS LIBSAMPLERATE_LIBS JACK_CFLAGS JACK_LIBS JACK_MIDI_CFLAGS JACK_MIDI_LIBS OLD_JACK_MIDI_CFLAGS OLD_JACK_MIDI_LIBS PHAT_CFLAGS PHAT_LIBS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias PKG_CONFIG LASH_CFLAGS LASH_LIBS CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP GTK_CFLAGS GTK_LIBS LIBXML_CFLAGS LIBXML_LIBS LIBGNOMECANVAS_CFLAGS LIBGNOMECANVAS_LIBS ALSA_CFLAGS ALSA_LIBS LIBSNDFILE_CFLAGS LIBSNDFILE_LIBS LIBSAMPLERATE_CFLAGS LIBSAMPLERATE_LIBS JACK_CFLAGS JACK_LIBS JACK_MIDI_CFLAGS JACK_MIDI_LIBS OLD_JACK_MIDI_CFLAGS OLD_JACK_MIDI_LIBS PHAT_CFLAGS PHAT_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-debug enable debugging information, accepting a performance penalty (default is NO) --disable-lash disable lash support (default is NO) --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Some influential environment variables: PKG_CONFIG path to pkg-config utility LASH_CFLAGS C compiler flags for LASH, overriding pkg-config LASH_LIBS linker flags for LASH, overriding pkg-config CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config LIBXML_CFLAGS C compiler flags for LIBXML, overriding pkg-config LIBXML_LIBS linker flags for LIBXML, overriding pkg-config LIBGNOMECANVAS_CFLAGS C compiler flags for LIBGNOMECANVAS, overriding pkg-config LIBGNOMECANVAS_LIBS linker flags for LIBGNOMECANVAS, overriding pkg-config ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config ALSA_LIBS linker flags for ALSA, overriding pkg-config LIBSNDFILE_CFLAGS C compiler flags for LIBSNDFILE, overriding pkg-config LIBSNDFILE_LIBS linker flags for LIBSNDFILE, overriding pkg-config LIBSAMPLERATE_CFLAGS C compiler flags for LIBSAMPLERATE, overriding pkg-config LIBSAMPLERATE_LIBS linker flags for LIBSAMPLERATE, overriding pkg-config JACK_CFLAGS C compiler flags for JACK, overriding pkg-config JACK_LIBS linker flags for JACK, overriding pkg-config JACK_MIDI_CFLAGS C compiler flags for JACK_MIDI, overriding pkg-config JACK_MIDI_LIBS linker flags for JACK_MIDI, overriding pkg-config OLD_JACK_MIDI_CFLAGS C compiler flags for OLD_JACK_MIDI, overriding pkg-config OLD_JACK_MIDI_LIBS linker flags for OLD_JACK_MIDI, overriding pkg-config PHAT_CFLAGS C compiler flags for PHAT, overriding pkg-config PHAT_LIBS linker flags for PHAT, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.9" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=specimen VERSION=0.5.2-rc3 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers src/config.h" # compilation with_debug="no" # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; if test x$enable_debug = xyes; then with_debug=yes ; fi fi if test x$with_debug = xno; then CFLAGS="-O3" else cat >>confdefs.h <<\_ACEOF #define DEBUG 1 _ACEOF fi # disable lash support? # Check whether --enable-lash was given. if test "${enable_lash+set}" = set; then enableval=$enable_lash; disable_lash="yes" fi # LASH have_lash="no" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { echo "$as_me:$LINENO: checking for LASH" >&5 echo $ECHO_N "checking for LASH... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LASH_CFLAGS"; then pkg_cv_LASH_CFLAGS="$LASH_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lash-1.0 >= 0.5.0\"") >&5 ($PKG_CONFIG --exists --print-errors "lash-1.0 >= 0.5.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LASH_CFLAGS=`$PKG_CONFIG --cflags "lash-1.0 >= 0.5.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LASH_LIBS"; then pkg_cv_LASH_LIBS="$LASH_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lash-1.0 >= 0.5.0\"") >&5 ($PKG_CONFIG --exists --print-errors "lash-1.0 >= 0.5.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LASH_LIBS=`$PKG_CONFIG --libs "lash-1.0 >= 0.5.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LASH_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lash-1.0 >= 0.5.0"` else LASH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lash-1.0 >= 0.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$LASH_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } have_lash="no" elif test $pkg_failed = untried; then have_lash="no" else LASH_CFLAGS=$pkg_cv_LASH_CFLAGS LASH_LIBS=$pkg_cv_LASH_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } have_lash="yes" fi if test "$have_lash" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LASH 1 _ACEOF else { echo "$as_me:$LINENO: WARNING: LASH not found, session support will not be built." >&5 echo "$as_me: WARNING: LASH not found, session support will not be built." >&2;} fi if test "$have_lash" = "yes"; then HAVE_LASH_TRUE= HAVE_LASH_FALSE='#' else HAVE_LASH_TRUE='#' HAVE_LASH_FALSE= fi # standard autoconf checks ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in stdlib.h string.h sys/time.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6; } if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi for ac_func in floor gettimeofday pow strchr strdup do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # pthreads # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then acx_pthread_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6; } if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; } ;; -*) { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; } PTHREAD_CFLAGS="$flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_acx_pthread_config+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$acx_pthread_config"; then ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_acx_pthread_config="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" fi fi acx_pthread_config=$ac_cv_prog_acx_pthread_config if test -n "$acx_pthread_config"; then { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5 echo "${ECHO_T}$acx_pthread_config" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; } PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then acx_pthread_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6; } if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int attr=PTHREAD_CREATE_JOINABLE; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ok=PTHREAD_CREATE_JOINABLE else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=unknown fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test x"$ok" = xunknown; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int attr=PTHREAD_CREATE_UNDETACHED; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ok=PTHREAD_CREATE_UNDETACHED else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=unknown fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then cat >>confdefs.h <<\_ACEOF #define PTHREAD_CREATE_JOINABLE $ok _ACEOF fi { echo "$as_me:$LINENO: result: ${ok}" >&5 echo "${ECHO_T}${ok}" >&6; } if test x"$ok" = xunknown; then { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} fi { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; } flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac { echo "$as_me:$LINENO: result: ${flag}" >&5 echo "${ECHO_T}${flag}" >&6; } if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r # Extract the first word of "cc_r", so it can be a program name with args. set dummy cc_r; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_PTHREAD_CC="cc_r" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 echo "${ECHO_T}$PTHREAD_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else PTHREAD_CC="$CC" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD 1 _ACEOF : else acx_pthread_ok=no fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu SPECIMEN_CFLAGS="-Wall -Werror" CFLAGS="$SPECIMEN_CFLAGS $CFLAGS" config_error="no" # gtk pkg_failed=no { echo "$as_me:$LINENO: checking for GTK" >&5 echo $ECHO_N "checking for GTK... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0"` else GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="yes" elif test $pkg_failed = untried; then config_error="yes" else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_GTK="yes" fi # libxml pkg_failed=no { echo "$as_me:$LINENO: checking for LIBXML" >&5 echo $ECHO_N "checking for LIBXML... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LIBXML_CFLAGS"; then pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LIBXML_LIBS"; then pkg_cv_LIBXML_LIBS="$LIBXML_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"` else LIBXML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$LIBXML_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="yes" elif test $pkg_failed = untried; then config_error="yes" else LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS LIBXML_LIBS=$pkg_cv_LIBXML_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_LIBXML="yes" fi # libgnomecanvas pkg_failed=no { echo "$as_me:$LINENO: checking for LIBGNOMECANVAS" >&5 echo $ECHO_N "checking for LIBGNOMECANVAS... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LIBGNOMECANVAS_CFLAGS"; then pkg_cv_LIBGNOMECANVAS_CFLAGS="$LIBGNOMECANVAS_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libgnomecanvas-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libgnomecanvas-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBGNOMECANVAS_CFLAGS=`$PKG_CONFIG --cflags "libgnomecanvas-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LIBGNOMECANVAS_LIBS"; then pkg_cv_LIBGNOMECANVAS_LIBS="$LIBGNOMECANVAS_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libgnomecanvas-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libgnomecanvas-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBGNOMECANVAS_LIBS=`$PKG_CONFIG --libs "libgnomecanvas-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBGNOMECANVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libgnomecanvas-2.0"` else LIBGNOMECANVAS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libgnomecanvas-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$LIBGNOMECANVAS_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="yes" elif test $pkg_failed = untried; then config_error="yes" else LIBGNOMECANVAS_CFLAGS=$pkg_cv_LIBGNOMECANVAS_CFLAGS LIBGNOMECANVAS_LIBS=$pkg_cv_LIBGNOMECANVAS_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_LIBGNOMECANVAS="yes" fi # alsa pkg_failed=no { echo "$as_me:$LINENO: checking for ALSA" >&5 echo $ECHO_N "checking for ALSA... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$ALSA_CFLAGS"; then pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$ALSA_LIBS"; then pkg_cv_ALSA_LIBS="$ALSA_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "alsa"` else ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "alsa"` fi # Put the nasty error message in config.log where it belongs echo "$ALSA_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="yes" elif test $pkg_failed = untried; then config_error="yes" else ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS ALSA_LIBS=$pkg_cv_ALSA_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_ALSA="yes" fi # libsndfile pkg_failed=no { echo "$as_me:$LINENO: checking for LIBSNDFILE" >&5 echo $ECHO_N "checking for LIBSNDFILE... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LIBSNDFILE_CFLAGS"; then pkg_cv_LIBSNDFILE_CFLAGS="$LIBSNDFILE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"sndfile\"") >&5 ($PKG_CONFIG --exists --print-errors "sndfile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBSNDFILE_CFLAGS=`$PKG_CONFIG --cflags "sndfile" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LIBSNDFILE_LIBS"; then pkg_cv_LIBSNDFILE_LIBS="$LIBSNDFILE_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"sndfile\"") >&5 ($PKG_CONFIG --exists --print-errors "sndfile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBSNDFILE_LIBS=`$PKG_CONFIG --libs "sndfile" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBSNDFILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sndfile"` else LIBSNDFILE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sndfile"` fi # Put the nasty error message in config.log where it belongs echo "$LIBSNDFILE_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="yes" elif test $pkg_failed = untried; then config_error="yes" else LIBSNDFILE_CFLAGS=$pkg_cv_LIBSNDFILE_CFLAGS LIBSNDFILE_LIBS=$pkg_cv_LIBSNDFILE_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_LIBSNDFILE="yes" fi # libsamplerate pkg_failed=no { echo "$as_me:$LINENO: checking for LIBSAMPLERATE" >&5 echo $ECHO_N "checking for LIBSAMPLERATE... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LIBSAMPLERATE_CFLAGS"; then pkg_cv_LIBSAMPLERATE_CFLAGS="$LIBSAMPLERATE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"samplerate\"") >&5 ($PKG_CONFIG --exists --print-errors "samplerate") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBSAMPLERATE_CFLAGS=`$PKG_CONFIG --cflags "samplerate" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LIBSAMPLERATE_LIBS"; then pkg_cv_LIBSAMPLERATE_LIBS="$LIBSAMPLERATE_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"samplerate\"") >&5 ($PKG_CONFIG --exists --print-errors "samplerate") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LIBSAMPLERATE_LIBS=`$PKG_CONFIG --libs "samplerate" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBSAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "samplerate"` else LIBSAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "samplerate"` fi # Put the nasty error message in config.log where it belongs echo "$LIBSAMPLERATE_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="yes" elif test $pkg_failed = untried; then config_error="yes" else LIBSAMPLERATE_CFLAGS=$pkg_cv_LIBSAMPLERATE_CFLAGS LIBSAMPLERATE_LIBS=$pkg_cv_LIBSAMPLERATE_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_LIBSAMPLERATE="yes" fi # jack pkg_failed=no { echo "$as_me:$LINENO: checking for JACK" >&5 echo $ECHO_N "checking for JACK... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$JACK_CFLAGS"; then pkg_cv_JACK_CFLAGS="$JACK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"jack >= 0.99.0\"") >&5 ($PKG_CONFIG --exists --print-errors "jack >= 0.99.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags "jack >= 0.99.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$JACK_LIBS"; then pkg_cv_JACK_LIBS="$JACK_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"jack >= 0.99.0\"") >&5 ($PKG_CONFIG --exists --print-errors "jack >= 0.99.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs "jack >= 0.99.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "jack >= 0.99.0"` else JACK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "jack >= 0.99.0"` fi # Put the nasty error message in config.log where it belongs echo "$JACK_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="yes" elif test $pkg_failed = untried; then config_error="yes" else JACK_CFLAGS=$pkg_cv_JACK_CFLAGS JACK_LIBS=$pkg_cv_JACK_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_JACK="yes" fi if test "x$HAVE_JACK" = xyes ; then pkg_failed=no { echo "$as_me:$LINENO: checking for JACK_MIDI" >&5 echo $ECHO_N "checking for JACK_MIDI... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$JACK_MIDI_CFLAGS"; then pkg_cv_JACK_MIDI_CFLAGS="$JACK_MIDI_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"jack >= 0.102.27\"") >&5 ($PKG_CONFIG --exists --print-errors "jack >= 0.102.27") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_JACK_MIDI_CFLAGS=`$PKG_CONFIG --cflags "jack >= 0.102.27" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$JACK_MIDI_LIBS"; then pkg_cv_JACK_MIDI_LIBS="$JACK_MIDI_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"jack >= 0.102.27\"") >&5 ($PKG_CONFIG --exists --print-errors "jack >= 0.102.27") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_JACK_MIDI_LIBS=`$PKG_CONFIG --libs "jack >= 0.102.27" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then JACK_MIDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "jack >= 0.102.27"` else JACK_MIDI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "jack >= 0.102.27"` fi # Put the nasty error message in config.log where it belongs echo "$JACK_MIDI_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="no" elif test $pkg_failed = untried; then config_error="no" else JACK_MIDI_CFLAGS=$pkg_cv_JACK_MIDI_CFLAGS JACK_MIDI_LIBS=$pkg_cv_JACK_MIDI_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_JACK_MIDI="yes" fi if test "x$HAVE_JACK_MIDI" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_JACK_MIDI _ACEOF else pkg_failed=no { echo "$as_me:$LINENO: checking for OLD_JACK_MIDI" >&5 echo $ECHO_N "checking for OLD_JACK_MIDI... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$OLD_JACK_MIDI_CFLAGS"; then pkg_cv_OLD_JACK_MIDI_CFLAGS="$OLD_JACK_MIDI_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"jack >= 0.102.0\"") >&5 ($PKG_CONFIG --exists --print-errors "jack >= 0.102.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_OLD_JACK_MIDI_CFLAGS=`$PKG_CONFIG --cflags "jack >= 0.102.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$OLD_JACK_MIDI_LIBS"; then pkg_cv_OLD_JACK_MIDI_LIBS="$OLD_JACK_MIDI_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"jack >= 0.102.0\"") >&5 ($PKG_CONFIG --exists --print-errors "jack >= 0.102.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_OLD_JACK_MIDI_LIBS=`$PKG_CONFIG --libs "jack >= 0.102.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then OLD_JACK_MIDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "jack >= 0.102.0"` else OLD_JACK_MIDI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "jack >= 0.102.0"` fi # Put the nasty error message in config.log where it belongs echo "$OLD_JACK_MIDI_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="no" elif test $pkg_failed = untried; then config_error="no" else OLD_JACK_MIDI_CFLAGS=$pkg_cv_OLD_JACK_MIDI_CFLAGS OLD_JACK_MIDI_LIBS=$pkg_cv_OLD_JACK_MIDI_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_OLD_JACK_MIDI="yes" fi if test "x$HAVE_OLD_JACK_MIDI" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OLD_JACK_MIDI _ACEOF fi fi fi # phat pkg_failed=no { echo "$as_me:$LINENO: checking for PHAT" >&5 echo $ECHO_N "checking for PHAT... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$PHAT_CFLAGS"; then pkg_cv_PHAT_CFLAGS="$PHAT_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"phat >= 0.3.1\"") >&5 ($PKG_CONFIG --exists --print-errors "phat >= 0.3.1") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PHAT_CFLAGS=`$PKG_CONFIG --cflags "phat >= 0.3.1" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PHAT_LIBS"; then pkg_cv_PHAT_LIBS="$PHAT_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"phat >= 0.3.1\"") >&5 ($PKG_CONFIG --exists --print-errors "phat >= 0.3.1") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PHAT_LIBS=`$PKG_CONFIG --libs "phat >= 0.3.1" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PHAT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "phat >= 0.3.1"` else PHAT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "phat >= 0.3.1"` fi # Put the nasty error message in config.log where it belongs echo "$PHAT_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="yes" elif test $pkg_failed = untried; then config_error="yes" else PHAT_CFLAGS=$pkg_cv_PHAT_CFLAGS PHAT_LIBS=$pkg_cv_PHAT_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_PHAT="yes" fi # optional lash if test x$disable_lash != xyes; then pkg_failed=no { echo "$as_me:$LINENO: checking for LASH" >&5 echo $ECHO_N "checking for LASH... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$LASH_CFLAGS"; then pkg_cv_LASH_CFLAGS="$LASH_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lash-1.0 >= 0.5.0\"") >&5 ($PKG_CONFIG --exists --print-errors "lash-1.0 >= 0.5.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LASH_CFLAGS=`$PKG_CONFIG --cflags "lash-1.0 >= 0.5.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$LASH_LIBS"; then pkg_cv_LASH_LIBS="$LASH_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"lash-1.0 >= 0.5.0\"") >&5 ($PKG_CONFIG --exists --print-errors "lash-1.0 >= 0.5.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_LASH_LIBS=`$PKG_CONFIG --libs "lash-1.0 >= 0.5.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LASH_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lash-1.0 >= 0.5.0"` else LASH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lash-1.0 >= 0.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$LASH_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } config_error="no" elif test $pkg_failed = untried; then config_error="no" else LASH_CFLAGS=$pkg_cv_LASH_CFLAGS LASH_LIBS=$pkg_cv_LASH_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_LASH="yes" fi if test "x$HAVE_LASH" = xyes ; then cat >>confdefs.h <<\_ACEOF #define HAVE_LASH _ACEOF else { echo "$as_me:$LINENO: WARNING: LASH not found, session support will not be built." >&5 echo "$as_me: WARNING: LASH not found, session support will not be built." >&2;} fi fi CC="$PTHREAD_CC" # print build summary # are we good to go? if test x$config_error = "xyes"; then { echo "$as_me:$LINENO: result: *** ERROR: the following required packages are missing *** " >&5 echo "${ECHO_T} *** ERROR: the following required packages are missing *** " >&6; } if test "x$HAVE_GTK" != xyes ; then { echo "$as_me:$LINENO: result: *** GTK+ version 2.2.x or greater, available from : http://www.gtk.org/ " >&5 echo "${ECHO_T} *** GTK+ version 2.2.x or greater, available from : http://www.gtk.org/ " >&6; } fi if test "x$HAVE_LIBGNOMECANVAS" != xyes ; then { echo "$as_me:$LINENO: result: *** libgnomecanvas, available from : http://ftp.gnome.org/pub/gnome/sources/libgnomecanvas/ " >&5 echo "${ECHO_T} *** libgnomecanvas, available from : http://ftp.gnome.org/pub/gnome/sources/libgnomecanvas/ " >&6; } fi if test "x$HAVE_PHAT" != xyes ; then { echo "$as_me:$LINENO: result: *** Phat 0.4.0 or greater, available from: http://phat.berlios.de/ " >&5 echo "${ECHO_T} *** Phat 0.4.0 or greater, available from: http://phat.berlios.de/ " >&6; } fi if test "x$HAVE_JACK" != xyes ; then { echo "$as_me:$LINENO: result: *** JACK 0.99.0 or greater, available from: http://www.jackaudio.org/ " >&5 echo "${ECHO_T} *** JACK 0.99.0 or greater, available from: http://www.jackaudio.org/ " >&6; } fi if test "x$HAVE_LIBSAMPLERATE" != xyes ; then { echo "$as_me:$LINENO: result: *** libsamplerate, available from: http://www.mega-nerd.com/SRC/ " >&5 echo "${ECHO_T} *** libsamplerate, available from: http://www.mega-nerd.com/SRC/ " >&6; } fi if test "x$HAVE_LIBSNDFILE" != xyes ; then { echo "$as_me:$LINENO: result: *** libsndfile, available from: http://www.mega-nerd.com/libsndfile/ " >&5 echo "${ECHO_T} *** libsndfile, available from: http://www.mega-nerd.com/libsndfile/ " >&6; } fi if test "x$HAVE_LIBXML" != xyes ; then { echo "$as_me:$LINENO: result: *** libxml2, available from: http://ftp.gnome.org/pub/gnome/sources/libxml2/ " >&5 echo "${ECHO_T} *** libxml2, available from: http://ftp.gnome.org/pub/gnome/sources/libxml2/ " >&6; } fi if test x$disable_lash != xyes; then if test "x$HAVE_LASH" != xyes ; then { echo "$as_me:$LINENO: result: *** LASH, available from: http://savannah.nongnu.org/projects/lash Note: you may get this message if jack is not installed since lash requires jack. To disable lash support, add --disable-lash to your configure options." >&5 echo "${ECHO_T} *** LASH, available from: http://savannah.nongnu.org/projects/lash Note: you may get this message if jack is not installed since lash requires jack. To disable lash support, add --disable-lash to your configure options." >&6; } fi fi { echo "$as_me:$LINENO: result: Please ensure that all the above software is properly installed before running configure again. To do this, use your package manager to install the correct versions of the binary AND development (dev) packages or, download them from the above link(s) and build and install them from source manually. " >&5 echo "${ECHO_T} Please ensure that all the above software is properly installed before running configure again. To do this, use your package manager to install the correct versions of the binary AND development (dev) packages or, download them from the above link(s) and build and install them from source manually. " >&6; } { { echo "$as_me:$LINENO: error: ************************************************* see ./config.log for full details. " >&5 echo "$as_me: error: ************************************************* see ./config.log for full details. " >&2;} { (exit 1); exit 1; }; } else ac_config_files="$ac_config_files Makefile pixmaps/Makefile src/Makefile src/gui/Makefile specimen.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${HAVE_LASH_TRUE}" && test -z "${HAVE_LASH_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_LASH\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_LASH\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/gui/Makefile") CONFIG_FILES="$CONFIG_FILES src/gui/Makefile" ;; "specimen.spec") CONFIG_FILES="$CONFIG_FILES specimen.spec" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim LASH_CFLAGS!$LASH_CFLAGS$ac_delim LASH_LIBS!$LASH_LIBS$ac_delim HAVE_LASH_TRUE!$HAVE_LASH_TRUE$ac_delim HAVE_LASH_FALSE!$HAVE_LASH_FALSE$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim RANLIB!$RANLIB$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LIBOBJS!$LIBOBJS$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim acx_pthread_config!$acx_pthread_config$ac_delim PTHREAD_CC!$PTHREAD_CC$ac_delim PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim SPECIMEN_CFLAGS!$SPECIMEN_CFLAGS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF GTK_CFLAGS!$GTK_CFLAGS$ac_delim GTK_LIBS!$GTK_LIBS$ac_delim LIBXML_CFLAGS!$LIBXML_CFLAGS$ac_delim LIBXML_LIBS!$LIBXML_LIBS$ac_delim LIBGNOMECANVAS_CFLAGS!$LIBGNOMECANVAS_CFLAGS$ac_delim LIBGNOMECANVAS_LIBS!$LIBGNOMECANVAS_LIBS$ac_delim ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim ALSA_LIBS!$ALSA_LIBS$ac_delim LIBSNDFILE_CFLAGS!$LIBSNDFILE_CFLAGS$ac_delim LIBSNDFILE_LIBS!$LIBSNDFILE_LIBS$ac_delim LIBSAMPLERATE_CFLAGS!$LIBSAMPLERATE_CFLAGS$ac_delim LIBSAMPLERATE_LIBS!$LIBSAMPLERATE_LIBS$ac_delim JACK_CFLAGS!$JACK_CFLAGS$ac_delim JACK_LIBS!$JACK_LIBS$ac_delim JACK_MIDI_CFLAGS!$JACK_MIDI_CFLAGS$ac_delim JACK_MIDI_LIBS!$JACK_MIDI_LIBS$ac_delim OLD_JACK_MIDI_CFLAGS!$OLD_JACK_MIDI_CFLAGS$ac_delim OLD_JACK_MIDI_LIBS!$OLD_JACK_MIDI_LIBS$ac_delim PHAT_CFLAGS!$PHAT_CFLAGS$ac_delim PHAT_LIBS!$PHAT_LIBS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| . 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save echo echo " BUILD SUMMARY" echo " =============" echo " Compiler full flags: $CFLAGS" echo -n " Build type: " if test x$with_debug = xyes; then echo "debugging" else echo "optimized" fi echo -n " Jack midi support: " if test "x$HAVE_JACK_MIDI" = xyes; then echo "yes with jack >= 0.102.27" elif test "x$HAVE_OLD_JACK_MIDI" = xyes; then echo "yes with jack >= 0.102.0 and < 0.102.27" else echo "no" fi echo echo # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi fi specimen-0.5.2-rc3/AUTHORS0000644000175000017500000000266710575117614012021 00000000000000-*- text -*- * Pete Bessman Founder, primary developer untill 2005-09-14 * Alexander modified midi.c to treat note-on events with velocity of 0x00 as note-offs. * Dave Robillard Lash support. Removed Gnome-ui requirement for about dialog. * David R. Clark Invaluable testing, feedback, and discussion, as well as some nifty sample generating programs. * Dimitry Baikov Added support for MIDI CC events. Update to jack_midi API. * Lars Luthman Jack-midi implementation. * Loki Davison Sync code, and initial implementation of lots of stuff which got lost during The Cleansing. Responsible for convincing ninjadroid to keep on hacking. * Nedko Arnaudov Made specimen window resizeable. * peter Rewrote the build system during the year of limbo. * Sacha Berger updated beef.c to reflect newly gained parameters. * Thorsten Wilms UI advice, and designed the fansliders used extensively in the GUI. * Torben Hohn was an immense help to Pete in optimizing the waveform code (and he pointed out that it needed to be done in the first place). * Eric Dantan Rzewnicki maintainer specimen-0.5.2-rc3/COPYING0000644000175000017500000004311010466727727012003 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. specimen-0.5.2-rc3/ChangeLog0000644000175000017500000010637110557730621012517 000000000000002007-01-30 Eric Dantan Rzewnicki * added specimen.desktop for gnome/kde users. * change to jackdriver.c for jack midi api update. * changed jackdriver.c to use jack_client_open() instead of jack_client_new(). This allows multiple specimen instances. * added command line options for bank to load and jack client name as submitted by Daniele Torelli . 2006-08-11 Eric Dantan Rzewnicki * configure.ac, Makefile.am, src/Makefile.am, src/gui/Makefile.am, pixmaps/Makefile.am, bootstrap, autogen.sh (symlink to bootstrap), specimen.spec.in: changes merged from "0.5.1.1" branch representing paugh's reworking of the build system. * configure.ac: changed phat check to version 0.3.1. Need to check with paugh about why this was changed from -devel tarball. * src/jackdriver.c, src/mixer.h, src/mixer.c: applied jack-midi patch from Lars Luthman. NOTE: this should probably be made conditional on a check for a jack version with jack-midi support. * src/lfo.h, src/driver.h, src/lashdriver.c, src/specimen.c, src/gui/Makefile.in, src/gui/patchlist.h, src/gui/Makefile.am, src/gui/gui.h, src/patch.h, src/lashdriver.h, src/specimen.h, src/Makefile.am, configure.ac: applied specimen-lash.patch from drobilla (I think ... or was it Loki? need to clarify this). The pertinent changes are in lashdriver.[ch], specimen.c and the build system. The other changes are all cosmetic. There may be some slight confusion with the build system since this patch was made before paugh's build system rework. 2005-09-14 Pete Bessman * src/midi.c (open_seq): Renamed sequencer client to "specimen" to match up with the JACK client name. Removed old LADCCA stuff that was lying around. 2005-08-06 Pete Bessman * src/gui/gui.c (create_about): Fixed the author entry for me in the about box. It was missing the trailing >. Chris thinks this is a very big problem, and was quite concerned, and had a discussion with me at great length on the matter. This lead into a speech about my direction in life, and his fear that my aimless maunderings will find me a whisky drenched hobo in orleans. So I stabbed him. That's OK. He's fat, and fat people don't have the same rights as you and I. In fact, I propose using fat people as an alternative fuel source. Think about it. We can have concentration camps to make the authoritarians happy, and we can burn the fat people to make the nanny staters happy, and we have a sustainable and relatively clean (or at least, amusing) source of energy to please the hippies. Plus, we eliminate the need for any sort of relations with despotic middle eastern countries. Which pretty much means that the next time johnny jihad bombs something, the leftists are going to implode because they simply will not be able to fashion any sort of apologia for our assailants that even an autistic monkey could be persuaded to accept as plausible. ... I fucked your mom last night. 2005-08-02 Pete Bessman * src/mixer.c (preview_render): use DEFAULT_VOLUME * src/gui/sample-editor.c (cb_play): replace horribly broken velocity of 127 with 1.0 * src/patch.c: fixed cuts (they got broken when I fixed envelope noteoffs for singleshots) 2005-07-31 Pete Bessman * src/gui/gui.c: added an about dialog. 2005-07-27 Pete Bessman * src/patch.c: fixed so that singleshot patches will still release any envelopes they have turned on. 2005-07-23 Pete Bessman * src/gui/gui.c (cb_menu_patch_add): new patches now have same channel as current one. * src/gui/midisection.c (midi_section_set_patch): added code to center keyboard around root note. 2005-07-18 Pete Bessman * src/beef.c (beef_write): added a missing cast for xmlChar (once again, thanks to Suva) * configure.ac: added libgnomecanvas-2.0 check for pkg-config (thanks to Suva for pointing out it's abscence!) 2005-07-12 Pete Bessman * src/gui/patchsection.c: yanked out play and panic buttons. * src/gui/gui.c: added a help menu and put the panic button (STFU!) in there. 2005-07-09 Pete Bessman * src/gui/channelsection.c, channelsection.h: split out from the midisection for GUI alignment. * README: updated to reflect new stuff. * src/patch.c (patch_dump): changed sorting to go by channels and then note. * src/gui/patchlist.c (patch_list_update): can now select either by index or patch id; updated invocations to reflect change. 2005-07-08 Pete Bessman * src/gui/midisection.c: added code for setting root note and range through keyboard. 2005-07-06 Pete Bessman * src/patch.c (patch_trigger_with_id): verify note is in range before accepting. * src/gui/midisection.c, midisection.h, gui.c: added new section for setting midi params. 2005-07-03 Pete Bessman * src/gui/patchsection.c: changed default title to the more appropriate "empty bank." * src/gui/gui.c (gui_refresh): added function. * src/specimen.c (main): added ability to load bank from cmdline. 2005-06-17 Pete Bessman * src/gui/patchsection.c, voicetab.c, filtertab.c: use g_timeout_add() instead of g_idle_add() for refresh functions, and set to newly defined GUI_REFRESH_TIMEOUT interval created in gui.h 2005-06-04 Pete Bessman * src/patch.c (filter): convert freso to logreso via lin_to_log() and apply. (patch_create): use DEFAULT_VOLUME for new patch volumes. * src/specimen.h (DEFAULT_VOLUME): renamed DEFVOL to DEFAULT_VOLUME and modified source tree to reflect change. * src/mixer.c (mixer_mixdown): convert 'volume' to 'logvol' via lin_to_log() and apply that to samples. * src/patch.c (gain): convert 'vol' to 'logvol' via lin_to_log() and apply that to samples. * src/mixer.c (mixer_init): set volume to DEFAULT_VOLUME. (mixer_mixdown): renamed 'offset' to 'write' for clarity. (mixer_flush): added code to clear preview. * src/maths.c: added lin_to_log() and log_to_lin() to convert back and forth between linear and logarithmic volumes. 2004-11-30 Pete Bessman * src/patch.c (prepare_pitch): fixed a bug which prevented portamento from working properly when a sample had been tuned. 2004-11-22 Pete Bessman * src/gui/patchsection.c (play_cb): fixed play button to use velocity of 1.0, not 127. 2004-10-09 Pete Bessman * src/gui/mastersection.c (master_section_init): added a bit of vertical padding between the section and the contents beneath it. 2004-10-08 Pete Bessman * src/gui/lfotab.c (lfo_tab_init): set lower value of sync sliderbutton to .25. * src/gui/*: updated to reflect adjustments to PhatSliderButton API change. 2004-10-06 Pete Bessman * applied c0ffs patches to move jitter correction code to mixer 2004-10-03 Pete Bessman * src/gui/envelopetab.c: Fixed locking of amount fan for volume envelope. * src/gui/patchsection.c: Added patch title display and panic button. * src/gui/gui.c: Use PatchList to control our current patch now. * src/gui/patchlist.c: Created the PatchList widget, a better way to keep track of patches. * src/gui/patchsection.c: Replaced patch_section_update() with patch_section_set_patch(). * src/beef.c: Account for monophonic and legato properties. * src/gui/voicetab.c: Implemented legato switch. * src/patch.c: Implemented legato 2004-10-02 Pete Bessman * src/gui/voicetab.c: Implemented monophonic switch. * src/gui/waveform.c: Now use an orange color to draw loop points. * src/patch.c: Implemented manual declicking for patches without volume envelopes. Modified to handle LFO and Envelope switching. Implemented monophonic patches. * src/gui/lfotab.c: Implemented switch. * src/gui/envelopetab.c: Implemented switch. * src/gui/envelopetab.c, envelopetab.h: Adopt same behavior as LfoTab when adjusting pitch modulation. Enable the on/off check box. * src/beef.c: Added pitch_steps and monophonic properties. 2004-10-01 Pete Bessman * src/gui/gui.c (gui_init): Added (...) to end of Add, Rename, and Settings menu entries. * src/gui/filtertab.c (filter_tab_destroy): remove refresh() from idle loop * src/gui/voicetab.c (voice_tab_destroy): remove refresh() from idle loop * src/gui/patchsection.c (play_cb): changed to handle [button|key]-press-event (stop_cb): changed to handle [button|key]-press-event (connect): changed to connect [play|stop]_cb to [button|key]-press-event (patch_section_destroy): remove refresh() from idle loop 2004-09-30 Pete Bessman * src/gui/voicetab.c, patchsection.c, filtertab.c (refresh): added simple redisplay code so you can see the effects of MIDI CCs. * src/patch.c, patch.h, control.h (new), midi.c, mixer.c mixer.h: merged in c0ff's MIDI CC patch. * src/midi.c (calc_bpm): use errmsg() to print cop-out message * src/Makefile.am (specimen_SOURCES): added control.h 2004-09-29 Pete Bessman * src/patch.c (patch_duplicate): added code to store/restore lfo tables * src/gui/*: removed all old and unused files, finished up new interface. wootzor to the max0r! 2004-09-28 Pete Bessman * src/gui/*: added hooks to new gui elements to read parameters from the engine 2004-09-27 Pete Bessman * configure.ac: removed checks for ladcca and gtk-2.4, and removed their use throughout the code * gui.c: removed bank builder and piano, added calls for new GUI components. * bank-builder.*, piano.*, leash.*: DELETED! * *tab.*, *secion.*: created new GUI components. Not hooked up yet. 2004-08-06 Pete Bessman * beef.c: pitch is now saved/loaded, thanks to Rocco (linuxmedia4@netscape.com) for pointing out that it wasn't previously. 2004-07-22 Pete Bessman * beef.c: committed changed version by Sacha Berger (sacha@woanders.de) which accounts for new patch parameters. 2004-07-01 Pete Bessman * waveform.c: fixed the drawing to use the same concept behind Brensenham's algorithm for better accuracy, optimized and cleaned a bit. 2004-06-28 Pete Bessman * ROADMAP: updated to reflect Thorsten's GUI contributions; 0.9.X is now an audit/pre-release phase. 2004-06-21 Pete Bessman * lfo.c: restructured as a general class, share LFO tables now for more memory efficiency. Added "positive" attribute, which constrains output from [0, 1] as opposed to [-1, 1] when set. * patch.c: added lfos at the voice level and global level on a per-parameter basis. Added special handlers for LFO and ADSR amount setters for pitch, and added necessary code to advance(), so that the amount parameter for pitch modulators effectively sets the pitch that is reached. * lfo-settings.c, lfo-settings.h: removed from source tree * param-settings.c: added controls for LFO manipulation, adjusted amount widgets and code to work intuitively with the user (displaying amount in half-steps). * release: 0.4.0, "Smooth" ...braaaaaaaiiinssss... gah... 2004-06-19 Pete Bessman * patch.c: added pitch setters/getters, and pitch_steps setters getters. Use pitch and pitch_steps to implement tuning. Added setters/getters for delay and hold phases of envelopes, modified patch_create() to initialize those values. * gui.c: added controls for pitch and pitch_steps * adsr.c: added support for delay and hold phases * param-settings.c: increased precision of control for spinboxes, added controls for delay and hold 2004-06-17 Pete Bessman * param-settings.c: added pitch option * patch.c: pitch is a parameter now, added pitchenv to PatchVoice and pitch to Patch, modified advance() to handle pitch modulation. Added properties necessary for portamento to work right to PatchVoice and Patch and created setters/getters. Implemented portamento in patch_trigger_patch() and advance(). * gui.c: changed starting master volume value to 80, added hooks for porta-params dialog * porta-params.c, porta-params.h: created the portamento settings dialog 2004-06-15 Pete Bessman * gui.c: renamed "chokes" back to "cuts." It would be appear that neither naming scheme is terribly intuitive. That being the case, I'll go for the shorter one. * patch.c: revised the order of volume scaling operations in gain(); we now add the LFO value first, then apply the envelopes, then apply velocity. 2004-06-14 Pete Bessman * sample.c: converted to a full-blown object * patch.c, mixer.c: adjustments to accomodate new sample.c * patch.c: reduced maximum number of patches to 32 and polyphony to 8. This should tide us over until we have a global polyphony limit. Added a temporary table to hold LFO values during mixdown process which render subroutines reference. Added a hook int driver_set_buffersize() to resize these tables when/if the buffersize changes. * driver.h, driver.c: added driver_set_buffersize() * mixer.c: removed lfo control and went back to "old" way of calling patch_render with full block of frames. 2004-06-13 Pete Bessman * configure.ac, Makefile.am: total rewrite, cleaning up everything and removing redundancy between Makefiles. Builds that don't specify --enable-debug are also built with -O3 and without -g. * pixmaps: created a new dir for the pixmaps and a makefile to manage them * play.png, stop.png: redid these; they're prettier and smaller now. sodipodi > all * specimen.h: changed the debug() macro to expand to nothing if DEBUG isn't defined. This should save us a handful of cycles during optimized builds for free. * patch.c: added patch_init/shutdown(), acting as a constructor/destructor pair. Created patch_lock() functions and replaced explicit pthread_mutex_lock() calls with them. Bugfixed patch_create() so that new patches start of with PATCH_MIN_RELEASE (lest the wrath of clicky samples be upon the unwitting user). * mixer.c: added mixer_init/shutdown(), acting as a constructor/destructor pair. Added a mutex to the MixerPreview structure and replaced locks on the sample mutex with locks on this new mutex. * sample.h, sample.c: removed mutex from Sample structure. Having it take care of locking for us was rather unhelpful. 2004-06-12 Pete Bessman * alsadriver.c: removed G_MAXINT* and replaced with hexadecimal constants. The G_MAXINT* features are only available in glib-2.4 which isn't in wide enough use among LADers yet. * configure.ac: ripped out gthreads and added a check for pthreads (their usage is cleaner than with gthreads). * TODO, ROADMAP: updated these files at long last. 2004-06-11 Pete Bessman * sync.h, sync.c: added sync_set_method() * alsadriver.c: calls sync_set_method() with SYNC_METHOD_MIDI whenever it's config frame is shown. Added code to restore settings to their internal values if you close the audio-settings window or switch to the jackdriver and back without actually ever starting the alsa driver. device is now stored with a GString. Status is now stored with an atomic variable instead of a mutex (we can get away with it... but why am I putting so much effort into a doomed module). * jackdriver.c: added a checkbox to use jack_transport syncing, processed on cofig_frame shows. Improved the transport code to handle tempo changes (necessary in order to work with the jack_transport shell, possibly necessary in general, a good idea no matter what). * patch.c: fixed a bug in patch_set_samplerate() where changes wouldn't take effect until the next call. * Released version 0.3.0, "Leading the Strike;" can't deny the users LFOs any longer. 2004-06-10 Pete Bessman * lfo.c: changed lfo_advace() to use cubic interpolation * mixer.c: changed FRAMES to 1 (these things should be run-time configurable) * patch.c: fixed a bug in patch_get_env_release() where the value returned would always be zero. 2004-06-09 Pete Bessman * global: made (mostly) sure the rules laid down in STYLE are followed (tons of fun) * jackdriver.h, alsadriver.h: removed these files and replaced them with extern references in driver.c * jackdriver.c, alsadriver.h: removed custom *msg code, added driver type to initializing message * specimen.h: modified *msg macros to print __FUNCTION__ * patch.c: fixed an *insidious* bug in patch_render_patch() that only manifests itself when switching samples. If the new sample has fewer frames than the original sample, and there are one or more active voices with frame-positions greater than the new number of frames, we get a good-ol-fashioned segfault when we attempt to render those voices. Took about an hour of focused ninja debugging, could have been worse I suppose. The solution was to add a check in patch_render_patch() to make sure that voices which exhibit such pathological behavior are ditched. * patch.c: created functions patch_flush() and patch_flush_all() 2004-06-08 Pete Bessman * driver.c, driver.h: created a new driver interface * mixer.c, patch.c, ticks.c: changes to accomodate new driver interface (the samplerate must be stored and cannot be explicitly retrieved) * jackdriver.c, patch.c: driver_set_samplerate() now called whenever driver is successfully started and if the samplerate changes * maths.c, maths.h: cerp() now demands an 8 bit fractional position value, rather than shifting a 32bit one * patch.c: replaced bit-twiddling for hex in expression for the maximum value of guint32 in patch_trigger_patch(), changed to accomodate new math.h * Makefile.am, gui/Makefile.am: added -Werror to CFLAGS 2004-06-06 Pete Bessman * lfo.c: added a minor optimization to lfo_advance() * lfo-settings.c: increased the maximum allowable frequency to 20 * patch.c: created a new function, patch_set_sample_rate(), removed patch_sample_reload_all() * audio-settings.c: adjusted to use patch_set_sample_rate() * globally: did some style cleanups to ensure consistency * STYLE: a new file to hold the style guidelines * PROFILE: a new file to hold the most recent gprof performance profile. We need a streamlined way to do a profiling build. * gprof-helper.c: ripped this file from the net to make gprof usable in multithreaded environments. 2004-06-06 Loki Davison * lfo-settings.c: added ui for lfo sync. 2004-06-05 Pete Bessman * patch.c: fixed a few bugs in the lfo handling code * lfo.c: changes to allow for tempo syncing * lfo-settings.c: tweaked Loki's lfo-sync code * midi.c: a few cleanups (ph33r). ALSA midi syncing doesn't seem to work on 2.6.6 kernels, added a check for FPEs (should have been there anyway). * jackdriver.c: redid the jack syncing code (sorry Loki) 2004-06-04 Loki Davison * sync.c, sync.h, jack-driver.c, midi.c: created midi/jack syncing code 2004-06-04 Pete Bessman * lfo.c, lfo.h: initial creation of the LFO module * param-settings.c, param-settings.h: the files formerly known as adsr-settings.*, moved here to accomodate our kludgey UI. * gui.c: removed the huge #ifdef commented block, and adjusted for adsr-settings.* renaming. * lfo-settings.c, lfo-settings.h: new gui interface to control LFOs. * patch.c: added hooks to store lfo settings, rendering functions now account for LFOs * mixer.c: added LFO needed code * audio-settings.c: added call to lfo_set_sample_rate() during sample rate changes 2004-05-28 Pete Bessman * configure.ac: removed redundant AC_CHECK_LIB for libsndfile, and redundant gtk+-2.0 general pkg-config check * bootsrap: added autoheader call * Makefile.am: added GTK_FLAGS * sample-editor.c: added Loki's change to use a spinbutton for zoom level * adsr-settings.c: fixed amount spinbutton to be between -1.0 and 1.0 * adsr.c: fixed erroneous conversion of sustain time to ticks in adsr_set_params() * gui.c: made the scrollbar policy for the piano's viewport completely automatic * patch.c: re-implemented envelopes for vol, pan, ffreq, and freso with new rendering system. Set minimum release value to prevent clicks. * midi.c: changed to *actually* ignore redundant start/stop commands * BUGS: created this file to keep track of known bugs 2004-05-27 Pete Bessman * Created a new set/get interface for patch envelopes * Created a new patch_param_t for parameters which also have envelope information * Modified mixdown system so that each patch tracks and renders its own voices (huge change) * Created a new interface for note activation and deactivation * Lots and lots of other little cleanups, tweaks, and optimizations that I doubt anyone will notice. Comparing the old against the new, I'm amazed the old worked at all. 2004-05-25 Loki Davison * piano.c, gui.c: Got rid of the externs Pete hated and added some helper functions instead. You can now drag and drop onto the file button as well, loading a new sample. * configure.ac: added check for libsoundfile, some how we missed it. 2004-05-24 Loki Davison * piano.c, bank-builder.c: Add multifile drag and drop support. * piano.c: fixed horrible crash if you dragged of the end of the piano, spotted by AudioFranky. 2004-05-22 Loki Davison * bank-builder.c, gui.c: Added the ifdefs to check for gtk 2.4. * configure.ac: added test for gtk2.4. 2004-05-20 Loki Davison * bank-builder.c, bank-builder.h: Added the new bank builder, requires gtk 2.4 now. * piano.c: Added support for drag and drop creation of patches using the bankbuilder. * gui.c: Changed the layout into 2 columes to support the bank builder, added the bank builder and changed location of the piano. * README: added bit about drag and drop. 2004-05-18 Pete Bessman * maths.c, maths.h: created these files and moved our interpolation routines here. This is the future home of all future general purpose math routines. * ticks.c, ticks.h: moved getticks() and friends here. All time related routines will go here in the future. * specimen.c, specimen.h: removed our in-house basename() and substituted all uses of it for g_path_get_basename(). * specimen.h: fixed b0rken PIXMAPSDIR check/redef code. Removed that old and crappy thread_data_t stuff (go go gadget vestigial newbie code). * configure.ac: added --enable-debug option * beef.c, patch.c: fixed a bug where loading a bank which has a patch with no samplefile causing segfaults. 2004-05-12 Pete Bessman * midi.c: finally got around to cleaning this file up. * patch.c, patch.h: finally got around to using a sensible naming scheme for the functions here (patch_set_foo instead of patch_foo_set), and it was all done automagically via the beauty of sed. Mmmmm... sed. 2004-05-12 Loki Davison * sample-editor.c: Changed the zoom buttons to a scroll button with acceleration and scroll wheel support, as suggested by AudioFranky. 2004-05-10 Pete Bessman * gui.c: renamed "cuts" to "chokes", since the former caused confusion. Layout is now done with tables, and the piano widget is packed into a viewport to keep things nice and tidy. * waveform.c: fixed the aliasing problem, and adjusted the colors a tad. There are still a few slight accuracy problems left to fix, as well as getting it to run smoothly with huge files. * sample-editor.c: made the scroll bar have a finer-grained resolution. 2004-05-09 Pete Bessman * midi.c: note-on events with velocity of 0x00 are now interpreted as note-offs (thanks to Alexander for the tip) * piano.c: applied Loki's patch to purtify things a bit. * sample-selector.c: selector now keeps track of its current directory. 2004-05-08 Loki Davison * piano.c, piano.h, gui.c : added new piano interface for showing range and location. Based on the widget from Swami. * configure.ac: Piano widget uses gnome_canvas so added check for it. you don't need all of gnome to use it. * README: Added bit about how to use the piano. 2004-04-27 Loki Davison * cca.c : added this file to support Lash/Ladcca. Has the main lash loop. Calls the gui to update about new patches. * jackdriver.c, specimen.c, midi.c: Minor changes to support lash. * Makefile.am: includes the extra libs needed for lash. * configure.ac: test for lash. 2004-03-11 Pete Bessman * patch.c: fixed bug where initial resonance and panning would have whack values (thanks to Paul Brossier for spotting this bug). 2004-02-24 Pete Bessman * patch.c: exercised the power of memcpy to minimize grunt work in patch_create() and patch_duplicate(). Support for resonance and panning envelopes added. Got rid of stupid conversions for pan and volume setters/getters, that's the responsiblity of the caller. Envelopes can be turned on and off. * adsr-settings.c: support for resonance and panning envelope added, ability to turn envelopes on and off. * mixer.c: support for resonance and panning envelope added. Filtering is now done before gain adjustment. * beef.c: cleaned up the file opening process, accomodated new parameters. 2004-02-24 Pete Bessman * waveform.c: applied Torben Hohn's optimization patch to *great* effect. Made another tweak and it's running like a raped ape now. * mixer.c, patch.c, patch.h, adsr-settings.c: added support for cutoff ADSR. Still pondering the best way to do this, wonder if I ought to go for a completely modular approach. Need to sleep on it and ask around. 2004-02-23 Pete Bessman * Makefile.am, gui/Makefile.am: fixed to use $(pkgdatadir) instead of @datadir@ when determining where to put the pixmaps (thanks to Torben Hohn for the tip). * configure.ac: removed useless dependency on gthread * specimen.spec: included and modified Florin Andrei's rpm specfile * mixer.c: fixed a bug in the ping-pong looping logic. This has really been the bane of my existence as of late >:O 2004-02-22 Pete Bessman * adsr-settings: created interface to set adsr envelope parameters. * path.c: added volume adsr parameters to patch structure and created setters and getters. * mixer.c: added support for volume adsr. Fixed a bug in the ping-pong loop logic. 2004-02-22 Pete Bessman * Complete source tree reorganization. Subdirectories and everything. Much prettier now. Ah. * playmode-settings.c: created this file to contain the widgets to set a patches play mode. * gui.c: now uses playmode-settings.c to set play mode for a patch. * patch.c: play_mode_t restructured as a bit field, allowing direction and duration properties to be separate but represented in one variable. * mixer.c: more tweaks to improve quality and accuracy, in addition to accomodating new restructuring of play_mode_t. simple lowpass filter and resonance support added. * holy shit, I didn't sleep... 2004-02-21 Pete Bessman * mixer.c: made a change so that notes in excess of the polyphony limit take the place of the oldest note currently playing, rather than being dropped. Thanks to David R. Clark for bringing the necessity of this to my attention. Reimplemented the cubic interpolation routine as a FIR (pow() was freakin' slow). Made some other optimizations, mainly by substituting floats with ints and bitshifting. * patch.c: added patch_duplicate() function. * gui.c: added Duplicate to action menu. 2004-02-20 Pete Bessman * mixer.c, mixer.h: moved mixing functions here. * loadsample.c, loadsample.h: modularised sample loading into here. 2004-02-17 Pete Bessman * gui.c: fixed a minor control interaction bug. * Today marks the release of version 0.2.0 of Specimen, or the "Mortal Wombat" release as those in the know refer to it. Documentation has been painstakingly (snicker) prepared and is available on the website. 2004-02-16 Pete Bessman * waveform.c: supports range parameters so that it only draws a specified part of the waveform. This makes good zooming possible. No, plastic doesn't make it possible. Eat me. * editsample.c: file initialized. This is the interface for editing sample play and loop start/stop points. I dare say it's halfway beastly. * editsample.h: file initialized. Contains prototypes for the sample editing interface. * patch.c: modified the play/loop point setters to modify other parameters so that a sane configuration is maintained when unsane arguments are given, rather than returning an error. Came up with better names for the enumerated event constants. The interpolation calls were simplified a bit and the whole mixdown function now accounts for playing samples in both directions. * gui.c: controls for ping pong mode and reverse mode added. 2004-02-15 Pete Bessman * waveform.c: transformed into a custom gtk widget Waveform. Drawing routine is significantly optmized. * gui.c: now displays waveform using the new Waveform widget. 2004-02-14 Pete Bessman * gui.c: extirpated a very minor (but stylistically abominable) bug in the way loop/play control constraints and values are set during patch changes. * waveform.c: now supports displaying loop and play points. * patch.c: modified file writing to write patches in order of their display index. Fixed a *really* stupid bug in the sorting part of patch_dump() (swapped twice instead of once...). 2004-02-13 Pete Bessman * got off my lazy ass and started working on this again. * alsadriver.c: made sure that we don't wait on threads that don't exist when trying to shutdown when we aren't running. * patch.c: replaced patch_id_get_all() with patch_dump(), which does the same thing only better and sorted. Created the function patch_verify() for testing that a patch exists and is sane. Right now, this basically means ensuring that the specified patch is active. Any out-o-whack integer parameters will get constrained to something reasonable by the nature of the gtk_spin_button class. I also created patch_deactivate_by_id() so that you can preview looped samples without subjecting yourself to them for eternity. Eliminated places where ints were constantly being converted to floats by storing those values as floats. * gui.c: cleaned this up like your mother cleans my pole when the rent's due. Just kidding. About your mom, I mean. The code is significantly cleaner, and accounts for the changes made to patch.c. * waveform.c: created this file, which contains the waveform display code. It's pretty much where it needs to be, now I just have to use it on a grander scale. 2004-02-09 Pete Bessman * patch.c: fixed a few erroneous newlines in some of the returns of patch_strerror(). Modified loop and play point setters to do nothing if there is no sample for the specified patch (they used to return errors). * gui.c: changed cb_sample_load() to call update_interface() instead of making changes to the sample button directly. 2004-02-09 Pete Bessman * patch.c: added display_index property to patches and a getter for it. Modified patch_create() to initialize it and patch_destroy() to account for it. * gui.c: update_interface() now organizes menu entries according to display_index. 2004-02-06 Pete Bessman * patch.c: added patch_flush() to stop any events currently in the queue. patch_mixdown() has been cleaned up a lot, it should be much easier to expand on it in the future. * audiosettings.c: calls patch_flush() whenever changing drivers to clear out accumlated events. Not doing this results in a nasty pop sometimes, so this is a nice improvement. * configure: got an autoconf/automake setup going on now. What a huge pain in the nuts that was. 2004-02-03 Pete Bessman * patch.c: fixed another memory bug in the interpolation section of patch_mixdown(). 2004-02-03 Pete Bessman * gui.c: created a separate module for sample loading and added much needed "load" and "preview" functions. * patch.c: modularized sample loading and added support for "previewing" a sample. 2004-02-02 Pete Bessman * gui.c: current_patch no longer as file scope. 2004-02-01 Pete Bessman * gui.c: removed useless call to update_interface when loading samples that only served to disorient. * patch.c: fixed a math bug in the cubic interpolation algorithm. 2004-01-31 Pete Bessman * The first beta release of specimen, code named VOMITRON (those of you who get that kick ass) is made today. Believers rejoice, sinners repent, etc. and so forth. * gui.c: controls added for loop points. * patch.c: patch_mixdown() does looping. File reading/writing pays attention to sample start/stop info now. Cuts work again. I think I fixed some audio quality bug also, but I'm not sure. 2004-01-27 Pete Bessman * gui.c: controls added for manipulating sample start and stop points. * patch.c: patch_mixdown() accommodates sample start and stop parameters. 2004-01-26 Pete Bessman * bank.c: created a new file to handle the gui aspects of managing patch banks. * patch.c: set to use bank.c now. 2004-01-24 Pete Bessman * patch.c: patch_mixdown() does real linear interpolation when pitch scaling now. * patch.c: scant moments later, patch_mixdown() has been updated to do REAL LIVE CUBIC INTERPOLATION OMG!!? WTF?!!? * patch.c: fixed what should have been a horrible memory addressing bug and cleaned up the code a bit, excising gratuitous variables. 2004-01-23 Pete Bessman * In celebration of another year of our Sun not going super nova on us, another release of specimen has been made, monikered as the "Little Pink Christina Aguieasfdflarea Monsters" (HETAERA) release. Midi velocity information isn't blatantly ignored, cuts are implemented, and crummy pitch scaling has forced its way into the code. 2003-12-22 Pete Bessman * Amateur hour continues with the "Winter is too friggin' cold" (WITFC) release. The driver interface has some semblance of taste now, there is one mixdown function which does it's job well, and the CLI babbles incessantly as always. 2003-11-25 Pete Bessman * Initial ultra-mega-super-alpha release, code-named "It seemed like a good idea at the time," or "ISLAGIATT" since acronyms are way sweet. Features a brain damaged output driver interface, slow mixdown functions, and copius CLI output. specimen-0.5.2-rc3/INSTALL0000644000175000017500000002203010466727727011777 00000000000000Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. specimen-0.5.2-rc3/NEWS0000644000175000017500000000047510466754366011455 000000000000002006-08-10 specimen has moved to a new home: http://zhevny.com/specimen/ Many thanks to Pete Bessmen, the original author, for releasing specimen under the GPL so that we can continue working on it now that he has moved on. A mailing list and subversion repository are now available. See above site for details. specimen-0.5.2-rc3/TODO0000644000175000017500000000307010467165265011433 00000000000000-Make "loop to end" optional -Create a better file format -Make a sample browser -Allow patches to have their own JACK ports -Automatically append .beef to a filename when saving a bank if it doesn't have that already -Make it possible to copy and paste whole parameter tabs -A way to import a bunch of samples at once -TOOLTIPS! Or a status bar... or tooltips AND a statusbar! This is low hanging fruit, any takers? Please? FOR THE LOVE OF GOD!!! -Add a command line option to specify what the jack and alsa_seq names should be -Make the bank save-as dialog prompt you before overwriting an existing file -Allow patches to host a few effects -Allow for longer times in the Envelopes and LFOs using non-linear sliders -Add more filter types -Figure out why some parts of the gui don't redraw properly, such as the waveform and the audio-settings window -Add a progressbar when loading soundfiles and banks -Fix syncing drift -Add snap and zero functions to sample editor -Fix the timing code, it's gotta be broken somehow -Add a CLI option to specify a custom gtkrc theme file. -Allow sample playback to be looped indefinitely while fooling with parameters beyond just loop and playback points. -Add the ability to export modified samples. -Add undo -Ask to save if any changes exist before quitting -Enable optimized build -Enable profiling build -Stereo view in the loop editor -Add a sampling capability -Fix --enable-debug, which currently does nothing -make jack-midi support conditional upon jack version >= the version when midi was added to jack. specimen-0.5.2-rc3/compile0000755000175000017500000000532610466727727012335 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. # Copyright 1999, 2000 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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 2, 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Usage: # compile PROGRAM [ARGS]... # `-o FOO.o' is removed from the args passed to the actual compile. prog=$1 shift ofile= cfile= args= while test $# -gt 0; do case "$1" in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we do something ugly here. ofile=$2 shift case "$ofile" in *.o | *.obj) ;; *) args="$args -o $ofile" ofile= ;; esac ;; *.c) cfile=$1 args="$args $1" ;; *) args="$args $1" ;; esac shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$prog" $args fi # Name of file we expect compiler to create. cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir $lockdir > /dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir $lockdir; exit 1" 1 2 15 # Run the compile. "$prog" $args status=$? if test -f "$cofile"; then mv "$cofile" "$ofile" fi rmdir $lockdir exit $status specimen-0.5.2-rc3/config.guess0000755000175000017500000012626010466646770013276 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-07-02' # This file 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[3456]*) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T:Interix*:[3456]*) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: specimen-0.5.2-rc3/config.sub0000755000175000017500000007730010466646770012741 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-07-02' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: specimen-0.5.2-rc3/depcomp0000755000175000017500000003710010532451263012306 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # 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 2, 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: specimen-0.5.2-rc3/install-sh0000755000175000017500000002202110532451262012730 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: specimen-0.5.2-rc3/missing0000755000175000017500000002540610532451262012335 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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 2, 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: specimen-0.5.2-rc3/specimen.spec0000644000175000017500000000250210575351327013415 00000000000000Summary: A midi controlled audio sampler Name: specimen Version: 0.5.2-rc3 Release: 1 License: GPL Group: Applications/Multimedia URL: http://www.gazuga.net Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Requires: libsamplerate libsndfile gtk2 libxml2 alsa-lib jack-audio-connection-kit BuildPrereq: libsamplerate-devel libsndfile-devel gtk2-devel libxml2-devel alsa-lib-devel jack-audio-connection-kit-devel %description Specimen is a midi controlled audio sampler for GNU/Linux systems. It allows you to create music using various sound files, or "samples", in tandem with a midi sequencer. %prep %setup -q %build %configure make %makeinstall %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_bindir}/specimen %dir %{_datadir}/specimen %{_datadir}/specimen/pixmaps/play.png %{_datadir}/specimen/pixmaps/stop.png %{_datadir}/specimen/pixmaps/open.png %{_datadir}/specimen/pixmaps/panic.png %doc AUTHORS ChangeLog COPYING NEWS README TODO %changelog * Sat Jun 12 2004 Pete Bessman - added jack and alsa-lib dependencies * Thu Mar 11 2004 - rebuilt for v0.2.4 * Mon Feb 23 2004 - modified and rebuilt for v0.2.2-1 * Thu Feb 19 2004 Florin Andrei - initial package, v0.2.0-1 specimen-0.5.2-rc3/bootstrap0000755000175000017500000000010610467146735012704 00000000000000#!/bin/bash set -x aclocal -I . autoheader autoconf -f automake -a specimen-0.5.2-rc3/BUGS0000644000175000017500000000211210557755643011427 00000000000000Known Bugs ========== * Create some patches, load some samples, connect to JACK, and start running a MIDI pattern . Then, flick back and forth between the patches quickly (a mousewheel is handy for this). JACK will fail with something along the lines of "unable to execute processing graph (invalid file descriptor)". JACK will stop processing data until Specimen is closed (it will exit with a segfault); JACK and all of it's clients will then resume normal operation. [This seems to have magically disappeared, which I find quite disturbing. Can anybody reproduce it? --pete] * Sample start/stop and loop points don't behave properly when switching audio sample rates. It's probably time to store the audio sample rate along with the session file, BTW. * Midi syncing appears to be broken with Fedora Core 2's kernel. If you compile --enable-debug you'll see the gory details. * Midi syncing drifts like a bitch anyway. * Help -> About -> credits causes a segfault. * audio settings dialog currently resets jack client name to default "specimen" instead of using previously set name. specimen-0.5.2-rc3/ROADMAP0000644000175000017500000000046710467174033011751 00000000000000strip out old build system add new build system from peter make it work with just specimen devel merge jack midi test build test functionality merge lash patch test build test functionality jack_client_new vs _open change release 0.5.2rcN fix bugs repeat release 0.5.2 specimen-0.5.2-rc3/PROFILE0000644000175000017500000016545510466727727012014 00000000000000Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ms/call ms/call name 50.81 62.90 62.90 177156 0.36 0.68 patch_render_patch 32.76 103.46 40.56 145601368 0.00 0.00 adsr_tick 7.58 112.85 9.39 72800684 0.00 0.00 cerp 4.84 118.84 6.00 36400342 0.00 0.00 advance 0.88 119.93 1.09 6048 0.18 20.23 mixer_mixdown 0.71 120.81 0.88 9388 0.09 0.09 adsr_release 0.58 121.53 0.72 process 0.57 122.24 0.71 24192 0.03 5.00 patch_render 0.44 122.79 0.55 1 550.03 580.03 beef_read 0.35 123.22 0.44 11246142 0.00 0.00 lfo_get_val 0.13 123.39 0.17 24192 0.01 0.01 lfo_advance_all 0.08 123.49 0.11 2000 0.05 0.05 patch_release 0.08 123.59 0.10 10072 0.01 0.01 getticks 0.06 123.66 0.07 8 8.75 8.75 draw_wave 0.02 123.69 0.03 2000 0.02 0.03 patch_trigger 0.02 123.72 0.03 8 3.75 3.75 sample_load_file 0.02 123.74 0.02 11104 0.00 0.00 adsr_set_params 0.02 123.76 0.02 __fixunsdfdi 0.02 123.78 0.02 __fixunssfdi 0.01 123.79 0.01 8 1.25 1.25 draw_grid 0.00 123.79 0.01 43392 0.00 0.00 getrate 0.00 123.80 0.01 1 5.00 5.00 getname 0.00 123.80 0.01 1 5.00 5.00 stop 0.00 123.81 0.01 patch_sample_unload 0.00 123.81 0.00 33312 0.00 0.00 sec2tick 0.00 123.81 0.00 11104 0.00 0.00 adsr_trigger 0.00 123.81 0.00 10072 0.00 0.00 getperiodsize 0.00 123.81 0.00 2776 0.00 0.01 patch_trigger_patch 0.00 123.81 0.00 2000 0.00 0.01 mixer_note_off 0.00 123.81 0.00 2000 0.00 0.01 mixer_note_on 0.00 123.81 0.00 1494 0.00 0.03 action 0.00 123.81 0.00 790 0.00 0.00 piano_get_type 0.00 123.81 0.00 495 0.00 0.00 get_current_patch 0.00 123.81 0.00 407 0.00 0.00 patch_get_note 0.00 123.81 0.00 386 0.00 0.00 patch_get_upper_note 0.00 123.81 0.00 384 0.00 0.00 piano_draw_noteoff 0.00 123.81 0.00 384 0.00 0.00 piano_note_off_internal 0.00 123.81 0.00 381 0.00 0.00 piano_draw_noteon 0.00 123.81 0.00 381 0.00 0.00 piano_note_on_internal 0.00 123.81 0.00 182 0.00 0.00 patch_get_param 0.00 123.81 0.00 64 0.00 0.00 patch_destroy 0.00 123.81 0.00 34 0.00 0.00 patch_set_env_attack 0.00 123.81 0.00 34 0.00 0.00 patch_set_env_decay 0.00 123.81 0.00 34 0.00 0.00 patch_set_env_sustain 0.00 123.81 0.00 33 0.00 0.00 waveform_get_type 0.00 123.81 0.00 32 0.00 0.00 adsr_init 0.00 123.81 0.00 32 0.00 0.00 patch_set_env_release 0.00 123.81 0.00 24 0.00 0.00 patch_set_env_amount 0.00 123.81 0.00 17 0.00 0.00 patch_get_frames 0.00 123.81 0.00 12 0.00 0.01 mixer_note_off_with_id 0.00 123.81 0.00 12 0.00 0.01 mixer_note_on_with_id 0.00 123.81 0.00 12 0.00 0.00 patch_release_with_id 0.00 123.81 0.00 12 0.00 0.01 patch_trigger_with_id 0.00 123.81 0.00 10 0.00 0.00 patch_set_lfo_amount 0.00 123.81 0.00 9 0.00 0.00 patch_set_channel 0.00 123.81 0.00 9 0.00 0.00 patch_set_lower_note 0.00 123.81 0.00 9 0.00 0.00 patch_set_range 0.00 123.81 0.00 9 0.00 0.00 patch_set_upper_note 0.00 123.81 0.00 8 0.00 0.00 draw_loop 0.00 123.81 0.00 8 0.00 0.00 patch_create 0.00 123.81 0.00 8 0.00 0.00 patch_get_loop_start 0.00 123.81 0.00 8 0.00 0.00 patch_get_loop_stop 0.00 123.81 0.00 8 0.00 0.00 patch_get_name 0.00 123.81 0.00 8 0.00 3.75 patch_sample_load 0.00 123.81 0.00 8 0.00 0.00 patch_set_cut 0.00 123.81 0.00 8 0.00 0.00 patch_set_cut_by 0.00 123.81 0.00 8 0.00 0.00 patch_set_cutoff 0.00 123.81 0.00 8 0.00 0.00 patch_set_loop_start 0.00 123.81 0.00 8 0.00 0.00 patch_set_loop_stop 0.00 123.81 0.00 8 0.00 0.00 patch_set_name 0.00 123.81 0.00 8 0.00 0.00 patch_set_note 0.00 123.81 0.00 8 0.00 0.00 patch_set_panning 0.00 123.81 0.00 8 0.00 0.00 patch_set_play_mode 0.00 123.81 0.00 8 0.00 0.00 patch_set_resonance 0.00 123.81 0.00 8 0.00 0.00 patch_set_sample_start 0.00 123.81 0.00 8 0.00 0.00 patch_set_sample_stop 0.00 123.81 0.00 8 0.00 0.00 patch_set_volume 0.00 123.81 0.00 8 0.00 10.00 waveform_draw 0.00 123.81 0.00 7 0.00 0.00 patch_get_sample 0.00 123.81 0.00 7 0.00 0.00 patch_get_sample_start 0.00 123.81 0.00 7 0.00 0.00 patch_get_sample_stop 0.00 123.81 0.00 5 0.00 0.00 patch_get_lower_note 0.00 123.81 0.00 5 0.00 0.00 patch_get_range 0.00 123.81 0.00 4 0.00 0.00 lfo_set_freq 0.00 123.81 0.00 4 0.00 0.00 lfo_set_shape 0.00 123.81 0.00 3 0.00 0.00 piano_draw_range 0.00 123.81 0.00 3 0.00 0.00 waveform_set_patch 0.00 123.81 0.00 2 0.00 0.00 getwidget 0.00 123.81 0.00 2 0.00 0.00 leash_get_client 0.00 123.81 0.00 2 0.00 0.00 patch_count 0.00 123.81 0.00 2 0.00 0.00 patch_dump 0.00 123.81 0.00 2 0.00 0.00 patch_get_channel 0.00 123.81 0.00 2 0.00 0.00 patch_get_cut 0.00 123.81 0.00 2 0.00 0.00 patch_get_cut_by 0.00 123.81 0.00 2 0.00 0.00 patch_get_display_index 0.00 123.81 0.00 2 0.00 0.00 patch_get_env_attack 0.00 123.81 0.00 2 0.00 0.00 patch_get_env_decay 0.00 123.81 0.00 2 0.00 0.00 patch_get_env_release 0.00 123.81 0.00 2 0.00 0.00 patch_get_env_sustain 0.00 123.81 0.00 2 0.00 0.00 patch_get_lfo 0.00 123.81 0.00 2 0.00 0.00 patch_get_lfo_amount 0.00 123.81 0.00 2 0.00 0.00 patch_get_panning 0.00 123.81 0.00 2 0.00 0.00 patch_get_sample_name 0.00 123.81 0.00 2 0.00 0.00 patch_get_volume 0.00 123.81 0.00 2 0.00 0.00 set_sensitive 0.00 123.81 0.00 2 0.00 0.00 waveform_new 0.00 123.81 0.00 1 0.00 5.00 audio_settings_init 0.00 123.81 0.00 1 0.00 0.00 bank_ops_open 0.00 123.81 0.00 1 0.00 0.00 bankbuilder_get_type 0.00 123.81 0.00 1 0.00 0.00 bankbuilder_new 0.00 123.81 0.00 1 0.00 0.00 filter_settings_init 0.00 123.81 0.00 1 0.00 0.00 getname 0.00 123.81 0.00 1 0.00 0.00 getwidget 0.00 123.81 0.00 1 0.00 5.00 gui_init 0.00 123.81 0.00 1 0.00 0.00 init 0.00 123.81 0.00 1 0.00 0.00 init 0.00 123.81 0.00 1 0.00 0.00 leash_init 0.00 123.81 0.00 1 0.00 0.00 lfo_get_freq 0.00 123.81 0.00 1 0.00 0.00 lfo_get_shape 0.00 123.81 0.00 1 0.00 0.00 lfo_get_sync 0.00 123.81 0.00 1 0.00 0.00 lfo_init 0.00 123.81 0.00 1 0.00 0.00 lfo_set_sync 0.00 123.81 0.00 1 0.00 0.00 lfo_settings_init 0.00 123.81 0.00 1 0.00 0.00 midi_start 0.00 123.81 0.00 1 0.00 0.00 midi_stop 0.00 123.81 0.00 1 0.00 0.00 mixer_set_volume 0.00 123.81 0.00 1 0.00 0.00 open_seq 0.00 123.81 0.00 1 0.00 0.00 param_settings_init 0.00 123.81 0.00 1 0.00 0.00 patch_destroy_all 0.00 123.81 0.00 1 0.00 0.00 patch_get_env_amount 0.00 123.81 0.00 1 0.00 0.00 patch_sample_reload_all 0.00 123.81 0.00 1 0.00 0.00 patch_set_lfo 0.00 123.81 0.00 1 0.00 0.00 playmode_settings_init 0.00 123.81 0.00 1 0.00 0.00 prepare_drivers 0.00 123.81 0.00 1 0.00 0.00 sample_editor_init 0.00 123.81 0.00 1 0.00 0.00 set_current_patch 0.00 123.81 0.00 1 0.00 0.00 start 0.00 123.81 0.00 1 0.00 0.00 update_interface 0.00 123.81 0.00 1 0.00 0.00 update_interface % the percentage of the total running time of the time program used by this function. cumulative a running sum of the number of seconds accounted seconds for by this function and those listed above it. self the number of seconds accounted for by this seconds function alone. This is the major sort for this listing. calls the number of times this function was invoked, if this function is profiled, else blank. self the average number of milliseconds spent in this ms/call function per call, if this function is profiled, else blank. total the average number of milliseconds spent in this ms/call function and its descendents per call, if this function is profiled, else blank. name the name of the function. This is the minor sort for this listing. The index shows the location of the function in the gprof listing. If the index is in parenthesis it shows where it would appear in the gprof listing if it were to be printed. Call graph (explanation follows) granularity: each sample hit covers 2 byte(s) for 0.01% of 123.81 seconds index % time self children called name [1] 99.4 0.72 122.34 process [1] 1.09 121.25 6048/6048 mixer_mixdown [2] ----------------------------------------------- 1.09 121.25 6048/6048 process [1] [2] 98.8 1.09 121.25 6048 mixer_mixdown [2] 0.71 120.16 24192/24192 patch_render [3] 0.17 0.00 24192/24192 lfo_advance_all [12] 0.11 0.00 2000/2000 patch_release [13] 0.06 0.00 6048/10072 getticks [14] 0.03 0.02 2000/2000 patch_trigger [18] 0.00 0.00 12/12 patch_trigger_with_id [41] 0.00 0.00 12/12 patch_release_with_id [62] ----------------------------------------------- 0.71 120.16 24192/24192 mixer_mixdown [2] [3] 97.6 0.71 120.16 24192 patch_render [3] 62.90 57.26 177156/177156 patch_render_patch [4] ----------------------------------------------- 62.90 57.26 177156/177156 patch_render [3] [4] 97.1 62.90 57.26 177156 patch_render_patch [4] 40.56 0.00 145601368/145601368 adsr_tick [5] 9.39 0.00 72800684/72800684 cerp [6] 6.00 0.88 36400342/36400342 advance [7] 0.44 0.00 11246142/11246142 lfo_get_val [11] ----------------------------------------------- 40.56 0.00 145601368/145601368 patch_render_patch [4] [5] 32.8 40.56 0.00 145601368 adsr_tick [5] ----------------------------------------------- 9.39 0.00 72800684/72800684 patch_render_patch [4] [6] 7.6 9.39 0.00 72800684 cerp [6] ----------------------------------------------- 6.00 0.88 36400342/36400342 patch_render_patch [4] [7] 5.6 6.00 0.88 36400342 advance [7] 0.88 0.00 9388/9388 adsr_release [8] ----------------------------------------------- 0.88 0.00 9388/9388 advance [7] [8] 0.7 0.88 0.00 9388 adsr_release [8] ----------------------------------------------- 0.55 0.03 1/1 open_bank_verify [10] [9] 0.5 0.55 0.03 1 beef_read [9] 0.00 0.03 8/8 patch_sample_load [22] 0.00 0.00 32/34 patch_set_env_attack [54] 0.00 0.00 32/34 patch_set_env_decay [55] 0.00 0.00 32/34 patch_set_env_sustain [56] 0.00 0.00 32/32 patch_set_env_release [59] 0.00 0.00 24/24 patch_set_env_amount [60] 0.00 0.00 8/8 patch_create [69] 0.00 0.00 8/8 patch_set_name [78] 0.00 0.00 8/9 patch_set_channel [64] 0.00 0.00 8/8 patch_set_note [79] 0.00 0.00 8/8 patch_set_volume [85] 0.00 0.00 8/8 patch_set_panning [80] 0.00 0.00 8/8 patch_set_play_mode [81] 0.00 0.00 8/8 patch_set_cut [73] 0.00 0.00 8/8 patch_set_cut_by [74] 0.00 0.00 8/9 patch_set_range [66] 0.00 0.00 8/9 patch_set_lower_note [65] 0.00 0.00 8/9 patch_set_upper_note [67] 0.00 0.00 8/8 patch_set_sample_start [83] 0.00 0.00 8/8 patch_set_sample_stop [84] 0.00 0.00 8/8 patch_set_loop_start [76] 0.00 0.00 8/8 patch_set_loop_stop [77] 0.00 0.00 8/8 patch_set_cutoff [75] 0.00 0.00 8/8 patch_set_resonance [82] 0.00 0.00 1/1 patch_destroy_all [134] ----------------------------------------------- [10] 0.5 0.00 0.58 open_bank_verify [10] 0.55 0.03 1/1 beef_read [9] ----------------------------------------------- 0.44 0.00 11246142/11246142 patch_render_patch [4] [11] 0.4 0.44 0.00 11246142 lfo_get_val [11] ----------------------------------------------- 0.17 0.00 24192/24192 mixer_mixdown [2] [12] 0.1 0.17 0.00 24192 lfo_advance_all [12] ----------------------------------------------- 0.11 0.00 2000/2000 mixer_mixdown [2] [13] 0.1 0.11 0.00 2000 patch_release [13] ----------------------------------------------- 0.00 0.00 12/10072 mixer_note_off_with_id [39] 0.00 0.00 12/10072 mixer_note_on_with_id [40] 0.02 0.00 2000/10072 mixer_note_off [27] 0.02 0.00 2000/10072 mixer_note_on [28] 0.06 0.00 6048/10072 mixer_mixdown [2] [14] 0.1 0.10 0.00 10072 getticks [14] 0.00 0.00 10072/43392 getrate [31] 0.00 0.00 10072/10072 getperiodsize [43] ----------------------------------------------- 0.00 0.08 8/8 waveform_expose [16] [15] 0.1 0.00 0.08 8 waveform_draw [15] 0.07 0.00 8/8 draw_wave [17] 0.01 0.00 8/8 draw_grid [29] 0.00 0.00 8/8 draw_loop [68] ----------------------------------------------- [16] 0.1 0.00 0.08 waveform_expose [16] 0.00 0.08 8/8 waveform_draw [15] 0.00 0.00 16/33 waveform_get_type [57] ----------------------------------------------- 0.07 0.00 8/8 waveform_draw [15] [17] 0.1 0.07 0.00 8 draw_wave [17] 0.00 0.00 7/7 patch_get_sample [86] 0.00 0.00 7/17 patch_get_frames [61] 0.00 0.00 7/7 patch_get_sample_start [87] 0.00 0.00 7/7 patch_get_sample_stop [88] ----------------------------------------------- 0.03 0.02 2000/2000 mixer_mixdown [2] [18] 0.0 0.03 0.02 2000 patch_trigger [18] 0.00 0.02 2764/2776 patch_trigger_patch [23] ----------------------------------------------- 0.00 0.04 1494/1494 poll_events [20] [19] 0.0 0.00 0.04 1494 action [19] 0.00 0.02 2000/2000 mixer_note_on [28] 0.00 0.02 2000/2000 mixer_note_off [27] ----------------------------------------------- [20] 0.0 0.00 0.04 poll_events [20] 0.00 0.04 1494/1494 action [19] ----------------------------------------------- 0.03 0.00 8/8 patch_sample_load [22] [21] 0.0 0.03 0.00 8 sample_load_file [21] 0.00 0.00 8/43392 getrate [31] ----------------------------------------------- 0.00 0.03 8/8 beef_read [9] [22] 0.0 0.00 0.03 8 patch_sample_load [22] 0.03 0.00 8/8 sample_load_file [21] ----------------------------------------------- 0.00 0.00 12/2776 patch_trigger_with_id [41] 0.00 0.02 2764/2776 patch_trigger [18] [23] 0.0 0.00 0.02 2776 patch_trigger_patch [23] 0.02 0.00 11104/11104 adsr_set_params [24] 0.00 0.00 11104/11104 adsr_trigger [42] ----------------------------------------------- 0.02 0.00 11104/11104 patch_trigger_patch [23] [24] 0.0 0.02 0.00 11104 adsr_set_params [24] 0.00 0.00 33312/33312 sec2tick [37] ----------------------------------------------- [25] 0.0 0.02 0.00 __fixunsdfdi [25] ----------------------------------------------- [26] 0.0 0.02 0.00 __fixunssfdi [26] ----------------------------------------------- 0.00 0.02 2000/2000 action [19] [27] 0.0 0.00 0.02 2000 mixer_note_off [27] 0.02 0.00 2000/10072 getticks [14] ----------------------------------------------- 0.00 0.02 2000/2000 action [19] [28] 0.0 0.00 0.02 2000 mixer_note_on [28] 0.02 0.00 2000/10072 getticks [14] ----------------------------------------------- 0.01 0.00 8/8 waveform_draw [15] [29] 0.0 0.01 0.00 8 draw_grid [29] ----------------------------------------------- [30] 0.0 0.00 0.01 main [30] 0.00 0.01 1/1 gui_init [34] 0.01 0.00 1/1 stop [35] 0.00 0.00 1/1 leash_init [122] 0.00 0.00 1/1 lfo_init [126] 0.00 0.00 1/1 prepare_drivers [139] 0.00 0.00 1/1 midi_start [129] 0.00 0.00 1/1 start [142] 0.00 0.00 1/1 midi_stop [130] ----------------------------------------------- 0.00 0.00 8/43392 sample_load_file [21] 0.00 0.00 10072/43392 getticks [14] 0.00 0.00 33312/43392 sec2tick [37] [31] 0.0 0.01 0.00 43392 getrate [31] ----------------------------------------------- 0.00 0.01 1/1 gui_init [34] [32] 0.0 0.00 0.01 1 audio_settings_init [32] 0.01 0.00 1/1 getname [33] 0.00 0.00 2/2 getwidget [95] 0.00 0.00 1/1 getwidget [119] 0.00 0.00 1/1 getname [118] ----------------------------------------------- 0.01 0.00 1/1 audio_settings_init [32] [33] 0.0 0.01 0.00 1 getname [33] ----------------------------------------------- 0.00 0.01 1/1 main [30] [34] 0.0 0.00 0.01 1 gui_init [34] 0.00 0.01 1/1 audio_settings_init [32] 0.00 0.00 2/790 piano_get_type [44] 0.00 0.00 1/495 get_current_patch [45] 0.00 0.00 1/2 waveform_new [113] 0.00 0.00 1/1 bankbuilder_new [116] 0.00 0.00 1/1 sample_editor_init [140] 0.00 0.00 1/1 filter_settings_init [117] 0.00 0.00 1/1 playmode_settings_init [138] 0.00 0.00 1/1 param_settings_init [133] 0.00 0.00 1/1 lfo_settings_init [128] 0.00 0.00 1/1 update_interface [143] ----------------------------------------------- 0.01 0.00 1/1 main [30] [35] 0.0 0.01 0.00 1 stop [35] ----------------------------------------------- [36] 0.0 0.01 0.00 patch_sample_unload [36] ----------------------------------------------- 0.00 0.00 33312/33312 adsr_set_params [24] [37] 0.0 0.00 0.00 33312 sec2tick [37] 0.00 0.00 33312/43392 getrate [31] ----------------------------------------------- [38] 0.0 0.00 0.00 cb_play [38] 0.00 0.00 12/12 mixer_note_off_with_id [39] 0.00 0.00 12/12 mixer_note_on_with_id [40] 0.00 0.00 79/495 get_current_patch [45] 0.00 0.00 24/407 patch_get_note [46] ----------------------------------------------- 0.00 0.00 12/12 cb_play [38] [39] 0.0 0.00 0.00 12 mixer_note_off_with_id [39] 0.00 0.00 12/10072 getticks [14] ----------------------------------------------- 0.00 0.00 12/12 cb_play [38] [40] 0.0 0.00 0.00 12 mixer_note_on_with_id [40] 0.00 0.00 12/10072 getticks [14] ----------------------------------------------- 0.00 0.00 12/12 mixer_mixdown [2] [41] 0.0 0.00 0.00 12 patch_trigger_with_id [41] 0.00 0.00 12/2776 patch_trigger_patch [23] ----------------------------------------------- 0.00 0.00 11104/11104 patch_trigger_patch [23] [42] 0.0 0.00 0.00 11104 adsr_trigger [42] ----------------------------------------------- 0.00 0.00 10072/10072 getticks [14] [43] 0.0 0.00 0.00 10072 getperiodsize [43] ----------------------------------------------- 0.00 0.00 1/790 piano_set_property [249] 0.00 0.00 1/790 piano_item_realize [243] 0.00 0.00 2/790 gui_init [34] 0.00 0.00 2/790 piano_destroy [238] 0.00 0.00 19/790 piano_cb_event [236] 0.00 0.00 381/790 piano_note_on_internal [51] 0.00 0.00 384/790 piano_note_off_internal [49] [44] 0.0 0.00 0.00 790 piano_get_type [44] ----------------------------------------------- 0.00 0.00 1/495 cb_chan_set [168] 0.00 0.00 1/495 cb_range_set [196] 0.00 0.00 1/495 cb_lower_note_set [183] 0.00 0.00 1/495 cb_upper_note_set [210] 0.00 0.00 1/495 cb_setting_clicked [205] 0.00 0.00 1/495 gui_init [34] 0.00 0.00 2/495 update_interface [144] 0.00 0.00 3/495 piano_draw_range [93] 0.00 0.00 24/495 cb_set [203] 0.00 0.00 79/495 cb_play [38] 0.00 0.00 381/495 piano_draw_noteon [50] [45] 0.0 0.00 0.00 495 get_current_patch [45] ----------------------------------------------- 0.00 0.00 2/407 set_current_patch [141] 0.00 0.00 24/407 cb_play [38] 0.00 0.00 381/407 piano_draw_noteon [50] [46] 0.0 0.00 0.00 407 patch_get_note [46] ----------------------------------------------- 0.00 0.00 2/386 set_current_patch [141] 0.00 0.00 384/386 piano_draw_range [93] [47] 0.0 0.00 0.00 386 patch_get_upper_note [47] ----------------------------------------------- 0.00 0.00 384/384 piano_note_off_internal [49] [48] 0.0 0.00 0.00 384 piano_draw_noteoff [48] ----------------------------------------------- 0.00 0.00 384/384 piano_draw_range [93] [49] 0.0 0.00 0.00 384 piano_note_off_internal [49] 0.00 0.00 384/790 piano_get_type [44] 0.00 0.00 384/384 piano_draw_noteoff [48] ----------------------------------------------- 0.00 0.00 381/381 piano_note_on_internal [51] [50] 0.0 0.00 0.00 381 piano_draw_noteon [50] 0.00 0.00 381/495 get_current_patch [45] 0.00 0.00 381/407 patch_get_note [46] ----------------------------------------------- 0.00 0.00 381/381 piano_draw_range [93] [51] 0.0 0.00 0.00 381 piano_note_on_internal [51] 0.00 0.00 381/790 piano_get_type [44] 0.00 0.00 381/381 piano_draw_noteon [50] ----------------------------------------------- 0.00 0.00 1/182 patch_get_env_amount [135] 0.00 0.00 1/182 patch_set_lfo [137] 0.00 0.00 2/182 patch_get_env_attack [103] 0.00 0.00 2/182 patch_get_env_decay [104] 0.00 0.00 2/182 patch_get_env_sustain [106] 0.00 0.00 2/182 patch_get_env_release [105] 0.00 0.00 2/182 patch_get_lfo [107] 0.00 0.00 2/182 patch_get_lfo_amount [108] 0.00 0.00 10/182 patch_set_lfo_amount [63] 0.00 0.00 24/182 patch_set_env_amount [60] 0.00 0.00 32/182 patch_set_env_release [59] 0.00 0.00 34/182 patch_set_env_attack [54] 0.00 0.00 34/182 patch_set_env_decay [55] 0.00 0.00 34/182 patch_set_env_sustain [56] [52] 0.0 0.00 0.00 182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 64/64 patch_destroy_all [134] [53] 0.0 0.00 0.00 64 patch_destroy [53] ----------------------------------------------- 0.00 0.00 2/34 cb_set [203] 0.00 0.00 32/34 beef_read [9] [54] 0.0 0.00 0.00 34 patch_set_env_attack [54] 0.00 0.00 34/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 2/34 cb_set [203] 0.00 0.00 32/34 beef_read [9] [55] 0.0 0.00 0.00 34 patch_set_env_decay [55] 0.00 0.00 34/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 2/34 cb_set [203] 0.00 0.00 32/34 beef_read [9] [56] 0.0 0.00 0.00 34 patch_set_env_sustain [56] 0.00 0.00 34/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 1/33 waveform_realize [280] 0.00 0.00 2/33 waveform_destroy [274] 0.00 0.00 2/33 waveform_size_request [285] 0.00 0.00 2/33 waveform_new [113] 0.00 0.00 3/33 set_current_patch [141] 0.00 0.00 3/33 waveform_set_patch [94] 0.00 0.00 4/33 waveform_size_allocate [284] 0.00 0.00 16/33 waveform_expose [16] [57] 0.0 0.00 0.00 33 waveform_get_type [57] ----------------------------------------------- 0.00 0.00 32/32 patch_create [69] [58] 0.0 0.00 0.00 32 adsr_init [58] ----------------------------------------------- 0.00 0.00 32/32 beef_read [9] [59] 0.0 0.00 0.00 32 patch_set_env_release [59] 0.00 0.00 32/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 24/24 beef_read [9] [60] 0.0 0.00 0.00 24 patch_set_env_amount [60] 0.00 0.00 24/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 2/17 set_current_patch [141] 0.00 0.00 7/17 draw_wave [17] 0.00 0.00 8/17 draw_loop [68] [61] 0.0 0.00 0.00 17 patch_get_frames [61] ----------------------------------------------- 0.00 0.00 12/12 mixer_mixdown [2] [62] 0.0 0.00 0.00 12 patch_release_with_id [62] ----------------------------------------------- 0.00 0.00 10/10 cb_set [203] [63] 0.0 0.00 0.00 10 patch_set_lfo_amount [63] 0.00 0.00 10/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 1/9 cb_chan_set [168] 0.00 0.00 8/9 beef_read [9] [64] 0.0 0.00 0.00 9 patch_set_channel [64] ----------------------------------------------- 0.00 0.00 1/9 cb_lower_note_set [183] 0.00 0.00 8/9 beef_read [9] [65] 0.0 0.00 0.00 9 patch_set_lower_note [65] ----------------------------------------------- 0.00 0.00 1/9 cb_range_set [196] 0.00 0.00 8/9 beef_read [9] [66] 0.0 0.00 0.00 9 patch_set_range [66] ----------------------------------------------- 0.00 0.00 1/9 cb_upper_note_set [210] 0.00 0.00 8/9 beef_read [9] [67] 0.0 0.00 0.00 9 patch_set_upper_note [67] ----------------------------------------------- 0.00 0.00 8/8 waveform_draw [15] [68] 0.0 0.00 0.00 8 draw_loop [68] 0.00 0.00 8/17 patch_get_frames [61] 0.00 0.00 8/8 patch_get_loop_start [70] 0.00 0.00 8/8 patch_get_loop_stop [71] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [69] 0.0 0.00 0.00 8 patch_create [69] 0.00 0.00 32/32 adsr_init [58] ----------------------------------------------- 0.00 0.00 8/8 draw_loop [68] [70] 0.0 0.00 0.00 8 patch_get_loop_start [70] ----------------------------------------------- 0.00 0.00 8/8 draw_loop [68] [71] 0.0 0.00 0.00 8 patch_get_loop_stop [71] ----------------------------------------------- 0.00 0.00 8/8 update_interface [143] [72] 0.0 0.00 0.00 8 patch_get_name [72] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [73] 0.0 0.00 0.00 8 patch_set_cut [73] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [74] 0.0 0.00 0.00 8 patch_set_cut_by [74] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [75] 0.0 0.00 0.00 8 patch_set_cutoff [75] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [76] 0.0 0.00 0.00 8 patch_set_loop_start [76] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [77] 0.0 0.00 0.00 8 patch_set_loop_stop [77] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [78] 0.0 0.00 0.00 8 patch_set_name [78] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [79] 0.0 0.00 0.00 8 patch_set_note [79] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [80] 0.0 0.00 0.00 8 patch_set_panning [80] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [81] 0.0 0.00 0.00 8 patch_set_play_mode [81] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [82] 0.0 0.00 0.00 8 patch_set_resonance [82] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [83] 0.0 0.00 0.00 8 patch_set_sample_start [83] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [84] 0.0 0.00 0.00 8 patch_set_sample_stop [84] ----------------------------------------------- 0.00 0.00 8/8 beef_read [9] [85] 0.0 0.00 0.00 8 patch_set_volume [85] ----------------------------------------------- 0.00 0.00 7/7 draw_wave [17] [86] 0.0 0.00 0.00 7 patch_get_sample [86] ----------------------------------------------- 0.00 0.00 7/7 draw_wave [17] [87] 0.0 0.00 0.00 7 patch_get_sample_start [87] ----------------------------------------------- 0.00 0.00 7/7 draw_wave [17] [88] 0.0 0.00 0.00 7 patch_get_sample_stop [88] ----------------------------------------------- 0.00 0.00 2/5 set_current_patch [141] 0.00 0.00 3/5 piano_draw_range [93] [89] 0.0 0.00 0.00 5 patch_get_lower_note [89] ----------------------------------------------- 0.00 0.00 2/5 set_current_patch [141] 0.00 0.00 3/5 piano_draw_range [93] [90] 0.0 0.00 0.00 5 patch_get_range [90] ----------------------------------------------- 0.00 0.00 4/4 lfo_init [126] [91] 0.0 0.00 0.00 4 lfo_set_freq [91] ----------------------------------------------- 0.00 0.00 4/4 lfo_init [126] [92] 0.0 0.00 0.00 4 lfo_set_shape [92] ----------------------------------------------- 0.00 0.00 1/3 cb_range_set [196] 0.00 0.00 1/3 cb_lower_note_set [183] 0.00 0.00 1/3 cb_upper_note_set [210] [93] 0.0 0.00 0.00 3 piano_draw_range [93] 0.00 0.00 384/386 patch_get_upper_note [47] 0.00 0.00 384/384 piano_note_off_internal [49] 0.00 0.00 381/381 piano_note_on_internal [51] 0.00 0.00 3/495 get_current_patch [45] 0.00 0.00 3/5 patch_get_range [90] 0.00 0.00 3/5 patch_get_lower_note [89] ----------------------------------------------- 0.00 0.00 3/3 set_current_patch [141] [94] 0.0 0.00 0.00 3 waveform_set_patch [94] 0.00 0.00 3/33 waveform_get_type [57] ----------------------------------------------- 0.00 0.00 2/2 audio_settings_init [32] [95] 0.0 0.00 0.00 2 getwidget [95] ----------------------------------------------- 0.00 0.00 1/2 start [142] 0.00 0.00 1/2 open_seq [132] [96] 0.0 0.00 0.00 2 leash_get_client [96] ----------------------------------------------- 0.00 0.00 2/2 patch_dump [98] [97] 0.0 0.00 0.00 2 patch_count [97] ----------------------------------------------- 0.00 0.00 2/2 update_interface [143] [98] 0.0 0.00 0.00 2 patch_dump [98] 0.00 0.00 2/2 patch_count [97] ----------------------------------------------- 0.00 0.00 2/2 set_current_patch [141] [99] 0.0 0.00 0.00 2 patch_get_channel [99] ----------------------------------------------- 0.00 0.00 2/2 set_current_patch [141] [100] 0.0 0.00 0.00 2 patch_get_cut [100] ----------------------------------------------- 0.00 0.00 2/2 set_current_patch [141] [101] 0.0 0.00 0.00 2 patch_get_cut_by [101] ----------------------------------------------- 0.00 0.00 2/2 set_current_patch [141] [102] 0.0 0.00 0.00 2 patch_get_display_index [102] ----------------------------------------------- 0.00 0.00 2/2 update_interface [144] [103] 0.0 0.00 0.00 2 patch_get_env_attack [103] 0.00 0.00 2/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 2/2 update_interface [144] [104] 0.0 0.00 0.00 2 patch_get_env_decay [104] 0.00 0.00 2/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 2/2 update_interface [144] [105] 0.0 0.00 0.00 2 patch_get_env_release [105] 0.00 0.00 2/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 2/2 update_interface [144] [106] 0.0 0.00 0.00 2 patch_get_env_sustain [106] 0.00 0.00 2/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 2/2 update_interface [144] [107] 0.0 0.00 0.00 2 patch_get_lfo [107] 0.00 0.00 2/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 2/2 update_interface [144] [108] 0.0 0.00 0.00 2 patch_get_lfo_amount [108] 0.00 0.00 2/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 2/2 set_current_patch [141] [109] 0.0 0.00 0.00 2 patch_get_panning [109] ----------------------------------------------- 0.00 0.00 2/2 set_current_patch [141] [110] 0.0 0.00 0.00 2 patch_get_sample_name [110] ----------------------------------------------- 0.00 0.00 2/2 set_current_patch [141] [111] 0.0 0.00 0.00 2 patch_get_volume [111] ----------------------------------------------- 0.00 0.00 2/2 set_current_patch [141] [112] 0.0 0.00 0.00 2 set_sensitive [112] ----------------------------------------------- 0.00 0.00 1/2 gui_init [34] 0.00 0.00 1/2 sample_editor_init [140] [113] 0.0 0.00 0.00 2 waveform_new [113] 0.00 0.00 2/33 waveform_get_type [57] ----------------------------------------------- 0.00 0.00 1/1 cb_menu_file_open_bank [186] [114] 0.0 0.00 0.00 1 bank_ops_open [114] ----------------------------------------------- 0.00 0.00 1/1 bankbuilder_new [116] [115] 0.0 0.00 0.00 1 bankbuilder_get_type [115] ----------------------------------------------- 0.00 0.00 1/1 gui_init [34] [116] 0.0 0.00 0.00 1 bankbuilder_new [116] 0.00 0.00 1/1 bankbuilder_get_type [115] ----------------------------------------------- 0.00 0.00 1/1 gui_init [34] [117] 0.0 0.00 0.00 1 filter_settings_init [117] ----------------------------------------------- 0.00 0.00 1/1 audio_settings_init [32] [118] 0.0 0.00 0.00 1 getname [118] ----------------------------------------------- 0.00 0.00 1/1 audio_settings_init [32] [119] 0.0 0.00 0.00 1 getwidget [119] ----------------------------------------------- 0.00 0.00 1/1 prepare_drivers [139] [120] 0.0 0.00 0.00 1 init [120] ----------------------------------------------- 0.00 0.00 1/1 prepare_drivers [139] [121] 0.0 0.00 0.00 1 init [121] ----------------------------------------------- 0.00 0.00 1/1 main [30] [122] 0.0 0.00 0.00 1 leash_init [122] ----------------------------------------------- 0.00 0.00 1/1 cb_lfo [181] [123] 0.0 0.00 0.00 1 lfo_get_freq [123] ----------------------------------------------- 0.00 0.00 1/1 cb_lfo [181] [124] 0.0 0.00 0.00 1 lfo_get_shape [124] ----------------------------------------------- 0.00 0.00 1/1 cb_lfo [181] [125] 0.0 0.00 0.00 1 lfo_get_sync [125] ----------------------------------------------- 0.00 0.00 1/1 main [30] [126] 0.0 0.00 0.00 1 lfo_init [126] 0.00 0.00 4/4 lfo_set_freq [91] 0.00 0.00 4/4 lfo_set_shape [92] ----------------------------------------------- 0.00 0.00 1/1 cb_sync [208] [127] 0.0 0.00 0.00 1 lfo_set_sync [127] ----------------------------------------------- 0.00 0.00 1/1 gui_init [34] [128] 0.0 0.00 0.00 1 lfo_settings_init [128] ----------------------------------------------- 0.00 0.00 1/1 main [30] [129] 0.0 0.00 0.00 1 midi_start [129] 0.00 0.00 1/1 open_seq [132] ----------------------------------------------- 0.00 0.00 1/1 main [30] [130] 0.0 0.00 0.00 1 midi_stop [130] ----------------------------------------------- 0.00 0.00 1/1 cb_master_vol_set [184] [131] 0.0 0.00 0.00 1 mixer_set_volume [131] ----------------------------------------------- 0.00 0.00 1/1 midi_start [129] [132] 0.0 0.00 0.00 1 open_seq [132] 0.00 0.00 1/2 leash_get_client [96] ----------------------------------------------- 0.00 0.00 1/1 gui_init [34] [133] 0.0 0.00 0.00 1 param_settings_init [133] ----------------------------------------------- 0.00 0.00 1/1 beef_read [9] [134] 0.0 0.00 0.00 1 patch_destroy_all [134] 0.00 0.00 64/64 patch_destroy [53] ----------------------------------------------- 0.00 0.00 1/1 update_interface [144] [135] 0.0 0.00 0.00 1 patch_get_env_amount [135] 0.00 0.00 1/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 1/1 sample_rate_change [256] [136] 0.0 0.00 0.00 1 patch_sample_reload_all [136] ----------------------------------------------- 0.00 0.00 1/1 cb_set [203] [137] 0.0 0.00 0.00 1 patch_set_lfo [137] 0.00 0.00 1/182 patch_get_param [52] ----------------------------------------------- 0.00 0.00 1/1 gui_init [34] [138] 0.0 0.00 0.00 1 playmode_settings_init [138] ----------------------------------------------- 0.00 0.00 1/1 main [30] [139] 0.0 0.00 0.00 1 prepare_drivers [139] 0.00 0.00 1/1 init [120] 0.00 0.00 1/1 init [121] ----------------------------------------------- 0.00 0.00 1/1 gui_init [34] [140] 0.0 0.00 0.00 1 sample_editor_init [140] 0.00 0.00 1/2 waveform_new [113] ----------------------------------------------- 0.00 0.00 1/1 update_interface [143] [141] 0.0 0.00 0.00 1 set_current_patch [141] 0.00 0.00 3/33 waveform_get_type [57] 0.00 0.00 3/3 waveform_set_patch [94] 0.00 0.00 2/2 patch_get_channel [99] 0.00 0.00 2/407 patch_get_note [46] 0.00 0.00 2/5 patch_get_range [90] 0.00 0.00 2/5 patch_get_lower_note [89] 0.00 0.00 2/386 patch_get_upper_note [47] 0.00 0.00 2/2 patch_get_volume [111] 0.00 0.00 2/2 patch_get_panning [109] 0.00 0.00 2/2 patch_get_cut [100] 0.00 0.00 2/2 patch_get_cut_by [101] 0.00 0.00 2/17 patch_get_frames [61] 0.00 0.00 2/2 patch_get_sample_name [110] 0.00 0.00 2/2 patch_get_display_index [102] 0.00 0.00 2/2 set_sensitive [112] ----------------------------------------------- 0.00 0.00 1/1 main [30] [142] 0.0 0.00 0.00 1 start [142] 0.00 0.00 1/2 leash_get_client [96] ----------------------------------------------- 0.00 0.00 1/1 gui_init [34] [143] 0.0 0.00 0.00 1 update_interface [143] 0.00 0.00 8/8 patch_get_name [72] 0.00 0.00 2/2 patch_dump [98] 0.00 0.00 1/1 set_current_patch [141] ----------------------------------------------- 0.00 0.00 1/1 param_settings_show [230] [144] 0.0 0.00 0.00 1 update_interface [144] 0.00 0.00 2/495 get_current_patch [45] 0.00 0.00 2/2 patch_get_env_attack [103] 0.00 0.00 2/2 patch_get_env_decay [104] 0.00 0.00 2/2 patch_get_env_sustain [106] 0.00 0.00 2/2 patch_get_env_release [105] 0.00 0.00 2/2 patch_get_lfo [107] 0.00 0.00 2/2 patch_get_lfo_amount [108] 0.00 0.00 1/1 patch_get_env_amount [135] ----------------------------------------------- This table describes the call tree of the program, and was sorted by the total amount of time spent in each function and its children. Each entry in this table consists of several lines. The line with the index number at the left hand margin lists the current function. The lines above it list the functions that called this function, and the lines below it list the functions this one called. This line lists: index A unique number given to each element of the table. Index numbers are sorted numerically. The index number is printed next to every function name so it is easier to look up where the function in the table. % time This is the percentage of the `total' time that was spent in this function and its children. Note that due to different viewpoints, functions excluded by options, etc, these numbers will NOT add up to 100%. self This is the total amount of time spent in this function. children This is the total amount of time propagated into this function by its children. called This is the number of times the function was called. If the function called itself recursively, the number only includes non-recursive calls, and is followed by a `+' and the number of recursive calls. name The name of the current function. The index number is printed after it. If the function is a member of a cycle, the cycle number is printed between the function's name and the index number. For the function's parents, the fields have the following meanings: self This is the amount of time that was propagated directly from the function into this parent. children This is the amount of time that was propagated from the function's children into this parent. called This is the number of times this parent called the function `/' the total number of times the function was called. Recursive calls to the function are not included in the number after the `/'. name This is the name of the parent. The parent's index number is printed after it. If the parent is a member of a cycle, the cycle number is printed between the name and the index number. If the parents of the function cannot be determined, the word `' is printed in the `name' field, and all the other fields are blank. For the function's children, the fields have the following meanings: self This is the amount of time that was propagated directly from the child into the function. children This is the amount of time that was propagated from the child's children to the function. called This is the number of times the function called this child `/' the total number of times the child was called. Recursive calls by the child are not listed in the number after the `/'. name This is the name of the child. The child's index number is printed after it. If the child is a member of a cycle, the cycle number is printed between the name and the index number. If there are any cycles (circles) in the call graph, there is an entry for the cycle-as-a-whole. This entry shows who called the cycle (as parents) and the members of the cycle (as children.) The `+' recursive calls entry shows the number of function calls that were internal to the cycle, and the calls entry for each member shows, for that member, how many times it was called from other members of the cycle. Index by function name [25] __fixunsdfdi [28] mixer_note_on [60] patch_set_env_amount [26] __fixunssfdi [40] mixer_note_on_with_id [54] patch_set_env_attack [19] action (midi.c) [131] mixer_set_volume [55] patch_set_env_decay [58] adsr_init [132] open_seq (midi.c) [59] patch_set_env_release [8] adsr_release [133] param_settings_init [56] patch_set_env_sustain [24] adsr_set_params [97] patch_count [137] patch_set_lfo [5] adsr_tick [69] patch_create [63] patch_set_lfo_amount [42] adsr_trigger [53] patch_destroy [76] patch_set_loop_start [7] advance (patch.c) [134] patch_destroy_all [77] patch_set_loop_stop [32] audio_settings_init [98] patch_dump [65] patch_set_lower_note [114] bank_ops_open [99] patch_get_channel [78] patch_set_name [115] bankbuilder_get_type [100] patch_get_cut [79] patch_set_note [116] bankbuilder_new [101] patch_get_cut_by [80] patch_set_panning [9] beef_read [102] patch_get_display_index [81] patch_set_play_mode [6] cerp [135] patch_get_env_amount [66] patch_set_range [29] draw_grid (waveform.c) [103] patch_get_env_attack [82] patch_set_resonance [68] draw_loop (waveform.c) [104] patch_get_env_decay [83] patch_set_sample_start [17] draw_wave (waveform.c) [105] patch_get_env_release [84] patch_set_sample_stop [117] filter_settings_init [106] patch_get_env_sustain [67] patch_set_upper_note [45] get_current_patch [61] patch_get_frames [85] patch_set_volume [33] getname (alsadriver.c) [107] patch_get_lfo [18] patch_trigger [118] getname (jackdriver.c) [108] patch_get_lfo_amount [23] patch_trigger_patch (patch.c) [43] getperiodsize (jackdriver.c) [70] patch_get_loop_start [41] patch_trigger_with_id [31] getrate (jackdriver.c) [71] patch_get_loop_stop [48] piano_draw_noteoff (piano.c) [14] getticks [89] patch_get_lower_note [50] piano_draw_noteon (piano.c) [119] getwidget (alsadriver.c) [72] patch_get_name [93] piano_draw_range [95] getwidget (jackdriver.c) [46] patch_get_note [44] piano_get_type [34] gui_init [109] patch_get_panning [49] piano_note_off_internal (piano.c) [120] init (alsadriver.c) [52] patch_get_param (patch.c) [51] piano_note_on_internal (piano.c) [121] init (jackdriver.c) [90] patch_get_range [138] playmode_settings_init [96] leash_get_client [86] patch_get_sample [139] prepare_drivers [122] leash_init [110] patch_get_sample_name [1] process (jackdriver.c) [12] lfo_advance_all [87] patch_get_sample_start [140] sample_editor_init [123] lfo_get_freq [88] patch_get_sample_stop [21] sample_load_file [124] lfo_get_shape [47] patch_get_upper_note [37] sec2tick [125] lfo_get_sync [111] patch_get_volume [141] set_current_patch (gui.c) [11] lfo_get_val [13] patch_release [112] set_sensitive (gui.c) [126] lfo_init [62] patch_release_with_id [142] start (jackdriver.c) [91] lfo_set_freq [3] patch_render [35] stop (jackdriver.c) [92] lfo_set_shape [4] patch_render_patch (patch.c) [143] update_interface (gui.c) [127] lfo_set_sync [22] patch_sample_load [144] update_interface (param-settings.c) [128] lfo_settings_init [136] patch_sample_reload_all [15] waveform_draw [129] midi_start [36] patch_sample_unload [57] waveform_get_type [130] midi_stop [64] patch_set_channel [113] waveform_new [2] mixer_mixdown [73] patch_set_cut [94] waveform_set_patch [27] mixer_note_off [74] patch_set_cut_by [39] mixer_note_off_with_id [75] patch_set_cutoff specimen-0.5.2-rc3/STYLE0000644000175000017500000001701410466744417011572 00000000000000Intro ===== I'm not a nazi about this (at least *I* don't think I am), but it's important for a program to have a consistent style throughout. These rules aren't cast in stone, but if you don't have a *good* reason to deviate, then don't. Otherwise, I will bitchslap you. After much deliberation (really, a *lot*), I've decided on a modified version of k&r style. If you use Emacs, just use k&r as your c-mode when hacking on Specimen. Braces ====== I used to follow the strict k&r layout, but after too many hours wasted furrowing my brow trying to focus on something like... if (p->play_mode & PATCH_PLAY_LOOP) { if (p->play_mode & PATCH_PLAY_PINGPONG) { if ((v->dir > 0) && (v->posi > p->loop_stop)) { v->posi = p->loop_stop; v->dir = -1; } else if ((v->dir < 0) && (v->posi < p->loop_start)) { v->posi = p->loop_start; v->dir = 1; } } else { if ((v->dir > 0) && (v->posi > p->loop_stop)) { v->posi = p->loop_start; } else if ((v->dir < 0) && (v->posi < p->loop_start)) { v->posi = p->loop_stop; } } } ...I decided that my A.D.H.D. ass was due for a change. The rule is, all braces have one line to themselves. Observe the difference in readability: if (p->play_mode & PATCH_PLAY_LOOP) { if (p->play_mode & PATCH_PLAY_PINGPONG) { if ((v->dir > 0) && (v->posi > p->loop_stop)) { v->posi = p->loop_stop; v->dir = -1; } else if ((v->dir < 0) && (v->posi < p->loop_start)) { v->posi = p->loop_start; v->dir = 1; } } else { if ((v->dir > 0) && (v->posi > p->loop_stop)) { v->posi = p->loop_start; } else if ((v->dir < 0) && (v->posi < p->loop_start)) { v->posi = p->loop_stop; } } } If this style of formatting costs you too much "screen real-estate," I doubt your system is in any shape to be running Specimen in the first place. Naming ====== Types should be written in StudlyCaps, and functions should be separated_with_underscores(). Variables which need some kind of multiword distinction should also take the underscore approach. I like this method because it makes the difference between types and functions eminently clear, as well as being a good metaphor for the singularity of types (they're just a thing) and the plurality of functions (they're a collection of actions). The first rule of name length is that length should be directly proportional to scope level. A variable that is local only to a particular function doesn't need a big name. On the other hand a function that will be used throughout the program should have a somewhat lengthier and more descriptive name. The second rule of name length is that length should be inversely proportional to frequency of use. If you're going to be using a variable a whole lot, you'll be well served to keep that name as short as is reasonable (not uncommonly down to one letter for function local variables). If you're going to be using a variable infrequently, it's name should be more descriptive so that you know what it is being used for when you go back to your code a week later. Functions ========= Global functions should follow this naming convention: namespace_operation_qualifier(args); Functions should be focused and to the point. gcc has an inline keyword, so don't hesitate to break up a function into smaller pieces if it's starting to get unwieldy. A good indicator is if it gets to be more than 150 lines, or has more than 10 local variables. Another indicator is if the indentation level is more than 3, although it is sometimes desirable to go for a 4th level of indentation rather than split off into another function. If your function is conceptually quite simple, than it's ok to break the above rules. However, if a retard like me won't be able to figure out what's going on, you should stay well within the limits. Oh, and if a function doesn't take any parameters, declare it as foo(void). Otherwise, compilers will assume your using oldskool function prototype parameter declarations (i.e., none), and that ain't good. Pointers ======== When declaring pointer types, this sytnax... int* foo; ...is preferred over this... int *foo; ...and this... int * foo; The reason is that the first very clearly says "integer pointer" by smacking the pointer right up there with the type. And anyway, the asterik is just another type qualifier, and it ought to be with all the other type qualifiers. You never see anybody write static const int foo; The reason? It's stupid. Don't be stupid. Commenting ========== From the Linux Kernel Coding Style guidelines: "Comments are good, but there is also a danger of over-commenting. Never try to explain how your code works in a comment: it's much better to write the code so that the working is obvious, and it's a waste of time to explain badly written code." "Generally, you want your comments to tell what your code does, not how. Also, try to avoid putting comments inside a function body: if the function is so complex that you need to separately comment parts of it, you should probably go back to chapter 4 for a while. You can make small comments to note or warn about something particularly clever (or ugly), but try to avoid excess. Instead, put the comments at the head of the function, telling people what it does, and possibly why it does it." It is vastly more important to comment data structures than it is functions. I cannot stress this enough. When the data structures are well understood, everything else falls into place. However, a well understood function that operates on mystery data is still unfathomable in a practical sense. You have to really dedicate yourself if you want to over-comment a data structure, and you'll probably fail anyway. Functions, on the other hand, can be over-commented almost instantly. When it comes to commenting, make sure your data structures get *lots* of love, but don't sweat your functions so much. In those rare circumstances where an incredible subtlety is at play, or an imperfection which cannot be solved at the moment needs a note to remind you to fix it, beefy function comments may be merited (but exercise prodigious discretion). On the whole, however, everything you learned in Comp Sci, if anything at all, is totally wrong and should be ignored/forgotten ASAP. But I Want To Do It My Way ========================== Fine, be a bitch. Just run the following indent command when you're done, and you'll probably get acceptable results. indent -kr -bad -bl -bls -bli0 -bs -nce Misc ==== Use spacing to your advantage. The human mind works really well with a table based layout. The following: int function_way_too_freakin_long(); /* blistered earth rules */ int function_one(int foo); /* metallica sucks */ int function_twenty(int bar); /* was anyone honestly surprised about halford? */ Is much more readable when laid out thusly: int function_way_too_freakin_long (); /* blistered earth rules */ int function_one (int foo); /* metallica sucks */ int function_twenty (int bar); /* was anyone honestly surprised about halford? */ This kind of thing is typically seen in header files, but don't be afraid to use the same technique to clean up intricate code that tends to induce migraines in whomsoever attempts to read it. At the time of this writing [2004-06-06], lots of Specimen blatantly disregards the above rules. So sue me, I was (am) just starting out. I'm working on fixing that. Hopefully, by the time anybody reads this doc, this clause will no longer be relevant. specimen-0.5.2-rc3/WISHLIST0000644000175000017500000000070410466754366012142 00000000000000lash -everyone jack-midi -everyone multiple jack outs -thorwil, yves potin envelope, velocity controllable plugins -thorwil, larsl "I would like to see loopingfeatures like the Ensoniq samplers which should not add many cpu load. For instance midi controlled loop start and end, loop offset and -let me call it so- PPG wavetablemode where the loop jumps always a defined amount so it switches waveforms. Ensoniq called it transwave." -Malte Steiner specimen-0.5.2-rc3/src/0000777000175000017500000000000010575351341011606 500000000000000specimen-0.5.2-rc3/src/Makefile.am0000644000175000017500000000244110575117614013562 00000000000000SUBDIRS = gui bin_PROGRAMS = specimen specimen_SOURCES = alsadriver.c jackdriver.c mixer.c mixer.h sample.c \ sample.h driver.c driver.h midi.c midi.h patch.c patch.h specimen.c \ specimen.h beef.c beef.h maths.c maths.h ticks.c ticks.h adsr.c adsr.h \ lfo.c lfo.h sync.c sync.h control.h if HAVE_LASH specimen_SOURCES += lashdriver.c lashdriver.h endif INCLUDES = \ @ALSA_CFLAGS@ \ @JACK_CFLAGS@ \ @LIBSAMPLERATE_CFLAGS@ \ @LIBSNDFILE_CFLAGS@ \ @LIBXML_CFLAGS@ \ @LASH_CFLAGS@ \ @GTK_CFLAGS@ specimen_LDADD = \ gui/libgui.a \ @PHAT_LIBS@ \ @ALSA_LIBS@ \ @JACK_LIBS@ \ @LIBSAMPLERATE_LIBS@ \ @LIBSNDFILE_LIBS@ \ @LIBXML_LIBS@ \ @LASH_LIBS@ \ @GTK_LIBS@ \ @LIBGNOMECANVAS_LIBS@ EXTRA_DIST = gprof-helper.c specimen-0.5.2-rc3/src/Makefile.in0000644000175000017500000004754310575351312013602 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = specimen$(EXEEXT) @HAVE_LASH_TRUE@am__append_1 = lashdriver.c lashdriver.h subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acx_pthread.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__specimen_SOURCES_DIST = alsadriver.c jackdriver.c mixer.c mixer.h \ sample.c sample.h driver.c driver.h midi.c midi.h patch.c \ patch.h specimen.c specimen.h beef.c beef.h maths.c maths.h \ ticks.c ticks.h adsr.c adsr.h lfo.c lfo.h sync.c sync.h \ control.h lashdriver.c lashdriver.h @HAVE_LASH_TRUE@am__objects_1 = lashdriver.$(OBJEXT) am_specimen_OBJECTS = alsadriver.$(OBJEXT) jackdriver.$(OBJEXT) \ mixer.$(OBJEXT) sample.$(OBJEXT) driver.$(OBJEXT) \ midi.$(OBJEXT) patch.$(OBJEXT) specimen.$(OBJEXT) \ beef.$(OBJEXT) maths.$(OBJEXT) ticks.$(OBJEXT) adsr.$(OBJEXT) \ lfo.$(OBJEXT) sync.$(OBJEXT) $(am__objects_1) specimen_OBJECTS = $(am_specimen_OBJECTS) specimen_DEPENDENCIES = gui/libgui.a DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(specimen_SOURCES) DIST_SOURCES = $(am__specimen_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LASH_FALSE = @HAVE_LASH_FALSE@ HAVE_LASH_TRUE = @HAVE_LASH_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ JACK_MIDI_CFLAGS = @JACK_MIDI_CFLAGS@ JACK_MIDI_LIBS = @JACK_MIDI_LIBS@ LASH_CFLAGS = @LASH_CFLAGS@ LASH_LIBS = @LASH_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNOMECANVAS_CFLAGS = @LIBGNOMECANVAS_CFLAGS@ LIBGNOMECANVAS_LIBS = @LIBGNOMECANVAS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@ LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@ LIBSNDFILE_CFLAGS = @LIBSNDFILE_CFLAGS@ LIBSNDFILE_LIBS = @LIBSNDFILE_LIBS@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OLD_JACK_MIDI_CFLAGS = @OLD_JACK_MIDI_CFLAGS@ OLD_JACK_MIDI_LIBS = @OLD_JACK_MIDI_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PHAT_CFLAGS = @PHAT_CFLAGS@ PHAT_LIBS = @PHAT_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPECIMEN_CFLAGS = @SPECIMEN_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ acx_pthread_config = @acx_pthread_config@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = gui specimen_SOURCES = alsadriver.c jackdriver.c mixer.c mixer.h sample.c \ sample.h driver.c driver.h midi.c midi.h patch.c patch.h \ specimen.c specimen.h beef.c beef.h maths.c maths.h ticks.c \ ticks.h adsr.c adsr.h lfo.c lfo.h sync.c sync.h control.h \ $(am__append_1) INCLUDES = \ @ALSA_CFLAGS@ \ @JACK_CFLAGS@ \ @LIBSAMPLERATE_CFLAGS@ \ @LIBSNDFILE_CFLAGS@ \ @LIBXML_CFLAGS@ \ @LASH_CFLAGS@ \ @GTK_CFLAGS@ specimen_LDADD = \ gui/libgui.a \ @PHAT_LIBS@ \ @ALSA_LIBS@ \ @JACK_LIBS@ \ @LIBSAMPLERATE_LIBS@ \ @LIBSNDFILE_LIBS@ \ @LIBXML_LIBS@ \ @LASH_LIBS@ \ @GTK_LIBS@ \ @LIBGNOMECANVAS_LIBS@ EXTRA_DIST = gprof-helper.c all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) specimen$(EXEEXT): $(specimen_OBJECTS) $(specimen_DEPENDENCIES) @rm -f specimen$(EXEEXT) $(LINK) $(specimen_LDFLAGS) $(specimen_OBJECTS) $(specimen_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adsr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsadriver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beef.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jackdriver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lashdriver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maths.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mixer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/specimen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ticks.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-binPROGRAMS clean-generic clean-recursive ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-hdr distclean-recursive distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: specimen-0.5.2-rc3/src/config.h.in0000644000175000017500000000551010575351310013542 00000000000000/* src/config.h.in. Generated from configure.ac by autoheader. */ /* [whether], [to], [display], [debugging], [output], [or], [not] */ #undef DEBUG /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if we have jack midi support. */ #undef HAVE_JACK_MIDI /* Define if we have lash. */ #undef HAVE_LASH /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define if we have old jack midi support. */ #undef HAVE_OLD_JACK_MIDI /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to the necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc specimen-0.5.2-rc3/src/alsadriver.c0000644000175000017500000003000610466727727014037 00000000000000#include #include #include #include #include "specimen.h" #include "driver.h" #include "mixer.h" #include "sync.h" #include "gui/gui.h" #define ALSA_PCM_NEW_HW_PARAMS_API /* fuckstickers shoulda made the importance of this evident */ #define ALSA_PCM_NEW_SW_PARAMS_API #include #define FAIL -1 #define REDUNDANT -2 /* gtk stuff */ static GtkWidget* frame; static GtkWidget* frame_hbox; static GtkWidget* frame_vbox; static GtkWidget* radio_format_s16le; static GtkWidget* radio_format_s24le; static GtkWidget* radio_rate_44100; static GtkWidget* radio_rate_96000; static GtkWidget* entry_device; static GtkWidget* label_format; static GtkWidget* label_rate; static GtkWidget* label_device; static GtkWidget* button_restart; static GtkWidget* button_stop; /* alsa stuff */ static Atomic running = 0; static snd_pcm_t* handle; /* playback handle */ static void* buffer; static snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE; static int rate = 44100; static int periodsize = 2048; static pthread_t process_thread; static GString* device; #define CONVERT(x) ((void (*)(void* , float* , int))(x)) static void (*convert) (void* , float* , int); static int xrun (int err) { if (err == -EPIPE) { errmsg ("xrun\n"); if ((err = snd_pcm_prepare (handle)) < 0) { errmsg ("Unable to recover from xrun (%s)\n", snd_strerror (err)); return -1; } } else if (err == -ESTRPIPE) { errmsg ("Suspended\n"); while ((err = snd_pcm_resume (handle)) == -EAGAIN) sleep (1); if (err < 0) { if ((err = snd_pcm_prepare (handle)) < 0) { errmsg ("Failed to recover from suspend (%s)\n", snd_strerror (err)); return -1; } } errmsg ("Resumed\n"); } else { errmsg ("Unrecognized error code (%s)\n", snd_strerror (err)); return -1; } return 0; } static void convert_s24le (gint32* dest, float* src, int frames) { int i; for (i = 0; i < frames * 2; i++) dest[i] = src[i] * (0x7FFFFF); } static void convert_s16le (gint16* dest, float* src, int frames) { int i; for (i = 0; i < frames * 2; i++) dest[i] = src[i] * (0x7FFF); } static void process (void* arg) { int avail, write, wrote, err, quit; float* buf; quit = 0; buf = g_new0 (float, periodsize * 2); while (!quit) { if ((err = snd_pcm_wait (handle, -1)) < 0) { if (xrun (err) < 0) { break; } } else if (err == 0) { errmsg ("Timed out somehow... odd\n"); break; } while ((avail = snd_pcm_avail_update (handle)) < 0) { if (xrun (avail) < 0) { quit = 1; break; } } if (quit) break; while (avail) { write = avail > periodsize ? periodsize : avail; mixer_mixdown (buf, write); convert (buffer, buf, write); if ((wrote = snd_pcm_writei (handle, buffer, write)) < 0) { if (xrun (wrote) < 0) { quit = 1; break; } } else { if (wrote != write) errmsg ("%d frames written of %d expected\n", wrote, write); avail -= wrote; } } if (!running) quit = 1; } if ((err = snd_pcm_close (handle)) < 0) errmsg ("Unable to close device (%s)\n", snd_strerror (err)); if (buffer != NULL) free (buffer); if (buf != NULL) free (buf); debug ("Halted\n"); } /* update preference to reflect config gui */ static void update_prefs ( ) { int old_rate; /* format */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_format_s16le))) { format = SND_PCM_FORMAT_S16_LE; } else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_format_s24le))) { format = SND_PCM_FORMAT_S24_LE; } /* rate */ old_rate = rate; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_rate_44100))) { rate = 44100; } else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_rate_96000))) { rate = 96000; } /* device */ g_string_assign (device, (char*) gtk_entry_get_text (GTK_ENTRY (entry_device))); } static int start ( ) { snd_pcm_hw_params_t* hwparams; snd_pcm_access_t access = SND_PCM_ACCESS_RW_INTERLEAVED; int channels = 2; int err; if (running) { errmsg ("Alsa Driver is already running, so not re-initializing\n"); return REDUNDANT; } debug ("Initializing Alsa Driver...\n"); update_prefs ( ); if ((err = snd_pcm_open (&handle, device->str, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0) { errmsg ("Failed to open device %s for playback (%s)\n", device->str, snd_strerror (err)); running = 0; errmsg ("Failed to initialize\n"); return FAIL; } /* setup the device */ snd_pcm_hw_params_alloca (&hwparams); if (hwparams == NULL) { errmsg ("Failed to allocate space for hardware parameters structure (%s)\n", snd_strerror (err)); goto fail; } if ((err = snd_pcm_hw_params_any (handle, hwparams)) < 0) { errmsg ("Failed to initialize hardware parameters structure (%s)\n", snd_strerror (err)); goto fail; } if ((err = snd_pcm_hw_params_set_access (handle, hwparams, access)) < 0) { errmsg ("Failed to set access mode (%s)\n", snd_strerror (err)); goto fail; } if ((err = snd_pcm_hw_params_set_format (handle, hwparams, format)) < 0) { errmsg ("Failed to set format (%s)\n", snd_strerror (err)); goto fail; } if ((err = snd_pcm_hw_params_set_rate (handle, hwparams, rate, 0)) < 0) { errmsg ("Failed to set sample rate to %d (%s)\n", rate, snd_strerror (err)); goto fail; } if ((err = snd_pcm_hw_params_set_channels (handle, hwparams, channels)) < 0) { errmsg ("Failed to set channels to %d (%s)\n", 2, snd_strerror (err)); goto fail; } if ((err = snd_pcm_hw_params_set_buffer_size (handle, hwparams, periodsize * 2)) < 0) { errmsg ("Failed to set buffer size to %d (%s)\n", periodsize * 2, snd_strerror (err)); goto fail; } if ((err = snd_pcm_hw_params_set_period_size (handle, hwparams, periodsize, 0)) < 0) { errmsg ("Failed to set period size to %d (%s)\n", periodsize, snd_strerror (err)); goto fail; } if ((err = snd_pcm_hw_params (handle, hwparams)) < 0) { errmsg ("Failed to apply hardware parameters (%s)\n", snd_strerror (err)); goto fail; } /* allocate write buffer */ if (format == SND_PCM_FORMAT_S16_LE) { buffer = g_new0 (gint16, channels * periodsize); convert = CONVERT (convert_s16le); } else if (format == SND_PCM_FORMAT_S24_LE) { buffer = g_new0 (gint32, channels * periodsize); convert = CONVERT (convert_s24le); } else { errmsg ("Invalid internal format... AIEEE!\n"); goto fail; } /* success */ driver_set_samplerate (rate); driver_set_buffersize (periodsize); mixer_flush(); running = 1; pthread_create (&process_thread, NULL, (void* ) process, NULL); debug ("Initialization complete\n"); return 0; fail: snd_pcm_close (handle); running = 0; errmsg ("Failed to initialize\n"); return FAIL; } static int stop ( ) { if (!running) { errmsg ("Not running, so not shutting down\n"); return 0; } else { debug ("Shutting down...\n"); running = 0; } pthread_join (process_thread, NULL); debug ("Shutdown successful\n"); return 0; } static void restart ( ) { stop ( ); start ( ); } static void cb_show (GtkWidget* widget, gpointer data) { if (rate == 96000) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_rate_96000), TRUE); } else { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_rate_44100), TRUE); } if (format == SND_PCM_FORMAT_S24_LE) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_format_s24le), TRUE); } else { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_format_s16le), TRUE); } gtk_entry_set_text (GTK_ENTRY (entry_device), device->str); sync_set_method (SYNC_METHOD_MIDI); } static void init ( ) { /* alsa settings frame */ frame = gtk_frame_new ("ALSA"); device = g_string_new ("plughw:0"); frame_vbox = gtk_vbox_new (FALSE, GUI_SPACING); gtk_container_set_border_width (GTK_CONTAINER (frame_vbox), GUI_SPACING); gtk_container_add (GTK_CONTAINER (frame), frame_vbox); gtk_widget_show (frame_vbox); frame_hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (frame_vbox), frame_hbox, FALSE, FALSE, 0); gtk_widget_show (frame_hbox); label_format = gtk_label_new ("Format:"); gtk_box_pack_start (GTK_BOX (frame_hbox), label_format, FALSE, FALSE, 0); gtk_widget_show (label_format); radio_format_s16le = gtk_radio_button_new_with_label (NULL, "S16LE"); gtk_box_pack_start (GTK_BOX (frame_hbox), radio_format_s16le, FALSE, FALSE, 0); gtk_widget_show (radio_format_s16le); radio_format_s24le = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio_format_s16le), "S24LE"); gtk_box_pack_start (GTK_BOX (frame_hbox), radio_format_s24le, FALSE, FALSE, 0); gtk_widget_show (radio_format_s24le); frame_hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (frame_vbox), frame_hbox, FALSE, FALSE, 0); gtk_widget_show (frame_hbox); label_rate = gtk_label_new ("Rate:"); gtk_box_pack_start (GTK_BOX (frame_hbox), label_rate, FALSE, FALSE, 0); gtk_widget_show (label_rate); radio_rate_44100 = gtk_radio_button_new_with_label (NULL, "44100"); gtk_box_pack_start (GTK_BOX (frame_hbox), radio_rate_44100, FALSE, FALSE, 0); gtk_widget_show (radio_rate_44100); radio_rate_96000 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio_rate_44100), "96000"); gtk_box_pack_start (GTK_BOX (frame_hbox), radio_rate_96000, FALSE, FALSE, 0); gtk_widget_show (radio_rate_96000); frame_hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (frame_vbox), frame_hbox, FALSE, FALSE, 0); gtk_widget_show (frame_hbox); label_device = gtk_label_new ("Device:"); gtk_box_pack_start (GTK_BOX (frame_hbox), label_device, FALSE, FALSE, 0); gtk_widget_show (label_device); entry_device = gtk_entry_new ( ); gtk_box_pack_start (GTK_BOX (frame_hbox), entry_device, FALSE, FALSE, 0); gtk_entry_set_text (GTK_ENTRY (entry_device), "plughw:0"); gtk_widget_show (entry_device); frame_hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (frame_vbox), frame_hbox, FALSE, FALSE, 0); gtk_widget_show (frame_hbox); button_restart = gtk_button_new_with_label ("Restart"); gtk_box_pack_start (GTK_BOX (frame_hbox), button_restart, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button_restart), "clicked", G_CALLBACK (restart), NULL); gtk_widget_show (button_restart); button_stop = gtk_button_new_with_label ("Stop"); gtk_box_pack_start (GTK_BOX (frame_hbox), button_stop, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button_stop), "clicked", G_CALLBACK (stop), NULL); gtk_widget_show (button_stop); /* we only allow midi syncing */ g_signal_connect_swapped (G_OBJECT (frame), "show", G_CALLBACK (cb_show), NULL); return; } static GtkWidget* getwidget ( ) { return frame; } static int getrate ( ) { return rate; } static int getperiodsize ( ) { return periodsize; } static const char* getname ( ) { return "ALSA"; } Driver alsa_driver = { init, start, stop, getrate, getperiodsize, getwidget, getname }; specimen-0.5.2-rc3/src/jackdriver.c0000644000175000017500000002471610575117614014027 00000000000000#include #include #include #include #include #if defined HAVE_JACK_MIDI || defined HAVE_OLD_JACK_MIDI #include #endif #include #include #include #include "specimen.h" #include "driver.h" #include "patch.h" #include "mixer.h" #include "sync.h" #include "lfo.h" #include "gui/gui.h" /* prototypes */ static int start (char* forced_instancename); static int stop ( ); /* file-global variables */ static GtkWidget* config_frame; static jack_port_t* lport; static jack_port_t* rport; #if defined HAVE_JACK_MIDI || defined HAVE_OLD_JACK_MIDI static jack_port_t* midiport; #endif static jack_client_t* client; static float* buffer; static int rate = 44100; static int periodsize = 2048; static int running = 0; static pthread_mutex_t running_mutex = PTHREAD_MUTEX_INITIALIZER; /* working together to stop CTS */ typedef jack_default_audio_sample_t jack_sample_t; #if defined HAVE_JACK_MIDI || defined HAVE_OLD_JACK_MIDI static void map_control(unsigned char chan, int param, float value, Tick tick) { static struct { int cc; ControlParamType param; float bias; float scale; } map[] = { { 5, CONTROL_PARAM_PORTAMENTO_TIME, 0, 1}, { 7, CONTROL_PARAM_VOLUME, 0, 1}, {10, CONTROL_PARAM_PANNING, -1, 2}, {65, CONTROL_PARAM_PORTAMENTO, 0, 1}, {71, CONTROL_PARAM_RESONANCE, 0, 1}, {74, CONTROL_PARAM_CUTOFF, 0, 1} }; int i; for (i=0; ievent_count; #endif /* HAVE_OLD_JACK_MIDI */ unsigned char* midi_data; #endif /* HAVE_JACK_MIDI || HAVE_OLD_JACK_MIDI */ /* transport state info */ static jack_transport_state_t last_state = JackTransportStopped; jack_transport_state_t new_state; /* transport tempo info */ static float last_tempo = -1; float new_tempo; /* behold: the jack_transport sync code */ if (((new_state = jack_transport_query (client, &pos)) == JackTransportRolling) && (pos.valid & JackPositionBBT)) { new_tempo = pos.beats_per_minute; if ((last_state == JackTransportStopped) || (last_state == JackTransportStarting)) { debug ("got transport start\n"); sync_start_jack (new_tempo); } else if (new_tempo != last_tempo) { debug ("got tempo change\n"); sync_start_jack (new_tempo); } last_tempo = new_tempo; } last_state = new_state; #if defined HAVE_JACK_MIDI || defined HAVE_OLD_JACK_MIDI /* send the JACK MIDI events to the mixer */ while (event_index < event_count) { jack_midi_event_get(&jack_midi_event, midi_buf,event_index, frames); midi_data = jack_midi_event.buffer; /* TODO: handle 14-bit controllers and RPNs and NRPNs */ /* note-off */ if (((midi_data[0] & 0xF0) == 0x80) || ((midi_data[0] & 0x90) == 0x90 && midi_data[2] == 0)) { mixer_direct_note_off(midi_data[0] & 0x0F, midi_data[1], jack_midi_event.time); } /* note-on */ else if ((midi_data[0] & 0xF0) == 0x90) { mixer_direct_note_on(midi_data[0] & 0x0F, midi_data[1], midi_data[2] / 127.0, jack_midi_event.time); } /* controller */ else if ((midi_data[0] & 0xF0) == 0xB0) { map_control(midi_data[0] & 0x0F, midi_data[1], midi_data[2] / 127.0, jack_midi_event.time); } /* pitch bend */ else if ((midi_data[0] & 0xF0) == 0xE0) { mixer_direct_control(midi_data[0] & 0x0F, CONTROL_PARAM_PITCH, ((midi_data[2] << 7) | midi_data[1]) / 8192.0, jack_midi_event.time); } event_index++; } #endif /* HAVE_JACK_MIDI || HAVE_OLD_JACK_MIDI */ mixer_mixdown (buffer, frames); for (i = 0; i < frames; i++) { l[i] = buffer[i * 2]; r[i] = buffer[i * 2 + 1]; } return 0; } static int sample_rate_change (jack_nframes_t r, void* arg) { rate = r; driver_set_samplerate (rate); return 0; } static int buffer_size_change (jack_nframes_t b, void* arg) { float* new; float* old; if ((new = malloc (sizeof (float) * b * 2)) == NULL) { errmsg ("Failed to change buffer size\n"); stop ( ); } old = buffer; buffer = new; if (old != NULL) free (old); periodsize = b; /* let the rest of the world know the good news */ driver_set_buffersize (b); return 0; } static void shutdown (void* arg) { pthread_mutex_lock (&running_mutex); running = 0; pthread_mutex_unlock (&running_mutex); return; } static void restart ( ) { stop ( ); start (NULL); } static void cb_sync (GtkToggleButton* button, gpointer data) { if (gtk_toggle_button_get_active (button)) sync_set_method (SYNC_METHOD_JACK); else sync_set_method (SYNC_METHOD_MIDI); } static void init ( ) { GtkWidget* hbox; GtkWidget* vbox; GtkWidget* button; config_frame = gtk_frame_new ("JACK"); vbox = gtk_vbox_new (FALSE, GUI_SPACING); gtk_container_set_border_width (GTK_CONTAINER (vbox), GUI_SPACING); gtk_container_add (GTK_CONTAINER (config_frame), vbox); gtk_widget_show (vbox); hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); button = gtk_button_new_with_label ("Reconnect"); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (restart), NULL); gtk_widget_show (button); button = gtk_button_new_with_label ("Disconnect"); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (stop), NULL); gtk_widget_show (button); button = gtk_check_button_new_with_label ("Sync to JACK Transport instead of MIDI"); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (cb_sync), NULL); gtk_widget_show (button); /* make sure that we reset the sync method appropriately after * the user switches to alsa */ g_signal_connect_swapped (G_OBJECT (config_frame), "show", G_CALLBACK (cb_sync), (gpointer) button); } static int start (char* forced_instancename) { const char** ports; char* instancename; if(forced_instancename) { instancename = strdup(forced_instancename); } else { instancename = strdup(DEFAULT_INSTANCE_NAME); } debug ("Initializing Jack Driver...\n"); pthread_mutex_lock (&running_mutex); running = 0; if ((client = jack_client_open (instancename, JackNullOption, NULL)) == 0) { errmsg ("Failed to open new jack client: %s\n", instancename); pthread_mutex_unlock (&running_mutex); return -1; } jack_set_process_callback (client, process, 0); jack_on_shutdown (client, shutdown, 0); lport = jack_port_register (client, "out_left", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); rport = jack_port_register (client, "out_right", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); #if defined HAVE_JACK_MIDI || defined HAVE_OLD_JACK_MIDI midiport = jack_port_register (client, "midi_input", JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0); #endif /* HAVE_JACK_MIDI || HAVE_OLD_JACK_MIDI */ rate = jack_get_sample_rate (client); driver_set_samplerate (rate); jack_set_sample_rate_callback (client, sample_rate_change, 0); periodsize = jack_get_buffer_size (client); driver_set_buffersize (periodsize); jack_set_buffer_size_callback (client, buffer_size_change, 0); if ((buffer = malloc (sizeof (float) * periodsize * 2)) == NULL) { errmsg ("Failed to allocate space for buffer\n"); jack_client_close (client); pthread_mutex_unlock (&running_mutex); return -1; } mixer_flush(); if (jack_activate (client) != 0) { errmsg ("Failed to activate client\n"); jack_client_close (client); pthread_mutex_unlock (&running_mutex); return -1; } ports = jack_get_ports (client, NULL, NULL, JackPortIsInput | JackPortIsPhysical); if (ports[0] != NULL) { if (jack_connect (client, jack_port_name (lport), ports[0]) != 0) errmsg ("Cannot connect left output port\n"); if (ports[1] != NULL) { if (jack_connect (client, jack_port_name (rport), ports[1]) != 0) errmsg ("Cannot connect right output port\n"); } else { errmsg ("Cannot connect right output port\n"); } free (ports); } else { errmsg ("Cannot connect output ports\n"); } debug ("Initialization complete\n"); running = 1; pthread_mutex_unlock (&running_mutex); return 0; } static int stop ( ) { pthread_mutex_lock (&running_mutex); if (running) { debug ("Shutting down...\n"); jack_deactivate (client); jack_client_close (client); if (buffer != NULL) free (buffer); debug ("Shutdown complete\n"); } else { debug ("Not running, so not shutting down\n"); } running = 0; pthread_mutex_unlock (&running_mutex); return 0; } static int getrate ( ) { return rate; } static int getperiodsize ( ) { return periodsize; } static const char* getname ( ) { return "JACK"; } static GtkWidget* getwidget ( ) { return config_frame; } Driver jack_driver = { init, start, stop, getrate, getperiodsize, getwidget, getname }; specimen-0.5.2-rc3/src/mixer.c0000644000175000017500000002302410467165265013023 00000000000000#include #include #include "patch.h" #include "specimen.h" #include "driver.h" #include "sample.h" #include "maths.h" #include "ticks.h" #include "lfo.h" /* magic numbers */ enum { EVENTMAX = 1024, }; /* event codes */ typedef enum { MIXER_NOTEON = 1, MIXER_NOTEOFF, MIXER_NOTEON_WITH_ID, MIXER_NOTEOFF_WITH_ID, MIXER_CONTROL } MixerEventType; typedef struct { int chan; int note; float vel; } MixerNoteEvent; typedef struct { int id; int note; float vel; } MixerIdNoteEvent; typedef struct { int chan; PatchParamType param; float value; } MixerControlEvent; /* type for ringbuffer of incoming events */ typedef struct _Event { MixerEventType type; /* type of event */ Tick ticks; /* time of event's occurence */ union { MixerNoteEvent note; MixerIdNoteEvent id_note; MixerControlEvent control; }; } Event; /* special structure for previewing samples */ typedef struct _MixerPreview { Atomic active; Sample* sample; int next_frame; pthread_mutex_t mutex; } MixerPreview; /* general variables */ static float volume = 0.0; /* master volume */ static MixerPreview preview; /* current preview sample */ static Event events[EVENTMAX]; /* events coming from the MIDI thread */ static Event* volatile writer = events; static Event* volatile reader = events; static Event direct_events[EVENTMAX]; /* events coming from the audio thread */ static int direct_events_end; static int samplerate = DRIVER_DEFAULT_SAMPLERATE; /* advance reader event vector */ inline static void advance_reader ( ) { reader = (reader + 1 >= events + EVENTMAX) ? events : reader + 1; } /* advance writer event vector */ inline static void advance_writer ( ) { writer = (writer + 1 >= events + EVENTMAX) ? events : writer + 1; } /* mixdown current preview sample (if any) into buf */ inline static void preview_render (float *buf, int frames) { int i, j; /* if there is a sample currently being previewed let's throw it into the mix */ if (preview.active && pthread_mutex_trylock (&preview.mutex) == 0) { if (preview.sample->sp != NULL) { /* fill the buf with samples from preview (two samples per frame) */ for (i = 0, j = preview.next_frame * 2; i < frames * 2 && j < preview.sample->frames * 2; i++, j++) buf[i] += preview.sample->sp[j] * log_volume(DEFAULT_VOLUME); /* increment next frame indicator (half as much as the number of samples written) */ if ((preview.next_frame = j / 2) >= preview.sample->frames) { preview.active = 0; sample_free_file (preview.sample); } } else { preview.active = 0; } pthread_mutex_unlock (&preview.mutex); } } /* stop all noise */ void mixer_flush ( ) { /* skip any queued ringbuffer events */ reader = writer; patch_flush_all ( ); /* stop any previews */ pthread_mutex_lock(&preview.mutex); if (preview.active && preview.sample->sp) { /* this will "mark" the preview sample for deletion next * mixdown */ preview.next_frame = preview.sample->frames; } pthread_mutex_unlock(&preview.mutex); } /* constructor */ void mixer_init ( ) { debug ("initializing...\n"); volume = DEFAULT_VOLUME; pthread_mutex_init (&preview.mutex, NULL); preview.sample = sample_new ( ); debug ("done\n"); } /* mix current soundscape into buf */ void mixer_mixdown (float *buf, int frames) { Tick curticks = ticks_get_ticks ( ); /* - jack_frames_since_cycle_start() */ Event* event = NULL; int wrote = 0; int write; int i; int d = 0; float logvol = 0.0; /* clear the buffer */ for (i = 0; i < frames * 2; i++) buf[i] = 0.0; /* adjust the ticks in the direct events */ for (i = 0; i < direct_events_end; ++i) direct_events[i].ticks += curticks - frames; /* get the first event */ if (reader != writer) { if (d < direct_events_end && direct_events[d].ticks < reader->ticks) { event = &direct_events[d++]; } else { event = reader; advance_reader(); } } else if (d < direct_events_end) event = &direct_events[d++]; /* process events */ while (event) { if (event->ticks > curticks) break; write = event->ticks - (curticks - frames + wrote); if (write > 0) { patch_render(buf + wrote*2, write); wrote += write; } switch (event->type) { case MIXER_NOTEON: patch_trigger (event->note.chan, event->note.note, event->note.vel, event->ticks); break; case MIXER_NOTEON_WITH_ID: patch_trigger_with_id (event->id_note.id, event->id_note.note, event->id_note.vel, event->ticks); break; case MIXER_NOTEOFF: patch_release (event->note.chan, event->note.note); break; case MIXER_NOTEOFF_WITH_ID: patch_release_with_id (event->id_note.id, event->id_note.note); break; case MIXER_CONTROL: patch_control(event->control.chan, event->control.param, event->control.value); } /* get next event */ if (reader != writer) { if (d < direct_events_end && direct_events[d].ticks < reader->ticks) { event = &direct_events[d++]; } else { event = reader; advance_reader(); } } else if (d < direct_events_end) event = &direct_events[d++]; else event = NULL; } /* reset the direct event buffer */ direct_events_end = 0; if (wrote < frames) patch_render (buf + wrote*2, frames - wrote); preview_render (buf, frames); /* scale to master volume */ logvol = log_volume(volume); for (i = 0; i < frames * 2; i++) buf[i] *= logvol; } /* queue a note-off event */ void mixer_note_off (int chan, int note) { writer->type = MIXER_NOTEOFF; writer->ticks = ticks_get_ticks ( ); writer->note.chan = chan; writer->note.note = note; advance_writer ( ); } /* queue a note-off event by patch id */ void mixer_note_off_with_id (int id, int note) { writer->type = MIXER_NOTEOFF_WITH_ID; writer->ticks = ticks_get_ticks ( ); writer->id_note.id = id; writer->id_note.note = note; advance_writer ( ); } /* queue a note-on event */ void mixer_note_on (int chan, int note, float vel) { writer->type = MIXER_NOTEON; writer->ticks = ticks_get_ticks ( ); writer->note.chan = chan; writer->note.note = note; writer->note.vel = vel; advance_writer ( ); } /* queue a note-on event by patch id */ void mixer_note_on_with_id (int id, int note, float vel) { writer->type = MIXER_NOTEON_WITH_ID; writer->ticks = ticks_get_ticks ( ); writer->id_note.id = id; writer->id_note.note = note; writer->id_note.vel = vel; advance_writer ( ); } /* queue control change event */ void mixer_control(int chan, ControlParamType param, float value) { writer->type = MIXER_CONTROL; writer->ticks = ticks_get_ticks ( ); writer->control.chan = chan; writer->control.param = param; writer->control.value = value; advance_writer ( ); } /* queue a note-off event from the audio thread */ void mixer_direct_note_off (int chan, int note, Tick tick) { if (direct_events_end < EVENTMAX) { direct_events[direct_events_end].type = MIXER_NOTEOFF; direct_events[direct_events_end].ticks = tick; direct_events[direct_events_end].note.chan = chan; direct_events[direct_events_end].note.note = note; ++direct_events_end; } } /* queue a note-on event from the audio thread */ void mixer_direct_note_on (int chan, int note, float vel, Tick tick) { if (direct_events_end < EVENTMAX) { direct_events[direct_events_end].type = MIXER_NOTEON; direct_events[direct_events_end].ticks = tick; direct_events[direct_events_end].note.chan = chan; direct_events[direct_events_end].note.note = note; direct_events[direct_events_end].note.vel = vel; ++direct_events_end; } } /* queue control change event from the audio thread */ void mixer_direct_control(int chan, ControlParamType param, float value, Tick tick) { if (direct_events_end < EVENTMAX) { direct_events[direct_events_end].type = MIXER_CONTROL; direct_events[direct_events_end].ticks = tick; direct_events[direct_events_end].control.chan = chan; direct_events[direct_events_end].control.param = param; direct_events[direct_events_end].control.value = value; ++direct_events_end; } } /* preview a sample file */ void mixer_preview (char *name) { pthread_mutex_lock (&preview.mutex); preview.active = 0; sample_load_file (preview.sample, name, samplerate); preview.next_frame = 0; preview.active = 1; pthread_mutex_unlock (&preview.mutex); } /* set the master volume */ int mixer_set_volume (float vol) { if (vol < 0.0 || vol > 1.0) return -1; volume = vol; return 0; } /* return the master volume */ float mixer_get_volume(void) { return volume; } /* set internally assumed samplerate */ void mixer_set_samplerate (int rate) { samplerate = rate; } /* destructor */ void mixer_shutdown ( ) { debug ("shutting down...\n"); sample_free (preview.sample); debug ("done\n"); } specimen-0.5.2-rc3/src/mixer.h0000644000175000017500000000171610467165265013034 00000000000000#ifndef __MIXER_H__ #define __MIXER_H__ #include "control.h" #include "ticks.h" void mixer_flush (void); void mixer_init (void); void mixer_mixdown (float* buf, int frames); void mixer_note_off (int chan, int note); void mixer_note_off_with_id (int id, int note); void mixer_note_on (int chan, int note, float vel); void mixer_note_on_with_id (int id, int note, float vel); void mixer_control (int chan, ControlParamType param, float value); void mixer_direct_note_off (int chan, int note, Tick tick); void mixer_direct_note_on (int chan, int note, float vel, Tick tick); void mixer_direct_control (int chan, ControlParamType param, float value, Tick tick); void mixer_preview (char* name); int mixer_set_volume (float volume); float mixer_get_volume (void); void mixer_set_samplerate (int rate); void mixer_shutdown (void); #endif /* __MIXER_H__ */ specimen-0.5.2-rc3/src/sample.c0000644000175000017500000000653110466727727013172 00000000000000#include #include #include #include #include "specimen.h" #include "sample.h" Sample* sample_new ( ) { Sample* sample; sample = g_new0 (Sample, 1); sample->sp = NULL; sample->frames = 0; sample->file = g_string_new (""); return sample; } void sample_free (Sample* sample) { g_string_free (sample->file, TRUE); g_free (sample->sp); g_free (sample); } int sample_load_file (Sample* sample, const char* name, int rate) { SNDFILE* sfp; SF_INFO sfinfo; SRC_DATA data; float* tmp; double ratio; int err, i; if ((sfp = sf_open (name, SFM_READ, &sfinfo)) == NULL) { debug ("libsndfile doesn't like %s\n", name); return -1; } if (sfinfo.channels > 2) { errmsg ("Data can't have more than 2 channels\n"); sf_close (sfp); return -1; } /* set aside space for samples */ if ((tmp = malloc (sfinfo.frames * sfinfo.channels * sizeof (float))) == NULL) { errmsg ("Unable to allocate space for samples!\n"); sf_close (sfp); return -1; } /* free existing samples, if any, and point to new space */ if (sample->sp != NULL) free (sample->sp); sample->sp = tmp; sample->frames = (int) sfinfo.frames; g_string_assign (sample->file, name); /* load sample file into memory */ if (sf_readf_float (sfp, sample->sp, sfinfo.frames) != sfinfo.frames) { errmsg ("Didn't read correct number of frames into memory... this is bad...\n"); } else { debug ("Read %d frames into memory.\n", (int) sfinfo.frames); } /* resample if necessary */ if ((ratio = rate / (sfinfo.samplerate * 1.0)) != 1.0) { debug ("Resampling... \n"); if ((tmp = malloc (sizeof (float) * sfinfo.frames * sfinfo.channels * ratio)) == NULL) { errmsg ("Couldn't malloc( ) output buffer, unable to samplerate convert\n"); sf_close (sfp); return -1; } data.src_ratio = ratio; data.data_in = sample->sp; data.data_out = tmp; data.input_frames = sfinfo.frames; data.output_frames = sfinfo.frames * ratio; if ((err = src_simple (&data, SRC_SINC_BEST_QUALITY, sfinfo.channels)) != 0) { errmsg ("Failed to resample (%s)\n", src_strerror (err)); free (tmp); sf_close (sfp); return -1; } if (sample->sp != NULL) free (sample->sp); sample->sp = tmp; sample->frames = data.output_frames_gen; debug ("done.\n"); } /* convert mono samples to stereo if necessary */ if (sfinfo.channels == 1) { debug ("Converting mono to stereo... "); if ((tmp = malloc (sizeof (float) * sample->frames * 2)) == NULL) { errmsg ("Couldn't malloc( ) output buffer, unable to convert to stereo\n"); sf_close (sfp); return -1; } for (i = 0; i < sample->frames; i++) { tmp[2 * i] = sample->sp[i]; tmp[2 * i + 1] = sample->sp[i]; } if (sample->sp != NULL) free (sample->sp); sample->sp = tmp; debug ("done\n"); } sf_close (sfp); return 0; } void sample_free_file (Sample* sample) { g_free (sample->sp); sample->sp = NULL; g_string_assign (sample->file, ""); } const char* sample_get_file (Sample* sample) { return sample->file->str; } specimen-0.5.2-rc3/src/sample.h0000644000175000017500000000110110466727727013163 00000000000000#ifndef __SAMPLE_H__ #define __SAMPLE_H__ #include typedef struct _Sample { /* Public */ float* sp; /* samples pointer */ int frames; /* number of frames (not samples) * pointed to by sp */ /* Private */ GString* file; /* name of current file */ } Sample; Sample* sample_new ( ); void sample_free (Sample* ); int sample_load_file (Sample* sample, const char* name, int rate); void sample_free_file (Sample* sample); const char* sample_get_file (Sample* sample); #endif /* __SAMPLE_H__ */ specimen-0.5.2-rc3/src/driver.c0000644000175000017500000000377510557730621013177 00000000000000#include "specimen.h" #include "driver.h" #include "lfo.h" #include "patch.h" #include "mixer.h" #include "ticks.h" /* available drivers */ extern Driver jack_driver; extern Driver alsa_driver; static Driver* drivers[] = { &jack_driver, &alsa_driver, NULL }; /* number of drivers available (we set this var in driver_init ( ) */ static int ndrivers = 0; /* which driver we are currently using */ static int curdriver = -1; void driver_init ( ) { int i; for (i = 0; drivers[i] != NULL; i++) drivers[i]->init ( ); if ((ndrivers = i) < 0) ndrivers = 0; } int driver_start (int id, char* forced_instance_name) { if (id < 0 || id >= ndrivers) return DRIVER_ERR_ID; if (ndrivers <= 0) return DRIVER_ERR_OTHER; if (curdriver >= 0) drivers[curdriver]->stop ( ); curdriver = id; // jack driver requires an argument if(id==0){ return drivers[id]->start (forced_instance_name); } return drivers[id]->start ( ); } void driver_stop ( ) { if (curdriver < 0) return; drivers[curdriver]->stop ( ); } int driver_get_count ( ) { return ndrivers; } const char* driver_get_name (int id) { if (id < 0 || id >= ndrivers) return NULL; return drivers[id]->getname ( ); } GtkWidget* driver_get_widget (int id) { if (id < 0 || id >= ndrivers) return NULL; return drivers[id]->getwidget ( ); } int driver_set_samplerate (int rate) { if (rate <= 0) { debug ("can't accept samplerate %d\n", rate); return DRIVER_ERR_OTHER; } /* tell everybody our (potentially new) samplerate */ lfo_set_samplerate (rate); patch_set_samplerate (rate); mixer_set_samplerate (rate); ticks_set_samplerate (rate); return 0; } int driver_set_buffersize (int nframes) { if (nframes <= 0) { debug ("can't accept buffersize %d\n", nframes); return DRIVER_ERR_OTHER; } /* tell everybody our (potentially new) buffersize */ patch_set_buffersize (nframes); return 0; } specimen-0.5.2-rc3/src/driver.h0000644000175000017500000000216410557746130013175 00000000000000#ifndef __DRIVER_H__ #define __DRIVER_H__ #include /* error codes */ enum { DRIVER_ERR_ID = -1, DRIVER_ERR_OTHER = -2 }; /* magic numbers */ enum { DRIVER_DEFAULT_SAMPLERATE = 44100 }; /* public class definition for drivers */ typedef struct _Driver { void (*init) ( ); int (*start) ( ); int (*stop) ( ); int (*getrate) ( ); int (*getperiodsize) ( ); GtkWidget* (*getwidget) ( ); const char* (*getname) ( ); } Driver; void driver_init ( ); int driver_start (int id, char* forced_instance_name); void driver_stop ( ); int driver_get_count ( ); const char* driver_get_name (int id); GtkWidget* driver_get_widget (int id); /* this function should only be called by drivers when they start * and/or their samplerate changes */ int driver_set_samplerate (int rate); /* this function should only be called by drivers when they start * and/or ther buffersize changes */ int driver_set_buffersize (int nframes); #endif /* __DRIVER_H__ */ specimen-0.5.2-rc3/src/midi.c0000644000175000017500000001126110466746442012622 00000000000000/* predominantly ripped from the alsa programming tutorial */ #include #include #include #include #include #include #include "specimen.h" #include "mixer.h" #include "midi.h" #include "sync.h" #include "control.h" static Atomic running = 0; static pthread_t midi_thread; /* work out the current bpm from the midi queue. */ static float calc_bpm (snd_seq_t* handle, int q) { float bpm; snd_seq_queue_tempo_t* tempo; snd_seq_queue_tempo_alloca (&tempo); /* convert microsec per quarter to bpm */ snd_seq_get_queue_tempo (handle, q, tempo); if (snd_seq_queue_tempo_get_tempo (tempo) == 0) { errmsg ("about to encounter a floating point exception\n"); errmsg ("bailing out and providing an arbitrary tempo of 120.0\n"); return 120.0; } bpm = 60000000 / snd_seq_queue_tempo_get_tempo (tempo); return bpm; } static void map_control(unsigned char chan, int param, float value) { static struct { int cc; ControlParamType param; float bias; float scale; } map[] = { { 5, CONTROL_PARAM_PORTAMENTO_TIME, 0, 1}, { 7, CONTROL_PARAM_VOLUME, 0, 1}, {10, CONTROL_PARAM_PANNING, -1, 2}, {65, CONTROL_PARAM_PORTAMENTO, 0, 1}, {71, CONTROL_PARAM_RESONANCE, 0, 1}, {74, CONTROL_PARAM_CUTOFF, 0, 1} }; int i; for (i=0; itype) { case SND_SEQ_EVENT_NOTEON: if (ev->data.note.velocity == 0) mixer_note_off (ev->data.note.channel, ev->data.note.note); else mixer_note_on (ev->data.note.channel, ev->data.note.note, ev->data.note.velocity / 127.0); break; case SND_SEQ_EVENT_NOTEOFF: mixer_note_off (ev->data.note.channel, ev->data.note.note); break; case SND_SEQ_EVENT_START: /* TODO: account for tempo changes throughout the song */ sync_start_midi (calc_bpm (handle, ev->data.queue.queue)); break; case SND_SEQ_EVENT_CONTROLLER: map_control(ev->data.control.channel, ev->data.control.param, ev->data.control.value / 127.0); break; case SND_SEQ_EVENT_CONTROL14: case SND_SEQ_EVENT_NONREGPARAM: case SND_SEQ_EVENT_REGPARAM: map_control(ev->data.control.channel, ev->data.control.param, ev->data.control.value / 16383.0); break; case SND_SEQ_EVENT_PITCHBEND: mixer_control(ev->data.control.channel, CONTROL_PARAM_PITCH, ev->data.control.value / 8192.0); } snd_seq_free_event (ev); } while (snd_seq_event_input_pending (handle, 0) > 0); } static void* poll_events (void* arg) { snd_seq_t* handle = arg; int npfd; struct pollfd* pfd; npfd = snd_seq_poll_descriptors_count (handle, POLLIN); pfd = g_newa (struct pollfd, npfd); snd_seq_poll_descriptors (handle, pfd, npfd, POLLIN); while (1) { if (poll (pfd, npfd, 100) > 0) action (handle); if (!running) break; } return 0; } static int open_seq (snd_seq_t** handle) { int portid; if (snd_seq_open (handle, "default", SND_SEQ_OPEN_INPUT, 0) < 0) { debug ("Failed to open ALSA sequencer\n"); return MIDI_ERR_SEQ; } snd_seq_set_client_name (*handle, "specimen"); if ((portid = snd_seq_create_simple_port (*handle, "Specimen Sampler", SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE, SND_SEQ_PORT_TYPE_APPLICATION)) < 0) { debug ("Failed to create ALSA sequencer port\n"); return MIDI_ERR_PORT; } return 0; } int midi_start ( ) { int err; snd_seq_t* handle; if (running) { debug ("MIDI already running, so not starting\n"); return 0; } debug ("Starting MIDI\n"); if ((err = open_seq (&handle)) < 0) return err; running = 1; pthread_create (&midi_thread, NULL, poll_events, (void*) handle); debug ("MIDI started\n"); return 0; } void midi_stop ( ) { if (!running) { debug ("MIDI not running, so not stopping\n"); return; } debug ("Stopping MIDI\n"); running = 0; pthread_join (midi_thread, NULL); debug ("MIDI stopped\n"); } specimen-0.5.2-rc3/src/midi.h0000644000175000017500000000051210466744417012624 00000000000000#ifndef __MIDI_H__ #define __MIDI_H__ /* magic numbers */ enum { MIDI_ERR_SEQ = -1, /* error opening sequencer */ MIDI_ERR_PORT = -2, /* error creating port */ MIDI_NOTES = 128, /* number of notes */ MIDI_CHANS = 16, /* number of channels */ }; int midi_start ( ); void midi_stop ( ); #endif /* __MIDI_H__ */ specimen-0.5.2-rc3/src/patch.c0000644000175000017500000021067310466746442013007 00000000000000#include #include #include #include #include #include "specimen.h" #include "maths.h" #include "ticks.h" #include "patch.h" #include "sample.h" #include "adsr.h" #include "lfo.h" #include "driver.h" /* for DRIVER_DEFAULT_SAMPLERATE */ #include "midi.h" /* for MIDI_CHANS */ /* the minimum envelope release value we'll allow (to prevent clicks) */ const float PATCH_MIN_RELEASE = 0.05; /* how much time to wait before actually releasing legato patches; * this is to make sure that noteons immediately following noteoffs * stay "connected" */ const float PATCH_LEGATO_LAG = 0.05; /* how much to decrease v->declick_vol by each tick; calculated to * take PATCH_MIN_RELEASE seconds (the initial value below is * bogus) */ static float declick_dec = -0.1; /* how many ticks legato releases lag; calculated to take * PATCH_LEGATO_LAG seconds (init value is bogus) */ static int legato_lag = 20; /* in certain places, we consider values with an absolute value less * than or equal to this to be equivalent to zero */ const float ALMOST_ZERO = 0.000001; /* what sample rate we think the audio interface is running at */ static float samplerate = DRIVER_DEFAULT_SAMPLERATE; /* release modes */ typedef enum { RELEASE_NONE, /* release no voices */ RELEASE_NOTEOFF, /* release is a result of a midi noteoff */ RELEASE_CUTOFF, /* release is a result of a cut */ RELEASE_ALL, /* release all voices for a given patch */ } release_t; /* type for currently playing notes (voices) */ typedef struct _PatchVoice { gboolean active; /* whether this voices is playing or not */ Tick ticks; /* at what time this voice was activated */ int relset; /* how many ticks should pass before we release this voice (negative if N/A) */ release_t relmode; /* how we're being released (noteoff or cutoff) */ gboolean released; /* whether we've been released or not */ float declick_vol; /* current volume being applied to declick phase */ int dir; /* current direction (forward == 1, reverse == -1) */ int note; /* the note that activated us */ double pitch; /* what pitch ratio to play at */ double pitch_step; /* how much to increment pitch by each porta_tick */ int porta_ticks; /* how many ticks to increment pitch for */ int posi; /* integer sample index */ guint32 posf; /* fractional sample index */ int stepi; /* integer step amount */ guint32 stepf; /* fractional step amount */ float vel; /* velocity; volume of this voice */ ADSR vol; /* volume envelope */ ADSR pan; /* panning envelope */ ADSR ffreq; /* filter frequency envelope */ ADSR freso; /* filter resonance envelope */ ADSR pitchenv; /* pitch envelope */ LFO vol_lfo; /* volume lfo */ LFO pan_lfo; /* panning lfo */ LFO ffreq_lfo; /* filter frequency lfo */ LFO freso_lfo; /* filter resonance lfo */ LFO pitch_lfo; /* pitch lfo */ float fll; /* lowpass filter buffer, left */ float flr; /* lowpass filter buffer, right */ float fbl; /* bandpass filter buffer, left */ float fbr; /* bandpass filter buffer, right */ } PatchVoice; /* type for modulatable parameters */ typedef struct _PatchParam { float val; /* value of this parameter */ ADSRParams env; /* envelope parameters */ float env_amt; /* amount of envelope we add [-1.0, 1.0] */ gboolean env_on; /* whether we are using this envelope or not */ LFOParams lfo_params; /* lfo-params for this parameter */ float lfo_amt; /* amount of lfo we add [-1.0, 1.0] */ gboolean lfo_on; /* whether we are using this lfo or not */ gboolean use_global_lfo; /* whether to use global_lfo or voice's lfo */ LFO global_lfo; /* optionally used global lfo */ float* lfo_tab; /* used for storing global_lfo values */ float vel_amt; /* amount of velocity to use [0.0, 1.0] */ } PatchParam; /* type for array of instruments (called patches) */ typedef struct _Patch { int active; /* whether this instance of Patch is in use or not */ Sample* sample; /* sample data */ int display_index; /* order in which this Patch to be displayed */ char name[PATCH_MAX_NAME]; int channel; /* midi channel to listen on */ int note; /* midi note to listen on */ int range; /* whether to listen to a range of notes or not */ int lower_note; /* lowest note in range */ int upper_note; /* highest note in range */ int cut; /* cut signal this patch emits */ int cut_by; /* what cut signals stop this patch */ int sample_start; /* the first frame to play */ int sample_stop; /* the last frame to play */ int loop_start; /* the first frame to loop at */ int loop_stop; /* the last frame to loop at */ gboolean porta; /* whether portamento is being used or not */ float porta_secs; /* length of portamento slides in seconds */ int pitch_steps; /* range of pitch.val in halfsteps */ float pitch_bend; /* pitch bending factor */ gboolean mono; /* whether patch is monophonic or not */ gboolean legato; /* whether patch is played legato or not */ PatchPlayMode play_mode; /* how this patch is to be played */ PatchParam vol; /* volume: [0.0, 1.0] */ PatchParam pan; /* panning: [-1.0, 1.0] */ PatchParam ffreq; /* filter cutoff frequency: [0.0, 1.0] */ PatchParam freso; /* filter resonance: [0.0, 1.0] */ PatchParam pitch; /* pitch scaling: [0.0, 1.0] */ /* the following parameters handle the special case of "amount" * when modulating pitch by LFO and/or ADSR */ double lfo_pitch_max; double lfo_pitch_min; double env_pitch_max; double env_pitch_min; /* each patch is responsible for its own voices */ PatchVoice voices[PATCH_VOICE_COUNT]; int last_note; /* the last MIDI note value that played us */ /* used exclusively by patch_lock functions to ensure that * patch_render ignores this patch */ pthread_mutex_t mutex; } Patch; /* array of all patches */ static Patch patches[PATCH_COUNT]; /*****************************************************************************/ /************************ PRIVATE GENERAL HELPER FUNCTIONS********************/ /*****************************************************************************/ /* verifies that a given id refers to a valid patch */ inline static int isok (int id) { if (id < 0 || id >= PATCH_COUNT || !patches[id].active) return 0; return 1; } /* a utility function which finds the PatchParam* associated with * a particular PatchParamType */ static int patch_get_param (PatchParam** p, int id, PatchParamType param) { if (!isok (id)) return PATCH_ID_INVALID; switch (param) { case PATCH_PARAM_VOLUME: *p = &patches[id].vol; break; case PATCH_PARAM_PANNING: *p = &patches[id].pan; break; case PATCH_PARAM_CUTOFF: *p = &patches[id].ffreq; break; case PATCH_PARAM_RESONANCE: *p = &patches[id].freso; break; case PATCH_PARAM_PITCH: *p = &patches[id].pitch; break; default: return PATCH_PARAM_INVALID; break; } return 0; } /* locks a patch so that it will be ignored by patch_render() */ inline static void patch_lock (int id) { g_assert (id >= 0 && id < PATCH_COUNT); pthread_mutex_lock (&patches[id].mutex); } /* same as above, but returns immediately with EBUSY if mutex is already held */ inline static int patch_trylock (int id) { g_assert (id >= 0 && id < PATCH_COUNT); return pthread_mutex_trylock (&patches[id].mutex); } /* unlocks a patch after use */ inline static void patch_unlock (int id) { g_assert (id >= 0 && id < PATCH_COUNT); pthread_mutex_unlock (&patches[id].mutex); } /* triggers all global LFOs if they are used with amounts greater than 0 */ inline static void patch_trigger_global_lfos ( ) { int i; debug ("retriggering...\n"); for (i = 0; i < PATCH_COUNT; i++) { lfo_trigger (&patches[i].vol.global_lfo, &patches[i].vol.lfo_params); lfo_trigger (&patches[i].pan.global_lfo, &patches[i].pan.lfo_params); lfo_trigger (&patches[i].ffreq.global_lfo, &patches[i].ffreq.lfo_params); lfo_trigger (&patches[i].freso.global_lfo, &patches[i].freso.lfo_params); lfo_trigger (&patches[i].pitch.global_lfo, &patches[i].pitch.lfo_params); } debug ("done\n"); } /*****************************************************************************/ /************************ UTILITY FUNCTIONS **********************************/ /*****************************************************************************/ /* returns the number of patches currently active */ int patch_count ( ) { int id, count; for (id = count = 0; id < PATCH_COUNT; id++) if (patches[id].active) count++; return count; } /* returns assigned patch id on success, negative value on failure */ int patch_create (const char *name) { int id, i; ADSRParams defadsr; LFOParams deflfo; PatchVoice defvoice; /* find an unoccupied patch id */ for (id = 0; patches[id].active; id++) if (id == PATCH_COUNT) return PATCH_LIMIT; patch_lock (id); patches[id].active = 1; debug ("Creating patch %s (%d).\n", name, id); /* name */ g_strlcpy (patches[id].name, name, PATCH_MAX_NAME); /* default values */ patches[id].channel = 0; patches[id].note = 60; patches[id].range = 0; patches[id].lower_note = 60; patches[id].upper_note = 60; patches[id].play_mode = PATCH_PLAY_FORWARD | PATCH_PLAY_SINGLESHOT; patches[id].cut = 0; patches[id].cut_by = 0; patches[id].sample_start = 0; patches[id].sample_stop = 0; patches[id].loop_start = 0; patches[id].loop_stop = 0; patches[id].porta = FALSE; patches[id].mono = FALSE; patches[id].legato = FALSE; patches[id].porta_secs = 0.05; patches[id].pitch_steps = 2; patches[id].pitch_bend = 0; patches[id].lfo_pitch_max = 1.0; patches[id].lfo_pitch_min = 1.0; patches[id].env_pitch_max = 1.0; patches[id].env_pitch_min = 1.0; /* default adsr params */ defadsr.delay = 0.0; defadsr.attack = 0.0; defadsr.hold = 0.0; defadsr.decay = 0.0; defadsr.sustain = 1.0; defadsr.release = PATCH_MIN_RELEASE; /* default lfo params */ deflfo.positive = FALSE; deflfo.shape = LFO_SHAPE_SINE; deflfo.freq = 1.0; deflfo.sync_beats = 1.0; deflfo.sync = FALSE; deflfo.delay = 0.0; deflfo.attack = 0.0; /* volume */ patches[id].vol.val = DEFAULT_VOLUME; patches[id].vol.env = defadsr; patches[id].vol.env_amt = 0.0; /* this parameter is actually ignored for volume */ patches[id].vol.env_on = FALSE; patches[id].vol.vel_amt = 1.0; patches[id].vol.lfo_params = deflfo; patches[id].vol.lfo_amt = 0.0; patches[id].vol.lfo_on = FALSE; patches[id].vol.use_global_lfo = FALSE; lfo_prepare (&patches[id].vol.global_lfo); /* panning */ patches[id].pan.val = 0.0; patches[id].pan.env = defadsr; patches[id].pan.env_amt = 0.0; patches[id].pan.env_on = FALSE; patches[id].pan.vel_amt = 0.0; patches[id].pan.lfo_params = deflfo; patches[id].pan.lfo_amt = 0.0; patches[id].pan.lfo_on = FALSE; patches[id].pan.use_global_lfo = FALSE; lfo_prepare (&patches[id].pan.global_lfo); /* cutoff */ patches[id].ffreq.val = 1.0; patches[id].ffreq.env = defadsr; patches[id].ffreq.env_amt = 0.0; patches[id].ffreq.env_on = FALSE; patches[id].ffreq.vel_amt = 0.0; patches[id].ffreq.lfo_params = deflfo; patches[id].ffreq.lfo_amt = 0.0; patches[id].ffreq.lfo_on = FALSE; patches[id].ffreq.use_global_lfo = FALSE; lfo_prepare (&patches[id].ffreq.global_lfo); /* resonance */ patches[id].freso.val = 0.0; patches[id].freso.env = defadsr; patches[id].freso.env_amt = 0.0; patches[id].freso.env_on = FALSE; patches[id].freso.vel_amt = 0.0; patches[id].freso.lfo_params = deflfo; patches[id].freso.lfo_amt = 0.0; patches[id].freso.lfo_on = FALSE; patches[id].freso.use_global_lfo = FALSE; lfo_prepare (&patches[id].freso.global_lfo); /* pitch */ patches[id].pitch.val = 0.0; patches[id].pitch.env = defadsr; patches[id].pitch.env_amt = 0.0; patches[id].pitch.env_on = FALSE; patches[id].pitch.vel_amt = 0.0; patches[id].pitch.lfo_params = deflfo; patches[id].pitch.lfo_amt = 0.0; patches[id].pitch.lfo_on = FALSE; patches[id].pitch.use_global_lfo = FALSE; lfo_prepare (&patches[id].pitch.global_lfo); /* default voice */ defvoice.active = FALSE; defvoice.note = 0; defvoice.posi = 0; defvoice.posf = 0; defvoice.stepi = 0; defvoice.stepf = 0; defvoice.vel = 0; adsr_init (&defvoice.vol); adsr_init (&defvoice.pan); adsr_init (&defvoice.ffreq); adsr_init (&defvoice.freso); adsr_init (&defvoice.pitchenv); lfo_prepare (&defvoice.vol_lfo); lfo_prepare (&defvoice.pan_lfo); lfo_prepare (&defvoice.ffreq_lfo); lfo_prepare (&defvoice.freso_lfo); lfo_prepare (&defvoice.pitch_lfo); defvoice.fll = 0; defvoice.flr = 0; defvoice.fbl = 0; defvoice.fbr = 0; /* initialize voices */ for (i = 0; i < PATCH_VOICE_COUNT; i++) { patches[id].voices[i] = defvoice; patches[id].last_note = 60; } /* set display_index to next unique value */ patches[id].display_index = 0; for (i = 0; i < PATCH_COUNT; i++) { if (i == id) continue; if (patches[i].active && patches[i].display_index >= patches[id].display_index) { patches[id].display_index = patches[i].display_index + 1; } } patch_unlock (id); return id; } /* destroy a single patch with given id */ int patch_destroy (int id) { int index; if (!isok (id)) return PATCH_ID_INVALID; debug ("Removing patch: %d\n", id); patch_lock (id); patches[id].active = 0; sample_free_file (patches[id].sample); patch_unlock (id); /* every active patch with a display_index greater than this * patch's needs to have it's value decremented so that we * preservere continuity; no locking necessary because the * display_index is not thread-shared data */ index = patches[id].display_index; for (id = 0; id < PATCH_COUNT; id++) { if (patches[id].active && patches[id].display_index > index) patches[id].display_index--; } return 0; } /* destroy all patches */ void patch_destroy_all ( ) { int id; for (id = 0; id < PATCH_COUNT; id++) patch_destroy (id); return; } /* place all patch ids, sorted in ascending order by channels and then notes, into array 'id' and return number of patches */ int patch_dump (int **dump) { int i, j, k, id, count, tmp; *dump = NULL; /* determine number of patches */ count = patch_count ( ); if (count == 0) return count; /* allocate dump */ *dump = malloc (sizeof (int) * count); if (*dump == NULL) return PATCH_ALLOC_FAIL; /* place active patches into dump array */ for (id = i = 0; id < PATCH_COUNT; id++) if (patches[id].active) (*dump)[i++] = id; /* sort dump array by channel in ascending order */ for (i = 0; i < count; i++) { for (j = i; j < count; j++) { if (patches[(*dump)[j]].channel < patches[(*dump)[i]].channel) { tmp = (*dump)[i]; (*dump)[i] = (*dump)[j]; (*dump)[j] = tmp; } } } /* sort dump array by note in ascending order while preserving * existing channel order */ for (i = 0; i < MIDI_CHANS; i++) { for (j = 0; j < count; j++) { if (patches[(*dump)[j]].channel != i) continue; for (k = j; k < count; k++) { if (patches[(*dump)[k]].channel != i) continue; if (patches[(*dump)[k]].note < patches[(*dump)[j]].note) { tmp = (*dump)[j]; (*dump)[j] = (*dump)[k]; (*dump)[k] = tmp; } } } } return count; } int patch_duplicate (int target) { int id, i; Sample* oldsam; float* vol; float* pan; float* cut; float* res; float* pitch; if (target < 0 || target > PATCH_COUNT || !patches[target].active) return PATCH_ID_INVALID; /* find an unoccupied patch id */ for (id = 0; patches[id].active; id++) if (id == PATCH_COUNT) return PATCH_LIMIT; debug ("Creating patch (%d) from patch %s (%d).\n", id, patches[target].name, target); patch_lock (id); /* we have to store and restore our pointers to allocated memory, * because the assignment below will overwrite them */ vol = patches[id].vol.lfo_tab; pan = patches[id].pan.lfo_tab; cut = patches[id].ffreq.lfo_tab; res = patches[id].freso.lfo_tab; pitch = patches[id].pitch.lfo_tab; oldsam = patches[id].sample; patches[id] = patches[target]; patches[id].vol.lfo_tab = vol; patches[id].pan.lfo_tab = pan; patches[id].ffreq.lfo_tab = cut; patches[id].freso.lfo_tab = res; patches[id].pitch.lfo_tab = pitch; patches[id].sample = oldsam; /* this is residual paranoia, I think */ patches[id].sample->sp = NULL; /* load same soundfile as target patch */ if (patches[target].sample->sp != NULL) { patch_sample_load (id, sample_get_file (patches[target].sample)); } /* set display_index to next unique value */ patches[id].display_index = 0; for (i = 0; i < PATCH_COUNT; i++) { if (i == id) continue; if (patches[i].active && patches[i].display_index >= patches[id].display_index) { patches[id].display_index = patches[i].display_index + 1; } } debug ("chosen display: %d\n", patches[id].display_index); patch_unlock (id); return id; } /* stop all currently playing voices in given patch */ int patch_flush (int id) { int i; if (!isok(id)) return PATCH_ID_INVALID; patch_lock (id); if (patches[id].sample->sp == NULL) { patch_unlock (id); return 0; } for (i = 0; i < PATCH_VOICE_COUNT; i++) patches[id].voices[i].active = FALSE; patch_unlock (id); return 0; } /* stop all voices for all patches */ void patch_flush_all ( ) { int i; for (i = 0; i < PATCH_COUNT; i++) { patch_flush (i); } } /* constructor */ void patch_init ( ) { int i; debug ("initializing...\n"); for (i = 0; i < PATCH_COUNT; i++) { pthread_mutex_init (&patches[i].mutex, NULL); patches[i].sample = sample_new ( ); patches[i].vol.lfo_tab = NULL; patches[i].pan.lfo_tab = NULL; patches[i].ffreq.lfo_tab = NULL; patches[i].freso.lfo_tab = NULL; patches[i].pitch.lfo_tab = NULL; } debug ("done\n"); } /* returns error message associated with error code */ const char *patch_strerror (int error) { switch (error) { case PATCH_PARAM_INVALID: return "patch parameter is invalid"; break; case PATCH_ID_INVALID: return "patch id is invalid"; break; case PATCH_ALLOC_FAIL: return "failed to allocate space for patch"; break; case PATCH_NOTE_INVALID: return "specified note is invalid"; break; case PATCH_PAN_INVALID: return "specified panning is invalid"; break; case PATCH_CHANNEL_INVALID: return "specified channel is invalid"; break; case PATCH_VOL_INVALID: return "specified volume is invalid"; break; case PATCH_PLAY_MODE_INVALID: return "specified patch play mode is invalid"; break; case PATCH_LIMIT: return "maximum patch count reached, can't create another"; break; case PATCH_SAMPLE_INDEX_INVALID: return "specified sample is invalid"; break; default: return "unknown error"; } } /* loads a sample file for a patch */ int patch_sample_load (int id, const char *name) { int val; if (!isok (id)) return PATCH_ID_INVALID; if (name == NULL) { debug ("Refusing to load null sample for patch %d\n", id); return PATCH_PARAM_INVALID; } debug ("Loading sample %s for patch %d\n", name, id); patch_flush (id); /* we lock *after* we call patch_flush because patch_flush does * its own locking */ patch_lock (id); val = sample_load_file (patches[id].sample, name, samplerate); /* set the sample/loop start/stop point appropriately */ patches[id].sample_start = 0; patches[id].sample_stop = patches[id].sample->frames - 1; patches[id].loop_start = 0; patches[id].loop_stop = patches[id].sample->frames - 1; patch_unlock (id); return val; } /* unloads a patch's sample */ void patch_sample_unload (int id) { if (!isok(id)) return; debug ("Unloading sample for patch %d\n", id); patch_lock (id); sample_free_file (patches[id].sample); patches[id].sample_start = 0; patches[id].sample_stop = 0; patches[id].loop_start = 0; patches[id].loop_stop = 0; patch_unlock (id); } /* sets our buffersize and reallocates our lfo_tab; this function * doesn't need to do any locking because we have a guarantee that * mixing will stop when the buffersize changes */ void patch_set_buffersize (int nframes) { int i; Patch* p; debug ("setting buffersize to %d\n", nframes); for (i = 0; i < PATCH_COUNT; i++) { p = &patches[i]; p->vol.lfo_tab = g_renew (float, p->vol.lfo_tab, nframes); p->pan.lfo_tab = g_renew (float, p->pan.lfo_tab, nframes); p->ffreq.lfo_tab = g_renew (float, p->ffreq.lfo_tab, nframes); p->freso.lfo_tab = g_renew (float, p->freso.lfo_tab, nframes); p->pitch.lfo_tab = g_renew (float, p->pitch.lfo_tab, nframes); } } /* sets our samplerate and resamples if necessary; this function * doesn't need to do any locking because we have a guarantee that * mixing will stop when the samplerate changes */ void patch_set_samplerate (int rate) { int id; char *name; int oldrate = samplerate; samplerate = rate; debug ("changing samplerate to %d\n", rate); if (samplerate != oldrate) { for (id = 0; id < PATCH_COUNT; id++) { if (!patches[id].active) continue; name = patch_get_sample_name (id); patch_sample_load (id, name); g_free (name); } } declick_dec = 1.0 / (PATCH_MIN_RELEASE * rate); legato_lag = PATCH_LEGATO_LAG * rate; debug("declick_dec = %f\n", declick_dec); debug("legato_lag = %d\n", legato_lag); patch_trigger_global_lfos ( ); } /* destructor */ void patch_shutdown ( ) { int i; debug ("shutting down...\n"); for (i = 0; i < PATCH_COUNT; i++) { sample_free (patches[i].sample); g_free (patches[i].vol.lfo_tab); g_free (patches[i].pan.lfo_tab); g_free (patches[i].ffreq.lfo_tab); g_free (patches[i].freso.lfo_tab); g_free (patches[i].pitch.lfo_tab); } debug ("done\n"); } /* re-sync all global lfos to new tempo */ void patch_sync (float bpm) { lfo_set_tempo (bpm); patch_trigger_global_lfos ( ); } /*****************************************************************************/ /******************* PLAYBACK AND RENDERING FUNCTIONS ************************/ /*****************************************************************************/ /* a helper function to release all voices matching a given criteria * (if note is a negative value, all active voices will be released) */ inline static void patch_release_patch (Patch* p, int note, release_t mode) { int i; PatchVoice* v; for (i = 0; i < PATCH_VOICE_COUNT; i++) { if (p->voices[i].active && (p->voices[i].note == note || note < 0)) { v = &p->voices[i]; /* we don't really release here, that's the job of * advance( ); we just tell it *when* to release */ v->relset = 0; v->relmode = mode; if (p->mono && p->legato) v->relset += legato_lag; } } } /* a helper function to cut all patches whose cut_by value matches the * cut value for the given patch */ inline static void patch_cut_patch (Patch* p) { int i; /* a cut value of zero is ignored so that the user has a way of *not* using * cuts */ if (p->cut == 0) return; for (i = 0; i < PATCH_COUNT; i++) { if (patches[i].active && patches[i].cut_by == p->cut) { patch_release_patch (&patches[i], -69, RELEASE_CUTOFF); } } } /* a helper function to prepare a voice's pitch information */ inline static void prepare_pitch(Patch* p, PatchVoice* v, int note) { double scale; /* base pitch scaling factor */ /* this applies the tuning factor */ scale = pow (2, (p->pitch.val * p->pitch_steps) / 12.0); if (p->porta && (p->porta_secs > 0.0) && (p->last_note != note)) { /* we calculate the pitch here because we can't be certain * what the current value of the last voice's pitch is */ v->pitch = pow (2, (p->last_note - p->note) / 12.0); v->pitch *= scale; v->porta_ticks = ticks_secs_to_ticks (p->porta_secs); /* calculate the value to be added to pitch each tick by * subtracting the target pitch from the initial pitch and * dividing by porta_ticks */ v->pitch_step = ((pow (2, (note - p->note) / 12.0) * scale) - v->pitch) / v->porta_ticks; } else { v->pitch = pow (2, (note - p->note) / 12.0); v->pitch *= scale; v->porta_ticks = 0; } /* store the note that called us as the last note that was played * (it's important that we do this *after* we use the * p->last_note variable, otherwise we'll be comparing ourself * against ourself) */ p->last_note = note; /* give our step variables their initial values */ v->stepi = v->pitch; v->stepf = (v->pitch - v->stepi) * (0xFFFFFFFFU); /* maximum value of guint32 */ } /* a helper function to activate a voice for a patch */ inline static void patch_trigger_patch (Patch* p, int note, float vel, Tick ticks) { int i; PatchVoice* v; int index; /* the index we ended up settling on */ int gzr = 0; /* index of the oldest running patch */ int empty = -1; /* index of the first empty patch we encountered */ Tick oldest = ticks; /* time of the oldest running patch */ /* we don't activate voices if we don't have a sample */ if (p->sample->sp == NULL) return; if (p->mono && p->legato) { /* find a voice to retrigger */ for (i = 0; i < PATCH_VOICE_COUNT; ++i) { if (p->voices[i].ticks <= oldest) { oldest = p->voices[i].ticks; gzr = i; } if (!p->voices[i].active) empty = i; /* we need to make sure that we don't grab a voice that is * busy trying to release itself, otherwise we'll take it * over, only to be promptly reduced to zero volume and * shut down... */ else if (!p->voices[i].released) break; /* ...however, if this is a singleshot patch being * released by a noteoff, the volume won't be dropping, and we can proceed * normally */ else if (p->play_mode == PATCH_PLAY_SINGLESHOT && p->voices[i].relmode == RELEASE_NOTEOFF) break; } /* if we couldn't find a voice to take over, use the first * empty one we encountered; failing that, we'll take the * oldest running */ if (i == PATCH_VOICE_COUNT) { if (empty < 0) index = gzr; else index = empty; /* ...apparently, I don't think very highly of the above logic... */ index = 0; } else { v = &p->voices[i]; v->ticks = ticks; v->note = note; v->vel = vel; v->relset = -1; /* cancel any pending release */ v->relmode = RELEASE_NONE; prepare_pitch(p, v, note); return; /* the rest of this function is * irrelevant now, fuck it */ } } else { /* find a free voice slot and determine the oldest running voice */ for (i = 0; i < PATCH_VOICE_COUNT; ++i) { if (p->voices[i].ticks <= oldest) { oldest = p->voices[i].ticks; gzr = i; } if (!p->voices[i].active) { break; } } /* take the oldest running voice's slot if we couldn't find an * empty one */ if (i == PATCH_VOICE_COUNT) { index = gzr; } else { index = i; } } v = &p->voices[index]; /* shutdown any running voices if monophonic */ if (p->mono) patch_release_patch(p, -69, RELEASE_CUTOFF); /* fill in our voice */ v->ticks = ticks; v->relset = -1; /* N/A at this time */ v->relmode = RELEASE_NONE; v->released = FALSE; v->declick_vol = 1.0; v->note = note; v->fll = 0; v->fbl = 0; v->flr = 0; v->fbr = 0; v->vel = vel; /* setup direction */ if (!(p->mono && p->legato && v->active)) { if (p->play_mode & PATCH_PLAY_REVERSE) { v->posi = p->sample_stop; v->posf = 0; v->dir = -1; } else { v->posi = p->sample_start; v->posf = 0; v->dir = 1; } } prepare_pitch(p, v, note); /* setup envelopes */ adsr_set_params (&v->vol, &p->vol.env); adsr_set_params (&v->pan, &p->pan.env); adsr_set_params (&v->ffreq, &p->ffreq.env); adsr_set_params (&v->freso, &p->freso.env); adsr_set_params (&v->pitchenv, &p->pitch.env); /* trigger envelopes */ adsr_trigger (&v->vol); adsr_trigger (&v->pan); adsr_trigger (&v->ffreq); adsr_trigger (&v->freso); adsr_trigger (&v->pitchenv); /* trigger local lfos */ lfo_trigger (&v->vol_lfo, &p->vol.lfo_params); lfo_trigger (&v->pan_lfo, &p->pan.lfo_params); lfo_trigger (&v->ffreq_lfo, &p->ffreq.lfo_params); lfo_trigger (&v->freso_lfo, &p->freso.lfo_params); lfo_trigger (&v->pitch_lfo, &p->pitch.lfo_params); /* mark our territory */ v->active = TRUE; } /* a helper routine to determine the pitch-scaled sample values to use for a frame */ inline static void pitchscale (Patch * p, PatchVoice * v, float *l, float *r) { int y0, y1, y2, y3; /* determine sample indices */ if ((y0 = (v->posi - 1) * 2) < 0) y0 = 0; y1 = v->posi * 2; if ((y2 = (v->posi + 1) * 2) >= p->sample->frames * 2) y2 = 0; if ((y3 = (v->posi + 2) * 2) >= p->sample->frames * 2) y3 = 0; /* interpolate */ *l = cerp (p->sample->sp[y0], p->sample->sp[y1], p->sample->sp[y2], p->sample->sp[y3], v->posf >> 24); *r = cerp (p->sample->sp[y0 + 1], p->sample->sp[y1 + 1], p->sample->sp[y2 + 1], p->sample->sp[y3 + 1], v->posf >> 24); } /* a helper routine to setup panning of two samples in a frame */ inline static void pan (Patch * p, PatchVoice * v, int index, float *l, float *r) { float pan; /* get pan value */ pan = p->pan.val; /* add lfo value */ if (p->pan.lfo_on != 0) { if (p->pan.use_global_lfo) { pan += p->pan.lfo_tab[index] * p->pan.lfo_amt; } else { pan += lfo_tick (&v->pan_lfo) * p->pan.lfo_amt; } } /* add adsr value */ if (p->pan.env_on) { pan += (adsr_tick (&v->pan) * p->pan.env_amt); } /* scale to velocity */ pan = lerp (pan, pan * v->vel, p->pan.vel_amt); /* determine values after modulation */ if (pan > 1.0) pan = 1.0; else if (pan < -1.0) pan = -1.0; if (pan < 0.0) { /* panned left */ *l += *r * -pan; *r *= 1 + pan; } else if (pan > 0.0) { /* panned right */ *r += *l * pan; *l *= 1 - pan; } } /* a helper routine to apply filters to a frame */ inline static void filter (Patch* p, PatchVoice* v, int index, float* l, float* r) { float ffreq, freso, logreso; /* get filter cutoff frequency */ ffreq = p->ffreq.val; /* add current lfo value */ if (p->ffreq.lfo_on) { if (p->ffreq.use_global_lfo) { ffreq += p->ffreq.lfo_tab[index] * p->ffreq.lfo_amt; } else { ffreq += lfo_tick (&v->ffreq_lfo) * p->ffreq.lfo_amt; } } /* add envelope value */ if (p->ffreq.env_on) { ffreq += (adsr_tick (&v->ffreq) * p->ffreq.env_amt); } /* scale to velocity */ ffreq = lerp (ffreq, ffreq * v->vel, p->ffreq.vel_amt); /* clip */ if (ffreq > 1.0) ffreq = 1.0; else if (ffreq < 0.0) ffreq = 0.0; /* get filter resonant frequency */ freso = p->freso.val; /* add current lfo value */ if (p->freso.lfo_on) { if (p->freso.use_global_lfo) { freso += p->freso.lfo_tab[index] * p->freso.lfo_amt; } else { freso += lfo_tick (&v->freso_lfo) * p->freso.lfo_amt; } } /* add envelope value */ if (p->freso.env_on) { freso += (adsr_tick (&v->freso) * p->freso.env_amt); } /* scale to velocity */ freso = lerp (freso, freso * v->vel, p->freso.vel_amt); /* clip */ if (freso > 1.0) freso = 1.0; else if (freso < 0.0) freso = 0.0; /* logify */ logreso = log_volume(freso); /* left */ v->fbl = logreso * v->fbl + ffreq * (*l - v->fll); v->fll += ffreq * v->fbl; *l = v->fll; /* right */ v->fbr = logreso * v->fbr + ffreq * (*r - v->flr); v->flr += ffreq * v->fbr; *r = v->flr; } /* a helper routine to adjust the volume of a frame */ inline static int gain (Patch* p, PatchVoice* v, int index, float* l, float* r) { float vol = 0.0; float logvol = 0.0; /* first, we use our set value as a base */ vol = p->vol.val; /* now we add whatever the lfo value is supposed to be */ if (p->vol.lfo_on) { if (p->vol.use_global_lfo) { vol += p->vol.lfo_tab[index] * p->vol.lfo_amt; } else { vol += lfo_tick (&v->vol_lfo) * p->vol.lfo_amt; } } /* envelope */ if (p->vol.env_on) { /* we want our envelope to "override" the above parameters, so we * apply it after them */ vol *= adsr_tick (&v->vol); } else if (v->released && !((p->play_mode & PATCH_PLAY_SINGLESHOT) && (v->relmode == RELEASE_NOTEOFF))) { /* if the patch is singleshot and it doesn't have a volume * envelope, we want to let it finish playing in toto */ vol *= v->declick_vol; v->declick_vol -= declick_dec; } /* velocity should be the last parameter considered because it * has the most "importance" */ vol = lerp (vol, vol * v->vel, p->vol.vel_amt); /* clip */ if (vol > 1.0) vol = 1.0; else if (vol < 0.0) vol = 0.0; /* as a last step, make logarithmic */ logvol = log_volume(vol); /* adjust volume */ *l *= logvol; *r *= logvol; /* check to see if we've finished a release */ if (v->released && vol < ALMOST_ZERO) return -1; return 0; } /* a helper routine to advance to the next frame while properly * accounting for the different possible play modes (negative value * returned if we are out of samples after doing our work) */ inline static int advance (Patch* p, PatchVoice* v, int index) { double pitch; double scale; guint32 next_posf; gboolean recalc = FALSE; /* whether we need to recalculate our pos/step vars */ /* portamento */ if (p->porta && v->porta_ticks) { recalc = TRUE; v->pitch += v->pitch_step; --(v->porta_ticks); } /* base pitch value */ pitch = v->pitch; if (p->pitch_bend) { recalc = TRUE; pitch *= p->pitch_bend; } /* pitch lfo value */ if (p->pitch.lfo_on) { recalc = TRUE; if (p->pitch.use_global_lfo) { scale = p->pitch.lfo_tab[index]; } else { scale = lfo_tick (&v->pitch_lfo); } /* we don't multiply against p->pitch.lfo_amount because the * "amount" variable has already been expressed in the * values of lfo_pitch_max and lfo_pitch_min (the same logic * applies when handling the envelopes below) */ if (scale >= 0.0) { pitch *= lerp (1.0, p->lfo_pitch_max, scale); } else { pitch *= lerp (1.0, p->lfo_pitch_min, -scale); } } /* pitch envelope value */ if (p->pitch.env_on) { recalc = TRUE; scale = adsr_tick (&v->pitchenv); if (scale >= 0.0) { pitch *= lerp (1.0, p->env_pitch_max, scale); } else { pitch *= lerp (1.0, p->env_pitch_min, -scale); } } /* scale to velocity */ if (p->pitch.vel_amt > ALMOST_ZERO) { recalc = TRUE; pitch = lerp (pitch, pitch * v->vel, p->pitch.vel_amt); } if (recalc) { v->stepi = pitch; v->stepf = (pitch - v->stepi) * (0xFFFFFFFFU); } /* advance our position indices */ if (v->dir > 0) { next_posf = v->posf + v->stepf; if (next_posf < v->posf) /* unsigned int wraps around */ v->posi++; v->posf = next_posf; v->posi += v->stepi; } else { next_posf = v->posf + v->stepf; if (next_posf < v->posf) /* unsigned int wraps around */ v->posi--; v->posf = next_posf; v->posi -= v->stepi; } /* adjust our indices according to our play mode */ if (p->play_mode & PATCH_PLAY_LOOP) { if (p->play_mode & PATCH_PLAY_PINGPONG) { if ((v->dir > 0) && (v->posi > p->loop_stop)) { v->posi = p->loop_stop; v->dir = -1; } else if ((v->dir < 0) && (v->posi < p->loop_start)) { v->posi = p->loop_start; v->dir = 1; } } else { if ((v->dir > 0) && (v->posi > p->loop_stop)) { v->posi = p->loop_start; } else if ((v->dir < 0) && (v->posi < p->loop_start)) { v->posi = p->loop_stop; } } } else { if (((v->dir > 0) && (v->posi > p->sample_stop)) || ((v->dir < 0) && (v->posi < p->sample_start))) { /* we need to let our caller know that they are out of * samples */ return -1; } } /* check to see if it's time to release */ if (v->relset >= 0 && !v->released) { if (v->relset == 0) { adsr_release (&v->vol); adsr_release (&v->pan); adsr_release (&v->ffreq); adsr_release (&v->freso); adsr_release (&v->pitchenv); v->released = TRUE; } else { --v->relset; } } return 0; } inline static void patch_update_lfo_tab (float* tab, LFO* lfo, int nframes) { register int i; for (i = 0; i < nframes; i++) { tab[i] = lfo_tick (lfo); } } /* a helper rountine to render all active voices of a given patch into buf */ inline static void patch_render_patch (Patch* p, float* buf, int nframes) { register int i; register int j; PatchVoice* v; float l, r; gboolean done; /* update global LFO tables if applicable */ if (p->vol.use_global_lfo) patch_update_lfo_tab (p->vol.lfo_tab, &p->vol.global_lfo, nframes); if (p->pan.use_global_lfo) patch_update_lfo_tab (p->pan.lfo_tab, &p->pan.global_lfo, nframes); if (p->ffreq.use_global_lfo) patch_update_lfo_tab (p->ffreq.lfo_tab, &p->ffreq.global_lfo, nframes); if (p->freso.use_global_lfo) patch_update_lfo_tab (p->freso.lfo_tab, &p->freso.global_lfo, nframes); if (p->pitch.use_global_lfo) patch_update_lfo_tab (p->pitch.lfo_tab, &p->pitch.global_lfo, nframes); for (i = 0; i < PATCH_VOICE_COUNT; i++) { if (p->voices[i].active == FALSE) continue; /* sanity check */ if (p->voices[i].posi < p->sample->frames) { v = &p->voices[i]; } else { p->voices[i].active = FALSE; continue; } done = FALSE; for (j = 0; j < nframes && done == FALSE; j++) { /* process samples */ pitchscale (p, v, &l, &r); pan (p, v, j, &l, &r); filter (p, v, j, &l, &r); /* adjust volume and stop rendering if we finished * a release */ if (gain (p, v, j, &l, &r) < 0) done = TRUE; buf[j * 2] += l; buf[j * 2 + 1] += r; /* advance our position and stop rendering if we * run out of samples */ if (advance (p, v, j) < 0) done = TRUE; } /* check to see if it's time to stop rendering */ if (done) v->active = FALSE; /* overflows bad, OVERFLOWS BAD! */ if (v->active && (v->posi < 0 || v->posi >= p->sample->frames)) { debug ("overflow! NO! BAD CODE! DIE DIE DIE!\n"); debug ("v->posi == %d, p->sample.frames == %d\n", v->posi, p->sample->frames); v->active = 0; } } } /* deactivate all active patches matching given criteria */ void patch_release (int chan, int note) { int i; for (i = 0; i < PATCH_COUNT; i++) { if (patches[i].active && patches[i].channel == chan && (patches[i].note == note || (patches[i].range > 0 && note >= patches[i].lower_note && note <= patches[i].upper_note))) { patch_release_patch (&patches[i], note, RELEASE_NOTEOFF); } } return; } /* deactivate a single patch with a given id */ void patch_release_with_id (int id, int note) { if (id < 0 || id >= PATCH_COUNT) return; if (!patches[id].active) return; patch_release_patch (&patches[id], note, RELEASE_NOTEOFF); return; } /* render nframes of all active patches into buf */ void patch_render (float *buf, int nframes) { int i; /* render patches */ for (i = 0; i < PATCH_COUNT; i++) { if (patches[i].active) { if (patch_trylock (i) != 0) { continue; } if (patches[i].sample->sp == NULL) { patch_unlock (i); continue; } patch_render_patch (&patches[i], buf, nframes); patch_unlock (i); } } } /* triggers all patches matching criteria */ void patch_trigger (int chan, int note, float vel, Tick ticks) { static int idp[PATCH_COUNT]; /* holds all patches to be activated */ int i, j; /* We gather up all of the patches that need to be activated here * so that we can run their cuts and then trigger them without * having to find them twice. We have to make sure that we do * cutting before triggering, otherwise patches which listen on * the same note and have the same cut/cut_by values will end up * stepping over each other before they both are heard. */ for (i = j = 0; i < PATCH_COUNT; i++) { if (patches[i].active && patches[i].channel == chan && (patches[i].note == note || (patches[i].range && note >= patches[i].lower_note && note <= patches[i].upper_note))) { idp[j++] = i; } } /* do cuts */ for (i = 0; i < j; i++) patch_cut_patch (&patches[idp[i]]); /* do triggers */ for (i = 0; i < j; i++) patch_trigger_patch (&patches[idp[i]], note, vel, ticks); } /* activate a single patch with given id */ void patch_trigger_with_id (int id, int note, float vel, Tick ticks) { if (id < 0 || id >= PATCH_COUNT) return; if (!patches[id].active) return; if (note < patches[id].lower_note || note > patches[id].upper_note) return; if (!patches[id].range && note != patches[id].note) return; patch_cut_patch (&patches[id]); patch_trigger_patch (&patches[id], note, vel, ticks); return; } static void patch_control_patch(Patch* p, ControlParamType param, float value) { switch( param ) { case CONTROL_PARAM_VOLUME: p->vol.val = value; break; case CONTROL_PARAM_PANNING: p->pan.val = value; break; case CONTROL_PARAM_CUTOFF: p->ffreq.val = value; break; case CONTROL_PARAM_RESONANCE: p->freso.val = value; break; case CONTROL_PARAM_PITCH: p->pitch_bend = pow(2, value); break; case CONTROL_PARAM_PORTAMENTO: p->porta = (value < 0.5) ? 0 : 1; break; case CONTROL_PARAM_PORTAMENTO_TIME: p->porta_secs = value; break; } } void patch_control(int chan, ControlParamType param, float value) { int i; for (i = 0; i < PATCH_COUNT; i++) { if (patches[i].active && patches[i].channel == chan) { patch_control_patch (&patches[i], param, value); } } return; } /*****************************************************************************/ /*************************** ENVELOPE SETTERS ********************************/ /*****************************************************************************/ /* sets whether the envelope is used or not */ int patch_set_env_on (int id, PatchParamType param, gboolean state) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; p->env_on = state; return 0; } /* sets how much the envelope affects a param */ int patch_set_env_amount (int id, PatchParamType param, float amt) { PatchParam* p; int err; if (param == PATCH_PARAM_VOLUME) return PATCH_PARAM_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (amt < -1.0 || amt > 1.0) return PATCH_PARAM_INVALID; p->env_amt = amt; /* pitch is a special case; we set these helper variables so that * we can pitch scale properly in advance() */ if (param == PATCH_PARAM_PITCH) { patches[id].env_pitch_max = pow (2, (amt * PATCH_MAX_PITCH_STEPS) / 12.0); patches[id].env_pitch_min = pow (2, -(amt * PATCH_MAX_PITCH_STEPS) / 12.0); } return 0; } /* sets the delay length in seconds */ int patch_set_env_delay (int id, PatchParamType param, float secs) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (secs < 0.0) return PATCH_PARAM_INVALID; p->env.delay = secs; return 0; } /* sets the attack length in seconds */ int patch_set_env_attack (int id, PatchParamType param, float secs) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (secs < 0.0) return PATCH_PARAM_INVALID; p->env.attack = secs; return 0; } /* sets the hold length in seconds */ int patch_set_env_hold (int id, PatchParamType param, float secs) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (secs < 0.0) return PATCH_PARAM_INVALID; p->env.hold = secs; return 0; } /* sets the decay length in seconds */ int patch_set_env_decay (int id, PatchParamType param, float secs) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (secs < 0.0) return PATCH_PARAM_INVALID; p->env.decay = secs; return 0; } /* sets the sustain level */ int patch_set_env_sustain (int id, PatchParamType param, float level) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (level < 0.0 || level > 1.0) return PATCH_PARAM_INVALID; p->env.sustain = level; return 0; } /* sets the release length in seconds */ int patch_set_env_release (int id, PatchParamType param, float secs) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (secs < 0.0) return PATCH_PARAM_INVALID; if (secs < PATCH_MIN_RELEASE) secs = PATCH_MIN_RELEASE; p->env.release = secs; return 0; } /*****************************************************************************/ /*************************** ENVELOPE GETTERS ********************************/ /*****************************************************************************/ /* returns whether the envelope is being used or not */ int patch_get_env_on (int id, PatchParamType param, gboolean* val) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->env_on; return 0; } /* places the amount the envelope is used into val */ int patch_get_env_amount (int id, PatchParamType param, float* val) { PatchParam* p; int err; if (param == PATCH_PARAM_VOLUME) return PATCH_PARAM_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->env_amt; return 0; } /* places the delay length in seconds into val */ int patch_get_env_delay (int id, PatchParamType param, float* val) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->env.delay; return 0; } /* places the attack length in seconds into val */ int patch_get_env_attack (int id, PatchParamType param, float* val) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->env.attack; return 0; } /* places the hold length in seconds into val */ int patch_get_env_hold (int id, PatchParamType param, float* val) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->env.hold; return 0; } /* places the decay length in seconds into val */ int patch_get_env_decay (int id, PatchParamType param, float* val) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->env.decay; return 0; } /* places the sustain level into val */ int patch_get_env_sustain (int id, PatchParamType param, float* val) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->env.sustain; return 0; } /* places the release length in seconds into val */ int patch_get_env_release (int id, PatchParamType param, float* val) { PatchParam* p; int err; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->env.release; /* we hide the fact that we have a min release value from the * outside world (they're on a need-to-know basis) */ if (*val <= PATCH_MIN_RELEASE) *val = 0; return 0; } /************************************************************************/ /*************************** LFO SETTERS ********************************/ /************************************************************************/ /* set whether the lfo is used or not */ int patch_set_lfo_on (int id, PatchParamType param, gboolean state) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; p->lfo_on = state; return 0; } /* set the amount of the lfo to add to param */ int patch_set_lfo_amount (int id, PatchParamType param, float amt) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (amt < -1.0 || amt > 1.0) return PATCH_PARAM_INVALID; p->lfo_amt = amt; /* pitch is a special case; we set these helper variables so that * we can pitch scale properly in advance() */ if (param == PATCH_PARAM_PITCH) { patches[id].lfo_pitch_max = pow (2, (amt * PATCH_MAX_PITCH_STEPS) / 12.0); patches[id].lfo_pitch_min = pow (2, -(amt * PATCH_MAX_PITCH_STEPS) / 12.0); } return 0; } /* set the attack time of the param's LFO */ int patch_set_lfo_attack (int id, PatchParamType param, float secs) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (secs < 0.0) return PATCH_PARAM_INVALID; p->lfo_params.attack = secs; lfo_trigger (&p->global_lfo, &p->lfo_params); return 0; } /* set the period length of the param's lfo in beats */ int patch_set_lfo_beats (int id, PatchParamType param, float beats) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (beats < 0.0) return PATCH_PARAM_INVALID; p->lfo_params.sync_beats = beats; lfo_trigger (&p->global_lfo, &p->lfo_params); return 0; } /* set the delay time of the param's LFO */ int patch_set_lfo_delay (int id, PatchParamType param, float secs) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (secs < 0.0) return PATCH_PARAM_INVALID; p->lfo_params.delay = secs; lfo_trigger (&p->global_lfo, &p->lfo_params); return 0; } /* set the frequency of the param's lfo */ int patch_set_lfo_freq (int id, PatchParamType param, float freq) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (freq < 0.0) return PATCH_PARAM_INVALID; p->lfo_params.freq = freq; lfo_trigger (&p->global_lfo, &p->lfo_params); return 0; } /* set whether to use the param's global lfo or not */ int patch_set_lfo_global (int id, PatchParamType param, gboolean state) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; p->use_global_lfo = state; return 0; } /* set whether to constrain the param's LFOs to positive values or not */ int patch_set_lfo_positive (int id, PatchParamType param, gboolean state) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; p->lfo_params.positive = state; lfo_trigger (&p->global_lfo, &p->lfo_params); return 0; } /* set the param's lfo shape */ int patch_set_lfo_shape (int id, PatchParamType param, LFOShape shape) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; p->lfo_params.shape = shape; lfo_trigger (&p->global_lfo, &p->lfo_params); return 0; } /* set whether to the param's lfo should sync to tempo or not */ int patch_set_lfo_sync (int id, PatchParamType param, gboolean state) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; p->lfo_params.sync = state; lfo_trigger (&p->global_lfo, &p->lfo_params); return 0; } /************************************************************************/ /*************************** LFO GETTERS ********************************/ /************************************************************************/ /* get whether the lfo is used or not */ int patch_get_lfo_on (int id, PatchParamType param, gboolean* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->lfo_on; return 0; } /* get the amount of the lfo that is added to param */ int patch_get_lfo_amount (int id, PatchParamType param, float* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->lfo_amt; return 0; } /* get the attack time of the param's LFO */ int patch_get_lfo_attack (int id, PatchParamType param, float* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->lfo_params.attack; return 0; } /* get the param's lfo period length in beats */ int patch_get_lfo_beats (int id, PatchParamType param, float* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->lfo_params.sync_beats; return 0; } /* get the delay time of the param's LFO */ int patch_get_lfo_delay (int id, PatchParamType param, float* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->lfo_params.delay; return 0; } /* get the param's lfo frequency */ int patch_get_lfo_freq (int id, PatchParamType param, float* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->lfo_params.freq; return 0; } /* get whether the global lfo is used or not */ int patch_get_lfo_global (int id, PatchParamType param, gboolean* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->use_global_lfo; return 0; } /* get whether the param's lfo is constrained to positive values or not */ int patch_get_lfo_positive (int id, PatchParamType param, gboolean* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->lfo_params.positive; return 0; } /* get param's lfo shape */ int patch_get_lfo_shape (int id, PatchParamType param, LFOShape* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->lfo_params.shape; return 0; } /* get whether param's lfo is tempo synced or not */ int patch_get_lfo_sync (int id, PatchParamType param, gboolean* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->lfo_params.sync; return 0; } /*****************************************************************************/ /*************************** VELOCITY FUNCTIONS ******************************/ /*****************************************************************************/ int patch_set_vel_amount (int id, PatchParamType param, float amt) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; if (amt < 0.0 || amt > 1.0) return PATCH_PARAM_INVALID; p->vel_amt = amt; return 0; } int patch_get_vel_amount (int id, PatchParamType param, float* val) { PatchParam* p; int err; if (!isok (id)) return PATCH_ID_INVALID; if ((err = patch_get_param (&p, id, param)) < 0) return err; *val = p->vel_amt; return 0; } /*****************************************************************************/ /*************************** PARAMETER SETTERS *******************************/ /*****************************************************************************/ /* sets channel patch listens on */ int patch_set_channel (int id, int channel) { if (!isok (id)) return PATCH_ID_INVALID; if (channel < 0 || channel > 15) return PATCH_CHANNEL_INVALID; patches[id].channel = channel; return 0; } /* sets the cut signal this patch emits when activated */ int patch_set_cut (int id, int cut) { if (!isok (id)) return PATCH_ID_INVALID; patches[id].cut = cut; return 0; } /* sets the cut signal that terminates this patch if active */ int patch_set_cut_by (int id, int cut_by) { if (!isok (id)) return PATCH_ID_INVALID; patches[id].cut_by = cut_by; return 0; } /* sets filter cutoff frequency */ int patch_set_cutoff (int id, float freq) { if (!isok (id)) return PATCH_ID_INVALID; if (freq < 0.0 || freq > 1.0) return PATCH_PARAM_INVALID; patches[id].ffreq.val = freq; return 0; } /* set whether this patch should be played legato or not */ int patch_set_legato(int id, gboolean val) { if (!isok (id)) return PATCH_ID_INVALID; patches[id].legato = val; return 0; } /* sets the start loop point */ int patch_set_loop_start (int id, int start) { if (!isok (id)) return PATCH_ID_INVALID; if (patches[id].sample->sp == NULL) return 0; if (start < patches[id].sample_start) start = patches[id].sample_start; else if (start > patches[id].sample_stop) start = patches[id].sample_stop; patches[id].loop_start = start; if (start > patches[id].loop_stop) patches[id].loop_stop = start; return 0; } /* sets the stopping loop point */ int patch_set_loop_stop (int id, int stop) { if (!isok (id)) return PATCH_ID_INVALID; if (patches[id].sample->sp == NULL) return 0; if (stop > patches[id].sample_stop) stop = patches[id].sample_stop; else if (stop < patches[id].sample_start) stop = patches[id].sample_start; patches[id].loop_stop = stop; if (stop < patches[id].loop_start) patches[id].loop_start = stop; return 0; } /* sets the lower note of a patch's range */ int patch_set_lower_note (int id, int note) { if (!isok (id)) return PATCH_ID_INVALID; if (note < 0 || note > 127) return PATCH_NOTE_INVALID; patches[id].lower_note = note; return 0; } /* set whether the patch is monophonic or not */ int patch_set_monophonic(int id, gboolean val) { if (!isok (id)) return PATCH_ID_INVALID; patches[id].mono = val; return 0; } /* sets the name */ int patch_set_name (int id, const char *name) { if (!isok (id)) return PATCH_ID_INVALID; strncpy (patches[id].name, name, PATCH_MAX_NAME); return 0; } /* sets the root note */ int patch_set_note (int id, int note) { if (!isok (id)) return PATCH_ID_INVALID; if (note < 0 || note > 127) return PATCH_NOTE_INVALID; patches[id].note = note; return 0; } /* sets the panorama */ int patch_set_panning (int id, float pan) { if (!isok (id)) return PATCH_ID_INVALID; if (pan < -1.0 || pan > 1.0) return PATCH_PAN_INVALID; patches[id].pan.val = pan; return 0; } /* set the pitch */ int patch_set_pitch (int id, float pitch) { if (!isok (id)) return PATCH_ID_INVALID; if (pitch < -1.0 || pitch > 1.0) return PATCH_PARAM_INVALID; patches[id].pitch.val = pitch; return 0; } /* set the pitch range */ int patch_set_pitch_steps (int id, int steps) { if (!isok (id)) return PATCH_ID_INVALID; if (steps < -PATCH_MAX_PITCH_STEPS || steps > PATCH_MAX_PITCH_STEPS) return PATCH_PARAM_INVALID; patches[id].pitch_steps = steps; return 0; } /* sets the play mode */ int patch_set_play_mode (int id, PatchPlayMode mode) { if (!isok (id)) return PATCH_ID_INVALID; /* verify direction */ if (mode & PATCH_PLAY_FORWARD) { if (mode & PATCH_PLAY_REVERSE) { return PATCH_PLAY_MODE_INVALID; } } else if (mode & PATCH_PLAY_REVERSE) { if (mode & PATCH_PLAY_FORWARD) { return PATCH_PLAY_MODE_INVALID; } } else { return PATCH_PLAY_MODE_INVALID; } /* verify duration */ if (mode & PATCH_PLAY_SINGLESHOT) { if ((mode & PATCH_PLAY_TRIM) || (mode & PATCH_PLAY_LOOP)) { return PATCH_PLAY_MODE_INVALID; } } else if (mode & PATCH_PLAY_TRIM) { if ((mode & PATCH_PLAY_SINGLESHOT) || (mode & PATCH_PLAY_LOOP)) { return PATCH_PLAY_MODE_INVALID; } } else if (mode & PATCH_PLAY_LOOP) { if ((mode & PATCH_PLAY_SINGLESHOT) || (mode & PATCH_PLAY_TRIM)) { return PATCH_PLAY_MODE_INVALID; } } /* make sure pingpong isn't frivolously set (just for style * points) */ if ((mode & PATCH_PLAY_PINGPONG) && !(mode && PATCH_PLAY_LOOP)) { return PATCH_PLAY_MODE_INVALID; } patches[id].play_mode = mode; return 0; } /* set whether portamento is being used or not */ int patch_set_portamento (int id, gboolean val) { if (!isok (id)) return PATCH_ID_INVALID; patches[id].porta = val; return 0; } /* set length of portamento slides in seconds */ int patch_set_portamento_time (int id, float secs) { if (!isok (id)) return PATCH_ID_INVALID; if (secs < 0.0) return PATCH_PARAM_INVALID; patches[id].porta_secs = secs; return 0; } /* set patch to listen to a range of notes if non-zero */ int patch_set_range (int id, int range) { if (!isok (id)) return PATCH_ID_INVALID; patches[id].range = range; return 0; } /* set the filter's resonance */ int patch_set_resonance (int id, float reso) { if (!isok (id)) return PATCH_ID_INVALID; if (reso < 0.0 || reso > 1.0) return PATCH_PARAM_INVALID; patches[id].freso.val = reso; return 0; } /* set the point within the sample to begin playing */ int patch_set_sample_start (int id, int start) { if (!isok (id)) return PATCH_ID_INVALID; if (patches[id].sample->sp == NULL) return 0; if (start < 0) { debug ("refusing to set negative sample start point\n"); return PATCH_PARAM_INVALID; } if (start > patches[id].sample_stop) { debug ("refusing to set incongruous sample start point\n"); return PATCH_PARAM_INVALID; } patches[id].sample_start = start; return 0; } /* set the point within the sample to stop playing */ int patch_set_sample_stop (int id, int stop) { if (!isok (id)) return PATCH_ID_INVALID; if (patches[id].sample->sp == NULL) return 0; if (stop >= patches[id].sample->frames) { debug ("refusing to set sample stop greater than sample frame count\n"); return PATCH_PARAM_INVALID; } if (stop < patches[id].sample_start) { debug ("refusing to set incongruous sample stop point\n"); return PATCH_PARAM_INVALID; } patches[id].sample_stop = stop; return 0; } /* set the upper note of a patch's range */ int patch_set_upper_note (int id, int note) { if (!isok (id)) return PATCH_ID_INVALID; if (note < 0 || note > 127) return PATCH_NOTE_INVALID; patches[id].upper_note = note; return 0; } /* set the volume */ int patch_set_volume (int id, float vol) { if (!isok (id)) return PATCH_ID_INVALID; if (vol < 0 || vol > 1.0) return PATCH_VOL_INVALID; patches[id].vol.val = vol; return 0; } /*****************************************************************************/ /*************************** PARAMETER GETTERS********************************/ /*****************************************************************************/ /* get the channel the patch listens on */ int patch_get_channel (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].channel; } /* get the cut signal */ int patch_get_cut (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].cut; } /* get the cut-by signal */ int patch_get_cut_by (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].cut_by; } /* get the filter cutoff value */ float patch_get_cutoff (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].ffreq.val; } /* get the display index */ int patch_get_display_index (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].display_index; } /* get the number of frame in the sample */ int patch_get_frames (int id) { if (!isok (id)) return PATCH_ID_INVALID; if (patches[id].sample->sp == NULL) return 0; return patches[id].sample->frames; } /* get whether this patch is played legato or not */ gboolean patch_get_legato(int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].legato; } /* get the starting loop point */ int patch_get_loop_start (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].loop_start; } /* get the stopping loop point */ int patch_get_loop_stop (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].loop_stop; } /* get the lower note */ int patch_get_lower_note (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].lower_note; } /* get whether this patch is monophonic or not */ gboolean patch_get_monophonic(int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].mono; } /* get the name */ char *patch_get_name (int id) { char *name; if (id < 0 || id >= PATCH_COUNT || !patches[id].active) name = strdup ("\0"); else name = strdup (patches[id].name); return name; } /* get the root note */ int patch_get_note (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].note; } /* get the panorama */ float patch_get_panning (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].pan.val; } /* get the pitch */ float patch_get_pitch (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].pitch.val; } /* get the pitch range */ int patch_get_pitch_steps (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].pitch_steps; } /* get the play mode */ PatchPlayMode patch_get_play_mode (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].play_mode; } /* get whether portamento is used or not */ gboolean patch_get_portamento (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].porta; } /* get length of portamento slides in seconds */ float patch_get_portamento_time (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].porta_secs; } /* get whether a range of notes is used or not */ int patch_get_range (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].range; } /* get the filter's resonance amount */ float patch_get_resonance (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].freso.val; } /* get a pointer to the sample data */ const float *patch_get_sample (int id) { if (id < 0 || id >= PATCH_COUNT || !patches[id].active) return NULL; return patches[id].sample->sp; } /* get the name of the sample file */ char *patch_get_sample_name (int id) { char *name; if (id < 0 || id >= PATCH_COUNT || !patches[id].active) name = strdup ("\0"); else name = strdup (sample_get_file (patches[id].sample)); return name; } /* get the starting playback point */ int patch_get_sample_start (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].sample_start; } /* get the stopping playback point */ int patch_get_sample_stop (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].sample_stop; } /* get the upper note */ int patch_get_upper_note (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].upper_note; } /* get the volume */ float patch_get_volume (int id) { if (!isok (id)) return PATCH_ID_INVALID; return patches[id].vol.val; } specimen-0.5.2-rc3/src/patch.h0000644000175000017500000001771310467173732013011 00000000000000#ifndef __PATCH_H__ #define __PATCH_H__ #include #include "ticks.h" #include "lfo.h" #include "control.h" /* magic numbers */ enum { PATCH_COUNT = 64, /* maximum number of patches */ PATCH_MAX_NAME = 32, /* maximum length of a patch name */ PATCH_VOICE_COUNT = 8, /* maximum number of active voices per patch */ PATCH_MAX_PITCH_STEPS = 48 /* maximum val allowable for pitch_steps */ }; /* error codes */ enum { PATCH_PARAM_INVALID = -1, PATCH_ID_INVALID = -2, PATCH_ALLOC_FAIL = -3, PATCH_NOTE_INVALID = -4, PATCH_PAN_INVALID = -5, PATCH_CHANNEL_INVALID = -6, PATCH_VOL_INVALID = -7, PATCH_PLAY_MODE_INVALID = -9, PATCH_LIMIT = -10, PATCH_SAMPLE_INDEX_INVALID = -11 }; /* These are the bitfield constants for the different ways a patch can be played. I've used comments to indicate mutual exclusion among groups. */ enum { /* direction */ PATCH_PLAY_FORWARD = 1, PATCH_PLAY_REVERSE = 1 << 1, /************/ /* duration */ PATCH_PLAY_SINGLESHOT = 1 << 2, PATCH_PLAY_TRIM = 1 << 3, PATCH_PLAY_LOOP = 1 << 4, /***********/ /* ping pong mode can be set independently of all the other * params, but it should only be tested for if PATCH_PLAY_LOOP is set */ PATCH_PLAY_PINGPONG = 1 << 5 }; /* type for playmode bitfield */ typedef guint8 PatchPlayMode; /* code names for modulatable parameters */ typedef enum { PATCH_PARAM_VOLUME, PATCH_PARAM_PANNING, PATCH_PARAM_CUTOFF, PATCH_PARAM_RESONANCE, PATCH_PARAM_PITCH } PatchParamType; /* utility functions */ int patch_count ( ); int patch_create (const char* name); int patch_destroy (int id); void patch_destroy_all ( ); int patch_dump (int** dump); int patch_duplicate (int id); int patch_flush (int id); void patch_flush_all ( ); void patch_init ( ); const char* patch_strerror (int error); int patch_sample_load (int id, const char* file); void patch_sample_unload (int id); void patch_set_buffersize (int nframes); void patch_set_samplerate (int rate); void patch_shutdown ( ); void patch_sync (float bpm); int patch_verify (int id); /* playback and rendering functions */ void patch_control (int chan, ControlParamType param, float value); void patch_release (int chan, int note); void patch_release_with_id (int id, int note); void patch_render (float* buf, int nframes); void patch_trigger (int chan, int note, float vel, Tick ticks); void patch_trigger_with_id (int id, int note, float vel, Tick ticks); /* envelope setters */ int patch_set_env_on (int id, PatchParamType param, gboolean state); int patch_set_env_amount (int id, PatchParamType param, float amt); int patch_set_env_delay (int id, PatchParamType param, float secs); int patch_set_env_attack (int id, PatchParamType param, float secs); int patch_set_env_hold (int id, PatchParamType param, float secs); int patch_set_env_decay (int id, PatchParamType param, float secs); int patch_set_env_sustain (int id, PatchParamType param, float level); int patch_set_env_release (int id, PatchParamType param, float secs); /* envelope getters */ int patch_get_env_on (int id, PatchParamType param, gboolean* val); int patch_get_env_amount (int id, PatchParamType param, float* val); int patch_get_env_delay (int id, PatchParamType param, float* val); int patch_get_env_attack (int id, PatchParamType param, float* val); int patch_get_env_hold (int id, PatchParamType param, float* val); int patch_get_env_decay (int id, PatchParamType param, float* val); int patch_get_env_sustain (int id, PatchParamType param, float* val); int patch_get_env_release (int id, PatchParamType param, float* val); /* lfo setters */ int patch_set_lfo_on (int id, PatchParamType param, gboolean state); int patch_set_lfo_amount (int id, PatchParamType param, float amt); int patch_set_lfo_attack (int id, PatchParamType param, float secs); int patch_set_lfo_beats (int id, PatchParamType param, float beats); int patch_set_lfo_delay (int id, PatchParamType param, float secs); int patch_set_lfo_freq (int id, PatchParamType param, float freq); int patch_set_lfo_global (int id, PatchParamType param, gboolean state); int patch_set_lfo_positive (int id, PatchParamType param, gboolean state); int patch_set_lfo_shape (int id, PatchParamType param, LFOShape shape); int patch_set_lfo_sync (int id, PatchParamType param, gboolean state); /* lfo getters */ int patch_get_lfo_on (int id, PatchParamType param, gboolean* val); int patch_get_lfo_amount (int id, PatchParamType param, float* val); int patch_get_lfo_attack (int id, PatchParamType param, float* secs); int patch_get_lfo_beats (int id, PatchParamType param, float* val); int patch_get_lfo_delay (int id, PatchParamType param, float* secs); int patch_get_lfo_freq (int id, PatchParamType param, float* val); int patch_get_lfo_global (int id, PatchParamType param, gboolean* val); int patch_get_lfo_positive (int id, PatchParamType param, gboolean* val); int patch_get_lfo_shape (int id, PatchParamType param, LFOShape* val); int patch_get_lfo_sync (int id, PatchParamType param, gboolean* val); /* velocity */ int patch_set_vel_amount (int id, PatchParamType param, float amt); int patch_get_vel_amount (int id, PatchParamType param, float* val); /* parameter setters */ int patch_set_channel (int id, int channel); int patch_set_cut (int id, int cut); int patch_set_cut_by (int id, int cut_by); int patch_set_cutoff (int id, float freq); int patch_set_legato (int id, gboolean val); int patch_set_loop_start (int id, int start); int patch_set_loop_stop (int id, int stop); int patch_set_lower_note (int id, int note); int patch_set_monophonic (int id, gboolean val); int patch_set_name (int id, const char* name); int patch_set_note (int id, int note); int patch_set_panning (int id, float pan); int patch_set_pitch (int id, float pitch); int patch_set_pitch_steps (int id, int steps); int patch_set_play_mode (int id, PatchPlayMode mode); int patch_set_portamento (int id, gboolean val); int patch_set_portamento_time (int id, float secs); int patch_set_range (int id, int range); int patch_set_resonance (int id, float reso); int patch_set_sample_start (int id, int start); int patch_set_sample_stop (int id, int stop); int patch_set_upper_note (int id, int note); int patch_set_volume (int id, float vol); /* parameter getters */ int patch_get_channel (int id); int patch_get_cut (int id); int patch_get_cut_by (int id); float patch_get_cutoff (int id); int patch_get_display_index (int id); int patch_get_frames (int id); gboolean patch_get_legato (int id); int patch_get_loop_start (int id); int patch_get_loop_stop (int id); int patch_get_lower_note (int id); gboolean patch_get_monophonic (int id); char* patch_get_name (int id); int patch_get_note (int id); float patch_get_panning (int id); float patch_get_pitch (int id); int patch_get_pitch_steps (int id); PatchPlayMode patch_get_play_mode (int id); gboolean patch_get_portamento (int id); float patch_get_portamento_time (int id); int patch_get_range (int id); float patch_get_resonance (int id); const float* patch_get_sample (int id); char* patch_get_sample_name (int id); int patch_get_sample_start (int id); int patch_get_sample_stop (int id); int patch_get_upper_note (int id); float patch_get_volume (int id); #endif /* __PATCH_H__ */ specimen-0.5.2-rc3/src/specimen.c0000644000175000017500000000371710575117614013504 00000000000000#include #include #include #include #include "specimen.h" #include "gui/gui.h" #include "midi.h" #include "driver.h" #include "lfo.h" #include "patch.h" #include "mixer.h" #include "beef.h" #ifdef HAVE_LASH #include "lashdriver.h" #endif void show_usage (void) { fprintf (stderr, "\nUsage: specimen [options] [bankname]\n"); fprintf (stderr, "Options:\n"); fprintf (stderr, " -n, --name Specify jack client name\n"); fprintf (stderr, " -h, --help Display this help message\n"); fprintf (stderr, "For more information see http://zhevny.com/specimen/\n"); } int main(int argc, char *argv[]) { int opt; int longopt_index; char* client_name = NULL; static struct option long_options[] = { { "name", 1, 0, 'n'}, { "help", 0, 0, 'h'}, { 0, 0, 0, 0} }; /* command line argument processing */ while((opt = getopt_long(argc, argv, "n:h", long_options, &longopt_index))>0) { switch(opt){ case 'n': client_name = strdup(optarg); break; case 'h': show_usage(); return 1; break; default: show_usage(); return 1; break; } } /* constructors */ #ifdef HAVE_LASH /* FIXME: use client_name in lashdriver_init */ lashdriver_init(&argc, &argv); #endif /* FIXME: use client_name in gtk_init */ gtk_init(&argc, &argv); driver_init(); lfo_init(); mixer_init(); patch_init(); gui_init(); if (optind < argc) { beef_read(argv[optind]); gui_refresh(); } /* start */ midi_start(); driver_start(0, client_name); #ifdef HAVE_LASH lashdriver_start(); #endif gtk_main(); /* stop */ midi_stop(); driver_stop(); /* destructors */ patch_shutdown(); mixer_shutdown(); debug("Goodbye.\n"); return 0; } specimen-0.5.2-rc3/src/specimen.h0000644000175000017500000000123510575117614013502 00000000000000#ifndef __SPECIMEN_H__ #define __SPECIMEN_H__ #include #include #include #ifndef DEBUG # define DEBUG 0 #endif enum { FUBAR = -69 }; #define DEFAULT_VOLUME 0.7 /* default volume stuff is set to, from 0 to 1 */ #define DEFAULT_INSTANCE_NAME "specimen" /* default volume stuff is set to, from 0 to 1 */ #ifndef PIXMAPSDIR # define PIXMAPSDIR INSTALLDIR"/specimen/pixmaps/" #endif #define errmsg(...) {fprintf(stderr, __FUNCTION__); fprintf(stderr, ": "); fprintf(stderr, __VA_ARGS__);} #if DEBUG # define debug(...) errmsg(__VA_ARGS__) #else # define debug(...) #endif typedef sig_atomic_t Atomic; #endif /* __SPECIMEN_H__ */ specimen-0.5.2-rc3/src/beef.c0000644000175000017500000012421710466744417012607 00000000000000#include #include #include #include #include #include "specimen.h" #include "patch.h" int beef_write (char *name) { char tmp[256]; gboolean tmpb; LFOShape tmpLS; char tmpName[256]; char *ptmp; float tmpf; int val; int *id; int i, j, count; xmlDocPtr doc; xmlNodePtr rootnode; xmlNodePtr xmlpatch; #define NR_OF_PPT 5 PatchParamType ppt_lst[NR_OF_PPT] = { PATCH_PARAM_VOLUME, PATCH_PARAM_PANNING, PATCH_PARAM_CUTOFF, PATCH_PARAM_RESONANCE, PATCH_PARAM_PITCH }; char* ppt_names[NR_OF_PPT] = { "volume_", "panning_", "cutoff_", "resonance_", "pitch_" }; debug ("Writing current bank to file %s\n", name); /* create the guts of the doc */ doc = xmlNewDoc ((const xmlChar *)"1.0"); rootnode = xmlNewDocNode (doc, NULL, (const xmlChar *) "beef", NULL); xmlDocSetRootElement (doc, rootnode); /* walk the walk */ count = patch_dump (&id); for (i = 0; i < count; i++) { xmlpatch = xmlNewTextChild (rootnode, NULL, (const xmlChar *) "patch", NULL); ptmp = patch_get_name (id[i]); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "name", (const xmlChar *) ptmp); g_free (ptmp); ptmp = patch_get_sample_name (id[i]); if (ptmp[0] != '\0') xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "file", (const xmlChar *) ptmp); g_free (ptmp); sprintf (tmp, "%d", patch_get_channel (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "channel", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_note (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "note", (const xmlChar *) tmp); sprintf (tmp, "%f", patch_get_volume (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "volume", (const xmlChar *) tmp); sprintf (tmp, "%f", patch_get_panning (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "pan", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_play_mode (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "play_mode", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_cut (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "cut", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_cut_by (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "cut_by", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_range (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "range", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_lower_note (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "lower_note", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_upper_note (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "upper_note", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_sample_start (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "sample_start", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_sample_stop (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "sample_stop", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_loop_start (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "loop_start", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_loop_stop (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "loop_stop", (const xmlChar *) tmp); sprintf (tmp, "%f", patch_get_cutoff (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "cutoff", (const xmlChar *) tmp); sprintf (tmp, "%f", patch_get_resonance (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "resonance", (const xmlChar *) tmp); sprintf (tmp, "%f", patch_get_pitch (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "pitch", (const xmlChar *) tmp); sprintf (tmp, "%d", patch_get_pitch_steps (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "pitch_steps", (const xmlChar *) tmp); tmpb = patch_get_portamento (id[i]); if ( tmpb ) sprintf (tmp, "%s", "yes"); else sprintf (tmp, "%s", "no"); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "portamento", (const xmlChar *) tmp); sprintf (tmp, "%f", patch_get_portamento_time (id[i])); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "portamento_time", (const xmlChar *) tmp); tmpb = patch_get_monophonic (id[i]); if ( tmpb ) sprintf (tmp, "%s", "yes"); else sprintf (tmp, "%s", "no"); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "monophonic", (const xmlChar *) tmp); tmpb = patch_get_legato (id[i]); if ( tmpb ) sprintf (tmp, "%s", "yes"); else sprintf (tmp, "%s", "no"); xmlNewTextChild (xmlpatch, NULL, (const xmlChar *) "legato", (const xmlChar *) tmp); /* params */ for (j=0; jname, (const xmlChar *) "beef") != 0) { errmsg ("%s is not a valid 'beef' file\n", path); xmlFreeDoc (doc); return -1; } patch_destroy_all ( ); for (xmlpatch = rootnode->xmlChildrenNode; xmlpatch != NULL; xmlpatch = xmlpatch->next) { key = NULL; if (!xmlStrcmp (xmlpatch->name, (const xmlChar *) "patch")) { id = patch_create ("Loading..."); for (cur = xmlpatch->xmlChildrenNode; cur != NULL; cur = cur->next) { if (!xmlStrcmp (cur->name, (const xmlChar *) "name")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_name (id, (char *) key); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "file")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_sample_load (id, (char *) key); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "channel")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_channel (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "note")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_note (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_volume (id, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pan")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_panning (id, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "play_mode")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_play_mode (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cut")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_cut (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cut_by")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_cut_by (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "range")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_range (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "lower_note")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lower_note (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "upper_note")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_upper_note (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "sample_start")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_sample_start (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "sample_stop")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_sample_stop (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "loop_start")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_loop_start (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "loop_stop")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_loop_stop (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_cutoff (id, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "portamento")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_portamento (id, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "portamento_time")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_portamento_time (id, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "monophonic")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_monophonic (id, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "legato")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_legato (id, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_resonance (id, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_attack (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_d")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_decay (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_delay (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_s")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_sustain (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_r")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_release (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_hold")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_hold (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_amount (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_env_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_on (id, PATCH_PARAM_RESONANCE, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_on (id, PATCH_PARAM_RESONANCE, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_vel_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_vel_amount (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_attack (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_delay (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_amount (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_beats")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_beats (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_freq")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_freq (id, PATCH_PARAM_RESONANCE, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_positive")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_positive (id, PATCH_PARAM_RESONANCE, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_global")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_global (id, PATCH_PARAM_RESONANCE, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_sync")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_sync (id, PATCH_PARAM_RESONANCE, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "resonance_lfo_shape")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); if (xmlStrcmp (key, (const xmlChar *) "sine") == 0) patch_set_lfo_shape (id, PATCH_PARAM_RESONANCE, LFO_SHAPE_SINE); else if (xmlStrcmp (key, (const xmlChar *) "triangle") == 0) patch_set_lfo_shape (id, PATCH_PARAM_RESONANCE, LFO_SHAPE_TRIANGLE); else if (xmlStrcmp (key, (const xmlChar *) "saw") == 0) patch_set_lfo_shape (id, PATCH_PARAM_RESONANCE, LFO_SHAPE_SAW); else if (xmlStrcmp (key, (const xmlChar *) "square") == 0) patch_set_lfo_shape (id, PATCH_PARAM_RESONANCE, LFO_SHAPE_SQUARE); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_attack (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_d")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_decay (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_delay (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_s")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_sustain (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_r")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_release (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_hold")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_hold (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_amount (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_vel_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_vel_amount (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_env_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_on (id, PATCH_PARAM_VOLUME, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_attack (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_delay (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_amount (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_on (id, PATCH_PARAM_VOLUME, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_beats")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_beats (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_freq")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_freq (id, PATCH_PARAM_VOLUME, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_positive")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_positive (id, PATCH_PARAM_VOLUME, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_global")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_global (id, PATCH_PARAM_VOLUME, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_sync")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_sync (id, PATCH_PARAM_VOLUME, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "volume_lfo_shape")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); if (xmlStrcmp (key, (const xmlChar *) "sine") == 0) patch_set_lfo_shape (id, PATCH_PARAM_VOLUME, LFO_SHAPE_SINE); else if (xmlStrcmp (key, (const xmlChar *) "triangle") == 0) patch_set_lfo_shape (id, PATCH_PARAM_VOLUME, LFO_SHAPE_TRIANGLE); else if (xmlStrcmp (key, (const xmlChar *) "saw") == 0) patch_set_lfo_shape (id, PATCH_PARAM_VOLUME, LFO_SHAPE_SAW); else if (xmlStrcmp (key, (const xmlChar *) "square") == 0) patch_set_lfo_shape (id, PATCH_PARAM_VOLUME, LFO_SHAPE_SQUARE); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_pitch (id, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_steps")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_pitch_steps (id, atoi ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_attack (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_d")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_decay (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_delay (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_s")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_sustain (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_r")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_release (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_hold")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_hold (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_amount (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_env_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_on (id, PATCH_PARAM_PITCH, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_attack (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_vel_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_vel_amount (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_delay (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_amount (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_on (id, PATCH_PARAM_PITCH, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_beats")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_beats (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_freq")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_freq (id, PATCH_PARAM_PITCH, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_positive")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_positive (id, PATCH_PARAM_PITCH, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_global")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_global (id, PATCH_PARAM_PITCH, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_sync")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_sync (id, PATCH_PARAM_PITCH, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "pitch_lfo_shape")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); if (xmlStrcmp (key, (const xmlChar *) "sine") == 0) patch_set_lfo_shape (id, PATCH_PARAM_PITCH, LFO_SHAPE_SINE); else if (xmlStrcmp (key, (const xmlChar *) "triangle") == 0) patch_set_lfo_shape (id, PATCH_PARAM_PITCH, LFO_SHAPE_TRIANGLE); else if (xmlStrcmp (key, (const xmlChar *) "saw") == 0) patch_set_lfo_shape (id, PATCH_PARAM_PITCH, LFO_SHAPE_SAW); else if (xmlStrcmp (key, (const xmlChar *) "square") == 0) patch_set_lfo_shape (id, PATCH_PARAM_PITCH, LFO_SHAPE_SQUARE); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_attack (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_d")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_decay (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_delay (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_s")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_sustain (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_r")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_release (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_hold")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_hold (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_amount (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_env_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_on (id, PATCH_PARAM_PANNING, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_vel_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_vel_amount (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_attack (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_delay (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_amount (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_on (id, PATCH_PARAM_PANNING, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_beats")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_beats (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_freq")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_freq (id, PATCH_PARAM_PANNING, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_positive")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_positive (id, PATCH_PARAM_PANNING, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_global")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_global (id, PATCH_PARAM_PANNING, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_sync")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_sync (id, PATCH_PARAM_PANNING, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "panning_lfo_shape")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); if (xmlStrcmp (key, (const xmlChar *) "sine") == 0) patch_set_lfo_shape (id, PATCH_PARAM_PANNING, LFO_SHAPE_SINE); else if (xmlStrcmp (key, (const xmlChar *) "triangle") == 0) patch_set_lfo_shape (id, PATCH_PARAM_PANNING, LFO_SHAPE_TRIANGLE); else if (xmlStrcmp (key, (const xmlChar *) "saw") == 0) patch_set_lfo_shape (id, PATCH_PARAM_PANNING, LFO_SHAPE_SAW); else if (xmlStrcmp (key, (const xmlChar *) "square") == 0) patch_set_lfo_shape (id, PATCH_PARAM_PANNING, LFO_SHAPE_SQUARE); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_attack (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_d")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_decay (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_delay (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_s")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_sustain (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_r")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_release (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_hold")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_hold (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_amount (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_env_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_env_on (id, PATCH_PARAM_CUTOFF, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_vel_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_vel_amount (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_a")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_attack (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_delay")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_delay (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_amt")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_amount (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_on")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_on (id, PATCH_PARAM_CUTOFF, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_beats")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_beats (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_freq")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_freq (id, PATCH_PARAM_CUTOFF, atof ((const char *) key)); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_positive")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_positive (id, PATCH_PARAM_CUTOFF, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_global")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_global (id, PATCH_PARAM_CUTOFF, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_sync")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); patch_set_lfo_sync (id, PATCH_PARAM_CUTOFF, xmlStrcmp (key, (const xmlChar *) "yes") == 0); } else if (!xmlStrcmp (cur->name, (const xmlChar *) "cutoff_lfo_shape")) { key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); if (xmlStrcmp (key, (const xmlChar *) "sine") == 0) patch_set_lfo_shape (id, PATCH_PARAM_CUTOFF, LFO_SHAPE_SINE); else if (xmlStrcmp (key, (const xmlChar *) "triangle") == 0) patch_set_lfo_shape (id, PATCH_PARAM_CUTOFF, LFO_SHAPE_TRIANGLE); else if (xmlStrcmp (key, (const xmlChar *) "saw") == 0) patch_set_lfo_shape (id, PATCH_PARAM_CUTOFF, LFO_SHAPE_SAW); else if (xmlStrcmp (key, (const xmlChar *) "square") == 0) patch_set_lfo_shape (id, PATCH_PARAM_CUTOFF, LFO_SHAPE_SQUARE); } if (key != NULL) { xmlFree (key); key = NULL; } } } } xmlFreeDoc (doc); return 0; } specimen-0.5.2-rc3/src/beef.h0000644000175000017500000000017210466727727012612 00000000000000#ifndef __BEEF_H__ #define __BEEF_H__ int beef_read (char* name); int beef_write (char* name); #endif /* __BEEF_H__ */ specimen-0.5.2-rc3/src/maths.c0000644000175000017500000003600010466744417013012 00000000000000#include #include #include "maths.h" enum { TABSIZE = 256 }; /* cubic interpolation coefficient table for first tap */ static float ct0[TABSIZE] = { 0.000000, -0.001938, -0.003845, -0.005723, -0.007570, -0.009388, -0.011176, -0.012934, -0.014664, -0.016364, -0.018035, -0.019678, -0.021292, -0.022877, -0.024435, -0.025964, -0.027466, -0.028940, -0.030386, -0.031805, -0.033197, -0.034562, -0.035901, -0.037213, -0.038498, -0.039757, -0.040990, -0.042197, -0.043379, -0.044535, -0.045666, -0.046771, -0.047852, -0.048907, -0.049938, -0.050945, -0.051928, -0.052886, -0.053820, -0.054731, -0.055618, -0.056482, -0.057323, -0.058140, -0.058935, -0.059707, -0.060457, -0.061184, -0.061890, -0.062573, -0.063235, -0.063875, -0.064493, -0.065091, -0.065667, -0.066222, -0.066757, -0.067272, -0.067765, -0.068239, -0.068693, -0.069127, -0.069542, -0.069937, -0.070312, -0.070669, -0.071007, -0.071326, -0.071627, -0.071909, -0.072173, -0.072419, -0.072647, -0.072858, -0.073051, -0.073227, -0.073385, -0.073527, -0.073652, -0.073760, -0.073853, -0.073928, -0.073988, -0.074032, -0.074060, -0.074073, -0.074071, -0.074053, -0.074020, -0.073973, -0.073911, -0.073835, -0.073744, -0.073639, -0.073520, -0.073388, -0.073242, -0.073083, -0.072911, -0.072725, -0.072527, -0.072316, -0.072093, -0.071857, -0.071609, -0.071350, -0.071079, -0.070796, -0.070501, -0.070196, -0.069879, -0.069552, -0.069214, -0.068865, -0.068506, -0.068137, -0.067759, -0.067370, -0.066972, -0.066564, -0.066147, -0.065721, -0.065286, -0.064842, -0.064390, -0.063930, -0.063461, -0.062984, -0.062500, -0.062008, -0.061508, -0.061002, -0.060488, -0.059967, -0.059439, -0.058905, -0.058365, -0.057818, -0.057266, -0.056707, -0.056143, -0.055573, -0.054998, -0.054418, -0.053833, -0.053243, -0.052649, -0.052050, -0.051447, -0.050840, -0.050229, -0.049614, -0.048996, -0.048374, -0.047750, -0.047122, -0.046492, -0.045859, -0.045223, -0.044585, -0.043945, -0.043304, -0.042660, -0.042015, -0.041368, -0.040721, -0.040072, -0.039423, -0.038773, -0.038122, -0.037471, -0.036820, -0.036169, -0.035518, -0.034868, -0.034218, -0.033569, -0.032921, -0.032274, -0.031629, -0.030985, -0.030342, -0.029702, -0.029063, -0.028427, -0.027793, -0.027162, -0.026533, -0.025908, -0.025285, -0.024666, -0.024050, -0.023438, -0.022829, -0.022225, -0.021624, -0.021029, -0.020437, -0.019850, -0.019269, -0.018692, -0.018121, -0.017555, -0.016994, -0.016439, -0.015891, -0.015348, -0.014812, -0.014282, -0.013759, -0.013243, -0.012734, -0.012232, -0.011737, -0.011250, -0.010771, -0.010300, -0.009836, -0.009382, -0.008935, -0.008497, -0.008068, -0.007648, -0.007237, -0.006836, -0.006444, -0.006062, -0.005689, -0.005327, -0.004975, -0.004634, -0.004303, -0.003983, -0.003673, -0.003375, -0.003089, -0.002813, -0.002550, -0.002298, -0.002058, -0.001831, -0.001616, -0.001414, -0.001224, -0.001047, -0.000883, -0.000733, -0.000596, -0.000473, -0.000364, -0.000268, -0.000187, -0.000120, -0.000068, -0.000030, -0.000008 }; /* cubic interpolation coefficient table for second tap */ static float ct1[TABSIZE] = { 1.000000, 0.999962, 0.999848, 0.999659, 0.999395, 0.999058, 0.998646, 0.998161, 0.997604, 0.996975, 0.996275, 0.995503, 0.994661, 0.993750, 0.992769, 0.991719, 0.990601, 0.989415, 0.988162, 0.986842, 0.985456, 0.984005, 0.982489, 0.980908, 0.979263, 0.977555, 0.975784, 0.973951, 0.972055, 0.970099, 0.968082, 0.966004, 0.963867, 0.961671, 0.959416, 0.957103, 0.954733, 0.952306, 0.949822, 0.947282, 0.944687, 0.942037, 0.939333, 0.936575, 0.933764, 0.930900, 0.927984, 0.925016, 0.921997, 0.918928, 0.915808, 0.912640, 0.909422, 0.906156, 0.902842, 0.899480, 0.896072, 0.892618, 0.889118, 0.885573, 0.881983, 0.878349, 0.874671, 0.870951, 0.867188, 0.863382, 0.859536, 0.855649, 0.851721, 0.847753, 0.843746, 0.839701, 0.835617, 0.831496, 0.827337, 0.823142, 0.818911, 0.814644, 0.810342, 0.806006, 0.801636, 0.797232, 0.792796, 0.788327, 0.783827, 0.779295, 0.774733, 0.770140, 0.765518, 0.760867, 0.756187, 0.751479, 0.746744, 0.741982, 0.737193, 0.732379, 0.727539, 0.722674, 0.717786, 0.712873, 0.707937, 0.702979, 0.697998, 0.692996, 0.687973, 0.682929, 0.677866, 0.672783, 0.667681, 0.662560, 0.657422, 0.652267, 0.647095, 0.641906, 0.636702, 0.631483, 0.626249, 0.621001, 0.615740, 0.610466, 0.605179, 0.599880, 0.594570, 0.589249, 0.583918, 0.578577, 0.573226, 0.567867, 0.562500, 0.557125, 0.551743, 0.546355, 0.540960, 0.535560, 0.530155, 0.524746, 0.519333, 0.513916, 0.508497, 0.503075, 0.497652, 0.492228, 0.486802, 0.481377, 0.475952, 0.470528, 0.465106, 0.459685, 0.454268, 0.448853, 0.443442, 0.438035, 0.432632, 0.427235, 0.421844, 0.416459, 0.411081, 0.405711, 0.400348, 0.394994, 0.389648, 0.384313, 0.378987, 0.373672, 0.368368, 0.363076, 0.357796, 0.352529, 0.347275, 0.342035, 0.336809, 0.331598, 0.326403, 0.321223, 0.316060, 0.310914, 0.305786, 0.300676, 0.295584, 0.290512, 0.285460, 0.280427, 0.275416, 0.270425, 0.265457, 0.260511, 0.255588, 0.250689, 0.245813, 0.240962, 0.236137, 0.231337, 0.226562, 0.221815, 0.217095, 0.212403, 0.207739, 0.203104, 0.198498, 0.193922, 0.189377, 0.184862, 0.180380, 0.175929, 0.171511, 0.167126, 0.162774, 0.158457, 0.154175, 0.149928, 0.145716, 0.141542, 0.137403, 0.133303, 0.129240, 0.125216, 0.121231, 0.117286, 0.113380, 0.109515, 0.105692, 0.101910, 0.098171, 0.094474, 0.090820, 0.087211, 0.083646, 0.080125, 0.076651, 0.073222, 0.069840, 0.066505, 0.063217, 0.059978, 0.056787, 0.053646, 0.050554, 0.047513, 0.044523, 0.041583, 0.038696, 0.035862, 0.033080, 0.030352, 0.027678, 0.025058, 0.022494, 0.019985, 0.017532, 0.015137, 0.012798, 0.010517, 0.008295, 0.006132, 0.004028, 0.001984 }; /* cubic interpolation coefficient table for third tap */ static float ct2[TABSIZE] = { 0.000000, 0.001984, 0.004028, 0.006132, 0.008295, 0.010517, 0.012798, 0.015137, 0.017532, 0.019985, 0.022494, 0.025058, 0.027678, 0.030352, 0.033080, 0.035862, 0.038696, 0.041583, 0.044523, 0.047513, 0.050554, 0.053646, 0.056787, 0.059978, 0.063217, 0.066505, 0.069840, 0.073222, 0.076651, 0.080125, 0.083646, 0.087211, 0.090820, 0.094474, 0.098171, 0.101910, 0.105692, 0.109515, 0.113380, 0.117286, 0.121231, 0.125216, 0.129240, 0.133303, 0.137403, 0.141542, 0.145716, 0.149928, 0.154175, 0.158457, 0.162774, 0.167126, 0.171511, 0.175929, 0.180380, 0.184862, 0.189377, 0.193922, 0.198498, 0.203104, 0.207739, 0.212403, 0.217095, 0.221815, 0.226562, 0.231337, 0.236137, 0.240962, 0.245813, 0.250689, 0.255588, 0.260511, 0.265457, 0.270425, 0.275416, 0.280427, 0.285460, 0.290512, 0.295584, 0.300676, 0.305786, 0.310914, 0.316060, 0.321223, 0.326403, 0.331598, 0.336809, 0.342035, 0.347275, 0.352529, 0.357796, 0.363076, 0.368368, 0.373672, 0.378987, 0.384313, 0.389648, 0.394994, 0.400348, 0.405711, 0.411081, 0.416459, 0.421844, 0.427235, 0.432632, 0.438035, 0.443442, 0.448853, 0.454268, 0.459685, 0.465106, 0.470528, 0.475952, 0.481377, 0.486802, 0.492228, 0.497652, 0.503075, 0.508497, 0.513916, 0.519333, 0.524746, 0.530155, 0.535560, 0.540960, 0.546355, 0.551743, 0.557125, 0.562500, 0.567867, 0.573226, 0.578577, 0.583918, 0.589249, 0.594570, 0.599880, 0.605179, 0.610466, 0.615740, 0.621001, 0.626249, 0.631483, 0.636702, 0.641906, 0.647095, 0.652267, 0.657422, 0.662560, 0.667681, 0.672783, 0.677866, 0.682929, 0.687973, 0.692996, 0.697998, 0.702979, 0.707937, 0.712873, 0.717786, 0.722674, 0.727539, 0.732379, 0.737193, 0.741982, 0.746744, 0.751479, 0.756187, 0.760867, 0.765518, 0.770140, 0.774733, 0.779295, 0.783827, 0.788327, 0.792796, 0.797232, 0.801636, 0.806006, 0.810342, 0.814644, 0.818911, 0.823142, 0.827337, 0.831496, 0.835617, 0.839701, 0.843746, 0.847753, 0.851721, 0.855649, 0.859536, 0.863382, 0.867188, 0.870951, 0.874671, 0.878349, 0.881983, 0.885573, 0.889118, 0.892618, 0.896072, 0.899480, 0.902842, 0.906156, 0.909422, 0.912640, 0.915808, 0.918928, 0.921997, 0.925016, 0.927984, 0.930900, 0.933764, 0.936575, 0.939333, 0.942037, 0.944687, 0.947282, 0.949822, 0.952306, 0.954733, 0.957103, 0.959416, 0.961671, 0.963867, 0.966004, 0.968082, 0.970099, 0.972055, 0.973951, 0.975784, 0.977555, 0.979263, 0.980908, 0.982489, 0.984005, 0.985456, 0.986842, 0.988162, 0.989415, 0.990601, 0.991719, 0.992769, 0.993750, 0.994661, 0.995503, 0.996275, 0.996975, 0.997604, 0.998161, 0.998646, 0.999058, 0.999395, 0.999659, 0.999848, 0.999962 }; /* cubic interpolation coefficient table for fourth tap */ static float ct3[TABSIZE] = { 0.000000, -0.000008, -0.000030, -0.000068, -0.000120, -0.000187, -0.000268, -0.000364, -0.000473, -0.000596, -0.000733, -0.000883, -0.001047, -0.001224, -0.001414, -0.001616, -0.001831, -0.002058, -0.002298, -0.002550, -0.002813, -0.003089, -0.003375, -0.003673, -0.003983, -0.004303, -0.004634, -0.004975, -0.005327, -0.005689, -0.006062, -0.006444, -0.006836, -0.007237, -0.007648, -0.008068, -0.008497, -0.008935, -0.009382, -0.009836, -0.010300, -0.010771, -0.011250, -0.011737, -0.012232, -0.012734, -0.013243, -0.013759, -0.014282, -0.014812, -0.015348, -0.015891, -0.016439, -0.016994, -0.017555, -0.018121, -0.018692, -0.019269, -0.019850, -0.020437, -0.021029, -0.021624, -0.022225, -0.022829, -0.023438, -0.024050, -0.024666, -0.025285, -0.025908, -0.026533, -0.027162, -0.027793, -0.028427, -0.029063, -0.029702, -0.030342, -0.030985, -0.031629, -0.032274, -0.032921, -0.033569, -0.034218, -0.034868, -0.035518, -0.036169, -0.036820, -0.037471, -0.038122, -0.038773, -0.039423, -0.040072, -0.040721, -0.041368, -0.042015, -0.042660, -0.043304, -0.043945, -0.044585, -0.045223, -0.045859, -0.046492, -0.047122, -0.047750, -0.048374, -0.048996, -0.049614, -0.050229, -0.050840, -0.051447, -0.052050, -0.052649, -0.053243, -0.053833, -0.054418, -0.054998, -0.055573, -0.056143, -0.056707, -0.057266, -0.057818, -0.058365, -0.058905, -0.059439, -0.059967, -0.060488, -0.061002, -0.061508, -0.062008, -0.062500, -0.062984, -0.063461, -0.063930, -0.064390, -0.064842, -0.065286, -0.065721, -0.066147, -0.066564, -0.066972, -0.067370, -0.067759, -0.068137, -0.068506, -0.068865, -0.069214, -0.069552, -0.069879, -0.070196, -0.070501, -0.070796, -0.071079, -0.071350, -0.071609, -0.071857, -0.072093, -0.072316, -0.072527, -0.072725, -0.072911, -0.073083, -0.073242, -0.073388, -0.073520, -0.073639, -0.073744, -0.073835, -0.073911, -0.073973, -0.074020, -0.074053, -0.074071, -0.074073, -0.074060, -0.074032, -0.073988, -0.073928, -0.073853, -0.073760, -0.073652, -0.073527, -0.073385, -0.073227, -0.073051, -0.072858, -0.072647, -0.072419, -0.072173, -0.071909, -0.071627, -0.071326, -0.071007, -0.070669, -0.070312, -0.069937, -0.069542, -0.069127, -0.068693, -0.068239, -0.067765, -0.067272, -0.066757, -0.066222, -0.065667, -0.065091, -0.064493, -0.063875, -0.063235, -0.062573, -0.061890, -0.061184, -0.060457, -0.059707, -0.058935, -0.058140, -0.057323, -0.056482, -0.055618, -0.054731, -0.053820, -0.052886, -0.051928, -0.050945, -0.049938, -0.048907, -0.047852, -0.046771, -0.045666, -0.044535, -0.043379, -0.042197, -0.040990, -0.039757, -0.038498, -0.037213, -0.035901, -0.034562, -0.033197, -0.031805, -0.030386, -0.028940, -0.027466, -0.025964, -0.024435, -0.022877, -0.021292, -0.019678, -0.018035, -0.016364, -0.014664, -0.012934, -0.011176, -0.009388, -0.007570, -0.005723, -0.003845, -0.001938 }; static float logvolct[TABSIZE] = { 0.000000, 0.000000, 0.000000, 0.000000, 0.000001, 0.000002, 0.000004, 0.000007, 0.000010, 0.000015, 0.000021, 0.000029, 0.000039, 0.000051, 0.000065, 0.000082, 0.000101, 0.000124, 0.000150, 0.000179, 0.000213, 0.000250, 0.000292, 0.000338, 0.000390, 0.000446, 0.000508, 0.000576, 0.000650, 0.000731, 0.000818, 0.000912, 0.001013, 0.001122, 0.001239, 0.001364, 0.001498, 0.001641, 0.001793, 0.001955, 0.002126, 0.002308, 0.002500, 0.002703, 0.002918, 0.003144, 0.003382, 0.003633, 0.003896, 0.004172, 0.004462, 0.004765, 0.005083, 0.005415, 0.005761, 0.006124, 0.006501, 0.006895, 0.007305, 0.007732, 0.008176, 0.008637, 0.009117, 0.009614, 0.010131, 0.010666, 0.011221, 0.011796, 0.012391, 0.013007, 0.013644, 0.014302, 0.014982, 0.015685, 0.016410, 0.017158, 0.017930, 0.018725, 0.019546, 0.020390, 0.021261, 0.022156, 0.023078, 0.024026, 0.025001, 0.026004, 0.027034, 0.028092, 0.029180, 0.030296, 0.031441, 0.032617, 0.033823, 0.035059, 0.036327, 0.037627, 0.038959, 0.040324, 0.041721, 0.043152, 0.044617, 0.046117, 0.047651, 0.049221, 0.050826, 0.052468, 0.054146, 0.055862, 0.057615, 0.059406, 0.061236, 0.063105, 0.065013, 0.066962, 0.068950, 0.070980, 0.073051, 0.075164, 0.077320, 0.079518, 0.081759, 0.084045, 0.086374, 0.088749, 0.091168, 0.093633, 0.096145, 0.098703, 0.101309, 0.103962, 0.106663, 0.109413, 0.112212, 0.115061, 0.117960, 0.120910, 0.123911, 0.126963, 0.130068, 0.133226, 0.136436, 0.139701, 0.143019, 0.146392, 0.149821, 0.153305, 0.156845, 0.160442, 0.164097, 0.167809, 0.171579, 0.175409, 0.179297, 0.183246, 0.187255, 0.191325, 0.195456, 0.199649, 0.203905, 0.208223, 0.212606, 0.217052, 0.221563, 0.226139, 0.230780, 0.235488, 0.240263, 0.245104, 0.250014, 0.254992, 0.260038, 0.265155, 0.270341, 0.275597, 0.280925, 0.286324, 0.291795, 0.297339, 0.302956, 0.308647, 0.314412, 0.320252, 0.326168, 0.332159, 0.338227, 0.344372, 0.350595, 0.356895, 0.363275, 0.369734, 0.376272, 0.382891, 0.389591, 0.396373, 0.403236, 0.410182, 0.417212, 0.424325, 0.431522, 0.438805, 0.446172, 0.453626, 0.461167, 0.468794, 0.476510, 0.484314, 0.492206, 0.500188, 0.508260, 0.516423, 0.524677, 0.533023, 0.541461, 0.549992, 0.558616, 0.567335, 0.576148, 0.585056, 0.594061, 0.603162, 0.612359, 0.621655, 0.631048, 0.640540, 0.650132, 0.659823, 0.669616, 0.679509, 0.689504, 0.699601, 0.709801, 0.720105, 0.730512, 0.741025, 0.751642, 0.762366, 0.773196, 0.784133, 0.795178, 0.806331, 0.817593, 0.828964, 0.840446, 0.852038, 0.863742, 0.875557, 0.887485, 0.899526, 0.911681, 0.923950, 0.936334, 0.948834, 0.961450, 0.974182, 0.987032, 1.000000, }; float cerp(float y0, float y1, float y2, float y3, guint8 d) { float s0; s0 = y0 * ct0[d]; s0 += y1 * ct1[d]; s0 += y2 * ct2[d]; s0 += y3 * ct3[d]; return s0; } float log_volume(float x) { int i = x * (TABSIZE - 1); return logvolct[i]; } specimen-0.5.2-rc3/src/maths.h0000644000175000017500000000141710466744417013023 00000000000000#ifndef __MATHS_H__ #define __MATHS_H__ #include /* old fashioned linear interpolator */ inline static float lerp(float y0, float y1, float d) { return y0 * (1 - d) + y1 * d; } /* return the distance between y0 and y1 given some value y */ inline static float delerp(float y0, float y1, float y) { return (y - y0) / (y1 - y); } /* cubic interpolation routine: y0 = sample previous to current sample y1 = current sample y2 = sample after current sample y3 = sample after y2 x = fractional distance between y1 and y2 in unsigned integer form */ float cerp(float y0, float y1, float y2, float y3, guint8 d); /* convert a floating-point linear volume value to its logarithmic * equivalent */ float log_volume(float x); #endif /* __MATHS_H__ */ specimen-0.5.2-rc3/src/ticks.c0000644000175000017500000000177210466744417013023 00000000000000#include #include "specimen.h" #include "driver.h" #include "ticks.h" static int samplerate = DRIVER_DEFAULT_SAMPLERATE; /* gets the current tick (sample count). N.B., we divide tv_usec by 1,000,000 to convert to full seconds */ Tick ticks_get_ticks ( ) { struct timeval time; Tick val; static Tick offset = -1; if (offset == -1) { if (gettimeofday (&time, NULL) < 0) { offset = 0; } else { offset = (time.tv_sec + time.tv_usec / 1000000.0); } } if (gettimeofday (&time, NULL) < 0) { errmsg ("Failed to get time\n"); return 0; } val = (time.tv_sec + time.tv_usec / 1000000.0 - offset) * samplerate; return val; } /* convert seconds to ticks */ Tick ticks_secs_to_ticks (float secs) { return samplerate * secs; } /* convert ticks to seconds */ float ticks_ticks_to_secs (Tick tick) { return tick * 1.0 / samplerate; } void ticks_set_samplerate (int rate) { samplerate = rate; } specimen-0.5.2-rc3/src/ticks.h0000644000175000017500000000062510466727727013031 00000000000000#ifndef __TICKS_H__ #define __TICKS_H__ #include /* frame count type */ #ifdef G_HAVE_GINT64 typedef guint32 Tick; #else typedef guint32 Tick; #endif /* G_HAVE_GINT64 */ /* functions */ Tick ticks_get_ticks ( ); Tick ticks_secs_to_ticks (float secs); float ticks_ticks_to_secs (Tick tick); /* call me sometime, OK? */ void ticks_set_samplerate (int rate); #endif /* __TICKS_H__ */ specimen-0.5.2-rc3/src/adsr.c0000644000175000017500000000511410466727727012636 00000000000000#include "specimen.h" #include "adsr.h" #include "maths.h" #include "ticks.h" void adsr_init (ADSR* env) { env->state = ADSR_STATE_IDLE; env->ticks = 0; env->val = 0.0; env->rval = 0.0; env->delay = 0; env->attack = 0; env->hold = 0; env->decay = 0; env->sustain = 1.0; env->release = 0; } void adsr_trigger (ADSR* env) { env->state = ADSR_STATE_DELAY; env->ticks = 0; } void adsr_release (ADSR* env) { env->state = ADSR_STATE_RELEASE; env->ticks = 0; } /* return current value between 0 and 1 and advance */ float adsr_tick (ADSR* e) { float d; switch (e->state) { case ADSR_STATE_DELAY: e->val = 0.0; if (++e->ticks > e->delay) { e->state = ADSR_STATE_ATTACK; e->ticks = 0; } break; case ADSR_STATE_ATTACK: if (e->attack == 0) { e->val = 1.0; } else { d = (e->ticks * 1.0) / e->attack; e->val = lerp (0.0, 1.0, d); } if (++e->ticks > e->attack) { e->state = ADSR_STATE_HOLD; e->ticks = 0; } break; case ADSR_STATE_HOLD: e->val = 1.0; if (++e->ticks > e->hold) { e->state = ADSR_STATE_DECAY; e->ticks = 0; } break; case ADSR_STATE_DECAY: if (e->decay == 0) { e->val = e->sustain; } else { d = (e->ticks * 1.0) / e->decay; e->val = lerp (1.0, e->sustain, d); } if (++e->ticks > e->decay) { e->state = ADSR_STATE_SUSTAIN; e->ticks = 0; } break; case ADSR_STATE_SUSTAIN: /* e->val just hovers at e->sustain */ e->val = e->sustain; break; case ADSR_STATE_RELEASE: if (e->release == 0) { e->val = 0.0; } else if (e->ticks == 0) { /* we are just beginning to release, store our current * value for later use */ e->rval = e->val; } else { d = (e->ticks * 1.0) / e->release; e->val = lerp (e->rval, 0.0, d); } if (++e->ticks > e->release) { e->state = ADSR_STATE_IDLE; e->ticks = 0; } break; case ADSR_STATE_IDLE: /* fall through */ default: e->val = 0.0; break; } return e->val; } void adsr_set_params (ADSR* env, ADSRParams* params) { env->delay = ticks_secs_to_ticks (params->delay); env->attack = ticks_secs_to_ticks (params->attack); env->hold = ticks_secs_to_ticks (params->hold); env->decay = ticks_secs_to_ticks (params->decay); env->sustain = params->sustain; env->release = ticks_secs_to_ticks (params->release); } specimen-0.5.2-rc3/src/adsr.h0000644000175000017500000000276110466727727012650 00000000000000#ifndef __ADSR_H__ #define __ADSR_H__ #include "specimen.h" #include "ticks.h" /* envelope state flags */ typedef enum _ADSRState { ADSR_STATE_IDLE, ADSR_STATE_DELAY, ADSR_STATE_ATTACK, ADSR_STATE_HOLD, ADSR_STATE_DECAY, ADSR_STATE_SUSTAIN, ADSR_STATE_RELEASE } ADSRState; /* envelope parameters */ typedef struct _ADSRParams { float delay; /* delay length in seconds */ float attack; /* attack length in seconds */ float decay; /* decay length in seconds */ float hold; /* hold length in seconds */ float sustain; /* sustain level [0.0, 1.0] */ float release; /* release length in seconds */ } ADSRParams; /* adsr envelope structure */ typedef struct _ADSR { ADSRState state; /* what phase of the envelope we are in */ Tick ticks; /* how far along we are in the current state */ float val; /* our current value [0.0, 1.0] */ float rval; /* value we released at */ Tick delay; /* delay length in ticks */ Tick attack; /* attack length in ticks */ Tick hold; /* hold length in ticks */ Tick decay; /* decay length in ticks */ float sustain; /* sustain level [0.0, 1.0] */ Tick release; /* release length in ticks */ } ADSR; void adsr_init (ADSR* env); void adsr_release (ADSR* env); void adsr_set_params (ADSR* env, ADSRParams* params); float adsr_tick (ADSR* env); void adsr_trigger (ADSR* env); #endif /* __ADSR_H__ */ specimen-0.5.2-rc3/src/lfo.c0000644000175000017500000000712210466727727012466 00000000000000#include #include #include "maths.h" #include "specimen.h" #include "lfo.h" #include "driver.h" #include "sync.h" #include "ticks.h" /* sample rate we expect the world to be running at */ static int samplerate = DRIVER_DEFAULT_SAMPLERATE; /* tempo we expect the world to be running at */ static float tempo = SYNC_DEFAULT_TEMPO; /* lookup tables for different shapes */ static float sintab[255]; /* sine */ static float sqtab[255]; /* square */ static float tritab[255]; /* triangle */ static float sawtab[255]; /* saw */ /* set the phase increment based on the LFO frequency */ inline static void lfo_set_inc_from_freq (LFO* lfo, float freq) { lfo->inc = (guint32) ((255.0 * freq / samplerate) * (float) (1 << 24)); } /* set the phase increment based on period length in beats */ inline static void lfo_set_inc_from_beats (LFO* lfo, float beats) { lfo_set_inc_from_freq (lfo, (tempo / 60.0) / beats); } void lfo_init ( ) { int i; float* t; /* build triangle table */ t = tritab; for (i = 0; i < 64; i++) { t[i] = i / 64.0; t[i + 64] = (64 - i) / 64.0; t[i + 128] = -i / 64.0; t[i + 192] = -(64 - i) / 64.0; } /* build sine table */ t = sintab; for (i = 0; i <= 255; i++) t[i] = sin (2.0 * G_PI * (i / 255.0)); /* build saw table */ t = sawtab; for (i = 0; i < 255; i++) t[i] = 2.0 * (i / 255.0) - 1.0; /* build square table */ t = sqtab; for (i = 0; i < 128; i++) { t[i] = 1.0; t[i + 128] = -1.0; } } void lfo_set_samplerate (int rate) { samplerate = rate; } void lfo_set_tempo (float bpm) { tempo = bpm; } void lfo_prepare (LFO* lfo) { lfo->positive = FALSE; lfo->val = 0.0; lfo->phase = 0; lfo_set_inc_from_freq (lfo, 1.0); lfo->tab = sintab; lfo->delay = 0; lfo->attack = 0; lfo->attack_ticks = 0; } void lfo_trigger (LFO* lfo, LFOParams* params) { lfo->positive = params->positive; switch (params->shape) { case LFO_SHAPE_TRIANGLE: lfo->tab = tritab; break; case LFO_SHAPE_SAW: lfo->tab = sawtab; break; case LFO_SHAPE_SQUARE: lfo->tab = sqtab; break; case LFO_SHAPE_SINE: /* fallthrough is intentional */ default: lfo->tab = sintab; break; } /* we recalculate our phase increment in case the tempo or * samplerate has changed */ if (params->sync) { lfo_set_inc_from_beats (lfo, params->sync_beats); } else { lfo_set_inc_from_freq (lfo, params->freq); } lfo->delay = ticks_secs_to_ticks (params->delay); lfo->attack = ticks_secs_to_ticks (params->attack); lfo->attack_ticks = 0; lfo->phase = 0; } float lfo_tick (LFO* lfo) { guint8 index, index0, index1, index2; guint8 frac; if (lfo->delay) { lfo->delay--; lfo->val = 0; return lfo->val; } lfo->phase += lfo->inc; /* calculate new value */ index = lfo->phase >> 24; frac = (lfo->phase & 0x00FF0000) >> 16; /* ensure the unsigned rollover happens if needed */ index0 = index - 1; index1 = index + 1; index2 = index + 2; lfo->val = cerp (lfo->tab[index0], lfo->tab[index], lfo->tab[index1], lfo->tab[index2], frac); if (lfo->positive) { lfo->val = (lfo->val + 1) / 2.0; } if (lfo->attack) { lfo->val = lerp (0.0, lfo->val, (lfo->attack_ticks * 1.0) / lfo->attack); lfo->attack_ticks++; if (lfo->attack_ticks == lfo->attack) lfo->attack = 0; } return lfo->val; } specimen-0.5.2-rc3/src/lfo.h0000644000175000017500000000406010467173732012461 00000000000000#ifndef __LFO_H__ #define __LFO_H__ /* * This class implements a LUT-based LFO with various waveforms and * linear interpolation. * * It uses 32-bit fixed-point phase and increment, where the 8 MSB * represent the integer part of the number and the 24 LSB the * fractionnal part * * Originally written Remy Muller on 2003-08-22 * * Adapted for C and Specimen by that incorrigible wannabe * cyber-ninja, Pete Bessman, on 2004-06-03. */ #include #include "ticks.h" typedef enum { LFO_SHAPE_SINE, LFO_SHAPE_TRIANGLE, LFO_SHAPE_SAW, LFO_SHAPE_SQUARE } LFOShape; typedef struct _LFOParams { LFOShape shape; float freq; /* frequency in hz */ float sync_beats; gboolean sync; gboolean positive; /* if on, oscillate from [0, 1] instead of [-1, 1] */ float delay; /* in seconds */ float attack; /* in seconds */ } LFOParams; typedef struct _LFO { gboolean positive; /* whether to constrain values to [0, 1] */ float val; /* current value */ guint32 phase; /* current phase within shape, 8 MSB * representing integer part and 24 * LSB representing fractional part */ guint32 inc; /* amount to increase phase by per tick */ float* tab; /* points to tabelized waveform */ Tick delay; Tick attack; Tick attack_ticks; /* how far along we are in the attack phase */ } LFO; /* initialize LFO subsystem */ void lfo_init ( ); /* set operating samplerate of all LFOs (call at least once and * whenever samplerate changes) */ void lfo_set_samplerate (int rate); /* set operating tempo in beats per minute of all tempo-synced LFOs */ void lfo_set_tempo (float bpm); /* prepare an LFO for use (must be first function called on an LFO) */ void lfo_prepare (LFO* lfo); /* activate an LFO using the given params; an LFO must be re-activated * after the samplerate/tempo changes in order for those changes to * take effect */ void lfo_trigger (LFO* lfo, LFOParams* params); /* advance an LFO and return its new value */ float lfo_tick (LFO* lfo); #endif /* __LFO_H__ */ specimen-0.5.2-rc3/src/sync.c0000644000175000017500000000205710466727727012664 00000000000000#include "specimen.h" #include "midi.h" #include "patch.h" #include "sync.h" static SyncMethod sync_method = SYNC_METHOD_MIDI; void sync_start_midi (float bpm) { if (bpm <= 0) { debug ("ignoring midi sync start with invalid bpm: %f\n", bpm); return; } if (sync_method == SYNC_METHOD_MIDI) { debug ("midi sync started, bpm: %f\n", bpm); patch_sync (bpm); } else { debug ("ignoring midi sync start\n"); } } void sync_start_jack (float bpm) { if (bpm <= 0) { debug ("ignoring jack sync start with invalid bpm: %f\n", bpm); return; } if (sync_method == SYNC_METHOD_JACK) { debug ("jack sync started, bpm: %f\n", bpm); patch_sync (bpm); } else { debug ("ignoring jack sync start\n"); } } void sync_set_method (SyncMethod method) { if (method == SYNC_METHOD_JACK) { debug ("syncing to JACK now\n"); sync_method = SYNC_METHOD_JACK; } else { debug ("syncing to MIDI now\n"); sync_method = SYNC_METHOD_MIDI; } } specimen-0.5.2-rc3/src/sync.h0000644000175000017500000000044510466727727012670 00000000000000#ifndef __SYNC_H__ #define __SYNC_H__ enum { SYNC_DEFAULT_TEMPO = 120, }; typedef enum { SYNC_METHOD_MIDI, SYNC_METHOD_JACK, } SyncMethod; void sync_start_midi (float bpm); void sync_start_jack (float bpm); void sync_set_method (SyncMethod method); #endif /* __SYNC_H__ */ specimen-0.5.2-rc3/src/control.h0000644000175000017500000000047210466727727013374 00000000000000#ifndef __CONTROL_H__ #define __CONTROL_H__ typedef enum { CONTROL_PARAM_VOLUME, CONTROL_PARAM_PANNING, CONTROL_PARAM_CUTOFF, CONTROL_PARAM_RESONANCE, CONTROL_PARAM_PITCH, CONTROL_PARAM_PORTAMENTO, CONTROL_PARAM_PORTAMENTO_TIME } ControlParamType; #endif /* __CONTROL_H__ */ specimen-0.5.2-rc3/src/lashdriver.c0000644000175000017500000000466710467173732014054 00000000000000#include "lashdriver.h" #include /* for idle callback */ #include #include "beef.h" #include "gui/gui.h" lash_client_t* lash_client; void lashdriver_init (int* argc, char*** argv) { lash_args_t* lash_args = lash_extract_args(argc, argv); lash_client = lash_init(lash_args, "Specimen", LASH_Config_File, LASH_PROTOCOL(2, 0)); if (!lash_client) fprintf(stderr, "Could not initialise LASH\n"); lash_event_t* event = lash_event_new_with_type(LASH_Client_Name); lash_event_set_string(event, "Specimen"); lash_send_event(lash_client, event); } gboolean lashdriver_process (void* absolutely_nothing) { lash_event_t* event = NULL; lash_config_t* config = NULL; const char* str = NULL; char* path = NULL; while ((event = lash_get_event(lash_client))) { if (lash_event_get_type(event) == LASH_Quit) { gtk_main_quit(); return FALSE; } else if (lash_event_get_type(event) == LASH_Save_File) { str = lash_event_get_string(event); /* our restore directory */ path = (char*)calloc(strlen(str)+11, sizeof(char)); strcpy(path, str); /* path = dir */ strcat(path, "/"); /* path += "/" */ strcat(path, "bank.beef"); /* path += "bank.beef" */ fprintf(stderr, "Saving to file %s\n", path); beef_write(path); } else if (lash_event_get_type(event) == LASH_Restore_File) { str = lash_event_get_string(event); /* our restore directory */ path = (char*)calloc(strlen(str)+11, sizeof(char)); strcpy(path, str); /* path = dir */ strcat(path, "/"); /* path += "/" */ strcat(path, "bank.beef"); /* path += "bank.beef" */ fprintf(stderr, "Restoring from file %s\n", path); beef_read(path); gui_refresh(); } else { fprintf(stderr, "Unhandled LASH event: type %d, '%s''\n", lash_event_get_type(event), lash_event_get_string(event)); } } while ((config = lash_get_config(lash_client))) { fprintf(stderr, "Unexpected LASH config: %s\n", lash_config_get_key(config)); } return TRUE; } void lashdriver_start ( ) { gtk_timeout_add(250, lashdriver_process, NULL); } specimen-0.5.2-rc3/src/lashdriver.h0000644000175000017500000000042010467173732014040 00000000000000#ifndef __LASHDRIVER_H__ #define __LASHDRIVER_H__ #include "config.h" #ifdef HAVE_LASH #include void lashdriver_init (int* argc, char*** argv); void lashdriver_start ( ); void lashdriver_stop ( ); #endif /* HAVE_LASH */ #endif /* __LASHDRIVER_H__ */ specimen-0.5.2-rc3/src/gprof-helper.c0000644000175000017500000000651010466727727014300 00000000000000/* gprof-helper.c -- preload library to profile pthread-enabled programs * * Authors: Sam Hocevar * Daniel Jönsson * * This program is free software; you can redistribute it and/or * modify it under the terms of the Do What The Fuck You Want To * Public License as published by Banlu Kemiyatorn. See * http://sam.zoy.org/projects/COPYING.WTFPL for more details. * * Compilation example: * gcc -shared -nostdlib -fPIC gprof-helper.c -o gprof-helper.so -lpthread -ldl * * Usage example: * LD_PRELOAD=./gprof-helper.so your_program */ #define _GNU_SOURCE #include #include #include #include #include static void *wrapper_routine (void *); /* Original pthread function */ static int (*pthread_create_orig) (pthread_t * __restrict, __const pthread_attr_t * __restrict, void *(*)(void *), void *__restrict) = NULL; /* Library initialization function */ void _init (void) { pthread_create_orig = dlsym (RTLD_NEXT, "pthread_create"); fprintf (stderr, "pthreads: using profiling hooks for gprof\n"); if (pthread_create_orig == NULL) { char *error = dlerror ( ); if (error == NULL) { error = "pthread_create is NULL"; } fprintf (stderr, "%s", error); exit (EXIT_FAILURE); } } /* Our data structure passed to the wrapper */ typedef struct wrapper_s { void *(*start_routine) (void *); void *arg; pthread_mutex_t lock; pthread_cond_t wait; struct itimerval itimer; } wrapper_t; /* The wrapper function in charge for setting the itimer value */ static void *wrapper_routine (void *data) { /* Put user data in thread-local variables */ void *(*start_routine) (void *) = ((wrapper_t *) data)->start_routine; void *arg = ((wrapper_t *) data)->arg; /* Set the profile timer value */ setitimer (ITIMER_PROF, &((wrapper_t *) data)->itimer, NULL); /* Tell the calling thread that we don't need its data anymore */ pthread_mutex_lock (&((wrapper_t *) data)->lock); pthread_cond_signal (&((wrapper_t *) data)->wait); pthread_mutex_unlock (&((wrapper_t *) data)->lock); /* Call the real function */ return start_routine (arg); } /* Our wrapper function for the real pthread_create( ) */ int pthread_create (pthread_t * __restrict thread, __const pthread_attr_t * __restrict attr, void *(*start_routine) (void *), void *__restrict arg) { wrapper_t wrapper_data; int i_return; /* Initialize the wrapper structure */ wrapper_data.start_routine = start_routine; wrapper_data.arg = arg; getitimer (ITIMER_PROF, &wrapper_data.itimer); pthread_cond_init (&wrapper_data.wait, NULL); pthread_mutex_init (&wrapper_data.lock, NULL); pthread_mutex_lock (&wrapper_data.lock); /* The real pthread_create call */ i_return = pthread_create_orig (thread, attr, &wrapper_routine, &wrapper_data); /* If the thread was successfully spawned, wait for the data * to be released */ if (i_return == 0) { pthread_cond_wait (&wrapper_data.wait, &wrapper_data.lock); } pthread_mutex_unlock (&wrapper_data.lock); pthread_mutex_destroy (&wrapper_data.lock); pthread_cond_destroy (&wrapper_data.wait); return i_return; } specimen-0.5.2-rc3/src/gui/0000777000175000017500000000000010575351341012372 500000000000000specimen-0.5.2-rc3/src/gui/Makefile.am0000644000175000017500000000134310575117614014346 00000000000000noinst_LIBRARIES = libgui.a libgui_a_SOURCES = audio-settings.c audio-settings.h sample-editor.c \ sample-editor.h gui.c gui.h waveform.c waveform.h bank-ops.c \ bank-ops.h sample-selector.c sample-selector.h mastersection.c \ mastersection.h patchsection.c patchsection.h sampletab.c sampletab.h \ voicetab.c voicetab.h filtertab.c filtertab.h velocitytab.c \ velocitytab.h envelopetab.c envelopetab.h lfotab.c lfotab.h \ paramselector.c paramselector.h patchlist.c patchlist.h midisection.c \ midisection.h channelsection.c channelsection.h INCLUDES = \ -l.. \ @GTK_CFLAGS@ \ @LIBGNOMECANVAS_CFLAGS@ \ @PHAT_CFLAGS@ if HAVE_LASH INCLUDES += @LASH_CFLAGS@ endif libgui_a_CFLAGS = $(CFLAGS) -I.. -DINSTALLDIR=\"$(datadir)\" specimen-0.5.2-rc3/src/gui/Makefile.in0000644000175000017500000014202510575351313014356 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_LASH_TRUE@am__append_1 = @LASH_CFLAGS@ subdir = src/gui DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acx_pthread.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libgui_a_AR = $(AR) $(ARFLAGS) libgui_a_LIBADD = am_libgui_a_OBJECTS = libgui_a-audio-settings.$(OBJEXT) \ libgui_a-sample-editor.$(OBJEXT) libgui_a-gui.$(OBJEXT) \ libgui_a-waveform.$(OBJEXT) libgui_a-bank-ops.$(OBJEXT) \ libgui_a-sample-selector.$(OBJEXT) \ libgui_a-mastersection.$(OBJEXT) \ libgui_a-patchsection.$(OBJEXT) libgui_a-sampletab.$(OBJEXT) \ libgui_a-voicetab.$(OBJEXT) libgui_a-filtertab.$(OBJEXT) \ libgui_a-velocitytab.$(OBJEXT) libgui_a-envelopetab.$(OBJEXT) \ libgui_a-lfotab.$(OBJEXT) libgui_a-paramselector.$(OBJEXT) \ libgui_a-patchlist.$(OBJEXT) libgui_a-midisection.$(OBJEXT) \ libgui_a-channelsection.$(OBJEXT) libgui_a_OBJECTS = $(am_libgui_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libgui_a_SOURCES) DIST_SOURCES = $(libgui_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LASH_FALSE = @HAVE_LASH_FALSE@ HAVE_LASH_TRUE = @HAVE_LASH_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ JACK_MIDI_CFLAGS = @JACK_MIDI_CFLAGS@ JACK_MIDI_LIBS = @JACK_MIDI_LIBS@ LASH_CFLAGS = @LASH_CFLAGS@ LASH_LIBS = @LASH_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNOMECANVAS_CFLAGS = @LIBGNOMECANVAS_CFLAGS@ LIBGNOMECANVAS_LIBS = @LIBGNOMECANVAS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@ LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@ LIBSNDFILE_CFLAGS = @LIBSNDFILE_CFLAGS@ LIBSNDFILE_LIBS = @LIBSNDFILE_LIBS@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OLD_JACK_MIDI_CFLAGS = @OLD_JACK_MIDI_CFLAGS@ OLD_JACK_MIDI_LIBS = @OLD_JACK_MIDI_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PHAT_CFLAGS = @PHAT_CFLAGS@ PHAT_LIBS = @PHAT_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPECIMEN_CFLAGS = @SPECIMEN_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ acx_pthread_config = @acx_pthread_config@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_LIBRARIES = libgui.a libgui_a_SOURCES = audio-settings.c audio-settings.h sample-editor.c \ sample-editor.h gui.c gui.h waveform.c waveform.h bank-ops.c \ bank-ops.h sample-selector.c sample-selector.h mastersection.c \ mastersection.h patchsection.c patchsection.h sampletab.c sampletab.h \ voicetab.c voicetab.h filtertab.c filtertab.h velocitytab.c \ velocitytab.h envelopetab.c envelopetab.h lfotab.c lfotab.h \ paramselector.c paramselector.h patchlist.c patchlist.h midisection.c \ midisection.h channelsection.c channelsection.h INCLUDES = -l.. @GTK_CFLAGS@ @LIBGNOMECANVAS_CFLAGS@ @PHAT_CFLAGS@ \ $(am__append_1) libgui_a_CFLAGS = $(CFLAGS) -I.. -DINSTALLDIR=\"$(datadir)\" all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gui/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/gui/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libgui.a: $(libgui_a_OBJECTS) $(libgui_a_DEPENDENCIES) -rm -f libgui.a $(libgui_a_AR) libgui.a $(libgui_a_OBJECTS) $(libgui_a_LIBADD) $(RANLIB) libgui.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-audio-settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-bank-ops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-channelsection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-envelopetab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-filtertab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-lfotab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-mastersection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-midisection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-paramselector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-patchlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-patchsection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-sample-editor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-sample-selector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-sampletab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-velocitytab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-voicetab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_a-waveform.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` libgui_a-audio-settings.o: audio-settings.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-audio-settings.o -MD -MP -MF "$(DEPDIR)/libgui_a-audio-settings.Tpo" -c -o libgui_a-audio-settings.o `test -f 'audio-settings.c' || echo '$(srcdir)/'`audio-settings.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-audio-settings.Tpo" "$(DEPDIR)/libgui_a-audio-settings.Po"; else rm -f "$(DEPDIR)/libgui_a-audio-settings.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='audio-settings.c' object='libgui_a-audio-settings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-audio-settings.o `test -f 'audio-settings.c' || echo '$(srcdir)/'`audio-settings.c libgui_a-audio-settings.obj: audio-settings.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-audio-settings.obj -MD -MP -MF "$(DEPDIR)/libgui_a-audio-settings.Tpo" -c -o libgui_a-audio-settings.obj `if test -f 'audio-settings.c'; then $(CYGPATH_W) 'audio-settings.c'; else $(CYGPATH_W) '$(srcdir)/audio-settings.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-audio-settings.Tpo" "$(DEPDIR)/libgui_a-audio-settings.Po"; else rm -f "$(DEPDIR)/libgui_a-audio-settings.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='audio-settings.c' object='libgui_a-audio-settings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-audio-settings.obj `if test -f 'audio-settings.c'; then $(CYGPATH_W) 'audio-settings.c'; else $(CYGPATH_W) '$(srcdir)/audio-settings.c'; fi` libgui_a-sample-editor.o: sample-editor.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-sample-editor.o -MD -MP -MF "$(DEPDIR)/libgui_a-sample-editor.Tpo" -c -o libgui_a-sample-editor.o `test -f 'sample-editor.c' || echo '$(srcdir)/'`sample-editor.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-sample-editor.Tpo" "$(DEPDIR)/libgui_a-sample-editor.Po"; else rm -f "$(DEPDIR)/libgui_a-sample-editor.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sample-editor.c' object='libgui_a-sample-editor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-sample-editor.o `test -f 'sample-editor.c' || echo '$(srcdir)/'`sample-editor.c libgui_a-sample-editor.obj: sample-editor.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-sample-editor.obj -MD -MP -MF "$(DEPDIR)/libgui_a-sample-editor.Tpo" -c -o libgui_a-sample-editor.obj `if test -f 'sample-editor.c'; then $(CYGPATH_W) 'sample-editor.c'; else $(CYGPATH_W) '$(srcdir)/sample-editor.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-sample-editor.Tpo" "$(DEPDIR)/libgui_a-sample-editor.Po"; else rm -f "$(DEPDIR)/libgui_a-sample-editor.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sample-editor.c' object='libgui_a-sample-editor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-sample-editor.obj `if test -f 'sample-editor.c'; then $(CYGPATH_W) 'sample-editor.c'; else $(CYGPATH_W) '$(srcdir)/sample-editor.c'; fi` libgui_a-gui.o: gui.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-gui.o -MD -MP -MF "$(DEPDIR)/libgui_a-gui.Tpo" -c -o libgui_a-gui.o `test -f 'gui.c' || echo '$(srcdir)/'`gui.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-gui.Tpo" "$(DEPDIR)/libgui_a-gui.Po"; else rm -f "$(DEPDIR)/libgui_a-gui.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gui.c' object='libgui_a-gui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-gui.o `test -f 'gui.c' || echo '$(srcdir)/'`gui.c libgui_a-gui.obj: gui.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-gui.obj -MD -MP -MF "$(DEPDIR)/libgui_a-gui.Tpo" -c -o libgui_a-gui.obj `if test -f 'gui.c'; then $(CYGPATH_W) 'gui.c'; else $(CYGPATH_W) '$(srcdir)/gui.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-gui.Tpo" "$(DEPDIR)/libgui_a-gui.Po"; else rm -f "$(DEPDIR)/libgui_a-gui.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gui.c' object='libgui_a-gui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-gui.obj `if test -f 'gui.c'; then $(CYGPATH_W) 'gui.c'; else $(CYGPATH_W) '$(srcdir)/gui.c'; fi` libgui_a-waveform.o: waveform.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-waveform.o -MD -MP -MF "$(DEPDIR)/libgui_a-waveform.Tpo" -c -o libgui_a-waveform.o `test -f 'waveform.c' || echo '$(srcdir)/'`waveform.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-waveform.Tpo" "$(DEPDIR)/libgui_a-waveform.Po"; else rm -f "$(DEPDIR)/libgui_a-waveform.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='waveform.c' object='libgui_a-waveform.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-waveform.o `test -f 'waveform.c' || echo '$(srcdir)/'`waveform.c libgui_a-waveform.obj: waveform.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-waveform.obj -MD -MP -MF "$(DEPDIR)/libgui_a-waveform.Tpo" -c -o libgui_a-waveform.obj `if test -f 'waveform.c'; then $(CYGPATH_W) 'waveform.c'; else $(CYGPATH_W) '$(srcdir)/waveform.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-waveform.Tpo" "$(DEPDIR)/libgui_a-waveform.Po"; else rm -f "$(DEPDIR)/libgui_a-waveform.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='waveform.c' object='libgui_a-waveform.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-waveform.obj `if test -f 'waveform.c'; then $(CYGPATH_W) 'waveform.c'; else $(CYGPATH_W) '$(srcdir)/waveform.c'; fi` libgui_a-bank-ops.o: bank-ops.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-bank-ops.o -MD -MP -MF "$(DEPDIR)/libgui_a-bank-ops.Tpo" -c -o libgui_a-bank-ops.o `test -f 'bank-ops.c' || echo '$(srcdir)/'`bank-ops.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-bank-ops.Tpo" "$(DEPDIR)/libgui_a-bank-ops.Po"; else rm -f "$(DEPDIR)/libgui_a-bank-ops.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bank-ops.c' object='libgui_a-bank-ops.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-bank-ops.o `test -f 'bank-ops.c' || echo '$(srcdir)/'`bank-ops.c libgui_a-bank-ops.obj: bank-ops.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-bank-ops.obj -MD -MP -MF "$(DEPDIR)/libgui_a-bank-ops.Tpo" -c -o libgui_a-bank-ops.obj `if test -f 'bank-ops.c'; then $(CYGPATH_W) 'bank-ops.c'; else $(CYGPATH_W) '$(srcdir)/bank-ops.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-bank-ops.Tpo" "$(DEPDIR)/libgui_a-bank-ops.Po"; else rm -f "$(DEPDIR)/libgui_a-bank-ops.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bank-ops.c' object='libgui_a-bank-ops.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-bank-ops.obj `if test -f 'bank-ops.c'; then $(CYGPATH_W) 'bank-ops.c'; else $(CYGPATH_W) '$(srcdir)/bank-ops.c'; fi` libgui_a-sample-selector.o: sample-selector.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-sample-selector.o -MD -MP -MF "$(DEPDIR)/libgui_a-sample-selector.Tpo" -c -o libgui_a-sample-selector.o `test -f 'sample-selector.c' || echo '$(srcdir)/'`sample-selector.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-sample-selector.Tpo" "$(DEPDIR)/libgui_a-sample-selector.Po"; else rm -f "$(DEPDIR)/libgui_a-sample-selector.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sample-selector.c' object='libgui_a-sample-selector.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-sample-selector.o `test -f 'sample-selector.c' || echo '$(srcdir)/'`sample-selector.c libgui_a-sample-selector.obj: sample-selector.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-sample-selector.obj -MD -MP -MF "$(DEPDIR)/libgui_a-sample-selector.Tpo" -c -o libgui_a-sample-selector.obj `if test -f 'sample-selector.c'; then $(CYGPATH_W) 'sample-selector.c'; else $(CYGPATH_W) '$(srcdir)/sample-selector.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-sample-selector.Tpo" "$(DEPDIR)/libgui_a-sample-selector.Po"; else rm -f "$(DEPDIR)/libgui_a-sample-selector.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sample-selector.c' object='libgui_a-sample-selector.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-sample-selector.obj `if test -f 'sample-selector.c'; then $(CYGPATH_W) 'sample-selector.c'; else $(CYGPATH_W) '$(srcdir)/sample-selector.c'; fi` libgui_a-mastersection.o: mastersection.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-mastersection.o -MD -MP -MF "$(DEPDIR)/libgui_a-mastersection.Tpo" -c -o libgui_a-mastersection.o `test -f 'mastersection.c' || echo '$(srcdir)/'`mastersection.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-mastersection.Tpo" "$(DEPDIR)/libgui_a-mastersection.Po"; else rm -f "$(DEPDIR)/libgui_a-mastersection.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mastersection.c' object='libgui_a-mastersection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-mastersection.o `test -f 'mastersection.c' || echo '$(srcdir)/'`mastersection.c libgui_a-mastersection.obj: mastersection.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-mastersection.obj -MD -MP -MF "$(DEPDIR)/libgui_a-mastersection.Tpo" -c -o libgui_a-mastersection.obj `if test -f 'mastersection.c'; then $(CYGPATH_W) 'mastersection.c'; else $(CYGPATH_W) '$(srcdir)/mastersection.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-mastersection.Tpo" "$(DEPDIR)/libgui_a-mastersection.Po"; else rm -f "$(DEPDIR)/libgui_a-mastersection.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mastersection.c' object='libgui_a-mastersection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-mastersection.obj `if test -f 'mastersection.c'; then $(CYGPATH_W) 'mastersection.c'; else $(CYGPATH_W) '$(srcdir)/mastersection.c'; fi` libgui_a-patchsection.o: patchsection.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-patchsection.o -MD -MP -MF "$(DEPDIR)/libgui_a-patchsection.Tpo" -c -o libgui_a-patchsection.o `test -f 'patchsection.c' || echo '$(srcdir)/'`patchsection.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-patchsection.Tpo" "$(DEPDIR)/libgui_a-patchsection.Po"; else rm -f "$(DEPDIR)/libgui_a-patchsection.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='patchsection.c' object='libgui_a-patchsection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-patchsection.o `test -f 'patchsection.c' || echo '$(srcdir)/'`patchsection.c libgui_a-patchsection.obj: patchsection.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-patchsection.obj -MD -MP -MF "$(DEPDIR)/libgui_a-patchsection.Tpo" -c -o libgui_a-patchsection.obj `if test -f 'patchsection.c'; then $(CYGPATH_W) 'patchsection.c'; else $(CYGPATH_W) '$(srcdir)/patchsection.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-patchsection.Tpo" "$(DEPDIR)/libgui_a-patchsection.Po"; else rm -f "$(DEPDIR)/libgui_a-patchsection.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='patchsection.c' object='libgui_a-patchsection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-patchsection.obj `if test -f 'patchsection.c'; then $(CYGPATH_W) 'patchsection.c'; else $(CYGPATH_W) '$(srcdir)/patchsection.c'; fi` libgui_a-sampletab.o: sampletab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-sampletab.o -MD -MP -MF "$(DEPDIR)/libgui_a-sampletab.Tpo" -c -o libgui_a-sampletab.o `test -f 'sampletab.c' || echo '$(srcdir)/'`sampletab.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-sampletab.Tpo" "$(DEPDIR)/libgui_a-sampletab.Po"; else rm -f "$(DEPDIR)/libgui_a-sampletab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sampletab.c' object='libgui_a-sampletab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-sampletab.o `test -f 'sampletab.c' || echo '$(srcdir)/'`sampletab.c libgui_a-sampletab.obj: sampletab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-sampletab.obj -MD -MP -MF "$(DEPDIR)/libgui_a-sampletab.Tpo" -c -o libgui_a-sampletab.obj `if test -f 'sampletab.c'; then $(CYGPATH_W) 'sampletab.c'; else $(CYGPATH_W) '$(srcdir)/sampletab.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-sampletab.Tpo" "$(DEPDIR)/libgui_a-sampletab.Po"; else rm -f "$(DEPDIR)/libgui_a-sampletab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sampletab.c' object='libgui_a-sampletab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-sampletab.obj `if test -f 'sampletab.c'; then $(CYGPATH_W) 'sampletab.c'; else $(CYGPATH_W) '$(srcdir)/sampletab.c'; fi` libgui_a-voicetab.o: voicetab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-voicetab.o -MD -MP -MF "$(DEPDIR)/libgui_a-voicetab.Tpo" -c -o libgui_a-voicetab.o `test -f 'voicetab.c' || echo '$(srcdir)/'`voicetab.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-voicetab.Tpo" "$(DEPDIR)/libgui_a-voicetab.Po"; else rm -f "$(DEPDIR)/libgui_a-voicetab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='voicetab.c' object='libgui_a-voicetab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-voicetab.o `test -f 'voicetab.c' || echo '$(srcdir)/'`voicetab.c libgui_a-voicetab.obj: voicetab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-voicetab.obj -MD -MP -MF "$(DEPDIR)/libgui_a-voicetab.Tpo" -c -o libgui_a-voicetab.obj `if test -f 'voicetab.c'; then $(CYGPATH_W) 'voicetab.c'; else $(CYGPATH_W) '$(srcdir)/voicetab.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-voicetab.Tpo" "$(DEPDIR)/libgui_a-voicetab.Po"; else rm -f "$(DEPDIR)/libgui_a-voicetab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='voicetab.c' object='libgui_a-voicetab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-voicetab.obj `if test -f 'voicetab.c'; then $(CYGPATH_W) 'voicetab.c'; else $(CYGPATH_W) '$(srcdir)/voicetab.c'; fi` libgui_a-filtertab.o: filtertab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-filtertab.o -MD -MP -MF "$(DEPDIR)/libgui_a-filtertab.Tpo" -c -o libgui_a-filtertab.o `test -f 'filtertab.c' || echo '$(srcdir)/'`filtertab.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-filtertab.Tpo" "$(DEPDIR)/libgui_a-filtertab.Po"; else rm -f "$(DEPDIR)/libgui_a-filtertab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filtertab.c' object='libgui_a-filtertab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-filtertab.o `test -f 'filtertab.c' || echo '$(srcdir)/'`filtertab.c libgui_a-filtertab.obj: filtertab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-filtertab.obj -MD -MP -MF "$(DEPDIR)/libgui_a-filtertab.Tpo" -c -o libgui_a-filtertab.obj `if test -f 'filtertab.c'; then $(CYGPATH_W) 'filtertab.c'; else $(CYGPATH_W) '$(srcdir)/filtertab.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-filtertab.Tpo" "$(DEPDIR)/libgui_a-filtertab.Po"; else rm -f "$(DEPDIR)/libgui_a-filtertab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filtertab.c' object='libgui_a-filtertab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-filtertab.obj `if test -f 'filtertab.c'; then $(CYGPATH_W) 'filtertab.c'; else $(CYGPATH_W) '$(srcdir)/filtertab.c'; fi` libgui_a-velocitytab.o: velocitytab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-velocitytab.o -MD -MP -MF "$(DEPDIR)/libgui_a-velocitytab.Tpo" -c -o libgui_a-velocitytab.o `test -f 'velocitytab.c' || echo '$(srcdir)/'`velocitytab.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-velocitytab.Tpo" "$(DEPDIR)/libgui_a-velocitytab.Po"; else rm -f "$(DEPDIR)/libgui_a-velocitytab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='velocitytab.c' object='libgui_a-velocitytab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-velocitytab.o `test -f 'velocitytab.c' || echo '$(srcdir)/'`velocitytab.c libgui_a-velocitytab.obj: velocitytab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-velocitytab.obj -MD -MP -MF "$(DEPDIR)/libgui_a-velocitytab.Tpo" -c -o libgui_a-velocitytab.obj `if test -f 'velocitytab.c'; then $(CYGPATH_W) 'velocitytab.c'; else $(CYGPATH_W) '$(srcdir)/velocitytab.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-velocitytab.Tpo" "$(DEPDIR)/libgui_a-velocitytab.Po"; else rm -f "$(DEPDIR)/libgui_a-velocitytab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='velocitytab.c' object='libgui_a-velocitytab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-velocitytab.obj `if test -f 'velocitytab.c'; then $(CYGPATH_W) 'velocitytab.c'; else $(CYGPATH_W) '$(srcdir)/velocitytab.c'; fi` libgui_a-envelopetab.o: envelopetab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-envelopetab.o -MD -MP -MF "$(DEPDIR)/libgui_a-envelopetab.Tpo" -c -o libgui_a-envelopetab.o `test -f 'envelopetab.c' || echo '$(srcdir)/'`envelopetab.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-envelopetab.Tpo" "$(DEPDIR)/libgui_a-envelopetab.Po"; else rm -f "$(DEPDIR)/libgui_a-envelopetab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='envelopetab.c' object='libgui_a-envelopetab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-envelopetab.o `test -f 'envelopetab.c' || echo '$(srcdir)/'`envelopetab.c libgui_a-envelopetab.obj: envelopetab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-envelopetab.obj -MD -MP -MF "$(DEPDIR)/libgui_a-envelopetab.Tpo" -c -o libgui_a-envelopetab.obj `if test -f 'envelopetab.c'; then $(CYGPATH_W) 'envelopetab.c'; else $(CYGPATH_W) '$(srcdir)/envelopetab.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-envelopetab.Tpo" "$(DEPDIR)/libgui_a-envelopetab.Po"; else rm -f "$(DEPDIR)/libgui_a-envelopetab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='envelopetab.c' object='libgui_a-envelopetab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-envelopetab.obj `if test -f 'envelopetab.c'; then $(CYGPATH_W) 'envelopetab.c'; else $(CYGPATH_W) '$(srcdir)/envelopetab.c'; fi` libgui_a-lfotab.o: lfotab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-lfotab.o -MD -MP -MF "$(DEPDIR)/libgui_a-lfotab.Tpo" -c -o libgui_a-lfotab.o `test -f 'lfotab.c' || echo '$(srcdir)/'`lfotab.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-lfotab.Tpo" "$(DEPDIR)/libgui_a-lfotab.Po"; else rm -f "$(DEPDIR)/libgui_a-lfotab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lfotab.c' object='libgui_a-lfotab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-lfotab.o `test -f 'lfotab.c' || echo '$(srcdir)/'`lfotab.c libgui_a-lfotab.obj: lfotab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-lfotab.obj -MD -MP -MF "$(DEPDIR)/libgui_a-lfotab.Tpo" -c -o libgui_a-lfotab.obj `if test -f 'lfotab.c'; then $(CYGPATH_W) 'lfotab.c'; else $(CYGPATH_W) '$(srcdir)/lfotab.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-lfotab.Tpo" "$(DEPDIR)/libgui_a-lfotab.Po"; else rm -f "$(DEPDIR)/libgui_a-lfotab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lfotab.c' object='libgui_a-lfotab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-lfotab.obj `if test -f 'lfotab.c'; then $(CYGPATH_W) 'lfotab.c'; else $(CYGPATH_W) '$(srcdir)/lfotab.c'; fi` libgui_a-paramselector.o: paramselector.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-paramselector.o -MD -MP -MF "$(DEPDIR)/libgui_a-paramselector.Tpo" -c -o libgui_a-paramselector.o `test -f 'paramselector.c' || echo '$(srcdir)/'`paramselector.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-paramselector.Tpo" "$(DEPDIR)/libgui_a-paramselector.Po"; else rm -f "$(DEPDIR)/libgui_a-paramselector.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='paramselector.c' object='libgui_a-paramselector.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-paramselector.o `test -f 'paramselector.c' || echo '$(srcdir)/'`paramselector.c libgui_a-paramselector.obj: paramselector.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-paramselector.obj -MD -MP -MF "$(DEPDIR)/libgui_a-paramselector.Tpo" -c -o libgui_a-paramselector.obj `if test -f 'paramselector.c'; then $(CYGPATH_W) 'paramselector.c'; else $(CYGPATH_W) '$(srcdir)/paramselector.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-paramselector.Tpo" "$(DEPDIR)/libgui_a-paramselector.Po"; else rm -f "$(DEPDIR)/libgui_a-paramselector.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='paramselector.c' object='libgui_a-paramselector.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-paramselector.obj `if test -f 'paramselector.c'; then $(CYGPATH_W) 'paramselector.c'; else $(CYGPATH_W) '$(srcdir)/paramselector.c'; fi` libgui_a-patchlist.o: patchlist.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-patchlist.o -MD -MP -MF "$(DEPDIR)/libgui_a-patchlist.Tpo" -c -o libgui_a-patchlist.o `test -f 'patchlist.c' || echo '$(srcdir)/'`patchlist.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-patchlist.Tpo" "$(DEPDIR)/libgui_a-patchlist.Po"; else rm -f "$(DEPDIR)/libgui_a-patchlist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='patchlist.c' object='libgui_a-patchlist.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-patchlist.o `test -f 'patchlist.c' || echo '$(srcdir)/'`patchlist.c libgui_a-patchlist.obj: patchlist.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-patchlist.obj -MD -MP -MF "$(DEPDIR)/libgui_a-patchlist.Tpo" -c -o libgui_a-patchlist.obj `if test -f 'patchlist.c'; then $(CYGPATH_W) 'patchlist.c'; else $(CYGPATH_W) '$(srcdir)/patchlist.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-patchlist.Tpo" "$(DEPDIR)/libgui_a-patchlist.Po"; else rm -f "$(DEPDIR)/libgui_a-patchlist.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='patchlist.c' object='libgui_a-patchlist.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-patchlist.obj `if test -f 'patchlist.c'; then $(CYGPATH_W) 'patchlist.c'; else $(CYGPATH_W) '$(srcdir)/patchlist.c'; fi` libgui_a-midisection.o: midisection.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-midisection.o -MD -MP -MF "$(DEPDIR)/libgui_a-midisection.Tpo" -c -o libgui_a-midisection.o `test -f 'midisection.c' || echo '$(srcdir)/'`midisection.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-midisection.Tpo" "$(DEPDIR)/libgui_a-midisection.Po"; else rm -f "$(DEPDIR)/libgui_a-midisection.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='midisection.c' object='libgui_a-midisection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-midisection.o `test -f 'midisection.c' || echo '$(srcdir)/'`midisection.c libgui_a-midisection.obj: midisection.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-midisection.obj -MD -MP -MF "$(DEPDIR)/libgui_a-midisection.Tpo" -c -o libgui_a-midisection.obj `if test -f 'midisection.c'; then $(CYGPATH_W) 'midisection.c'; else $(CYGPATH_W) '$(srcdir)/midisection.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-midisection.Tpo" "$(DEPDIR)/libgui_a-midisection.Po"; else rm -f "$(DEPDIR)/libgui_a-midisection.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='midisection.c' object='libgui_a-midisection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-midisection.obj `if test -f 'midisection.c'; then $(CYGPATH_W) 'midisection.c'; else $(CYGPATH_W) '$(srcdir)/midisection.c'; fi` libgui_a-channelsection.o: channelsection.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-channelsection.o -MD -MP -MF "$(DEPDIR)/libgui_a-channelsection.Tpo" -c -o libgui_a-channelsection.o `test -f 'channelsection.c' || echo '$(srcdir)/'`channelsection.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-channelsection.Tpo" "$(DEPDIR)/libgui_a-channelsection.Po"; else rm -f "$(DEPDIR)/libgui_a-channelsection.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='channelsection.c' object='libgui_a-channelsection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-channelsection.o `test -f 'channelsection.c' || echo '$(srcdir)/'`channelsection.c libgui_a-channelsection.obj: channelsection.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -MT libgui_a-channelsection.obj -MD -MP -MF "$(DEPDIR)/libgui_a-channelsection.Tpo" -c -o libgui_a-channelsection.obj `if test -f 'channelsection.c'; then $(CYGPATH_W) 'channelsection.c'; else $(CYGPATH_W) '$(srcdir)/channelsection.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgui_a-channelsection.Tpo" "$(DEPDIR)/libgui_a-channelsection.Po"; else rm -f "$(DEPDIR)/libgui_a-channelsection.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='channelsection.c' object='libgui_a-channelsection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgui_a_CFLAGS) $(CFLAGS) -c -o libgui_a-channelsection.obj `if test -f 'channelsection.c'; then $(CYGPATH_W) 'channelsection.c'; else $(CYGPATH_W) '$(srcdir)/channelsection.c'; fi` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: specimen-0.5.2-rc3/src/gui/audio-settings.c0000644000175000017500000001140410575117614015414 00000000000000#include #include #include #include #include "specimen.h" #include "driver.h" #include "patch.h" #include "mixer.h" #include "lfo.h" #include "gui.h" /* my mom says I shouldn't play with my widget */ static GtkWidget* window; static GtkWidget* master_vbox; static GtkWidget* master_hbox; static GtkWidget* frame_driver; static GtkWidget* frame_driver_hbox; static GtkWidget* radio_driver; static GtkWidget* config_widget; /* current (last) config widget */ static GtkWidget* button_close; static GtkWidget* label; static void cb_close (GtkWidget* widget, gpointer data) { debug ("Hiding audio settings window\n"); gtk_widget_hide (window); } static void cb_setdriver (GtkWidget* widget, int id) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { /* handle widget */ gtk_widget_hide (config_widget); config_widget = driver_get_widget (id); gtk_widget_show (config_widget); /* start the new sound system */ driver_stop ( ); /* FIXME: passing DEFAULT_INSTANCE_NAME is an ugly hack. we * should get the existing name and restart with that*/ driver_start (id, DEFAULT_INSTANCE_NAME); } } void audio_settings_show ( ) { debug ("Showing audio settings window\n"); /* a hack to make sure that the alsadriver widget handles * displaying it's settings properly */ g_signal_emit_by_name (G_OBJECT (config_widget), "show"); gtk_widget_show (window); } void audio_settings_init (GtkWidget* parent) { size_t i; GSList *driver_list = NULL; debug ("Initializing audio settings window\n"); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "Audio Settings"); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (parent)); gtk_window_set_modal (GTK_WINDOW (window), TRUE); g_signal_connect (GTK_WINDOW (window), "delete-event", G_CALLBACK (cb_close), NULL); master_vbox = gtk_vbox_new (FALSE, GUI_SPACING); gtk_container_add (GTK_CONTAINER (window), master_vbox); gtk_container_set_border_width (GTK_CONTAINER (window), GUI_SPACING); gtk_widget_show (master_vbox); master_hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (master_vbox), master_hbox, FALSE, FALSE, 0); gtk_widget_show (master_hbox); frame_driver = gtk_frame_new ("Driver"); gtk_box_pack_start (GTK_BOX (master_hbox), frame_driver, FALSE, FALSE, 0); gtk_widget_show (frame_driver); frame_driver_hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_container_add (GTK_CONTAINER (frame_driver), frame_driver_hbox); gtk_container_set_border_width (GTK_CONTAINER (frame_driver_hbox), GUI_SPACING); gtk_widget_show (frame_driver_hbox); master_hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (master_vbox), master_hbox, FALSE, FALSE, 0); gtk_widget_show (master_hbox); /* setup up config interfaces for drivers */ for (i = 0; i < driver_get_count ( ); i++) { gtk_box_pack_start (GTK_BOX (master_hbox), driver_get_widget (i), FALSE, FALSE, 0); if (driver_list == NULL) { radio_driver = gtk_radio_button_new_with_label (NULL, driver_get_name (i)); gtk_box_pack_start (GTK_BOX (frame_driver_hbox), radio_driver, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (radio_driver), "toggled", G_CALLBACK (cb_setdriver), (gpointer) i); gtk_widget_show (radio_driver); driver_list = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_driver)); } else { radio_driver = gtk_radio_button_new_with_label (driver_list, driver_get_name (i)); gtk_box_pack_start (GTK_BOX (frame_driver_hbox), radio_driver, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (radio_driver), "toggled", G_CALLBACK (cb_setdriver), (gpointer) i); gtk_widget_show (radio_driver); } } if (i > 0) { /* setup the first useable driver */ config_widget = driver_get_widget (0); } else { /* if we don't have any configurable (i.e. real) drivers... */ label = gtk_label_new ("No drivers available. AIEE!\n"); config_widget = label; } gtk_widget_show (config_widget); master_hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (master_vbox), master_hbox, FALSE, FALSE, 0); gtk_widget_show (master_hbox); button_close = gtk_button_new_from_stock (GTK_STOCK_CLOSE); gtk_box_pack_end (GTK_BOX (master_hbox), button_close, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button_close), "clicked", G_CALLBACK (cb_close), NULL); gtk_widget_show (button_close); } specimen-0.5.2-rc3/src/gui/audio-settings.h0000644000175000017500000000030010466727727015425 00000000000000#ifndef __AUDIO_SETTINGS_H__ #define __AUDIO_SETTINGS_H__ #include void audio_settings_init (GtkWidget* parent); void audio_settings_show ( ); #endif /* __AUDIO_SETTINGS_H__ */ specimen-0.5.2-rc3/src/gui/sample-editor.c0000644000175000017500000001770710466746442015244 00000000000000#include #include #include #include "specimen.h" #include "patch.h" #include "waveform.h" #include "gui.h" #include "mixer.h" static GtkWidget *window; static GtkWidget *waveform; static GtkWidget *hscroll; static GtkAdjustment *hscrolladj; enum { ZOOM_MIN = 1, ZOOM_MAX = 100 }; static int zoom = ZOOM_MIN; static float range = 1.0; static int old_play_start, old_play_stop; static int old_loop_start, old_loop_stop; static int patch; static void cb_close (GtkWidget * widget, gpointer data) { debug ("Hiding sample editor\n"); mixer_note_off_with_id (patch, patch_get_note (patch)); gtk_widget_hide (window); } static void cb_play (GtkWidget * widget, gpointer data) { mixer_note_on_with_id (patch, patch_get_note (patch), 1.0); } static void cb_stop (GtkWidget * widget, gpointer data) { mixer_note_off_with_id (patch, patch_get_note (patch)); } static void cb_reset (GtkWidget * widget, gpointer data) { debug ("Restoring initial values\n"); patch_set_sample_start (patch, old_play_start); patch_set_sample_stop (patch, old_play_stop); patch_set_loop_start (patch, old_loop_start); patch_set_loop_stop (patch, old_loop_stop); gtk_widget_queue_draw (waveform); } static void cb_clear (GtkWidget * widget, char *op) { int play_start, play_stop; int frames; if (strcmp (op, "loop") == 0) { play_start = patch_get_sample_start (patch); play_stop = patch_get_sample_stop (patch); patch_set_loop_start (patch, play_start); patch_set_loop_stop (patch, play_stop); } else if (strcmp (op, "play") == 0) { frames = patch_get_frames (patch); patch_set_sample_start (patch, 0); patch_set_sample_stop (patch, frames - 1); } gtk_widget_queue_draw (waveform); } static void cb_scroll (GtkWidget * scroll, gpointer data) { float val; val = gtk_range_get_value (GTK_RANGE (scroll)); waveform_set_range (WAVEFORM (waveform), val, val + range); } static void cb_zoom (GtkAdjustment * adj, GtkWidget * spinbutton) { float max; float page_size; float step_inc; float page_inc; float val; /* validate new zoom value, isn't a step anymore because of using spinbutton */ zoom = gtk_adjustment_get_value (adj); if (zoom < ZOOM_MIN) zoom = ZOOM_MIN; else if (zoom > ZOOM_MAX) zoom = ZOOM_MAX; /* setup new adjustment values */ max = 1.0 - (1.0 / zoom); /* the maximum value we'll be able to obtain */ page_size = 1.0 / zoom; page_inc = max / 1000; step_inc = max / 10; /* create new adjustment */ val = gtk_range_get_value (GTK_RANGE (hscroll)); if (val > max) val = max; hscrolladj = (GtkAdjustment *) gtk_adjustment_new (val, 0.0, 1.0, step_inc, page_inc, page_size); gtk_range_set_adjustment (GTK_RANGE (hscroll), hscrolladj); /* range needs to be updated so that we can tell the waveform * object how much of itself it needs to draw when the scrollbar * thumb (who the fuck named _that_?) moves */ range = 1.0 - max; /* we emit this signal so that the waveform will get redrawn with * the new dimensions */ g_signal_emit_by_name (G_OBJECT (hscroll), "value-changed"); } void sample_editor_show (int id) { waveform_set_patch (WAVEFORM (waveform), id); patch = id; old_play_start = patch_get_sample_start (id); old_play_stop = patch_get_sample_stop (id); old_loop_start = patch_get_loop_start (id); old_loop_stop = patch_get_loop_stop (id); gtk_widget_show (window); } void sample_editor_init (GtkWidget * parent) { GtkWindow *w; GtkWidget *master_vbox; GtkWidget *hbox; GtkWidget *button; GtkWidget *image; GtkWidget *label; GtkWidget *spinbutton; GtkAdjustment *zoom_adj; debug ("Initializing sample editor window\n"); /* main window */ window = gtk_window_new (GTK_WINDOW_TOPLEVEL); w = GTK_WINDOW (window); gtk_window_set_title (w, "Edit Sample"); gtk_window_set_resizable (w, TRUE); gtk_window_set_transient_for (w, GTK_WINDOW (parent)); gtk_window_set_modal (w, TRUE); g_signal_connect (G_OBJECT (w), "delete-event", G_CALLBACK (cb_close), NULL); /* master vbox */ master_vbox = gtk_vbox_new (FALSE, GUI_SPACING); gtk_container_add (GTK_CONTAINER (window), master_vbox); gtk_container_set_border_width (GTK_CONTAINER (window), GUI_SPACING); gtk_widget_show (master_vbox); /* top row hbox */ hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (master_vbox), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); /* play button */ image = gtk_image_new_from_file (PIXMAPSDIR "play.png"); button = gtk_button_new ( ); gtk_container_add (GTK_CONTAINER (button), image); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK (cb_play), NULL); gtk_widget_show (image); gtk_widget_show (button); /* stop button */ image = gtk_image_new_from_file (PIXMAPSDIR "stop.png"); button = gtk_button_new ( ); gtk_container_add (GTK_CONTAINER (button), image); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK (cb_stop), NULL); gtk_widget_show (image); gtk_widget_show (button); /* loop points clear button */ button = gtk_button_new_with_label ("Loop"); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (cb_clear), (gpointer) "loop"); gtk_widget_show (button); /* play points clear button */ button = gtk_button_new_with_label ("Play"); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (cb_clear), (gpointer) "play"); gtk_widget_show (button); /* clear label */ label = gtk_label_new ("Clear Points:"); gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); /* waveform */ waveform = waveform_new (-1, 512, 256, TRUE); gtk_box_pack_start (GTK_BOX (master_vbox), waveform, TRUE, TRUE, 0); gtk_widget_show (waveform); /* waveform scrollbar */ hscrolladj = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, 1.0, 0.0, 0.0, 1.0); hscroll = gtk_hscrollbar_new (GTK_ADJUSTMENT (hscrolladj)); gtk_box_pack_start (GTK_BOX (master_vbox), hscroll, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (hscroll), "value-changed", G_CALLBACK (cb_scroll), NULL); gtk_widget_show (hscroll); /* hbox */ hbox = gtk_hbox_new (FALSE, GUI_SPACING); gtk_box_pack_start (GTK_BOX (master_vbox), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); /* zoom spinbutton */ label = gtk_label_new ("Zoom:"); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); zoom_adj = (GtkAdjustment *) gtk_adjustment_new (1.0, ZOOM_MIN, ZOOM_MAX, 1, 5, 0.0); spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (zoom_adj), 1, 2); gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (zoom_adj), "value_changed", G_CALLBACK (cb_zoom), (gpointer) spinbutton); gtk_widget_show (spinbutton); /* close button */ button = gtk_button_new_from_stock (GTK_STOCK_CLOSE); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (cb_close), NULL); gtk_widget_show (button); /* reset button */ button = gtk_button_new_with_label ("Reset"); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (cb_reset), NULL); gtk_widget_show (button); } specimen-0.5.2-rc3/src/gui/sample-editor.h0000644000175000017500000000027610466727727015247 00000000000000#ifndef __SAMPLE_EDITOR_H__ #define __SAMPLE_EDITOR_H__ #include void sample_editor_show(int id); void sample_editor_init(GtkWidget* parent); #endif /* __SAMPLE_EDITOR_H__ */ specimen-0.5.2-rc3/src/gui/gui.c0000644000175000017500000004334410575117614013251 00000000000000#include #include #include #include #include #include "specimen.h" #include "patch.h" #include "mixer.h" #include "gui.h" #include "patchsection.h" #include "mastersection.h" #include "channelsection.h" #include "midisection.h" #include "patchlist.h" #include "waveform.h" #include "sample-editor.h" #include "sample-selector.h" #include "bank-ops.h" #include "audio-settings.h" /* windows */ static GtkWidget* window; static GtkWidget* patch_section; static GtkWidget* master_section; static GtkWidget* midi_section; static GtkWidget* channel_section; static GtkWidget* patch_list; /* main menu */ static GtkWidget* menu_file; static GtkWidget* menu_file_item; static GtkWidget* menu_file_new_bank; static GtkWidget* menu_file_open_bank; static GtkWidget* menu_file_save_bank; static GtkWidget* menu_file_save_bank_as; static GtkWidget* menu_file_quit; static GtkWidget* menu_file_vsep; static GtkWidget* menu_settings; static GtkWidget* menu_settings_item; static GtkWidget* menu_settings_audio; static GtkWidget* menu_patch; static GtkWidget* menu_patch_item; static GtkWidget* menu_patch_add; static GtkWidget* menu_patch_duplicate; static GtkWidget* menu_patch_rename; static GtkWidget* menu_patch_remove; static GtkWidget* menu_help; static GtkWidget* menu_help_item; static GtkWidget* menu_help_stfu; static GtkWidget* menu_help_about; GtkWidget* gui_title_new(const char* msg) { GtkWidget* label; char* s; label = gtk_label_new(NULL); s = g_strdup_printf("%s", msg); gtk_label_set_markup(GTK_LABEL(label), s); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); g_free(s); return label; } GtkWidget* gui_hpad_new(int size) { GtkWidget* pad; pad = gtk_alignment_new(0, 0, 1, 1); gtk_widget_set_size_request(pad, size, 0); return pad; } GtkWidget* gui_vpad_new(int size) { GtkWidget* pad; pad = gtk_alignment_new(0, 0, 1, 1); gtk_widget_set_size_request(pad, 0, size); return pad; } GtkWidget* gui_section_new(const char* name, GtkWidget** box) { GtkWidget* vbox; GtkWidget* title; GtkWidget* hbox; GtkWidget* pad; /* vbox */ vbox = gtk_vbox_new(FALSE, 0); /* title */ title = gui_title_new(name); gtk_box_pack_start(GTK_BOX(vbox), title, TRUE, TRUE, 0); gtk_widget_show(title); /* pad */ pad = gui_vpad_new(GUI_TITLESPACE); gtk_box_pack_start(GTK_BOX(vbox), pad, FALSE, FALSE, 0); gtk_widget_show(pad); /* hbox */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0); gtk_widget_show(hbox); /* pad */ pad = gui_hpad_new(GUI_INDENT); gtk_box_pack_start(GTK_BOX(hbox), pad, FALSE, FALSE, 0); gtk_widget_show(pad); *box = hbox; return vbox; } /* when the 'x' button is clicked on the titlebar */ static gboolean cb_delete (GtkWidget* widget, GdkEvent* event, gpointer data) { /* we return false, causing the "destroy" event to be released on "widget" */ return FALSE; } static void cb_quit (GtkWidget* widget, gpointer data) { debug ("Quitting\n"); gtk_main_quit ( ); } /* enables ok button if there is input in entry, disables otherwise */ static gboolean cb_menu_patch_name_verify (GtkWidget * entry, GdkEventKey * event, GtkDialog * dialog) { int val = strlen ((char *) gtk_entry_get_text (GTK_ENTRY (entry))); if (val) gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_ACCEPT, TRUE); else gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_ACCEPT, FALSE); return FALSE; /* make sure normal event handlers grab signal */ } static void cb_menu_patch_add (GtkWidget * menu_item, GtkWidget * main_window) { GtkWidget *dialog; GtkWidget *entry; int val; /* dialog box */ dialog = gtk_dialog_new_with_buttons ("Add Patch", GTK_WINDOW (main_window), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); /* create entry box */ entry = gtk_entry_new_with_max_length (PATCH_MAX_NAME); gtk_entry_set_text (GTK_ENTRY (entry), "Patch Name"); gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); /* I wish I had a "changed" event... */ g_signal_connect (G_OBJECT (entry), "key-press-event", G_CALLBACK (cb_menu_patch_name_verify), (gpointer) dialog); g_signal_connect (G_OBJECT (entry), "key-release-event", G_CALLBACK (cb_menu_patch_name_verify), (gpointer) dialog); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), entry, FALSE, FALSE, 0); gtk_widget_show (entry); /* guaranteed to have a string in there if response is 'accept' * due to sensitivity callback */ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { val = patch_create ((char *) gtk_entry_get_text (GTK_ENTRY (entry))); if (val < 0) { errmsg ("Failed to create a new patch (%s).\n", patch_strerror (val)); return; } patch_set_channel(val, channel_section_get_channel(CHANNEL_SECTION(channel_section))); patch_list_update (PATCH_LIST(patch_list), val, PATCH_LIST_PATCH); } gtk_widget_destroy (dialog); } static void cb_menu_patch_duplicate (GtkWidget * menu_item, GtkWidget * main_window) { int val; int cp; if ((cp = patch_list_get_current_patch(PATCH_LIST(patch_list))) < 0) { debug ("Duplicate what, jackass?\n"); return; } val = patch_duplicate (cp); if (val < 0) { errmsg ("Failed to create a new patch (%s).\n", patch_strerror (val)); return; } patch_list_update (PATCH_LIST(patch_list), val, PATCH_LIST_PATCH); } static void cb_menu_patch_rename (GtkWidget * menu_item, GtkWidget * main_window) { GtkWidget *dialog; GtkWidget *entry; int val; int index; int cp; if ((cp = patch_list_get_current_patch(PATCH_LIST(patch_list))) < 0) { debug ("No patches to rename, infidel.\n"); return; } /* dialog box */ dialog = gtk_dialog_new_with_buttons ("Rename Patch", GTK_WINDOW (main_window), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); /* create entry box */ entry = gtk_entry_new_with_max_length (PATCH_MAX_NAME); gtk_entry_set_text (GTK_ENTRY (entry), patch_get_name (cp)); gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); /* I wish I had a "changed" event... */ g_signal_connect (G_OBJECT (entry), "key-press-event", G_CALLBACK (cb_menu_patch_name_verify), (gpointer) dialog); g_signal_connect (G_OBJECT (entry), "key-release-event", G_CALLBACK (cb_menu_patch_name_verify), (gpointer) dialog); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), entry, FALSE, FALSE, 0); gtk_widget_show (entry); /* guaranteed to have a string in there if response is 'accept' * due to sensitivity callback */ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { val = patch_set_name (cp, (char *) gtk_entry_get_text (GTK_ENTRY (entry))); if (val < 0) { errmsg ("Failed to rename patch (%s).\n", patch_strerror (val)); return; } index = patch_list_get_current_index (PATCH_LIST(patch_list)); patch_list_update (PATCH_LIST(patch_list), index, PATCH_LIST_INDEX); } gtk_widget_destroy (dialog); } static void cb_menu_patch_remove (GtkWidget * menu_item, gpointer data) { int val; int cp; int index; if ((cp = patch_list_get_current_patch(PATCH_LIST(patch_list))) < 0) { debug ("No patches to remove, you dolt.\n"); return; } index = patch_list_get_current_index (PATCH_LIST(patch_list)); if ((val = patch_destroy (cp)) < 0) { errmsg ("Error removing patch %d (%s).\n", cp, patch_strerror (val)); return; } if (index == 0) { patch_list_update (PATCH_LIST(patch_list), index, PATCH_LIST_INDEX); } else { patch_list_update (PATCH_LIST(patch_list), index - 1, PATCH_LIST_INDEX); } } static void cb_menu_file_new_bank (GtkWidget * widget, gpointer data) { if (bank_ops_new ( ) == 0) { patch_list_update (PATCH_LIST(patch_list), 0, PATCH_LIST_INDEX); } } static void cb_menu_file_open_bank (GtkWidget * widget, gpointer data) { if (bank_ops_open ( ) == 0) { patch_list_update (PATCH_LIST(patch_list), 0, PATCH_LIST_INDEX); } } static void cb_menu_file_save_bank (GtkWidget * widget, gpointer data) { bank_ops_save ( ); } static void cb_menu_file_save_bank_as (GtkWidget * widget, gpointer data) { bank_ops_save_as ( ); } static void cb_menu_settings_audio (GtkWidget * widget, gpointer data) { audio_settings_show (window); } static void cb_menu_help_stfu (GtkWidget* widget, gpointer data) { mixer_flush(); } static void cb_menu_help_about (GtkWidget* widget, gpointer data) { GdkPixbuf* logo; const char* authors[] = { "Pete Bessman (original author)", "See the AUTHORS file for others", 0 }; /* should this be freed later on? */ logo = gdk_pixbuf_new_from_file(PIXMAPSDIR "specimen.png", NULL); gtk_show_about_dialog( GTK_WINDOW(data), "name", "Specimen", "logo", logo, "authors", authors, "version", VERSION, "copyright", "(C) 2004-2005 Pete Bessman (C) 2006-2007 others", NULL); } static void cb_patch_list_changed(PatchList* list, gpointer data) { int patch = patch_list_get_current_patch(list); patch_section_set_patch(PATCH_SECTION(patch_section), patch); midi_section_set_patch(MIDI_SECTION(midi_section), patch); channel_section_set_patch(CHANNEL_SECTION(channel_section), patch); } int gui_init(void) { GtkWidget* window_vbox; GtkWidget* master_hbox; GtkWidget* menubar; GtkWidget* vbox; debug ("Initializing GUI\n"); /* main window */ window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "Specimen"); g_signal_connect (G_OBJECT (window), "delete-event", G_CALLBACK (cb_delete), NULL); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (cb_quit), NULL); /* setup the window's main vbox */ window_vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), window_vbox); /* the menubar */ menubar = gtk_menu_bar_new ( ); gtk_box_pack_start (GTK_BOX (window_vbox), menubar, FALSE, FALSE, 0); gtk_widget_show (menubar); /* file menu */ menu_file = gtk_menu_new ( ); menu_file_item = gtk_menu_item_new_with_label ("File"); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_file_item), menu_file); gtk_menu_bar_append (GTK_MENU_BAR (menubar), menu_file_item); gtk_widget_show (menu_file_item); menu_file_new_bank = gtk_menu_item_new_with_label ("New Bank"); gtk_menu_shell_append (GTK_MENU_SHELL (menu_file), menu_file_new_bank); g_signal_connect (G_OBJECT (menu_file_new_bank), "activate", G_CALLBACK (cb_menu_file_new_bank), NULL); gtk_widget_show (menu_file_new_bank); menu_file_open_bank = gtk_menu_item_new_with_label ("Open Bank..."); gtk_menu_shell_append (GTK_MENU_SHELL (menu_file), menu_file_open_bank); g_signal_connect (G_OBJECT (menu_file_open_bank), "activate", G_CALLBACK (cb_menu_file_open_bank), NULL); gtk_widget_show (menu_file_open_bank); menu_file_save_bank = gtk_menu_item_new_with_label ("Save Bank"); gtk_menu_shell_append (GTK_MENU_SHELL (menu_file), menu_file_save_bank); g_signal_connect (G_OBJECT (menu_file_save_bank), "activate", G_CALLBACK (cb_menu_file_save_bank), NULL); gtk_widget_show (menu_file_save_bank); menu_file_save_bank_as = gtk_menu_item_new_with_label ("Save Bank As..."); gtk_menu_shell_append (GTK_MENU_SHELL (menu_file), menu_file_save_bank_as); g_signal_connect (G_OBJECT (menu_file_save_bank_as), "activate", G_CALLBACK (cb_menu_file_save_bank_as), NULL); gtk_widget_show (menu_file_save_bank_as); menu_file_vsep = gtk_menu_item_new ( ); gtk_menu_shell_append (GTK_MENU_SHELL (menu_file), menu_file_vsep); gtk_widget_show (menu_file_vsep); menu_file_quit = gtk_menu_item_new_with_label ("Quit"); gtk_menu_shell_append (GTK_MENU_SHELL (menu_file), menu_file_quit); g_signal_connect (G_OBJECT (menu_file_quit), "activate", G_CALLBACK (cb_quit), NULL); gtk_widget_show (menu_file_quit); /* patch menu */ menu_patch = gtk_menu_new ( ); menu_patch_item = gtk_menu_item_new_with_label ("Patch"); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_patch_item), menu_patch); gtk_menu_bar_append (GTK_MENU_BAR (menubar), menu_patch_item); gtk_widget_show (menu_patch_item); menu_patch_add = gtk_menu_item_new_with_label ("Add..."); gtk_menu_shell_append (GTK_MENU_SHELL (menu_patch), menu_patch_add); g_signal_connect (G_OBJECT (menu_patch_add), "activate", G_CALLBACK (cb_menu_patch_add), (gpointer) window); gtk_widget_show (menu_patch_add); menu_patch_duplicate = gtk_menu_item_new_with_label ("Duplicate"); gtk_menu_shell_append (GTK_MENU_SHELL (menu_patch), menu_patch_duplicate); g_signal_connect (G_OBJECT (menu_patch_duplicate), "activate", G_CALLBACK (cb_menu_patch_duplicate), (gpointer) window); gtk_widget_show (menu_patch_duplicate); menu_patch_rename = gtk_menu_item_new_with_label ("Rename..."); gtk_menu_shell_append (GTK_MENU_SHELL (menu_patch), menu_patch_rename); g_signal_connect (G_OBJECT (menu_patch_rename), "activate", G_CALLBACK (cb_menu_patch_rename), (gpointer) window); gtk_widget_show (menu_patch_rename); menu_patch_remove = gtk_menu_item_new_with_label ("Remove"); gtk_menu_shell_append (GTK_MENU_SHELL (menu_patch), menu_patch_remove); g_signal_connect (G_OBJECT (menu_patch_remove), "activate", G_CALLBACK (cb_menu_patch_remove), (gpointer) NULL); gtk_widget_show (menu_patch_remove); /* settings menu */ menu_settings = gtk_menu_new ( ); menu_settings_item = gtk_menu_item_new_with_label ("Settings"); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_settings_item), menu_settings); gtk_menu_bar_append (GTK_MENU_BAR (menubar), menu_settings_item); gtk_widget_show (menu_settings_item); menu_settings_audio = gtk_menu_item_new_with_label ("Audio..."); gtk_menu_shell_append (GTK_MENU_SHELL (menu_settings), menu_settings_audio); g_signal_connect (G_OBJECT (menu_settings_audio), "activate", G_CALLBACK (cb_menu_settings_audio), NULL); gtk_widget_show (menu_settings_audio); /* help menu */ menu_help = gtk_menu_new ( ); menu_help_item = gtk_menu_item_new_with_label ("Help"); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_help_item), menu_help); gtk_menu_bar_append (GTK_MENU_BAR (menubar), menu_help_item); gtk_widget_show (menu_help_item); menu_help_stfu = gtk_menu_item_new_with_label ("STFU!"); gtk_menu_shell_append (GTK_MENU_SHELL (menu_help), menu_help_stfu); g_signal_connect (G_OBJECT (menu_help_stfu), "activate", G_CALLBACK (cb_menu_help_stfu), NULL); gtk_widget_show (menu_help_stfu); menu_help_about = gtk_menu_item_new_with_label ("About..."); gtk_menu_shell_append (GTK_MENU_SHELL (menu_help), menu_help_about); g_signal_connect (G_OBJECT (menu_help_about), "activate", G_CALLBACK (cb_menu_help_about), window); gtk_widget_show (menu_help_about); /* setup the main window's master hbox, and left and right boxes */ master_hbox = gtk_hbox_new(FALSE, GUI_SECSPACE); gtk_container_set_border_width(GTK_CONTAINER(master_hbox), GUI_BORDERSPACE); gtk_box_pack_start(GTK_BOX(window_vbox), master_hbox, TRUE, TRUE, 0); /* left vbox */ vbox = gtk_vbox_new(FALSE, GUI_SPACING); gtk_box_pack_start(GTK_BOX(master_hbox), vbox, FALSE, FALSE, 0); gtk_widget_show(vbox); /* master section */ master_section = master_section_new(); gtk_box_pack_start(GTK_BOX(vbox), master_section, FALSE, FALSE, 0); gtk_widget_show(master_section); /* patch list */ patch_list = patch_list_new(); gtk_box_pack_start(GTK_BOX(vbox), patch_list, TRUE, TRUE, 0); g_signal_connect(G_OBJECT(patch_list), "changed", G_CALLBACK(cb_patch_list_changed), NULL); gtk_widget_show(patch_list); /* channel section */ channel_section = channel_section_new(); gtk_box_pack_start(GTK_BOX(vbox), channel_section, FALSE, FALSE, 0); gtk_widget_show(channel_section); /* right vbox */ vbox = gtk_vbox_new(FALSE, GUI_SPACING); gtk_box_pack_start(GTK_BOX(master_hbox), vbox, TRUE, TRUE, 0); gtk_widget_show(vbox); /* patch section */ patch_section = patch_section_new(); gtk_box_pack_start(GTK_BOX(vbox), patch_section, TRUE, TRUE, 0); gtk_widget_show(patch_section); /* midi section */ midi_section = midi_section_new(); gtk_box_pack_start(GTK_BOX(vbox), midi_section, FALSE, FALSE, 0); gtk_widget_show(midi_section); /* done */ gtk_widget_show (master_hbox); gtk_widget_show (window_vbox); gtk_widget_show (window); /* intialize children */ sample_editor_init(window); audio_settings_init(window); /* priming updates */ master_section_update(MASTER_SECTION(master_section)); patch_list_update(PATCH_LIST(patch_list), 0, PATCH_LIST_INDEX); return 0; } void gui_refresh(void) { patch_list_update (PATCH_LIST(patch_list), 0, PATCH_LIST_INDEX); } PatchList* gui_get_patch_list(void) { return PATCH_LIST(patch_list); } specimen-0.5.2-rc3/src/gui/gui.h0000644000175000017500000000243710467173732013257 00000000000000#ifndef __GUI_H__ #define __GUI_H__ #include "specimen.h" #include "patchlist.h" enum { GUI_SPACING = 6, /* space between widgets */ GUI_INDENT = 18, /* how much to indent sections by */ GUI_SECSPACE = 18, /* space between sections */ GUI_SCROLLSPACE = 3, /* space between a scrollbar and its scrollie thingie */ GUI_TITLESPACE = 12, /* space between a section title and its contents */ GUI_TEXTSPACE = 12, /* space between a label and its control */ GUI_BORDERSPACE = 12, /* space between a border and its guts */ GUI_THRESHOLD = 20, /* threshold used for sliderbuttons */ GUI_REFRESH_TIMEOUT = 100 /* time in milliseconds between controller refreshes */ }; /* returns a titlefied label */ GtkWidget* gui_title_new(const char* msg); /* returns a horizontal padding widget of the chosen size */ GtkWidget* gui_hpad_new(int size); /* returns a vertical padding widget of the chosen size */ GtkWidget* gui_vpad_new(int size); /* returns a newly prepared section and a box to put children in */ GtkWidget* gui_section_new(const char* name, GtkWidget** box); /* prepare the gui for use */ int gui_init(void); /* refresh the gui's display */ void gui_refresh(void); /* get the gui's PatchList widget */ PatchList* gui_get_patch_list(void); #endif /* __GUI_H__ */ specimen-0.5.2-rc3/src/gui/waveform.c0000644000175000017500000004134310466727727014323 00000000000000#include #include #include #include "specimen.h" #include "patch.h" #include "waveform.h" /* colors: from 0 to 65535 */ enum { /* background fades from 1 to 2 values */ BACK_R1 = 0, BACK_R2 = 0, BACK_G1 = 0, BACK_G2 = 0, BACK_B1 = 5000, BACK_B2 = 20000, /* grid colors */ GRID_R1 = 0, GRID_R2 = 0, GRID_G1 = 5000, GRID_G2 = 10000, GRID_B1 = 15000, GRID_B2 = 30000, GRID_Y = 8, /* number of sqaures in Y direction */ /* color for center line */ CENT_R = 0000, CENT_G = 15000, CENT_B = 30000, /* colors for waveform */ WAVE_R = 0000, WAVE_G = 40000, WAVE_B = 60000, /* color to draw parts of waveform outside of start/stop points */ WAVE_RO = 0, WAVE_GO = 20000, WAVE_BO = 30000, /* color to draw loop points */ LOOP_R = 50000, LOOP_G = 30000, LOOP_B = 20000, }; /* forward declarations */ static void waveform_class_init (WaveformClass * wf); static void waveform_init (Waveform * wf); static void waveform_destroy (GtkObject * object); static void waveform_realize (GtkWidget * widget); static void waveform_size_request (GtkWidget * widget, GtkRequisition * requisition); static void waveform_size_allocate (GtkWidget * widget, GtkAllocation * allocation); static gboolean waveform_expose (GtkWidget * widget, GdkEventExpose * event); static gboolean waveform_button_press (GtkWidget * widget, GdkEventButton * event); /* local data */ static GtkWidgetClass *parent_class = NULL; GType waveform_get_type ( ) { static GType wf_type = 0; if (!wf_type) { static const GTypeInfo wf_info = { sizeof (WaveformClass), NULL, NULL, (GClassInitFunc) waveform_class_init, NULL, NULL, sizeof (Waveform), 0, (GInstanceInitFunc) waveform_init, }; wf_type = g_type_register_static (GTK_TYPE_WIDGET, "Waveform", &wf_info, 0); } return wf_type; } static void waveform_class_init (WaveformClass * class) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; object_class = (GtkObjectClass *) class; widget_class = (GtkWidgetClass *) class; parent_class = gtk_type_class (gtk_widget_get_type ( )); object_class->destroy = waveform_destroy; widget_class->realize = waveform_realize; widget_class->expose_event = waveform_expose; widget_class->size_request = waveform_size_request; widget_class->size_allocate = waveform_size_allocate; widget_class->button_press_event = waveform_button_press; } static void waveform_init (Waveform * wf) { wf->interactive = FALSE; wf->width = 0; wf->height = 0; wf->patch = -1; wf->range_start = 0.0; wf->range_stop = 1.0; } static void waveform_destroy (GtkObject * object) { g_return_if_fail (object != NULL); g_return_if_fail (IS_WAVEFORM (object)); if (GTK_OBJECT_CLASS (parent_class)->destroy) GTK_OBJECT_CLASS (parent_class)->destroy (object); } static void waveform_realize (GtkWidget * widget) { GdkWindowAttr attributes; gint attributes_mask; g_return_if_fail (widget != NULL); g_return_if_fail (IS_WAVEFORM (widget)); GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes.wclass = GDK_INPUT_OUTPUT; attributes.window_type = GDK_WINDOW_CHILD; attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; widget->window = gdk_window_new (widget->parent->window, &attributes, attributes_mask); widget->style = gtk_style_attach (widget->style, widget->window); gdk_window_set_user_data (widget->window, widget); gtk_style_set_background (widget->style, widget->window, GTK_STATE_ACTIVE); } static void waveform_size_request (GtkWidget * widget, GtkRequisition * requisition) { requisition->width = WAVEFORM (widget)->width; requisition->height = WAVEFORM (widget)->height; } static void waveform_size_allocate (GtkWidget * widget, GtkAllocation * allocation) { Waveform *wf; g_return_if_fail (widget != NULL); g_return_if_fail (IS_WAVEFORM (widget)); g_return_if_fail (allocation != NULL); widget->allocation = *allocation; wf = WAVEFORM (widget); wf->width = allocation->width; wf->height = allocation->height; if (GTK_WIDGET_REALIZED (widget)) { gdk_window_move_resize (widget->window, allocation->x, allocation->y, allocation->width, allocation->height); } } static gboolean waveform_expose (GtkWidget * widget, GdkEventExpose * event) { g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (IS_WAVEFORM (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); if (event->count > 0) return FALSE; waveform_draw (WAVEFORM (widget)); return FALSE; } static gboolean waveform_button_press (GtkWidget * widget, GdkEventButton * event) { Waveform *wf; int frames; int start; int stop; float fpp; /* frames per pixel */ int sel, control, chaos; g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (IS_WAVEFORM (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); if (!WAVEFORM (widget)->interactive) { return FALSE; } wf = WAVEFORM (widget); frames = patch_get_frames (wf->patch); start = wf->range_start * frames; stop = wf->range_stop * frames; fpp = (stop - start) * 1.0 / wf->width; sel = (event->x * fpp) + start; /* sel is now set to the frame * which corresponds to where the * user clicked */ if (event->type == GDK_BUTTON_PRESS) { /* during this process we ensure that values aren't set * which are bogus in relation to each other. For example, * we make sure that the sample starting point is not * greater than it's stopping point. */ /* left button: start point */ /* anything else: stop point */ if (event->state & GDK_CONTROL_MASK) { /* we set play points for control clicks */ if (event->button == 1) { control = patch_get_sample_stop (wf->patch); if (sel < control) { patch_set_sample_start (wf->patch, sel); /* adjust starting loop point if we need to */ chaos = patch_get_loop_start (wf->patch); if (sel > chaos) patch_set_loop_start (wf->patch, sel); } } else { control = patch_get_sample_start (wf->patch); if (sel > control) { patch_set_sample_stop (wf->patch, sel); /* adjust stopping loop point if we need to */ chaos = patch_get_loop_stop (wf->patch); if (sel < chaos) patch_set_loop_stop (wf->patch, sel); } } } else { /* otherwise, we set loop points */ if (event->button == 1) { control = patch_get_sample_start (wf->patch); chaos = patch_get_loop_stop (wf->patch); if (sel > control && sel < chaos) { patch_set_loop_start (wf->patch, sel); } } else { control = patch_get_sample_stop (wf->patch); chaos = patch_get_loop_start (wf->patch); if (sel < control && sel > chaos) { patch_set_loop_stop (wf->patch, sel); } } } } gtk_widget_queue_draw (widget); return FALSE; } /* draw background gradient */ inline static void draw_back (GdkDrawable * surface, int w, int h, GdkGC * gc) { int y; int center = h / 2; float d; GdkColor color; for (y = 0; y < h; y++) { d = 1.0 - (abs (y - center) * 1.0 / (center)); color.red = BACK_R1 * (1 - d) + BACK_R2 * d; color.green = BACK_G1 * (1 - d) + BACK_G2 * d; color.blue = BACK_B1 * (1 - d) + BACK_B2 * d; gdk_gc_set_rgb_fg_color (gc, &color); gdk_draw_line (surface, gc, 0, y, w - 1, y); } } /* draw grid gradient */ inline static void draw_grid (GdkDrawable * surface, int w, int h, GdkGC * gc) { int x, y; int center = h / 2; float d; GdkColor color; for (y = 0; y < h; y++) { d = 1.0 - (abs (y - center) * 1.0 / (center)); if (y == center) { color.red = CENT_R; color.green = CENT_G; color.blue = CENT_B; } else { color.red = GRID_R1 * (1 - d) + GRID_R2 * d; color.green = GRID_G1 * (1 - d) + GRID_G2 * d; color.blue = GRID_B1 * (1 - d) + GRID_B2 * d; } gdk_gc_set_rgb_fg_color (gc, &color); /* draw horizontal line */ if (y % (h / GRID_Y) == 0) { gdk_draw_line (surface, gc, 0, y, w - 1, y); } else { /* draw vertical line components */ for (x = (h / GRID_Y); x < w; x += (h / GRID_Y)) { gdk_draw_point (surface, gc, x, y); } } } } /* draw waveform, using a method similar to Brensenham's Line-Drawing * Algorithm */ inline static void draw_wave (Waveform* wf, GdkDrawable* surface, int w, int h, GdkGC* gc) { int center = h / 2; int frames; int play_start, play_stop; int start, stop; const float* wav; GdkColor color; if (wf->patch < 0) return; if ((wav = patch_get_sample (wf->patch)) == NULL) return; frames = patch_get_frames (wf->patch); start = frames * wf->range_start; stop = frames * wf->range_stop; play_start = patch_get_sample_start (wf->patch); play_stop = patch_get_sample_stop (wf->patch); /* draw waveform when pixels >= frames */ if (w >= (stop - start)) { int lx = 0; /* last x val */ int ly = center; /* last y val */ int x = 0; /* x index */ int y = 0; /* y val */ int f = start; /* frame index */ int ferr = 0; /* frame error value */ int visframes /* number of frames that will be drawn */ = stop - start; for (x = 0; x < w; x++) { if ((ferr += visframes) >= w) { ferr -= w; } else { continue; } y = (wav[f*2] + 1) / 2 * h; /* set line color */ if (f < play_start * 2 || f > play_stop * 2) { color.red = WAVE_RO; color.green = WAVE_GO; color.blue = WAVE_BO; } else { color.red = WAVE_R; color.green = WAVE_G; color.blue = WAVE_B; } gdk_gc_set_rgb_fg_color (gc, &color); gdk_draw_line (surface, gc, lx, ly, x, y); f++; lx = x; ly = y; } } /* draw waveform when pixels < frames */ else { float lminy = 0; /* last min val */ float lmaxy = 0; /* last max val */ float miny = 2; /* min val found over interval */ float maxy = -2; /* max val found over interval */ int draw_miny = 0; /* pixel value of miny */ int draw_maxy = 0; /* pixel value of maxy */ int lx = 0; /* last x value (prevents trouble when x == 0) */ int xerr = 0; /* x error value */ int x = 0; /* x index */ int f = 0; /* frame index */ int s = 0; /* sample index */ int visframes /* number of frames that will be drawn */ = stop - start; for (f = start; f < stop; f++) { s = f * 2; if (wav[s] > maxy) { maxy = wav[s]; } if (wav[s] < miny) { miny = wav[s]; } if ((xerr += w) >= visframes) { xerr -= visframes; } else { continue; } /* set color of line */ if (f < play_start || f > play_stop) { color.red = WAVE_RO; color.green = WAVE_GO; color.blue = WAVE_BO; } else { color.red = WAVE_R; color.green = WAVE_G; color.blue = WAVE_B; } gdk_gc_set_rgb_fg_color (gc, &color); /* calculate drawing coordinates */ draw_miny = (miny + 1) / 2 * h; draw_maxy = (maxy + 1) / 2 * h; /* connect to previously drawn segment; we put off * converting the lm??y values so that they don't get * calculated if they aren't needed (efficiency) */ if (maxy < lminy) { gdk_draw_line (surface, gc, lx, (lminy+1)/2 * h, x, draw_maxy); } else if (miny > lmaxy) { gdk_draw_line (surface, gc, lx, (lmaxy+1)/2 * h, x, draw_miny); } /* connect min val to max val */ gdk_draw_line (surface, gc, x, draw_miny, x, draw_maxy); /* reset all vars */ lx = x++; lminy = miny; lmaxy = maxy; /* this trick ensures that miny and maxy will be set at * least once */ miny = 2; maxy = -2; } } } inline static void draw_loop (Waveform * wf, GdkDrawable * surface, int w, int h, GdkGC * gc) { int frames; int start, stop; int loop_start, loop_stop; float ppf; GdkColor color; frames = patch_get_frames (wf->patch); start = frames * wf->range_start; stop = frames * wf->range_stop; loop_start = patch_get_loop_start (wf->patch); loop_stop = patch_get_loop_stop (wf->patch); ppf = w / (stop - start * 1.0); /* prepare to draw loop points */ color.red = LOOP_R; color.green = LOOP_G; color.blue = LOOP_B; gdk_gc_set_rgb_fg_color (gc, &color); gdk_gc_set_function (gc, GDK_COPY); /* draw starting loop point */ if (loop_start > start) { loop_start = (loop_start - start) * ppf; gdk_draw_line (surface, gc, loop_start, 0, loop_start, h - 1); } /* draw stopping loop point */ if (loop_stop < stop) { loop_stop = (loop_stop - start) * ppf; gdk_draw_line (surface, gc, loop_stop, 0, loop_stop, h - 1); } } void waveform_draw (Waveform * wf) { GtkWidget *widget = GTK_WIDGET (wf); GdkGC *gc; int w, h; /* width and height of drawing area */ /* prepate to draw */ if (!GTK_WIDGET_REALIZED (widget)) return; gdk_drawable_get_size (GDK_DRAWABLE (widget->window), &w, &h); gc = gdk_gc_new (GDK_DRAWABLE (widget->window)); /* draw each component */ draw_back (GDK_DRAWABLE (widget->window), w, h, gc); draw_grid (GDK_DRAWABLE (widget->window), w, h, gc); draw_wave (wf, GDK_DRAWABLE (widget->window), w, h, gc); draw_loop (wf, GDK_DRAWABLE (widget->window), w, h, gc); g_object_unref (gc); } GtkWidget *waveform_new (int id, int w, int h, gboolean interactive) { Waveform *wf; wf = g_object_new (waveform_get_type ( ), NULL); wf->patch = id; wf->width = w; wf->height = h; wf->interactive = interactive; return GTK_WIDGET (wf); } void waveform_set_patch (Waveform * wf, int id) { g_return_if_fail (wf != NULL); g_return_if_fail (IS_WAVEFORM (wf)); wf->patch = id; gtk_widget_queue_draw (GTK_WIDGET (wf)); } void waveform_set_size (Waveform * wf, int w, int h) { g_return_if_fail (wf != NULL); g_return_if_fail (IS_WAVEFORM (wf)); wf->width = w; wf->height = h; gtk_widget_queue_resize (GTK_WIDGET (wf)); } void waveform_set_interactive (Waveform * wf, gboolean interactive) { g_return_if_fail (wf != NULL); g_return_if_fail (IS_WAVEFORM (wf)); wf->interactive = interactive; gtk_widget_queue_draw (GTK_WIDGET (wf)); } void waveform_set_range (Waveform * wf, float start, float stop) { g_return_if_fail (wf != NULL); g_return_if_fail (IS_WAVEFORM (wf)); wf->range_start = (start < 0.0 || start > 1.0 || start > stop) ? 0.0 : start; wf->range_stop = (stop < 0.0 || start > 1.0 || start > stop) ? 1.0 : stop; gtk_widget_queue_draw (GTK_WIDGET (wf)); } int waveform_get_patch (Waveform * wf) { g_return_val_if_fail (wf != NULL, -1); g_return_val_if_fail (IS_WAVEFORM (wf), -1); return wf->patch; } void waveform_get_size (Waveform * wf, int *w, int *h) { g_return_if_fail (wf != NULL); g_return_if_fail (IS_WAVEFORM (wf)); *w = wf->width; *h = wf->height; return; } gboolean waveform_get_interactive (Waveform * wf) { g_return_val_if_fail (wf != NULL, FALSE); g_return_val_if_fail (IS_WAVEFORM (wf), FALSE); return wf->interactive; } void waveform_get_range (Waveform * wf, float *start, float *stop) { g_return_if_fail (wf != NULL); g_return_if_fail (IS_WAVEFORM (wf)); *start = wf->range_start; *stop = wf->range_stop; } specimen-0.5.2-rc3/src/gui/waveform.h0000644000175000017500000000260010466727727014321 00000000000000#ifndef __WAVEFORM_H__ #define __WAVEFORM_H__ #include #define WAVEFORM(obj) GTK_CHECK_CAST(obj, waveform_get_type( ), Waveform) #define WAVEFORM_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, waveform_get_type( ), WaveformClass) #define IS_WAVEFORM(obj) GTK_CHECK_TYPE(obj, waveform_get_type( )) typedef struct _waveform Waveform; typedef struct _waveform_class WaveformClass; /* instance definition */ struct _waveform { GtkWidget parent_object; gboolean interactive; int width, height; float range_start, range_stop; int patch; }; /* class definition */ struct _waveform_class { GtkWidgetClass parent_class; }; GtkWidget* waveform_new (int id, int w, int h, gboolean interactive); GType waveform_get_type ( ); void waveform_draw (Waveform* wf); void waveform_set_patch (Waveform* wf, int id); void waveform_set_size (Waveform* wf, int w, int h); void waveform_set_range (Waveform* wf, float start, float stop); void waveform_set_interactive (Waveform* wf, gboolean interactive); int waveform_get_patch (Waveform* wf); void waveform_get_size (Waveform* wf, int* w, int* h); void waveform_get_range (Waveform* wf, float* start, float* stop); gboolean waveform_get_interactive (Waveform* wf); #endif /* __WAVEFORM_H__ */ specimen-0.5.2-rc3/src/gui/bank-ops.c0000644000175000017500000000640410466727727014206 00000000000000#include #include #include #include #include "specimen.h" #include "patch.h" #include "beef.h" static char *last_bank = NULL; static void save_bank_as_verify (GtkWidget * filesel) { GtkWidget *msg; char *name = (char *) gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); int val; if ((val = beef_write (name)) < 0) { errmsg ("Failed to write file %s\n", name); msg = gtk_message_dialog_new (GTK_WINDOW (filesel), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Failed to write file %s\n.", name); g_signal_connect_swapped (G_OBJECT (msg), "response", G_CALLBACK (gtk_widget_destroy), msg); gtk_widget_show (msg); } else { debug ("Succesfully wrote file %s\n", name); if (last_bank != NULL) free (last_bank); last_bank = strdup (name); gtk_dialog_response (GTK_DIALOG (filesel), GTK_RESPONSE_ACCEPT); } } static void open_bank_verify (GtkWidget * filesel) { GtkWidget *msg; char *name = (char *) gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); int val; if ((val = beef_read (name)) < 0) { errmsg ("Failed to open file %s\n", name); msg = gtk_message_dialog_new (GTK_WINDOW (filesel), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Failed to open file %s.", name); g_signal_connect_swapped (G_OBJECT (msg), "response", G_CALLBACK (gtk_widget_destroy), msg); gtk_widget_show (msg); } else { debug ("Succesfully opened file %s\n", name); if (last_bank != NULL) free (last_bank); last_bank = strdup (name); gtk_dialog_response (GTK_DIALOG (filesel), GTK_RESPONSE_ACCEPT); } } int bank_ops_save_as ( ) { GtkWidget *filesel; int val; if (last_bank == NULL) last_bank = strdup ("\0"); filesel = gtk_file_selection_new ("Save Bank"); gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), last_bank); g_signal_connect_swapped (G_OBJECT (GTK_FILE_SELECTION (filesel)->ok_button), "clicked", G_CALLBACK (save_bank_as_verify), filesel); if (gtk_dialog_run (GTK_DIALOG (filesel)) == GTK_RESPONSE_ACCEPT) val = 0; else val = -1; gtk_widget_destroy (filesel); return val; } int bank_ops_save ( ) { int val; if (last_bank == NULL) last_bank = strdup ("\0"); if (!strcmp (last_bank, "\0")) { val = bank_ops_save_as ( ); } else { val = beef_write (last_bank); } return val; } int bank_ops_open ( ) { GtkWidget *filesel; int val; if (last_bank == NULL) last_bank = strdup ("\0"); filesel = gtk_file_selection_new ("Open Bank"); gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), last_bank); g_signal_connect_swapped (G_OBJECT (GTK_FILE_SELECTION (filesel)->ok_button), "clicked", G_CALLBACK (open_bank_verify), filesel); if (gtk_dialog_run (GTK_DIALOG (filesel)) == GTK_RESPONSE_ACCEPT) val = 0; else val = -1; gtk_widget_destroy (filesel); return val; } int bank_ops_new ( ) { patch_destroy_all ( ); return 0; } specimen-0.5.2-rc3/src/gui/bank-ops.h0000644000175000017500000000026410466727727014211 00000000000000#ifndef __BANK_OPS_H__ #define __BANK_OPS_H__ int bank_ops_new ( ); int bank_ops_open ( ); int bank_ops_save_as ( ); int bank_ops_save ( ); #endif /* __BANK_OPS_H__ */ specimen-0.5.2-rc3/src/gui/sample-selector.c0000644000175000017500000000705510466727727015576 00000000000000#include #include #include #include #include #include "gui.h" #include "specimen.h" #include "patch.h" #include "mixer.h" static int patch; static char *old_file = NULL; static GtkWidget *filesel = NULL; static void cb_load (GtkWidget * filesel) { GtkWidget *msg; char *name = (char *) gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); char *curname = patch_get_sample_name (patch); int val; /* don't load the sample if it's already loaded */ if (strcmp (name, curname) == 0) { if (curname != NULL) free (curname); return; } if ((val = patch_sample_load (patch, name)) < 0) { errmsg ("Failed to load sample %s for patch %d (%s)\n", name, patch, patch_strerror (val)); msg = gtk_message_dialog_new (GTK_WINDOW (filesel), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Failed to load sample %s", name); gtk_dialog_run (GTK_DIALOG (msg)); gtk_widget_destroy (msg); } else { debug ("Successfully loaded sample %s\n", name); } if (curname != NULL) free (curname); } static void cb_preview (GtkWidget * filesel) { char *name; name = (char *) gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); mixer_preview (name); return; } static void cb_cancel ( ) { char *cur_file; if (old_file == NULL) { return; } else if (strcmp (old_file, "\0") == 0) { patch_sample_unload (patch); } else { /* set patch to old sample if another one is currently loaded */ cur_file = patch_get_sample_name (patch); if (strcmp (old_file, cur_file) != 0) patch_sample_load (patch, old_file); if (cur_file != NULL) free (cur_file); } return; } static void filesel_init ( ) { GtkWidget *load, *preview; char *filename; filesel = gtk_file_selection_new ("Load Sample"); filename = patch_get_sample_name (patch); gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), filename); gtk_window_set_modal (GTK_WINDOW (filesel), TRUE); if (filename != NULL) free (filename); g_signal_connect_swapped (G_OBJECT (GTK_FILE_SELECTION (filesel)->ok_button), "clicked", G_CALLBACK (cb_load), G_OBJECT (filesel)); g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (filesel)->cancel_button), "clicked", G_CALLBACK (cb_cancel), NULL); load = gtk_dialog_add_button (GTK_DIALOG (filesel), "Load", 0); g_signal_connect_swapped (G_OBJECT (load), "clicked", G_CALLBACK (cb_load), G_OBJECT (filesel)); preview = gtk_dialog_add_button (GTK_DIALOG (filesel), "Preview", 0); g_signal_connect_swapped (G_OBJECT (preview), "clicked", G_CALLBACK (cb_preview), G_OBJECT (filesel)); } int sample_selector_show (int id) { int response; patch = id; /* create filselector if this is our first time */ if (filesel == NULL) filesel_init ( ); old_file = patch_get_sample_name (patch); /* "I've been singing to myself, 'There's got to be a better way.'" */ while (1) { response = gtk_dialog_run (GTK_DIALOG (filesel)); if (response != 0) { gtk_widget_hide (filesel); break; } } /* maybe I'm just a retard, but I think the dialog/filesel * scheme in GTK sucks and I hope it gets fixed */ if (old_file != NULL) { free (old_file); old_file = NULL; } return 0; } specimen-0.5.2-rc3/src/gui/sample-selector.h0000644000175000017500000000020310466727727015567 00000000000000#ifndef __SAMPLE_SELECTOR_H__ #define __SAMPLE_SELECTOR_H__ int sample_selector_show(int id); #endif /* __SAMPLE_SELECTOR_H__ */ specimen-0.5.2-rc3/src/gui/mastersection.c0000644000175000017500000000457710466744417015360 00000000000000#include #include #include "mastersection.h" #include "specimen.h" #include "gui.h" #include "mixer.h" static GtkVBoxClass* parent_class; static void master_section_class_init(MasterSectionClass* klass); static void master_section_init(MasterSection* self); GType master_section_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (MasterSectionClass), NULL, NULL, (GClassInitFunc) master_section_class_init, NULL, NULL, sizeof (MasterSection), 0, (GInstanceInitFunc) master_section_init, }; type = g_type_register_static(GTK_TYPE_VBOX, "MasterSection", &info, 0); } return type; } static void master_section_class_init(MasterSectionClass* klass) { parent_class = g_type_class_peek_parent(klass); } static void volume_changed_cb(PhatFanSlider* slider, gpointer data) { float val; val = phat_fan_slider_get_value(slider); mixer_set_volume(val); } static void master_section_init(MasterSection* self) { GtkBox* box = GTK_BOX(self); GtkWidget* hbox; GtkWidget* label; GtkWidget* pad; gtk_box_set_spacing(box, GUI_SPACING); /* volume */ label = gtk_label_new(NULL); self->volume_fan = phat_hfan_slider_new_with_range(DEFAULT_VOLUME, 0.0, 1.0, 0.1); hbox = gtk_hbox_new(FALSE, GUI_TEXTSPACE); gtk_label_set_markup(GTK_LABEL(label), "Master"); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), self->volume_fan, TRUE, TRUE, 0); gtk_box_pack_start(box, hbox, FALSE, FALSE, 0); gtk_widget_show(label); gtk_widget_show(self->volume_fan); gtk_widget_show(hbox); /* pad */ pad = gui_vpad_new(GUI_SPACING/2); gtk_box_pack_start(box, pad, FALSE, FALSE, 0); gtk_widget_show(pad); /* signal */ g_signal_connect(self->volume_fan, "value-changed", G_CALLBACK(volume_changed_cb), NULL); } GtkWidget* master_section_new(void) { return (GtkWidget*) g_object_new(MASTER_SECTION_TYPE, NULL); } void master_section_update(MasterSection* self) { float volume; volume = mixer_get_volume(); g_signal_handlers_block_by_func(self->volume_fan, volume_changed_cb, NULL); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->volume_fan), volume); g_signal_handlers_unblock_by_func(self->volume_fan, volume_changed_cb, NULL); } specimen-0.5.2-rc3/src/gui/mastersection.h0000644000175000017500000000202710466727727015356 00000000000000#ifndef __MASTER_SECTION__ #define __MASTER_SECTION__ #include G_BEGIN_DECLS #define MASTER_SECTION_TYPE (master_section_get_type()) #define MASTER_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MASTER_SECTION_TYPE, MasterSection)) #define MASTER_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MASTER_SECTION_TYPE, MasterSectionClass)) #define IS_MASTER_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MASTER_SECTION_TYPE)) #define IS_MASTER_SECTION_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), MASTER_SECTION_TYPE)) typedef struct _MasterSectionClass MasterSectionClass; typedef struct _MasterSection MasterSection; struct _MasterSection { GtkVBox parent; /*< private >*/ GtkWidget* volume_fan; }; struct _MasterSectionClass { GtkVBoxClass parent_class; /*< private >*/ }; GType master_section_get_type(void); GtkWidget* master_section_new(void); /* sync display to match engine settings */ void master_section_update(MasterSection* self); G_END_DECLS #endif /* __MASTER_SECTION__ */ specimen-0.5.2-rc3/src/gui/patchsection.c0000644000175000017500000002475210575117614015153 00000000000000#include #include #include #include #include "patchsection.h" #include "specimen.h" #include "gui.h" #include "sampletab.h" #include "voicetab.h" #include "filtertab.h" #include "velocitytab.h" #include "envelopetab.h" #include "lfotab.h" #include "patch.h" #include "mixer.h" const char* deftitle = "Empty Bank"; static GtkVBoxClass* parent_class; static void patch_section_class_init(PatchSectionClass* klass); static void patch_section_init(PatchSection* self); static void patch_section_destroy(GtkObject* object); typedef struct _MenuItem { GtkWidget *item; PatchSection* self; int patch; } MenuItem; GType patch_section_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (PatchSectionClass), NULL, NULL, (GClassInitFunc) patch_section_class_init, NULL, NULL, sizeof (PatchSection), 0, (GInstanceInitFunc) patch_section_init, }; type = g_type_register_static(GTK_TYPE_VBOX, "PatchSection", &info, 0); } return type; } static void patch_section_class_init(PatchSectionClass* klass) { parent_class = g_type_class_peek_parent(klass); GTK_OBJECT_CLASS(klass)->destroy = patch_section_destroy; } static void vol_cb(PhatFanSlider* fan, PatchSection* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_volume(self->patch, val); } static void pan_cb(PhatFanSlider* fan, PatchSection* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_panning(self->patch, val); } static void pitch_cb(PhatFanSlider* fan, PatchSection* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_pitch(self->patch, val); } static void range_cb(PhatSliderButton* button, PatchSection* self) { int val; val = phat_slider_button_get_value(button); patch_set_pitch_steps(self->patch, val); } static void connect(PatchSection* self) { g_signal_connect(G_OBJECT(self->volume_fan), "value-changed", G_CALLBACK(vol_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->pan_fan), "value-changed", G_CALLBACK(pan_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->pitch_fan), "value-changed", G_CALLBACK(pitch_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->range_sb), "value-changed", G_CALLBACK(range_cb), (gpointer) self); } static void block(PatchSection* self) { g_signal_handlers_block_by_func(self->volume_fan, vol_cb, self); g_signal_handlers_block_by_func(self->pan_fan, pan_cb, self); g_signal_handlers_block_by_func(self->pitch_fan, pitch_cb, self); g_signal_handlers_block_by_func(self->range_sb, range_cb, self); } static void unblock(PatchSection* self) { g_signal_handlers_unblock_by_func(self->volume_fan, vol_cb, self); g_signal_handlers_unblock_by_func(self->pan_fan, pan_cb, self); g_signal_handlers_unblock_by_func(self->pitch_fan, pitch_cb, self); g_signal_handlers_unblock_by_func(self->range_sb, range_cb, self); } static void set_sensitive(PatchSection* self, gboolean val) { gtk_widget_set_sensitive(self->volume_fan, val); gtk_widget_set_sensitive(self->pan_fan, val); gtk_widget_set_sensitive(self->pitch_fan, val); gtk_widget_set_sensitive(self->range_sb, val); gtk_widget_set_sensitive(self->notebook, val); } static gboolean refresh(gpointer data) { PatchSection* self = PATCH_SECTION(data); float vol, pan; if (self->patch < 0) return TRUE; vol = patch_get_volume(self->patch); pan = patch_get_panning(self->patch); block(self); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->volume_fan), vol); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->pan_fan), pan); unblock(self); return TRUE; } static void patch_section_init(PatchSection* self) { GtkBox* box = GTK_BOX(self); GtkWidget* label; GtkWidget* table; GtkWidget* pad; self->patch = -1; /* table */ table = gtk_table_new(4, 8, FALSE); gtk_box_pack_start(box, table, TRUE, TRUE, 0); gtk_widget_show(table); /* title */ self->title = gtk_label_new(NULL); gtk_misc_set_alignment(GTK_MISC(self->title), 0.0, 0.0); gtk_label_set_markup(GTK_LABEL(self->title), deftitle); gtk_table_attach(GTK_TABLE(table), self->title, 0, 8, 0, 1, GTK_FILL, 0, 0, 0); gtk_widget_show(self->title); /* indentation */ pad = gui_hpad_new(GUI_INDENT); gtk_table_attach(GTK_TABLE(table), pad, 0, 1, 0, 1, 0, 0, 0, 0); gtk_widget_show(pad); /* column 3 padding */ pad = gui_hpad_new(GUI_TEXTSPACE); gtk_table_attach(GTK_TABLE(table), pad, 2, 3, 0, 1, 0, 0, 0, 0); gtk_widget_show(pad); /* column 5 padding */ pad = gui_hpad_new(GUI_SECSPACE); gtk_table_attach(GTK_TABLE(table), pad, 4, 5, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* column 7 padding */ pad = gui_hpad_new(GUI_TEXTSPACE); gtk_table_attach(GTK_TABLE(table), pad, 6, 7, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* row 1 spacing */ gtk_table_set_row_spacing(GTK_TABLE(table), 0, GUI_TITLESPACE); /* row 3 spacing */ gtk_table_set_row_spacing(GTK_TABLE(table), 2, GUI_SPACING*2); /* volume */ label = gtk_label_new("Volume:"); self->volume_fan = phat_hfan_slider_new_with_range(DEFAULT_VOLUME, 0.0, 1.0, 0.1); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(GTK_TABLE(table), label, 1, 2, 1, 2, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), self->volume_fan, 3, 4, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_widget_show(label); gtk_widget_show(self->volume_fan); /* panning */ label = gtk_label_new("Panning:"); self->pan_fan = phat_hfan_slider_new_with_range(0.0, -1.0, 1.0, 0.1); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(GTK_TABLE(table), label, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), self->pan_fan, 3, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_widget_show(label); gtk_widget_show(self->pan_fan); /* pitch */ label = gtk_label_new("Pitch:"); self->pitch_fan = phat_hfan_slider_new_with_range(0.0, -1.0, 1.0, 0.1); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(GTK_TABLE(table), label, 5, 6, 1, 2, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), self->pitch_fan, 7, 8, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_widget_show(label); gtk_widget_show(self->pitch_fan); /* range */ label = gtk_label_new("Steps:"); self->range_sb = phat_slider_button_new_with_range(2.0, 0.0, 48.0, 1.0, 0); phat_slider_button_set_threshold(PHAT_SLIDER_BUTTON(self->range_sb), GUI_THRESHOLD); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(GTK_TABLE(table), label, 5, 6, 2, 3, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), self->range_sb, 7, 8, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_widget_show(label); gtk_widget_show(self->range_sb); /* notebook */ self->notebook = gtk_notebook_new(); gtk_table_attach_defaults(GTK_TABLE(table), self->notebook, 0, 8, 3, 4); gtk_widget_show(self->notebook); /* sample page */ self->sample_tab = sample_tab_new(); label = gtk_label_new("SMP"); gtk_notebook_append_page(GTK_NOTEBOOK(self->notebook), self->sample_tab, label); gtk_widget_show(self->sample_tab); gtk_widget_show(label); /* voice page */ self->voice_tab = voice_tab_new(); label = gtk_label_new("VOICE"); gtk_notebook_append_page(GTK_NOTEBOOK(self->notebook), self->voice_tab, label); gtk_widget_show(self->voice_tab); gtk_widget_show(label); /* filter page */ self->filter_tab = filter_tab_new(); label = gtk_label_new("FILT"); gtk_notebook_append_page(GTK_NOTEBOOK(self->notebook), self->filter_tab, label); gtk_widget_show(self->filter_tab); gtk_widget_show(label); /* velocity page */ self->vel_tab = velocity_tab_new(); label = gtk_label_new("VEL"); gtk_notebook_append_page(GTK_NOTEBOOK(self->notebook), self->vel_tab, label); gtk_widget_show(self->vel_tab); gtk_widget_show(label); /* envelope page */ self->env_tab = envelope_tab_new(); label = gtk_label_new("ENV"); gtk_notebook_append_page(GTK_NOTEBOOK(self->notebook), self->env_tab, label); gtk_widget_show(self->env_tab); gtk_widget_show(label); /* lfo page */ self->lfo_tab = lfo_tab_new(); label = gtk_label_new("LFO"); gtk_notebook_append_page(GTK_NOTEBOOK(self->notebook), self->lfo_tab, label); gtk_widget_show(self->lfo_tab); gtk_widget_show(label); /* done */ connect(self); self->refresh = g_timeout_add(GUI_REFRESH_TIMEOUT, refresh, (gpointer) self); } static void patch_section_destroy(GtkObject* object) { PatchSection* self = PATCH_SECTION(object); GtkObjectClass* klass = GTK_OBJECT_CLASS(parent_class); if (!g_source_remove(self->refresh)) { debug("failed to remove refresh function from idle loop: %u\n", self->refresh); } else { debug("refresh function removed\n"); } if (klass->destroy) klass->destroy(object); } GtkWidget* patch_section_new(void) { return (GtkWidget*) g_object_new(PATCH_SECTION_TYPE, NULL); } void patch_section_set_patch(PatchSection* self, int patch) { float vol, pan, pitch; int range; char* name; char* title; self->patch = patch; if (patch < 0) { set_sensitive(self, FALSE); gtk_label_set_markup(GTK_LABEL(self->title), deftitle); } else { set_sensitive(self, TRUE); vol = patch_get_volume(patch); pan = patch_get_panning(patch); pitch = patch_get_pitch(patch); range = patch_get_pitch_steps(patch); name = patch_get_name(patch); title = g_strdup_printf("%s", name); gtk_label_set_markup(GTK_LABEL(self->title), title); g_free(title); g_free(name); block(self); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->volume_fan), vol); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->pan_fan), pan); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->pitch_fan), pitch); phat_slider_button_set_value(PHAT_SLIDER_BUTTON(self->range_sb), range); unblock(self); } sample_tab_set_patch(SAMPLE_TAB(self->sample_tab), patch); voice_tab_set_patch(VOICE_TAB(self->voice_tab), patch); filter_tab_set_patch(FILTER_TAB(self->filter_tab), patch); velocity_tab_set_patch(VELOCITY_TAB(self->vel_tab), patch); envelope_tab_set_patch(ENVELOPE_TAB(self->env_tab), patch); lfo_tab_set_patch(LFO_TAB(self->lfo_tab), patch); } specimen-0.5.2-rc3/src/gui/patchsection.h0000644000175000017500000000242310466744417015155 00000000000000#ifndef __PATCH_SECTION__ #define __PATCH_SECTION__ #include G_BEGIN_DECLS #define PATCH_SECTION_TYPE (patch_section_get_type()) #define PATCH_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PATCH_SECTION_TYPE, PatchSection)) #define PATCH_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PATCH_SECTION_TYPE, PatchSectionClass)) #define IS_PATCH_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PATCH_SECTION_TYPE)) #define IS_PATCH_SECTION_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), PATCH_SECTION_TYPE)) typedef struct _PatchSectionClass PatchSectionClass; typedef struct _PatchSection PatchSection; struct _PatchSection { GtkVBox parent; /*< private >*/ int patch; guint refresh; GtkWidget* title; GtkWidget* volume_fan; GtkWidget* pan_fan; GtkWidget* pitch_fan; GtkWidget* range_sb; GtkWidget* notebook; GtkWidget* sample_tab; GtkWidget* voice_tab; GtkWidget* filter_tab; GtkWidget* vel_tab; GtkWidget* env_tab; GtkWidget* lfo_tab; }; struct _PatchSectionClass { GtkVBoxClass parent_class; /*< private >*/ }; GType patch_section_get_type(void); GtkWidget* patch_section_new(void); void patch_section_set_patch(PatchSection* self, int patch); G_END_DECLS #endif /* __PATCH_SECTION__ */ specimen-0.5.2-rc3/src/gui/sampletab.c0000644000175000017500000001737610466727727014456 00000000000000#include #include "sampletab.h" #include "gui.h" #include "waveform.h" #include "patch.h" #include "mixer.h" #include "sample-selector.h" #include "sample-editor.h" static GtkVBoxClass* parent_class; static void sample_tab_class_init(SampleTabClass* klass); static void sample_tab_init(SampleTab* self); /* must match order of items in menu */ enum { SINGLESHOT, TRIM, LOOP, PINGPONG, }; GType sample_tab_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (SampleTabClass), NULL, NULL, (GClassInitFunc) sample_tab_class_init, NULL, NULL, sizeof (SampleTab), 0, (GInstanceInitFunc) sample_tab_init, }; type = g_type_register_static(GTK_TYPE_VBOX, "SampleTab", &info, 0); } return type; } static void sample_tab_class_init(SampleTabClass* klass) { parent_class = g_type_class_peek_parent(klass); } static void update_file_button(SampleTab* self) { char* name; char* base; name = patch_get_sample_name(self->patch); if (*name == '\0') { gtk_label_set_text(GTK_LABEL(self->file_label), "Load Sample"); } else { base = g_path_get_basename(name); gtk_label_set_text(GTK_LABEL(self->file_label), base); g_free(base); } g_free(name); } static gboolean waveform_cb(GtkWidget* wf, GdkEventButton* event, SampleTab* self) { if (event->button == 1) sample_editor_show(self->patch); /* this doesn't work! */ gtk_widget_queue_draw(wf); return FALSE; } static void set_mode(SampleTab* self) { int val; PatchPlayMode mode = 0; val = gtk_option_menu_get_history(GTK_OPTION_MENU(self->mode_opt)); switch (val) { case TRIM: mode = PATCH_PLAY_TRIM; break; case LOOP: mode = PATCH_PLAY_LOOP; break; case PINGPONG: mode = PATCH_PLAY_PINGPONG | PATCH_PLAY_LOOP; break; default: mode = PATCH_PLAY_SINGLESHOT; break; } if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->reverse_check))) mode |= PATCH_PLAY_REVERSE; else mode |= PATCH_PLAY_FORWARD; patch_set_play_mode(self->patch, mode); } static void mode_cb(GtkOptionMenu* opt, SampleTab* self) { set_mode(self); } static void reverse_cb(GtkCheckButton* button, SampleTab* self) { set_mode(self); } static void file_cb(GtkButton* button, SampleTab* self) { sample_selector_show(self->patch); update_file_button(self); gtk_widget_queue_draw(self->waveform); } static void connect(SampleTab* self) { g_signal_connect(G_OBJECT(self->waveform), "button-press-event", G_CALLBACK(waveform_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->mode_opt), "changed", G_CALLBACK(mode_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->reverse_check), "toggled", G_CALLBACK(reverse_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->file_button), "clicked", G_CALLBACK(file_cb), (gpointer) self); } static void block(SampleTab* self) { g_signal_handlers_block_by_func(self->mode_opt, mode_cb, self); g_signal_handlers_block_by_func(self->reverse_check, reverse_cb, self); } static void unblock(SampleTab* self) { g_signal_handlers_unblock_by_func(self->mode_opt, mode_cb, self); g_signal_handlers_unblock_by_func(self->reverse_check, reverse_cb, self); } inline static GtkWidget* file_button_new(SampleTab* self) { GtkWidget* button; GtkWidget* hbox; GtkWidget* vsep; GtkWidget* image; button = gtk_button_new(); hbox = gtk_hbox_new(FALSE, 0); self->file_label = gtk_label_new("Load File"); vsep = gtk_vseparator_new(); image = gtk_image_new_from_file(PIXMAPSDIR "open.png"); gtk_box_pack_start(GTK_BOX(hbox), self->file_label, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), vsep, FALSE, FALSE, GUI_SPACING); gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0); gtk_container_add(GTK_CONTAINER(button), hbox); gtk_misc_set_alignment(GTK_MISC(self->file_label), 0.0, 0.5); gtk_widget_show(hbox); gtk_widget_show(self->file_label); gtk_widget_show(vsep); gtk_widget_show(image); return button; } inline static GtkWidget* mode_opt_new(SampleTab* self) { GtkWidget* menu; GtkWidget* item; GtkWidget* opt; /* playback menu */ menu = gtk_menu_new(); item = gtk_menu_item_new_with_label("Single Shot"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); item = gtk_menu_item_new_with_label("Trim"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); item = gtk_menu_item_new_with_label("Loop"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); item = gtk_menu_item_new_with_label("Ping Pong"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); /* playback option menu */ opt = gtk_option_menu_new(); gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); return opt; } static void sample_tab_init(SampleTab* self) { GtkBox* box = GTK_BOX(self); GtkWidget* section; GtkWidget* hbox; GtkWidget* vbox; GtkWidget* pad; self->patch = -1; gtk_container_set_border_width(GTK_CONTAINER(self), GUI_BORDERSPACE); /* sample section */ section = gui_section_new("Sample", &hbox); gtk_box_pack_start(box, section, FALSE, FALSE, 0); gtk_widget_show(section); /* vbox */ vbox = gtk_vbox_new(FALSE, GUI_SPACING); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0); gtk_widget_show(vbox); /* file button */ self->file_button = file_button_new(self); gtk_box_pack_start(GTK_BOX(vbox), self->file_button, TRUE, TRUE, 0); gtk_widget_show(self->file_button); /* waveform preview */ self->waveform = waveform_new(self->patch, 256, 64, FALSE); gtk_box_pack_start(GTK_BOX(vbox), self->waveform, TRUE, TRUE, 0); gtk_widget_show(self->waveform); /* section padding */ pad = gui_vpad_new(GUI_SECSPACE); gtk_box_pack_start(box, pad, FALSE, FALSE, 0); gtk_widget_show(pad); /* playback section */ section = gui_section_new("Playback", &hbox); gtk_box_pack_start(box, section, FALSE, FALSE, 0); gtk_widget_show(section); /* mode option menu */ self->mode_opt = mode_opt_new(self); gtk_box_pack_start(GTK_BOX(hbox), self->mode_opt, TRUE, TRUE, 0); gtk_widget_show(self->mode_opt); /* pad */ pad = gui_hpad_new(GUI_SPACING); gtk_box_pack_start(GTK_BOX(hbox), pad, FALSE, FALSE, 0); gtk_widget_show(pad); /* reverse check */ self->reverse_check = gtk_check_button_new_with_label("Reverse"); gtk_box_pack_start(GTK_BOX(hbox), self->reverse_check, TRUE, TRUE, 0); gtk_widget_show(self->reverse_check); connect(self); } GtkWidget* sample_tab_new(void) { return (GtkWidget*) g_object_new(SAMPLE_TAB_TYPE, NULL); } void sample_tab_set_patch(SampleTab* self, int patch) { PatchPlayMode mode; self->patch = patch; waveform_set_patch(WAVEFORM(self->waveform), patch); block(self); if (patch < 0) { gtk_label_set_text(GTK_LABEL(self->file_label), "Load Sample"); } else { update_file_button(self); mode = patch_get_play_mode(patch); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->reverse_check), mode & PATCH_PLAY_REVERSE); if (mode & PATCH_PLAY_TRIM) { gtk_option_menu_set_history(GTK_OPTION_MENU(self->mode_opt), TRIM); } else if (mode & PATCH_PLAY_PINGPONG) { gtk_option_menu_set_history(GTK_OPTION_MENU(self->mode_opt), PINGPONG); } else if (mode & PATCH_PLAY_LOOP) { gtk_option_menu_set_history(GTK_OPTION_MENU(self->mode_opt), LOOP); } else { gtk_option_menu_set_history(GTK_OPTION_MENU(self->mode_opt), SINGLESHOT); } } unblock(self); } specimen-0.5.2-rc3/src/gui/sampletab.h0000644000175000017500000000201710466727727014445 00000000000000#ifndef __SAMPLE_TAB__ #define __SAMPLE_TAB__ #include G_BEGIN_DECLS #define SAMPLE_TAB_TYPE (sample_tab_get_type()) #define SAMPLE_TAB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAMPLE_TAB_TYPE, SampleTab)) #define SAMPLE_TAB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAMPLE_TAB_TYPE, SampleTabClass)) #define IS_SAMPLE_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAMPLE_TAB_TYPE)) #define IS_SAMPLE_TAB_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), SAMPLE_TAB_TYPE)) typedef struct _SampleTabClass SampleTabClass; typedef struct _SampleTab SampleTab; struct _SampleTab { GtkVBox parent; /*< private >*/ int patch; GtkWidget* waveform; GtkWidget* mode_opt; GtkWidget* file_label; GtkWidget* file_button; GtkWidget* reverse_check; }; struct _SampleTabClass { GtkVBoxClass parent_class; /*< private >*/ }; GType sample_tab_get_type(void); GtkWidget* sample_tab_new(void); void sample_tab_set_patch(SampleTab* self, int patch); G_END_DECLS #endif /* __SAMPLE_TAB__ */ specimen-0.5.2-rc3/src/gui/voicetab.c0000644000175000017500000002265210466744417014266 00000000000000#include #include #include "voicetab.h" #include "gui.h" #include "patch.h" static GtkVBoxClass* parent_class; static void voice_tab_class_init(VoiceTabClass* klass); static void voice_tab_init(VoiceTab* self); static void voice_tab_destroy(GtkObject* object); GType voice_tab_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (VoiceTabClass), NULL, NULL, (GClassInitFunc) voice_tab_class_init, NULL, NULL, sizeof (VoiceTab), 0, (GInstanceInitFunc) voice_tab_init, }; type = g_type_register_static(GTK_TYPE_VBOX, "VoiceTab", &info, 0); } return type; } static void voice_tab_class_init(VoiceTabClass* klass) { parent_class = g_type_class_peek_parent(klass); GTK_OBJECT_CLASS(klass)->destroy = voice_tab_destroy; } static void cut_cb(PhatSliderButton* button, VoiceTab* self) { int val; val = phat_slider_button_get_value(button); patch_set_cut(self->patch, val); } static void cutby_cb(PhatSliderButton* button, VoiceTab* self) { int val; val = phat_slider_button_get_value(button); patch_set_cut_by(self->patch, val); } static void porta_cb(GtkToggleButton* button, VoiceTab* self) { patch_set_portamento(self->patch, gtk_toggle_button_get_active(button)); } static void porta_cb2(GtkToggleButton* button, VoiceTab* self) { if (gtk_toggle_button_get_active(button)) { gtk_widget_set_sensitive(self->time_fan, TRUE); } else { gtk_widget_set_sensitive(self->time_fan, FALSE); } } static void time_cb(PhatFanSlider* fan, VoiceTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_portamento_time(self->patch, val); } static void mono_cb(GtkToggleButton* button, VoiceTab* self) { patch_set_monophonic(self->patch, gtk_toggle_button_get_active(button)); } static void mono_cb2(GtkToggleButton* button, VoiceTab* self) { gtk_widget_set_sensitive(self->legato_check, gtk_toggle_button_get_active(button)); } static void legato_cb(GtkToggleButton* button, VoiceTab* self) { patch_set_legato(self->patch, gtk_toggle_button_get_active(button)); } static void connect(VoiceTab* self) { g_signal_connect(G_OBJECT(self->cut_sb), "value-changed", G_CALLBACK(cut_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->cutby_sb), "value-changed", G_CALLBACK(cutby_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->mono_check), "toggled", G_CALLBACK(mono_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->mono_check), "toggled", G_CALLBACK(mono_cb2), (gpointer) self); g_signal_connect(G_OBJECT(self->legato_check), "toggled", G_CALLBACK(legato_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->porta_check), "toggled", G_CALLBACK(porta_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->porta_check), "toggled", G_CALLBACK(porta_cb2), (gpointer) self); g_signal_connect(G_OBJECT(self->time_fan), "value-changed", G_CALLBACK(time_cb), (gpointer) self); } static void block(VoiceTab* self) { g_signal_handlers_block_by_func(self->cut_sb, cut_cb, self); g_signal_handlers_block_by_func(self->cutby_sb, cutby_cb, self); g_signal_handlers_block_by_func(self->mono_check, mono_cb, self); g_signal_handlers_block_by_func(self->legato_check, legato_cb, self); g_signal_handlers_block_by_func(self->porta_check, porta_cb, self); g_signal_handlers_block_by_func(self->time_fan, time_cb, self); /* *_cb2 intentionally omitted */ } static void unblock(VoiceTab* self) { g_signal_handlers_unblock_by_func(self->cut_sb, cut_cb, self); g_signal_handlers_unblock_by_func(self->cutby_sb, cutby_cb, self); g_signal_handlers_unblock_by_func(self->mono_check, mono_cb, self); g_signal_handlers_unblock_by_func(self->legato_check, legato_cb, self); g_signal_handlers_unblock_by_func(self->porta_check, porta_cb, self); g_signal_handlers_unblock_by_func(self->time_fan, time_cb, self); /* *_cb2 intentionally omitted */ } static gboolean refresh(gpointer data) { VoiceTab* self = VOICE_TAB(data); gboolean porta; float time; if (self->patch < 0) return TRUE; porta = patch_get_portamento(self->patch); time = patch_get_portamento_time(self->patch); block(self); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->porta_check), porta); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->time_fan), time); unblock(self); return TRUE; } static void voice_tab_init(VoiceTab* self) { GtkBox* box = GTK_BOX(self); GtkWidget* title; GtkWidget* table; GtkTable* t; GtkWidget* pad; GtkWidget* label; self->patch = -1; gtk_container_set_border_width(GTK_CONTAINER(self), GUI_BORDERSPACE); /* table */ table = gtk_table_new(8, 6, FALSE); t = (GtkTable*) table; gtk_box_pack_start(box, table, FALSE, FALSE, 0); gtk_widget_show(table); /* voice title */ title = gui_title_new("Voice"); gtk_table_attach_defaults(t, title, 0, 6, 0, 1); gtk_widget_show(title); /* indentation */ pad = gui_hpad_new(GUI_INDENT); gtk_table_attach(t, pad, 0, 1, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* voice title padding */ pad = gui_vpad_new(GUI_TITLESPACE); gtk_table_attach(t, pad, 1, 2, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* portamento title padding */ pad = gui_vpad_new(GUI_TITLESPACE); gtk_table_attach(t, pad, 1, 2, 6, 7, 0, 0, 0, 0); gtk_widget_show(pad); /* cut-mono column spacing */ pad = gui_hpad_new(GUI_SECSPACE); gtk_table_attach(t, pad, 4, 5, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* time-fan column spacing */ pad = gui_hpad_new(GUI_TEXTSPACE); gtk_table_attach(t, pad, 2, 3, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* section spacing */ pad = gui_vpad_new(GUI_SECSPACE); gtk_table_attach(t, pad, 0, 1, 4, 5, 0, 0, 0, 0); gtk_widget_show(pad); /* cut sliderbutton */ self->cut_sb = phat_slider_button_new_with_range(0, 0, 99, 1, 0); phat_slider_button_set_format(PHAT_SLIDER_BUTTON(self->cut_sb), 0, "Cut:", NULL); phat_slider_button_set_threshold(PHAT_SLIDER_BUTTON(self->cut_sb), GUI_THRESHOLD); gtk_table_attach_defaults(t, self->cut_sb, 1, 4, 2, 3); gtk_widget_show(self->cut_sb); gtk_table_set_row_spacing(t, 2, GUI_SPACING); /* cutby sliderbutton */ self->cutby_sb = phat_slider_button_new_with_range(0, 0, 99, 1, 0); phat_slider_button_set_format(PHAT_SLIDER_BUTTON(self->cutby_sb), 0, "Cut by:", NULL); phat_slider_button_set_threshold(PHAT_SLIDER_BUTTON(self->cutby_sb), GUI_THRESHOLD); gtk_table_attach_defaults(t, self->cutby_sb, 1, 4, 3, 4); gtk_widget_show(self->cutby_sb); /* mono sliderbutton */ self->mono_check = gtk_check_button_new_with_label("Monophonic"); gtk_table_attach_defaults(t, self->mono_check, 5, 6, 2, 3); gtk_widget_show(self->mono_check); /* legato sliderbutton */ self->legato_check = gtk_check_button_new_with_label("Legato"); gtk_table_attach_defaults(t, self->legato_check, 5, 6, 3, 4); gtk_widget_show(self->legato_check); gtk_widget_set_sensitive(self->legato_check, FALSE); /* portamento checkbox */ title = gui_title_new("Portamento"); self->porta_check = gtk_check_button_new(); gtk_container_add(GTK_CONTAINER(self->porta_check), title); gtk_table_attach_defaults(t, self->porta_check, 0, 6, 5, 6); gtk_widget_show(title); gtk_widget_show(self->porta_check); /* time fan */ label = gtk_label_new("Time:"); self->time_fan = phat_hfan_slider_new_with_range(0.05, 0.0, .25, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 7, 8, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->time_fan, 3, 4, 7, 8); gtk_widget_show(label); gtk_widget_show(self->time_fan); gtk_widget_set_sensitive(self->time_fan, FALSE); /* done */ connect(self); self->refresh = g_timeout_add(GUI_REFRESH_TIMEOUT, refresh, (gpointer) self); } static void voice_tab_destroy(GtkObject* object) { VoiceTab* self = VOICE_TAB(object); GtkObjectClass* klass = GTK_OBJECT_CLASS(parent_class); if (!g_source_remove(self->refresh)) { debug("failed to remove refresh function from idle loop: %u\n", self->refresh); } else { debug("refresh function removed\n"); } if (klass->destroy) klass->destroy(object); } GtkWidget* voice_tab_new(void) { return (GtkWidget*) g_object_new(VOICE_TAB_TYPE, NULL); } void voice_tab_set_patch(VoiceTab* self, int patch) { int cut, cutby; gboolean porta, mono, legato; float time; self->patch = patch; if (patch < 0) return; cut = patch_get_cut(patch); cutby = patch_get_cut_by(patch); porta = patch_get_portamento(patch); mono = patch_get_monophonic(patch); legato = patch_get_legato(patch); time = patch_get_portamento_time(patch); block(self); phat_slider_button_set_value(PHAT_SLIDER_BUTTON(self->cut_sb), cut); phat_slider_button_set_value(PHAT_SLIDER_BUTTON(self->cutby_sb), cutby); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->porta_check), porta); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->mono_check), mono); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->legato_check), legato); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->time_fan), time); unblock(self); } specimen-0.5.2-rc3/src/gui/voicetab.h0000644000175000017500000000203710466727727014273 00000000000000#ifndef __VOICE_TAB__ #define __VOICE_TAB__ #include G_BEGIN_DECLS #define VOICE_TAB_TYPE (voice_tab_get_type()) #define VOICE_TAB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VOICE_TAB_TYPE, VoiceTab)) #define VOICE_TAB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VOICE_TAB_TYPE, VoiceTabClass)) #define IS_VOICE_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VOICE_TAB_TYPE)) #define IS_VOICE_TAB_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), VOICE_TAB_TYPE)) typedef struct _VoiceTabClass VoiceTabClass; typedef struct _VoiceTab VoiceTab; struct _VoiceTab { GtkVBox parent; /*< private >*/ int patch; guint refresh; GtkWidget* cut_sb; GtkWidget* cutby_sb; GtkWidget* time_fan; GtkWidget* mono_check; GtkWidget* legato_check; GtkWidget* porta_check; }; struct _VoiceTabClass { GtkVBoxClass parent_class; /*< private >*/ }; GType voice_tab_get_type(void); GtkWidget* voice_tab_new(void); void voice_tab_set_patch(VoiceTab* self, int patch); G_END_DECLS #endif /* __VOICE_TAB__ */ specimen-0.5.2-rc3/src/gui/filtertab.c0000644000175000017500000001173110466744417014442 00000000000000#include #include #include "filtertab.h" #include "gui.h" #include "patch.h" static GtkVBoxClass* parent_class; static void filter_tab_class_init(FilterTabClass* klass); static void filter_tab_init(FilterTab* self); static void filter_tab_destroy(GtkObject* object); GType filter_tab_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (FilterTabClass), NULL, NULL, (GClassInitFunc) filter_tab_class_init, NULL, NULL, sizeof (FilterTab), 0, (GInstanceInitFunc) filter_tab_init, }; type = g_type_register_static(GTK_TYPE_VBOX, "FilterTab", &info, 0); } return type; } static void filter_tab_class_init(FilterTabClass* klass) { parent_class = g_type_class_peek_parent(klass); GTK_OBJECT_CLASS(klass)->destroy = filter_tab_destroy; } static void freq_cb(PhatFanSlider* fan, FilterTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_cutoff(self->patch, val); } static void reso_cb(PhatFanSlider* fan, FilterTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_resonance(self->patch, val); } static void connect(FilterTab* self) { g_signal_connect(G_OBJECT(self->freq_fan), "value-changed", G_CALLBACK(freq_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->reso_fan), "value-changed", G_CALLBACK(reso_cb), (gpointer) self); } static void block(FilterTab* self) { g_signal_handlers_block_by_func(self->freq_fan, freq_cb, self); g_signal_handlers_block_by_func(self->reso_fan, reso_cb, self); } static void unblock(FilterTab* self) { g_signal_handlers_unblock_by_func(self->freq_fan, freq_cb, self); g_signal_handlers_unblock_by_func(self->reso_fan, reso_cb, self); } static gboolean refresh(gpointer data) { FilterTab* self = FILTER_TAB(data); float cut, res; if (self->patch < 0) return TRUE; cut = patch_get_cutoff(self->patch); res = patch_get_resonance(self->patch); block(self); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->freq_fan), cut); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->reso_fan), res); unblock(self); return TRUE; } static void filter_tab_init(FilterTab* self) { GtkBox* box = GTK_BOX(self); GtkWidget* title; GtkWidget* table; GtkTable* t; GtkWidget* pad; GtkWidget* label; self->patch = -1; gtk_container_set_border_width(GTK_CONTAINER(self), GUI_BORDERSPACE); /* table */ table = gtk_table_new(4, 4, FALSE); t = (GtkTable*) table; gtk_box_pack_start(box, table, FALSE, FALSE, 0); gtk_widget_show(table); /* filter title */ title = gui_title_new("Filter"); gtk_table_attach_defaults(t, title, 0, 4, 0, 1); gtk_widget_show(title); /* indentation */ pad = gui_hpad_new(GUI_INDENT); gtk_table_attach(t, pad, 0, 1, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* filter title padding */ pad = gui_vpad_new(GUI_TITLESPACE); gtk_table_attach(t, pad, 1, 2, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* label-fan column spacing */ pad = gui_hpad_new(GUI_TEXTSPACE); gtk_table_attach(t, pad, 2, 3, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* freq fan */ label = gtk_label_new("Cutoff:"); self->freq_fan = phat_hfan_slider_new_with_range(1.0, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->freq_fan, 3, 4, 2, 3); gtk_widget_show(label); gtk_widget_show(self->freq_fan); /* reso fan */ label = gtk_label_new("Resonance:"); self->reso_fan = phat_hfan_slider_new_with_range(0.0, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 3, 4, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->reso_fan, 3, 4, 3, 4); gtk_widget_show(label); gtk_widget_show(self->reso_fan); /* done */ connect(self); self->refresh = g_timeout_add(GUI_REFRESH_TIMEOUT, refresh, (gpointer) self); } static void filter_tab_destroy(GtkObject* object) { FilterTab* self = FILTER_TAB(object); GtkObjectClass* klass = GTK_OBJECT_CLASS(parent_class); if (!g_source_remove(self->refresh)) { debug("failed to remove refresh function from idle loop: %u\n", self->refresh); } else { debug("refresh function removed\n"); } if (klass->destroy) klass->destroy(object); } GtkWidget* filter_tab_new(void) { return (GtkWidget*) g_object_new(FILTER_TAB_TYPE, NULL); } void filter_tab_set_patch(FilterTab* self, int patch) { float freq, reso; self->patch = patch; if (patch < 0) return; freq = patch_get_cutoff(patch); reso = patch_get_resonance(patch); block(self); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->freq_fan), freq); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->reso_fan), reso); unblock(self); } specimen-0.5.2-rc3/src/gui/filtertab.h0000644000175000017500000000171510466727727014455 00000000000000#ifndef __FILTER_TAB__ #define __FILTER_TAB__ #include G_BEGIN_DECLS #define FILTER_TAB_TYPE (filter_tab_get_type()) #define FILTER_TAB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TAB_TYPE, FilterTab)) #define FILTER_TAB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TAB_TYPE, FilterTabClass)) #define IS_FILTER_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TAB_TYPE)) #define IS_FILTER_TAB_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), FILTER_TAB_TYPE)) typedef struct _FilterTabClass FilterTabClass; typedef struct _FilterTab FilterTab; struct _FilterTab { GtkVBox parent; /*< private >*/ int patch; guint refresh; GtkWidget* freq_fan; GtkWidget* reso_fan; }; struct _FilterTabClass { GtkVBoxClass parent_class; /*< private >*/ }; GType filter_tab_get_type(void); GtkWidget* filter_tab_new(void); void filter_tab_set_patch(FilterTab* self, int patch); G_END_DECLS #endif /* __FILTER_TAB__ */ specimen-0.5.2-rc3/src/gui/velocitytab.c0000644000175000017500000001553210466727727015023 00000000000000#include #include #include "velocitytab.h" #include "gui.h" #include "patch.h" static GtkVBoxClass* parent_class; static void velocity_tab_class_init(VelocityTabClass* klass); static void velocity_tab_init(VelocityTab* self); GType velocity_tab_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (VelocityTabClass), NULL, NULL, (GClassInitFunc) velocity_tab_class_init, NULL, NULL, sizeof (VelocityTab), 0, (GInstanceInitFunc) velocity_tab_init, }; type = g_type_register_static(GTK_TYPE_VBOX, "VelocityTab", &info, 0); } return type; } static void velocity_tab_class_init(VelocityTabClass* klass) { parent_class = g_type_class_peek_parent(klass); } static void vol_cb(PhatFanSlider* fan, VelocityTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_vel_amount(self->patch, PATCH_PARAM_VOLUME, val); } static void pan_cb(PhatFanSlider* fan, VelocityTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_vel_amount(self->patch, PATCH_PARAM_PANNING, val); } static void freq_cb(PhatFanSlider* fan, VelocityTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_vel_amount(self->patch, PATCH_PARAM_CUTOFF, val); } static void reso_cb(PhatFanSlider* fan, VelocityTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_vel_amount(self->patch, PATCH_PARAM_RESONANCE, val); } static void pitch_cb(PhatFanSlider* fan, VelocityTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_vel_amount(self->patch, PATCH_PARAM_PITCH, val); } static void connect(VelocityTab* self) { g_signal_connect(G_OBJECT(self->vol_fan), "value-changed", G_CALLBACK(vol_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->pan_fan), "value-changed", G_CALLBACK(pan_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->freq_fan), "value-changed", G_CALLBACK(freq_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->reso_fan), "value-changed", G_CALLBACK(reso_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->pitch_fan), "value-changed", G_CALLBACK(pitch_cb), (gpointer) self); } static void block(VelocityTab* self) { g_signal_handlers_block_by_func(self->vol_fan, vol_cb, self); g_signal_handlers_block_by_func(self->pan_fan, pan_cb, self); g_signal_handlers_block_by_func(self->freq_fan, freq_cb, self); g_signal_handlers_block_by_func(self->reso_fan, reso_cb, self); g_signal_handlers_block_by_func(self->pitch_fan, pitch_cb, self); } static void unblock(VelocityTab* self) { g_signal_handlers_unblock_by_func(self->vol_fan, vol_cb, self); g_signal_handlers_unblock_by_func(self->pan_fan, pan_cb, self); g_signal_handlers_unblock_by_func(self->freq_fan, freq_cb, self); g_signal_handlers_unblock_by_func(self->reso_fan, reso_cb, self); g_signal_handlers_unblock_by_func(self->pitch_fan, pitch_cb, self); } static void velocity_tab_init(VelocityTab* self) { GtkBox* box = GTK_BOX(self); GtkWidget* title; GtkWidget* table; GtkTable* t; GtkWidget* pad; GtkWidget* label; self->patch = -1; gtk_container_set_border_width(GTK_CONTAINER(self), GUI_BORDERSPACE); /* table */ table = gtk_table_new(7, 4, FALSE); t = (GtkTable*) table; gtk_box_pack_start(box, table, FALSE, FALSE, 0); gtk_widget_show(table); /* title */ title = gui_title_new("Velocity Sensitivity"); gtk_table_attach_defaults(t, title, 0, 4, 0, 1); gtk_widget_show(title); /* indentation */ pad = gui_hpad_new(GUI_INDENT); gtk_table_attach(t, pad, 0, 1, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* title padding */ pad = gui_vpad_new(GUI_TITLESPACE); gtk_table_attach(t, pad, 1, 2, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* label-fan column spacing */ pad = gui_hpad_new(GUI_TEXTSPACE); gtk_table_attach(t, pad, 2, 3, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* vol fan */ label = gtk_label_new("Volume:"); self->vol_fan = phat_hfan_slider_new_with_range(1.0, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->vol_fan, 3, 4, 2, 3); gtk_widget_show(label); gtk_widget_show(self->vol_fan); /* pan fan */ label = gtk_label_new("Panning:"); self->pan_fan = phat_hfan_slider_new_with_range(0.0, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 3, 4, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->pan_fan, 3, 4, 3, 4); gtk_widget_show(label); gtk_widget_show(self->pan_fan); /* freq fan */ label = gtk_label_new("Cutoff:"); self->freq_fan = phat_hfan_slider_new_with_range(0.0, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 4, 5, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->freq_fan, 3, 4, 4, 5); gtk_widget_show(label); gtk_widget_show(self->freq_fan); /* reso fan */ label = gtk_label_new("Resonance:"); self->reso_fan = phat_hfan_slider_new_with_range(0.0, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 5, 6, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->reso_fan, 3, 4, 5, 6); gtk_widget_show(label); gtk_widget_show(self->reso_fan); /* pitch fan */ label = gtk_label_new("Pitch:"); self->pitch_fan = phat_hfan_slider_new_with_range(0.0, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 6, 7, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->pitch_fan, 3, 4, 6, 7); gtk_widget_show(label); gtk_widget_show(self->pitch_fan); connect(self); } GtkWidget* velocity_tab_new(void) { return (GtkWidget*) g_object_new(VELOCITY_TAB_TYPE, NULL); } void velocity_tab_set_patch(VelocityTab* self, int patch) { float vol, pan, freq, reso, pitch; self->patch = patch; if (patch < 0) return; patch_get_vel_amount(patch, PATCH_PARAM_VOLUME, &vol); patch_get_vel_amount(patch, PATCH_PARAM_PANNING, &pan); patch_get_vel_amount(patch, PATCH_PARAM_CUTOFF, &freq); patch_get_vel_amount(patch, PATCH_PARAM_RESONANCE, &reso); patch_get_vel_amount(patch, PATCH_PARAM_PITCH, &pitch); block(self); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->vol_fan), vol); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->pan_fan), pan); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->freq_fan), freq); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->reso_fan), reso); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->pitch_fan), pitch); unblock(self); } specimen-0.5.2-rc3/src/gui/velocitytab.h0000644000175000017500000000206610466727727015026 00000000000000#ifndef __VELOCITY_TAB__ #define __VELOCITY_TAB__ #include G_BEGIN_DECLS #define VELOCITY_TAB_TYPE (velocity_tab_get_type()) #define VELOCITY_TAB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VELOCITY_TAB_TYPE, VelocityTab)) #define VELOCITY_TAB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VELOCITY_TAB_TYPE, VelocityTabClass)) #define IS_VELOCITY_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VELOCITY_TAB_TYPE)) #define IS_VELOCITY_TAB_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), VELOCITY_TAB_TYPE)) typedef struct _VelocityTabClass VelocityTabClass; typedef struct _VelocityTab VelocityTab; struct _VelocityTab { GtkVBox parent; /*< private >*/ int patch; GtkWidget* vol_fan; GtkWidget* pan_fan; GtkWidget* freq_fan; GtkWidget* reso_fan; GtkWidget* pitch_fan; }; struct _VelocityTabClass { GtkVBoxClass parent_class; /*< private >*/ }; GType velocity_tab_get_type(void); GtkWidget* velocity_tab_new(void); void velocity_tab_set_patch(VelocityTab* self, int patch); G_END_DECLS #endif /* __VELOCITY_TAB__ */ specimen-0.5.2-rc3/src/gui/envelopetab.c0000644000175000017500000003114310466744417014771 00000000000000#include #include #include "envelopetab.h" #include "gui.h" #include "paramselector.h" #include "patch.h" enum { MAXSTEPS = PATCH_MAX_PITCH_STEPS, }; static GtkVBoxClass* parent_class; static void envelope_tab_class_init(EnvelopeTabClass* klass); static void envelope_tab_init(EnvelopeTab* self); static void update_env(EnvelopeTab* self); GType envelope_tab_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (EnvelopeTabClass), NULL, NULL, (GClassInitFunc) envelope_tab_class_init, NULL, NULL, sizeof (EnvelopeTab), 0, (GInstanceInitFunc) envelope_tab_init, }; type = g_type_register_static(GTK_TYPE_VBOX, "EnvelopeTab", &info, 0); } return type; } static void envelope_tab_class_init(EnvelopeTabClass* klass) { parent_class = g_type_class_peek_parent(klass); } static void set_sensitive(EnvelopeTab* self, gboolean val) { gtk_widget_set_sensitive(self->delay_fan, val); gtk_widget_set_sensitive(self->attack_fan, val); gtk_widget_set_sensitive(self->hold_fan, val); gtk_widget_set_sensitive(self->decay_fan, val); gtk_widget_set_sensitive(self->sustain_fan, val); gtk_widget_set_sensitive(self->release_fan, val); gtk_widget_set_sensitive(self->pitch_sb, val); gtk_widget_set_sensitive(self->amount_fan, val && !(param_selector_get( PARAM_SELECTOR(self->paramsel)) == PATCH_PARAM_VOLUME)); } static void param_cb(ParamSelector* paramsel, EnvelopeTab* self) { update_env(self); if (param_selector_get(paramsel) == PATCH_PARAM_PITCH) { gtk_widget_hide(self->amount_fan); gtk_widget_show(self->pitch_sb); } else { gtk_widget_hide(self->pitch_sb); gtk_widget_show(self->amount_fan); } set_sensitive(self, gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(self->env_check))); } static void on_cb(GtkToggleButton* button, EnvelopeTab* self) { patch_set_env_on(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), gtk_toggle_button_get_active(button)); } static void on_cb2(GtkToggleButton* button, EnvelopeTab* self) { set_sensitive(self, gtk_toggle_button_get_active(button)); } static void delay_cb(PhatFanSlider* fan, EnvelopeTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_env_delay(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void attack_cb(PhatFanSlider* fan, EnvelopeTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_env_attack(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void hold_cb(PhatFanSlider* fan, EnvelopeTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_env_hold(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void decay_cb(PhatFanSlider* fan, EnvelopeTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_env_decay(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void sustain_cb(PhatFanSlider* fan, EnvelopeTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_env_sustain(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void release_cb(PhatFanSlider* fan, EnvelopeTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_env_release(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void amount_cb(PhatFanSlider* fan, EnvelopeTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_env_amount(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void pitch_cb(PhatSliderButton* button, EnvelopeTab* self) { float val; val = phat_slider_button_get_value(button); patch_set_env_amount(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val / MAXSTEPS); } static void connect(EnvelopeTab* self) { g_signal_connect(G_OBJECT(self->paramsel), "changed", G_CALLBACK(param_cb), (gpointer)self); g_signal_connect(G_OBJECT(self->env_check), "toggled", G_CALLBACK(on_cb), (gpointer)self); g_signal_connect(G_OBJECT(self->env_check), "toggled", G_CALLBACK(on_cb2), (gpointer)self); g_signal_connect(G_OBJECT(self->delay_fan), "value-changed", G_CALLBACK(delay_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->attack_fan), "value-changed", G_CALLBACK(attack_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->hold_fan), "value-changed", G_CALLBACK(hold_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->decay_fan), "value-changed", G_CALLBACK(decay_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->sustain_fan), "value-changed", G_CALLBACK(sustain_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->release_fan), "value-changed", G_CALLBACK(release_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->amount_fan), "value-changed", G_CALLBACK(amount_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->pitch_sb), "value-changed", G_CALLBACK(pitch_cb), (gpointer) self); } static void block(EnvelopeTab* self) { g_signal_handlers_block_by_func(self->env_check, on_cb, self); g_signal_handlers_block_by_func(self->delay_fan, delay_cb, self); g_signal_handlers_block_by_func(self->attack_fan, attack_cb, self); g_signal_handlers_block_by_func(self->hold_fan, hold_cb, self); g_signal_handlers_block_by_func(self->decay_fan, decay_cb, self); g_signal_handlers_block_by_func(self->sustain_fan, sustain_cb, self); g_signal_handlers_block_by_func(self->release_fan, release_cb, self); g_signal_handlers_block_by_func(self->amount_fan, amount_cb, self); g_signal_handlers_block_by_func(self->pitch_sb, pitch_cb, self); } static void unblock(EnvelopeTab* self) { g_signal_handlers_unblock_by_func(self->env_check, on_cb, self); g_signal_handlers_unblock_by_func(self->delay_fan, delay_cb, self); g_signal_handlers_unblock_by_func(self->attack_fan, attack_cb, self); g_signal_handlers_unblock_by_func(self->hold_fan, hold_cb, self); g_signal_handlers_unblock_by_func(self->decay_fan, decay_cb, self); g_signal_handlers_unblock_by_func(self->sustain_fan, sustain_cb, self); g_signal_handlers_unblock_by_func(self->release_fan, release_cb, self); g_signal_handlers_unblock_by_func(self->amount_fan, amount_cb, self); g_signal_handlers_unblock_by_func(self->pitch_sb, pitch_cb, self); } static void envelope_tab_init(EnvelopeTab* self) { GtkBox* box = GTK_BOX(self); GtkWidget* title; GtkWidget* table; GtkTable* t; GtkWidget* pad; GtkWidget* label; self->patch = -1; gtk_container_set_border_width(GTK_CONTAINER(self), GUI_BORDERSPACE); /* parameter selector */ self->paramsel = param_selector_new(); gtk_box_pack_start(box, self->paramsel, FALSE, FALSE, 0); gtk_widget_show(self->paramsel); /* selector padding */ pad = gui_vpad_new(GUI_SPACING); gtk_box_pack_start(box, pad, FALSE, FALSE, 0); gtk_widget_show(pad); /* table */ table = gtk_table_new(9, 4, FALSE); t = (GtkTable*) table; gtk_box_pack_start(box, table, FALSE, FALSE, 0); gtk_widget_show(table); /* envelope title */ title = gui_title_new("Envelope"); self->env_check = gtk_check_button_new(); gtk_container_add(GTK_CONTAINER(self->env_check), title); gtk_table_attach_defaults(t, self->env_check, 0, 4, 0, 1); gtk_widget_show(title); gtk_widget_show(self->env_check); /* indentation */ pad = gui_hpad_new(GUI_INDENT); gtk_table_attach(t, pad, 0, 1, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* envelope title padding */ pad = gui_vpad_new(GUI_TITLESPACE); gtk_table_attach(t, pad, 1, 2, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* label-fan column spacing */ pad = gui_hpad_new(GUI_TEXTSPACE); gtk_table_attach(t, pad, 2, 3, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* delay fan */ label = gtk_label_new("Delay:"); self->delay_fan = phat_hfan_slider_new_with_range(0.1, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->delay_fan, 3, 4, 2, 3); gtk_widget_show(label); gtk_widget_show(self->delay_fan); /* attack fan */ label = gtk_label_new("Attack:"); self->attack_fan = phat_hfan_slider_new_with_range(0.1, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 3, 4, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->attack_fan, 3, 4, 3, 4); gtk_widget_show(label); gtk_widget_show(self->attack_fan); /* hold fan */ label = gtk_label_new("Hold:"); self->hold_fan = phat_hfan_slider_new_with_range(0.1, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 4, 5, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->hold_fan, 3, 4, 4, 5); gtk_widget_show(label); gtk_widget_show(self->hold_fan); /* decay fan */ label = gtk_label_new("Decay:"); self->decay_fan = phat_hfan_slider_new_with_range(0.1, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 5, 6, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->decay_fan, 3, 4, 5, 6); gtk_widget_show(label); gtk_widget_show(self->decay_fan); /* sustain fan */ label = gtk_label_new("Sustain:"); self->sustain_fan = phat_hfan_slider_new_with_range(0.7, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 6, 7, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->sustain_fan, 3, 4, 6, 7); gtk_widget_show(label); gtk_widget_show(self->sustain_fan); /* release fan */ label = gtk_label_new("Release:"); self->release_fan = phat_hfan_slider_new_with_range(0.1, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 7, 8, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->release_fan, 3, 4, 7, 8); gtk_widget_show(label); gtk_widget_show(self->release_fan); gtk_table_set_row_spacing(t, 7, GUI_SPACING); /* amount fan */ label = gtk_label_new("Amount:"); self->amount_fan = phat_hfan_slider_new_with_range(1.0, -1.0, 1.0, 0.01); self->pitch_sb = phat_slider_button_new_with_range(12, -MAXSTEPS, MAXSTEPS, 0.1, 1); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); phat_slider_button_set_format(PHAT_SLIDER_BUTTON(self->pitch_sb), -1, NULL, "Semitones"); phat_slider_button_set_threshold(PHAT_SLIDER_BUTTON(self->pitch_sb), GUI_THRESHOLD); gtk_table_attach(t, label, 1, 2, 8, 9, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->amount_fan, 3, 4, 8, 9); gtk_table_attach_defaults(t, self->pitch_sb, 3, 4, 8, 9); gtk_widget_show(label); gtk_widget_show(self->amount_fan); set_sensitive(self, FALSE); connect(self); } static void update_env(EnvelopeTab* self) { PatchParamType p; int i = self->patch; float l, a, h, d, s, r, m; gboolean on; p = param_selector_get(PARAM_SELECTOR(self->paramsel)); patch_get_env_delay(i, p, &l); patch_get_env_attack(i, p, &a); patch_get_env_hold(i, p, &h); patch_get_env_decay(i, p, &d); patch_get_env_sustain(i, p, &s); patch_get_env_release(i, p, &r); patch_get_env_amount(i, p, &m); patch_get_env_on(i, p, &on); block(self); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->delay_fan), l); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->attack_fan), a); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->hold_fan), h); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->decay_fan), d); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->sustain_fan), s); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->release_fan), r); phat_slider_button_set_value(PHAT_SLIDER_BUTTON(self->pitch_sb), m * MAXSTEPS); if (p == PATCH_PARAM_VOLUME) { phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->amount_fan), 1); } else { phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->amount_fan), m); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->env_check), on); unblock(self); } GtkWidget* envelope_tab_new(void) { return (GtkWidget*) g_object_new(ENVELOPE_TAB_TYPE, NULL); } void envelope_tab_set_patch(EnvelopeTab* self, int patch) { self->patch = patch; if (patch < 0) return; update_env(self); } specimen-0.5.2-rc3/src/gui/envelopetab.h0000644000175000017500000000230110466727727014775 00000000000000#ifndef __ENVELOPE_TAB__ #define __ENVELOPE_TAB__ #include G_BEGIN_DECLS #define ENVELOPE_TAB_TYPE (envelope_tab_get_type()) #define ENVELOPE_TAB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ENVELOPE_TAB_TYPE, EnvelopeTab)) #define ENVELOPE_TAB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ENVELOPE_TAB_TYPE, EnvelopeTabClass)) #define IS_ENVELOPE_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ENVELOPE_TAB_TYPE)) #define IS_ENVELOPE_TAB_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), ENVELOPE_TAB_TYPE)) typedef struct _EnvelopeTabClass EnvelopeTabClass; typedef struct _EnvelopeTab EnvelopeTab; struct _EnvelopeTab { GtkVBox parent; /*< private >*/ int patch; GtkWidget* paramsel; GtkWidget* env_check; GtkWidget* delay_fan; GtkWidget* attack_fan; GtkWidget* hold_fan; GtkWidget* decay_fan; GtkWidget* sustain_fan; GtkWidget* release_fan; GtkWidget* amount_fan; GtkWidget* pitch_sb; }; struct _EnvelopeTabClass { GtkVBoxClass parent_class; /*< private >*/ }; GType envelope_tab_get_type(void); GtkWidget* envelope_tab_new(void); void envelope_tab_set_patch(EnvelopeTab* self, int patch); G_END_DECLS #endif /* __ENVELOPE_TAB__ */ specimen-0.5.2-rc3/src/gui/lfotab.c0000644000175000017500000004032110466744417013732 00000000000000#include #include #include "lfotab.h" #include "gui.h" #include "paramselector.h" #include "lfo.h" #include "patch.h" /* must match order of items in menu */ enum { SINE, TRIANGLE, SAW, SQUARE, }; enum { MAXSTEPS = PATCH_MAX_PITCH_STEPS, }; static GtkVBoxClass* parent_class; static void lfo_tab_class_init(LfoTabClass* klass); static void lfo_tab_init(LfoTab* self); static void update_lfo(LfoTab* self); GType lfo_tab_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (LfoTabClass), NULL, NULL, (GClassInitFunc) lfo_tab_class_init, NULL, NULL, sizeof (LfoTab), 0, (GInstanceInitFunc) lfo_tab_init, }; type = g_type_register_static(GTK_TYPE_VBOX, "LfoTab", &info, 0); } return type; } static void lfo_tab_class_init(LfoTabClass* klass) { parent_class = g_type_class_peek_parent(klass); } static void set_sensitive(LfoTab* self, gboolean val) { gboolean active; gtk_widget_set_sensitive(self->shape_opt, val); gtk_widget_set_sensitive(self->free_radio, val); gtk_widget_set_sensitive(self->sync_radio, val); gtk_widget_set_sensitive(self->beats_sb, val); gtk_widget_set_sensitive(self->global_check, val); gtk_widget_set_sensitive(self->pos_check, val); gtk_widget_set_sensitive(self->delay_fan, val); gtk_widget_set_sensitive(self->attack_fan, val); gtk_widget_set_sensitive(self->amount_fan, val); gtk_widget_set_sensitive(self->pitch_sb, val); active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->sync_radio)); gtk_widget_set_sensitive(self->speed_fan, !active && val); gtk_widget_set_sensitive(self->beats_sb, active && val); } static void param_cb(ParamSelector* paramsel, LfoTab* self) { update_lfo(self); if (param_selector_get(paramsel) == PATCH_PARAM_PITCH) { gtk_widget_hide(self->amount_fan); gtk_widget_show(self->pitch_sb); } else { gtk_widget_hide(self->pitch_sb); gtk_widget_show(self->amount_fan); } } static void on_cb(GtkToggleButton* button, LfoTab* self) { patch_set_lfo_on(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), gtk_toggle_button_get_active(button)); } static void on_cb2(GtkToggleButton* button, LfoTab* self) { set_sensitive(self, gtk_toggle_button_get_active(button)); } static void shape_cb(GtkOptionMenu* opt, LfoTab* self) { int val; LFOShape shape; val = gtk_option_menu_get_history(opt); switch(val) { case TRIANGLE: shape = LFO_SHAPE_TRIANGLE; break; case SAW: shape = LFO_SHAPE_SAW; break; case SQUARE: shape = LFO_SHAPE_SQUARE; break; default: shape = LFO_SHAPE_SINE; break; } patch_set_lfo_shape(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), shape); } static void sync_cb(GtkToggleButton* button, LfoTab* self) { patch_set_lfo_sync(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), gtk_toggle_button_get_active(button)); } static void sync_cb2(GtkToggleButton* button, LfoTab* self) { set_sensitive(self, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->lfo_check))); } static void speed_cb(PhatFanSlider* fan, LfoTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_lfo_freq(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void beats_cb(PhatSliderButton* button, LfoTab* self) { float val; val = phat_slider_button_get_value(button); patch_set_lfo_beats(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void global_cb(GtkToggleButton* button, LfoTab* self) { patch_set_lfo_global(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), gtk_toggle_button_get_active(button)); } static void positive_cb(GtkToggleButton* button, LfoTab* self) { patch_set_lfo_positive(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), gtk_toggle_button_get_active(button)); } static void delay_cb(PhatFanSlider* fan, LfoTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_lfo_delay(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void attack_cb(PhatFanSlider* fan, LfoTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_lfo_attack(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void amount_cb(PhatFanSlider* fan, LfoTab* self) { float val; val = phat_fan_slider_get_value(fan); patch_set_lfo_amount(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val); } static void pitch_cb(PhatSliderButton* button, LfoTab* self) { float val; val = phat_slider_button_get_value(button); patch_set_lfo_amount(self->patch, param_selector_get(PARAM_SELECTOR(self->paramsel)), val / MAXSTEPS); } static void connect(LfoTab* self) { g_signal_connect(G_OBJECT(self->paramsel), "changed", G_CALLBACK(param_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->lfo_check), "toggled", G_CALLBACK(on_cb), (gpointer)self); g_signal_connect(G_OBJECT(self->lfo_check), "toggled", G_CALLBACK(on_cb2), (gpointer)self); g_signal_connect(G_OBJECT(self->shape_opt), "changed", G_CALLBACK(shape_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->speed_fan), "value-changed", G_CALLBACK(speed_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->sync_radio), "toggled", G_CALLBACK(sync_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->sync_radio), "toggled", G_CALLBACK(sync_cb2), (gpointer) self); g_signal_connect(G_OBJECT(self->global_check), "toggled", G_CALLBACK(global_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->pos_check), "toggled", G_CALLBACK(positive_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->beats_sb), "value-changed", G_CALLBACK(beats_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->delay_fan), "value-changed", G_CALLBACK(delay_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->attack_fan), "value-changed", G_CALLBACK(attack_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->amount_fan), "value-changed", G_CALLBACK(amount_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->pitch_sb), "value-changed", G_CALLBACK(pitch_cb), (gpointer) self); } static void block(LfoTab* self) { g_signal_handlers_block_by_func(self->lfo_check, on_cb, self); g_signal_handlers_block_by_func(self->shape_opt, shape_cb, self); g_signal_handlers_block_by_func(self->speed_fan, speed_cb, self); g_signal_handlers_block_by_func(self->sync_radio, sync_cb, self); g_signal_handlers_block_by_func(self->global_check, global_cb, self); g_signal_handlers_block_by_func(self->pos_check, positive_cb, self); g_signal_handlers_block_by_func(self->beats_sb, beats_cb, self); g_signal_handlers_block_by_func(self->delay_fan, delay_cb, self); g_signal_handlers_block_by_func(self->attack_fan, attack_cb, self); g_signal_handlers_block_by_func(self->amount_fan, amount_cb, self); g_signal_handlers_block_by_func(self->pitch_sb, pitch_cb, self); } static void unblock(LfoTab* self) { g_signal_handlers_unblock_by_func(self->lfo_check, on_cb, self); g_signal_handlers_unblock_by_func(self->shape_opt, shape_cb, self); g_signal_handlers_unblock_by_func(self->speed_fan, speed_cb, self); g_signal_handlers_unblock_by_func(self->sync_radio, sync_cb, self); g_signal_handlers_unblock_by_func(self->global_check, global_cb, self); g_signal_handlers_unblock_by_func(self->pos_check, positive_cb, self); g_signal_handlers_unblock_by_func(self->beats_sb, beats_cb, self); g_signal_handlers_unblock_by_func(self->delay_fan, delay_cb, self); g_signal_handlers_unblock_by_func(self->attack_fan, attack_cb, self); g_signal_handlers_unblock_by_func(self->amount_fan, amount_cb, self); g_signal_handlers_unblock_by_func(self->pitch_sb, pitch_cb, self); } inline static GtkWidget* shape_opt_new(LfoTab* self) { GtkWidget* menu; GtkWidget* opt; GtkWidget* item; /* lfo menu */ menu = gtk_menu_new(); item = gtk_menu_item_new_with_label("Sine"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); item = gtk_menu_item_new_with_label("Triangle"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); item = gtk_menu_item_new_with_label("Saw"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); item = gtk_menu_item_new_with_label("Square"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); /* lfo option menu */ opt = gtk_option_menu_new(); gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); return opt; } static void lfo_tab_init(LfoTab* self) { GtkBox* box = GTK_BOX(self); GtkWidget* title; GtkWidget* table; GtkTable* t; GtkWidget* pad; GtkWidget* label; self->patch = -1; gtk_container_set_border_width(GTK_CONTAINER(self), GUI_BORDERSPACE); /* parameter selector */ self->paramsel = param_selector_new(); gtk_box_pack_start(box, self->paramsel, FALSE, FALSE, 0); gtk_widget_show(self->paramsel); /* selector padding */ pad = gui_vpad_new(GUI_SPACING); gtk_box_pack_start(box, pad, FALSE, FALSE, 0); gtk_widget_show(pad); /* table */ table = gtk_table_new(10, 5, FALSE); t = (GtkTable*) table; gtk_box_pack_start(box, table, FALSE, FALSE, 0); gtk_widget_show(table); /* lfo title */ title = gui_title_new("LFO"); self->lfo_check = gtk_check_button_new(); gtk_container_add(GTK_CONTAINER(self->lfo_check), title); gtk_table_attach_defaults(t, self->lfo_check, 0, 5, 0, 1); gtk_widget_show(title); gtk_widget_show(self->lfo_check); /* indentation */ pad = gui_hpad_new(GUI_INDENT); gtk_table_attach(t, pad, 0, 1, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* lfo title padding */ pad = gui_vpad_new(GUI_TITLESPACE); gtk_table_attach(t, pad, 1, 2, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* label-fan column spacing */ pad = gui_hpad_new(GUI_TEXTSPACE); gtk_table_attach(t, pad, 2, 3, 1, 2, 0, 0, 0, 0); gtk_widget_show(pad); /* shape */ label = gtk_label_new("Shape:"); self->shape_opt = shape_opt_new(self); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->shape_opt, 3, 5, 2, 3); gtk_widget_show(label); gtk_widget_show(self->shape_opt); gtk_table_set_row_spacing(t, 2, GUI_SPACING); /* speed */ label = gtk_label_new("Speed:"); self->free_radio = gtk_radio_button_new(NULL); self->speed_fan = phat_hfan_slider_new_with_range(5.0, 0.0, 20.0, 0.1); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 3, 4, GTK_FILL, 0, 0, 0); gtk_table_attach(t, self->free_radio, 2, 3, 3, 4, 0, 0, 0, 0); gtk_table_attach_defaults(t, self->speed_fan, 3, 5, 3, 4); gtk_widget_show(label); gtk_widget_show(self->free_radio); gtk_widget_show(self->speed_fan); /* sync */ self->sync_radio = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(self->free_radio)); self->beats_sb = phat_slider_button_new_with_range(1.0, .25, 32.0, .25, 2); phat_slider_button_set_format(PHAT_SLIDER_BUTTON(self->beats_sb), -1, NULL, "Beats"); phat_slider_button_set_threshold(PHAT_SLIDER_BUTTON(self->beats_sb), GUI_THRESHOLD); gtk_table_attach(t, self->sync_radio, 2, 3, 4, 5, 0, 0, 0, 0); gtk_table_attach_defaults(t, self->beats_sb, 3, 5, 4, 5); gtk_widget_show(self->sync_radio); gtk_widget_show(self->beats_sb); gtk_widget_set_sensitive(self->beats_sb, FALSE); gtk_table_set_row_spacing(t, 4, GUI_SPACING); /* delay fan */ label = gtk_label_new("Delay:"); self->delay_fan = phat_hfan_slider_new_with_range(0.1, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 7, 8, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->delay_fan, 3, 4, 7, 8); gtk_widget_show(label); gtk_widget_show(self->delay_fan); gtk_table_set_col_spacing(t, 3, GUI_SPACING*2); /* global */ self->global_check = gtk_check_button_new_with_label("Global"); gtk_table_attach(t, self->global_check, 4, 5, 7, 8, GTK_FILL, 0, 0, 0); gtk_widget_show(self->global_check); /* attack fan */ label = gtk_label_new("Attack:"); self->attack_fan = phat_hfan_slider_new_with_range(0.1, 0.0, 1.0, 0.01); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_table_attach(t, label, 1, 2, 8, 9, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->attack_fan, 3, 4, 8, 9); gtk_widget_show(label); gtk_widget_show(self->attack_fan); /* positive */ self->pos_check = gtk_check_button_new_with_label("Positive"); gtk_table_attach(t, self->pos_check, 4, 5, 8, 9, GTK_FILL, 0, 0, 0); gtk_widget_show(self->pos_check); gtk_table_set_row_spacing(t, 8, GUI_SPACING); /* amount */ label = gtk_label_new("Amount:"); self->amount_fan = phat_hfan_slider_new_with_range(1.0, -1.0, 1.0, 0.01); self->pitch_sb = phat_slider_button_new_with_range(12, -MAXSTEPS, MAXSTEPS, 0.1, 1); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); phat_slider_button_set_format(PHAT_SLIDER_BUTTON(self->pitch_sb), -1, NULL, "Semitones"); phat_slider_button_set_threshold(PHAT_SLIDER_BUTTON(self->pitch_sb), GUI_THRESHOLD); gtk_table_attach(t, label, 1, 2, 9, 10, GTK_FILL, 0, 0, 0); gtk_table_attach_defaults(t, self->amount_fan, 3, 5, 9, 10); gtk_table_attach_defaults(t, self->pitch_sb, 3, 5, 9, 10); gtk_widget_show(label); gtk_widget_show(self->amount_fan); set_sensitive(self, FALSE); connect(self); } static void update_lfo(LfoTab* self) { PatchParamType param; LFOShape shape; float speed, beats, delay, attack, amount; gboolean sync, global, positive; gboolean on; param = param_selector_get(PARAM_SELECTOR(self->paramsel)); patch_get_lfo_shape(self->patch, param, &shape); patch_get_lfo_freq(self->patch, param, &speed); patch_get_lfo_beats(self->patch, param, &beats); patch_get_lfo_delay(self->patch, param, &delay); patch_get_lfo_attack(self->patch, param, &attack); patch_get_lfo_amount(self->patch, param, &amount); patch_get_lfo_sync(self->patch, param, &sync); patch_get_lfo_global(self->patch, param, &global); patch_get_lfo_positive(self->patch, param, &positive); patch_get_lfo_on(self->patch, param, &on); block(self); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->speed_fan), speed); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->delay_fan), delay); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->attack_fan), attack); phat_fan_slider_set_value(PHAT_FAN_SLIDER(self->amount_fan), amount); phat_slider_button_set_value(PHAT_SLIDER_BUTTON(self->beats_sb), beats); phat_slider_button_set_value(PHAT_SLIDER_BUTTON(self->pitch_sb), amount * MAXSTEPS); if (sync) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->sync_radio), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->free_radio), TRUE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->global_check), global); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->pos_check), positive); switch (shape) { case LFO_SHAPE_TRIANGLE: gtk_option_menu_set_history(GTK_OPTION_MENU(self->shape_opt), TRIANGLE); break; case LFO_SHAPE_SAW: gtk_option_menu_set_history(GTK_OPTION_MENU(self->shape_opt), SAW); break; case LFO_SHAPE_SQUARE: gtk_option_menu_set_history(GTK_OPTION_MENU(self->shape_opt), SQUARE); break; default: gtk_option_menu_set_history(GTK_OPTION_MENU(self->shape_opt), SINE); break; } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->lfo_check), on); unblock(self); } GtkWidget* lfo_tab_new(void) { return (GtkWidget*) g_object_new(LFO_TAB_TYPE, NULL); } void lfo_tab_set_patch(LfoTab* self, int patch) { self->patch = patch; if (patch < 0) return; update_lfo(self); } specimen-0.5.2-rc3/src/gui/lfotab.h0000644000175000017500000000222310466727727013743 00000000000000#ifndef __LFO_TAB__ #define __LFO_TAB__ #include G_BEGIN_DECLS #define LFO_TAB_TYPE (lfo_tab_get_type()) #define LFO_TAB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LFO_TAB_TYPE, LfoTab)) #define LFO_TAB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LFO_TAB_TYPE, LfoTabClass)) #define IS_LFO_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LFO_TAB_TYPE)) #define IS_LFO_TAB_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LFO_TAB_TYPE)) typedef struct _LfoTabClass LfoTabClass; typedef struct _LfoTab LfoTab; struct _LfoTab { GtkVBox parent; /*< private >*/ int patch; GtkWidget* paramsel; GtkWidget* shape_opt; GtkWidget* lfo_check; GtkWidget* free_radio; GtkWidget* sync_radio; GtkWidget* beats_sb; GtkWidget* global_check; GtkWidget* pos_check; GtkWidget* speed_fan; GtkWidget* delay_fan; GtkWidget* attack_fan; GtkWidget* amount_fan; GtkWidget* pitch_sb; }; struct _LfoTabClass { GtkVBoxClass parent_class; /*< private >*/ }; GType lfo_tab_get_type(void); GtkWidget* lfo_tab_new(void); void lfo_tab_set_patch(LfoTab* self, int patch); G_END_DECLS #endif /* __LFO_TAB__ */ specimen-0.5.2-rc3/src/gui/paramselector.c0000644000175000017500000001006410466727727015332 00000000000000#include #include #include "paramselector.h" #include "specimen.h" #include "patch.h" enum { CHANGED, LAST_SIGNAL, }; static int signals[LAST_SIGNAL]; static GtkHBoxClass* parent_class; static void param_selector_class_init(ParamSelectorClass* klass); static void param_selector_init(ParamSelector* self); GType param_selector_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (ParamSelectorClass), NULL, NULL, (GClassInitFunc) param_selector_class_init, NULL, NULL, sizeof (ParamSelector), 0, (GInstanceInitFunc) param_selector_init, }; type = g_type_register_static(GTK_TYPE_HBOX, "ParamSelector", &info, 0); } return type; } static void param_selector_class_init(ParamSelectorClass* klass) { parent_class = g_type_class_peek_parent(klass); signals[CHANGED] = g_signal_new ("changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (ParamSelectorClass, changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); klass->changed = NULL; } static gboolean press_cb(GtkToggleButton* button, GdkEvent* event, ParamSelector* self) { gboolean toggle = FALSE; switch (event->type) { case GDK_KEY_PRESS: if (event->key.keyval == GDK_Return || event->key.keyval == GDK_KP_Enter || event->key.keyval == GDK_space) toggle = TRUE; break; case GDK_BUTTON_PRESS: if (event->button.button == 1) toggle = TRUE; break; default: break; } if (!toggle) return FALSE; if (gtk_toggle_button_get_active(button)) return TRUE; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->current), FALSE); self->current = GTK_WIDGET(button); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->current), TRUE); g_signal_emit_by_name(G_OBJECT(self), "changed"); return TRUE; } static gboolean enter_cb(GtkWidget* button, GdkEvent* event, ParamSelector* self) { if (self->current == button) return TRUE; return FALSE; } static void param_selector_init(ParamSelector* self) { GtkBox* box; GtkWidget* hbox; GList* list; hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(self), hbox, TRUE, FALSE, 0); gtk_widget_show(hbox); box = GTK_BOX(hbox); self->vol = gtk_toggle_button_new_with_label("Vol"); self->pan = gtk_toggle_button_new_with_label("Pan"); self->cut = gtk_toggle_button_new_with_label("Cut"); self->res = gtk_toggle_button_new_with_label("Res"); self->pitch = gtk_toggle_button_new_with_label("Pitch"); gtk_box_pack_start(box, self->vol, TRUE, TRUE, 0); gtk_box_pack_start(box, self->pan, TRUE, TRUE, 0); gtk_box_pack_start(box, self->cut, TRUE, TRUE, 0); gtk_box_pack_start(box, self->res, TRUE, TRUE, 0); gtk_box_pack_start(box, self->pitch, TRUE, TRUE, 0); gtk_widget_show(self->vol); gtk_widget_show(self->pan); gtk_widget_show(self->cut); gtk_widget_show(self->res); gtk_widget_show(self->pitch); self->current = self->vol; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->vol), TRUE); /* make connections */ list = gtk_container_get_children(GTK_CONTAINER(hbox)); while (list != NULL) { g_signal_connect(G_OBJECT(list->data), "button-press-event", G_CALLBACK(press_cb), (gpointer)self); g_signal_connect(G_OBJECT(list->data), "key-press-event", G_CALLBACK(press_cb), (gpointer)self); g_signal_connect(G_OBJECT(list->data), "enter-notify-event", G_CALLBACK(enter_cb), (gpointer)self); list = list->next; } } GtkWidget* param_selector_new(void) { return (GtkWidget*) g_object_new(PARAM_SELECTOR_TYPE, NULL); } PatchParamType param_selector_get(ParamSelector* self) { if (self->current == self->pan) return PATCH_PARAM_PANNING; else if (self->current == self->cut) return PATCH_PARAM_CUTOFF; else if (self->current == self->res) return PATCH_PARAM_RESONANCE; else if (self->current == self->pitch) return PATCH_PARAM_PITCH; else return PATCH_PARAM_VOLUME; } specimen-0.5.2-rc3/src/gui/paramselector.h0000644000175000017500000000222110466727727015333 00000000000000#ifndef __PARAM_SELECTOR__ #define __PARAM_SELECTOR__ #include #include "patch.h" G_BEGIN_DECLS #define PARAM_SELECTOR_TYPE (param_selector_get_type()) #define PARAM_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PARAM_SELECTOR_TYPE, ParamSelector)) #define PARAM_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PARAM_SELECTOR_TYPE, ParamSelectorClass)) #define IS_PARAM_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PARAM_SELECTOR_TYPE)) #define IS_PARAM_SELECTOR_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), PARAM_SELECTOR_TYPE)) typedef struct _ParamSelectorClass ParamSelectorClass; typedef struct _ParamSelector ParamSelector; struct _ParamSelector { GtkHBox parent; /*< private >*/ GtkWidget* current; GtkWidget* vol; GtkWidget* pan; GtkWidget* cut; GtkWidget* res; GtkWidget* pitch; }; struct _ParamSelectorClass { GtkHBoxClass parent_class; /*< private >*/ void (*changed)(ParamSelector* self); }; GType param_selector_get_type(void); GtkWidget* param_selector_new(void); PatchParamType param_selector_get(ParamSelector* self); G_END_DECLS #endif /* __PARAM_SELECTOR__ */ specimen-0.5.2-rc3/src/gui/patchlist.c0000644000175000017500000001063310575117614014453 00000000000000#include #include "patchlist.h" #include "gui.h" #include "specimen.h" #include "patch.h" /* magic numbers */ enum { LIST_WIDTH = 128, SPACING = GUI_SCROLLSPACE, }; /* signals */ enum { CHANGED, LAST_SIGNAL, }; /* model columns */ enum { PATCH_NAME, PATCH_ID, LAST_COLUMN, }; static int signals[LAST_SIGNAL]; static GtkHBoxClass* parent_class; static void patch_list_class_init(PatchListClass* klass); static void patch_list_init(PatchList* self); GType patch_list_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (PatchListClass), NULL, NULL, (GClassInitFunc) patch_list_class_init, NULL, NULL, sizeof (PatchList), 0, (GInstanceInitFunc) patch_list_init, }; /* replace PARENT_CLASS_TYPE with whatever's appropriate for your widget */ type = g_type_register_static(GTK_TYPE_HBOX, "PatchList", &info, 0); } return type; } static void patch_list_class_init(PatchListClass* klass) { parent_class = g_type_class_peek_parent(klass); signals[CHANGED] = g_signal_new ("changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (PatchListClass, changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); klass->changed = NULL; } static void select_cb(GtkTreeSelection* selection, PatchList* self) { GtkTreeIter iter; GtkTreeModel *model; if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_tree_model_get(model, &iter, PATCH_ID, &self->patch, -1); } else { self->patch = -1; } g_signal_emit_by_name(G_OBJECT(self), "changed"); } static void patch_list_init(PatchList* self) { GtkBox* box = GTK_BOX(self); GtkCellRenderer* renderer; GtkTreeViewColumn* column; gtk_box_set_spacing(box, SPACING); /* patch list */ self->patch_store = gtk_list_store_new(LAST_COLUMN, G_TYPE_STRING, G_TYPE_INT); self->patch_tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(self->patch_store)); self->vscroll = gtk_vscrollbar_new(NULL); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes("Patch", renderer, "text", PATCH_NAME, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(self->patch_tree), column); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(self->patch_tree), FALSE); gtk_tree_view_set_vadjustment(GTK_TREE_VIEW(self->patch_tree), gtk_range_get_adjustment(GTK_RANGE(self->vscroll))); gtk_box_pack_start(box, self->patch_tree, TRUE, TRUE, 0); gtk_box_pack_start(box, self->vscroll, FALSE, FALSE, 0); gtk_widget_show(self->patch_tree); gtk_widget_show(self->vscroll); /* connect up */ self->select = gtk_tree_view_get_selection(GTK_TREE_VIEW(self->patch_tree)); gtk_tree_selection_set_mode(self->select, GTK_SELECTION_SINGLE); g_signal_connect(G_OBJECT(self->select), "changed", G_CALLBACK(select_cb), (gpointer) self); } GtkWidget* patch_list_new(void) { return (GtkWidget*) g_object_new(PATCH_LIST_TYPE, NULL); } void patch_list_update(PatchList* self, int target, int type) { int npatches; int* patches; GtkTreeIter iter; GtkTreePath* path; char* str; int i; int index = 0; g_signal_handlers_block_by_func(self->select, select_cb, self); npatches = patch_dump(&patches); gtk_list_store_clear(self->patch_store); for (i = 0; i < npatches; ++i) { str = patch_get_name(patches[i]); gtk_list_store_append(self->patch_store, &iter); gtk_list_store_set(self->patch_store, &iter, PATCH_NAME, str, PATCH_ID, patches[i], -1); g_free(str); if (type == PATCH_LIST_PATCH && patches[i] == target) index = i; } g_free(patches); if (type == PATCH_LIST_INDEX) index = target; path = gtk_tree_path_new_from_indices(index, -1); gtk_tree_view_set_cursor(GTK_TREE_VIEW(self->patch_tree), path, NULL, FALSE); gtk_tree_path_free(path); g_signal_handlers_unblock_by_func(self->select, select_cb, self); g_signal_emit_by_name(G_OBJECT(self->select), "changed"); } int patch_list_get_current_patch(PatchList* self) { return self->patch; } int patch_list_get_current_index(PatchList* self) { int* i; GtkTreePath* t; gtk_tree_view_get_cursor(GTK_TREE_VIEW(self->patch_tree), &t, NULL); i = gtk_tree_path_get_indices(t); return *i; } specimen-0.5.2-rc3/src/gui/patchlist.h0000644000175000017500000000302210467173732014455 00000000000000#ifndef __PATCH_LIST__ #define __PATCH_LIST__ #include G_BEGIN_DECLS #define PATCH_LIST_TYPE (patch_list_get_type()) #define PATCH_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PATCH_LIST_TYPE, PatchList)) #define PATCH_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PATCH_LIST_TYPE, PatchListClass)) #define IS_PATCH_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PATCH_LIST_TYPE)) #define IS_PATCH_LIST_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), PATCH_LIST_TYPE)) typedef struct _PatchListClass PatchListClass; typedef struct _PatchList PatchList; enum { PATCH_LIST_INDEX, /* target is a display index */ PATCH_LIST_PATCH /* target is a patch id */ }; struct _PatchList { GtkHBox parent; /*< private >*/ GtkWidget* patch_tree; GtkListStore* patch_store; GtkWidget* vscroll; GtkTreeSelection* select; int patch; }; struct _PatchListClass { GtkHBoxClass parent_class; /*< private >*/ void (*changed)(PatchList* self); }; GType patch_list_get_type(void); GtkWidget* patch_list_new(void); /* refresh the list of available pactches; target specifies either the index or patch id of the item to select, depending on the value of type */ void patch_list_update(PatchList* self, int target, int type); /* returns which patch we are currently looking at */ int patch_list_get_current_patch(PatchList* self); /* returns the index of the patch we are currently looking at */ int patch_list_get_current_index(PatchList* self); G_END_DECLS #endif /* __PATCH_LIST__ */ specimen-0.5.2-rc3/src/gui/midisection.c0000644000175000017500000002327710466746442015005 00000000000000#include #include #include #include "midisection.h" #include "specimen.h" #include "gui.h" #include "patchlist.h" #include "midi.h" #include "patch.h" #include "mixer.h" static GtkVBoxClass* parent_class; static void midi_section_class_init(MidiSectionClass* klass); static void midi_section_init(MidiSection* self); /* magic numbers */ enum { HEIGHT = 8, BG_COLOR = 0x888888FF, NOTE_COLOR = 0xEECC00FF, RANGE_COLOR = 0xDD8800FF, }; GType midi_section_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (MidiSectionClass), NULL, NULL, (GClassInitFunc) midi_section_class_init, NULL, NULL, sizeof (MidiSection), 0, (GInstanceInitFunc) midi_section_init, }; /* replace PARENT_CLASS_TYPE with whatever's appropriate for your widget */ type = g_type_register_static(GTK_TYPE_VBOX, "MidiSection", &info, 0); } return type; } static void pressed_cb(GtkWidget* widget, int key, MidiSection* self) { /* a ghetto form of set-insensitive */ if (self->patch < 0) return; mixer_note_on_with_id(self->patch, key, 1.0); } static void released_cb(GtkWidget* widget, int key, MidiSection* self) { /* a ghetto form of set-insensitive */ if (self->patch < 0) return; mixer_note_off_with_id(self->patch, key); } static gboolean range_cb(GnomeCanvasItem* item, GdkEvent* event, MidiSection* self) { int clicked; int note; int lower; int upper; int range; int change_range = 0; PatchList* list = gui_get_patch_list(); /* a ghetto form of set-insensitive */ if (self->patch < 0) return FALSE; switch (event->type) { case GDK_BUTTON_PRESS: clicked = event->button.x / PHAT_KEYBOARD_KEY_WIDTH; note = patch_get_note(self->patch); lower = patch_get_lower_note(self->patch); upper = patch_get_upper_note(self->patch); range = patch_get_range(self->patch); /* process the click */ if (event->button.button == 1) { lower = clicked; change_range = 1; } else if (event->button.button == 2) { note = clicked; } else if (event->button.button == 3) { upper = clicked; change_range = 1; } /* clamp the parameters */ if (note < lower) { lower = note; } if (note > upper) { upper = note; } /* if the range is off, and a range adjusting button wasn't * pressed, then clamp the range down to nothing (which will * result in it remaining disabled) */ if (!range && !change_range) { lower = upper = note; } /* reposition note */ gnome_canvas_item_set(self->note, "x1", (gdouble) (note * PHAT_KEYBOARD_KEY_WIDTH - 1), NULL); gnome_canvas_item_set(self->note, "x2", (gdouble) (note * PHAT_KEYBOARD_KEY_WIDTH + PHAT_KEYBOARD_KEY_WIDTH - 1), NULL); /* reposition range */ gnome_canvas_item_set(self->range, "x1", (gdouble) (lower * PHAT_KEYBOARD_KEY_WIDTH - 1), NULL); gnome_canvas_item_set(self->range, "x2", (gdouble) (upper * PHAT_KEYBOARD_KEY_WIDTH + PHAT_KEYBOARD_KEY_WIDTH - 1), NULL); /* apply changes */ patch_set_note(self->patch, note); patch_set_lower_note(self->patch, lower); patch_set_upper_note(self->patch, upper); if (lower == upper) { patch_set_range(self->patch, FALSE); gnome_canvas_item_hide(self->range); } else { patch_set_range(self->patch, TRUE); gnome_canvas_item_show(self->range); } /* we might have moved this patch around relative to the list; * update the list and try to keep this patch selected */ self->ignore = TRUE; patch_list_update(list, patch_list_get_current_patch(list), PATCH_LIST_PATCH); break; default: break; }; return FALSE; /* make sure my fellow jiggas pickup up da shizzle */ } /* what the fuck is wrong with me... did I just say shizzle? */ static void connect(MidiSection* self) { g_signal_connect(G_OBJECT(self->keyboard), "key-pressed", G_CALLBACK(pressed_cb), (gpointer) self); g_signal_connect(G_OBJECT(self->keyboard), "key-released", G_CALLBACK(released_cb), (gpointer) self); } /* why am I having a conversation with myself in my program through comments? */ static void block(MidiSection* self) { g_signal_handlers_block_by_func(self->keyboard, pressed_cb, self); g_signal_handlers_block_by_func(self->keyboard, released_cb, self); } /* I need crack. */ static void unblock(MidiSection* self) { g_signal_handlers_unblock_by_func(self->keyboard, pressed_cb, self); g_signal_handlers_unblock_by_func(self->keyboard, released_cb, self); } static void set_sensitive(MidiSection* self, gboolean val) { /* nada */ } static void midi_section_class_init(MidiSectionClass* klass) { parent_class = g_type_class_peek_parent(klass); } static void midi_section_init(MidiSection* self) { GtkBox* box = GTK_BOX(self); GtkWidget* pad; GtkWidget* view; GtkWidget* scroll; GnomeCanvas* canvas; GnomeCanvasPoints* points; int x1, x2, y1, y2; self->patch = -1; self->ignore = FALSE; x1 = 0; y1 = 0; x2 = (PHAT_KEYBOARD_KEY_WIDTH * MIDI_NOTES); y2 = HEIGHT; /* adjustment */ self->adj = (GtkAdjustment*) gtk_adjustment_new(0, 0, 0, 0, 0, 0); /* viewport */ view = gtk_viewport_new(self->adj, NULL); gtk_box_pack_start(box, view, FALSE, FALSE, 0); gtk_viewport_set_shadow_type(GTK_VIEWPORT(view), GTK_SHADOW_NONE); gtk_widget_set_size_request(view, 0, y2); gtk_widget_show(view); /* canvas */ canvas = (GnomeCanvas*) gnome_canvas_new(); gtk_widget_set_size_request(GTK_WIDGET(canvas), x2, y2); gnome_canvas_set_scroll_region(canvas, 0, 0, x2 - 1, y2 -1); gtk_container_add(GTK_CONTAINER(view), GTK_WIDGET(canvas)); g_signal_connect(G_OBJECT(canvas), "event", G_CALLBACK(range_cb), (gpointer)self); gtk_widget_show(GTK_WIDGET(canvas)); /* range display backdrop */ gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_rect_get_type(), "x1", (gdouble)0, "y1", (gdouble)0, "x2", (gdouble)x2, "y2", (gdouble)y2, "fill-color-rgba", BG_COLOR, NULL); /* range */ self->range = gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_rect_get_type(), "x1", (gdouble)x1, "y1", (gdouble)y1, "x2", (gdouble)PHAT_KEYBOARD_KEY_WIDTH, "y2", (gdouble)y2, "fill-color-rgba", RANGE_COLOR, "outline-color", "black", NULL); gnome_canvas_item_hide(self->range); /* range root note */ self->note = gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_rect_get_type(), "x1", (gdouble)x1, "y1", (gdouble)y1, "x2", (gdouble)PHAT_KEYBOARD_KEY_WIDTH, "y2", (gdouble)y2, "fill-color-rgba", NOTE_COLOR, "outline-color", "black", NULL); gnome_canvas_item_hide(self->note); self->canvas = canvas; /* range display border */ points = gnome_canvas_points_new(4); points->coords[0] = x1; points->coords[1] = y2; points->coords[2] = x1; points->coords[3] = y1; points->coords[4] = x2-1; points->coords[5] = y1; points->coords[6] = x2-1; points->coords[7] = y2; gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_line_get_type(), "points", points, "width-units", (gdouble)1, "fill-color-rgba", 0, NULL); gnome_canvas_points_unref(points); /* keyboard */ self->keyboard = phat_hkeyboard_new(self->adj, MIDI_NOTES, TRUE); gtk_box_pack_start(box, self->keyboard, FALSE, FALSE, 0); gtk_widget_show(self->keyboard); /* vpad */ pad = gui_vpad_new(GUI_SCROLLSPACE); gtk_box_pack_start(box, pad, FALSE, FALSE, 0); gtk_widget_show(pad); /* scrollbar */ scroll = gtk_hscrollbar_new(self->adj); gtk_box_pack_start(box, scroll, FALSE, FALSE, 0); gtk_widget_show(scroll); /* done */ connect(self); } GtkWidget* midi_section_new(void) { return (GtkWidget*) g_object_new(MIDI_SECTION_TYPE, NULL); } void midi_section_set_patch(MidiSection* self, int patch) { int note; int lower; int upper; int range; self->patch = patch; if (patch < 0) { set_sensitive(self, FALSE); gnome_canvas_item_hide(self->note); gnome_canvas_item_hide(self->range); if (self->ignore) self->ignore = FALSE; else gtk_adjustment_set_value(self->adj, (0.5 * self->adj->upper) - (self->adj->page_size / 2)); } else { set_sensitive(self, TRUE); note = patch_get_note(patch); lower = patch_get_lower_note(patch); upper = patch_get_upper_note(patch); range = patch_get_range(patch); block(self); /* so let me get this straight... if I set more than one * property at once, shit gets fux0red? Fags. */ gnome_canvas_item_set(self->note, "x1", (gdouble) (note * PHAT_KEYBOARD_KEY_WIDTH - 1), NULL); gnome_canvas_item_set(self->note, "x2", (gdouble) (note * PHAT_KEYBOARD_KEY_WIDTH + PHAT_KEYBOARD_KEY_WIDTH - 1), NULL); gnome_canvas_item_show(self->note); /* do the same dumbshit for the range */ gnome_canvas_item_set(self->range, "x1", (gdouble) (lower * PHAT_KEYBOARD_KEY_WIDTH - 1), NULL); gnome_canvas_item_set(self->range, "x2", (gdouble) (upper * PHAT_KEYBOARD_KEY_WIDTH + PHAT_KEYBOARD_KEY_WIDTH - 1), NULL); if (range) gnome_canvas_item_show(self->range); else gnome_canvas_item_hide(self->range); /* scroll the keyboard to show the root note */ if (self->ignore) self->ignore = FALSE; else gtk_adjustment_set_value(self->adj, ((note+1.0) / MIDI_NOTES) * self->adj->upper - (self->adj->page_size / 2)); unblock(self); } } specimen-0.5.2-rc3/src/gui/midisection.h0000644000175000017500000000217210466746442015001 00000000000000#ifndef __MIDI_SECTION__ #define __MIDI_SECTION__ #include #include G_BEGIN_DECLS #define MIDI_SECTION_TYPE (midi_section_get_type()) #define MIDI_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDI_SECTION_TYPE, MidiSection)) #define MIDI_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIDI_SECTION_TYPE, MidiSectionClass)) #define IS_MIDI_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDI_SECTION_TYPE)) #define IS_MIDI_SECTION_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), MIDI_SECTION_TYPE)) typedef struct _MidiSectionClass MidiSectionClass; typedef struct _MidiSection MidiSection; struct _MidiSection { GtkVBox parent; /*< private >*/ int patch; GtkAdjustment* adj; GtkWidget* keyboard; GnomeCanvasItem* range; GnomeCanvasItem* note; GnomeCanvas* canvas; gboolean ignore; }; struct _MidiSectionClass { /*< private >*/ GtkVBoxClass parent_class; }; GType midi_section_get_type(void); GtkWidget* midi_section_new(void); void midi_section_set_patch(MidiSection* self, int patch); G_END_DECLS #endif /* __MIDI_SECTION__ */ specimen-0.5.2-rc3/src/gui/channelsection.c0000644000175000017500000000630610466746442015465 00000000000000#include #include #include "channelsection.h" #include "gui.h" #include "patchlist.h" #include "patch.h" #include "midi.h" static GtkVBoxClass* parent_class; static void channel_section_class_init(ChannelSectionClass* klass); static void channel_section_init(ChannelSection* self); GType channel_section_get_type(void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (ChannelSectionClass), NULL, NULL, (GClassInitFunc) channel_section_class_init, NULL, NULL, sizeof (ChannelSection), 0, (GInstanceInitFunc) channel_section_init, }; type = g_type_register_static(GTK_TYPE_VBOX, "ChannelSection", &info, 0); } return type; } static void channel_section_class_init(ChannelSectionClass* klass) { parent_class = g_type_class_peek_parent(klass); } static void channel_cb(PhatSliderButton* button, ChannelSection* self) { int channel = (int)phat_slider_button_get_value(button); PatchList* list = gui_get_patch_list(); patch_set_channel(self->patch, channel-1); patch_list_update(list, patch_list_get_current_patch(list), PATCH_LIST_PATCH); } static void connect(ChannelSection* self) { g_signal_connect(G_OBJECT(self->chan_sb), "value-changed", G_CALLBACK(channel_cb), (gpointer) self); } static void channel_section_init(ChannelSection* self) { GtkBox* box = GTK_BOX(self); GtkWidget* hbox; GtkWidget* label; GtkWidget* pad; self->patch = -1; /* hbox */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(box, hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); /* channel label */ label = gtk_label_new("Channel:"); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_widget_show(label); /* hpad */ pad = gui_hpad_new(GUI_TEXTSPACE); gtk_box_pack_start(GTK_BOX(hbox), pad, FALSE, FALSE, 0); gtk_widget_show(pad); /* channel sliderbutton */ self->chan_sb = phat_slider_button_new_with_range(1, 1, MIDI_CHANS, 1, 0); phat_slider_button_set_threshold(PHAT_SLIDER_BUTTON(self->chan_sb), GUI_THRESHOLD); gtk_box_pack_start(GTK_BOX(hbox), self->chan_sb, TRUE, TRUE, 0); gtk_widget_show(self->chan_sb); /* done */ connect(self); } static void block(ChannelSection* self) { g_signal_handlers_block_by_func(self->chan_sb, channel_cb, self); } static void unblock(ChannelSection* self) { g_signal_handlers_unblock_by_func(self->chan_sb, channel_cb, self); } static void set_sensitive(ChannelSection* self, gboolean val) { gtk_widget_set_sensitive(self->chan_sb, val); } GtkWidget* channel_section_new(void) { return (GtkWidget*) g_object_new(CHANNEL_SECTION_TYPE, NULL); } void channel_section_set_patch(ChannelSection* self, int patch) { int channel; self->patch = patch; if (patch < 0) { set_sensitive(self, FALSE); } else { set_sensitive(self, TRUE); channel = patch_get_channel(patch); block(self); phat_slider_button_set_value(PHAT_SLIDER_BUTTON(self->chan_sb), channel+1); unblock(self); } } int channel_section_get_channel(ChannelSection* self) { if (self->patch < 0) return 0; return patch_get_channel(self->patch); } specimen-0.5.2-rc3/src/gui/channelsection.h0000644000175000017500000000212410466746442015464 00000000000000#ifndef __CHANNEL_SECTION__ #define __CHANNEL_SECTION__ #include G_BEGIN_DECLS #define CHANNEL_SECTION_TYPE (channel_section_get_type()) #define CHANNEL_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHANNEL_SECTION_TYPE, ChannelSection)) #define CHANNEL_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CHANNEL_SECTION_TYPE, ChannelSectionClass)) #define IS_CHANNEL_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHANNEL_SECTION_TYPE)) #define IS_CHANNEL_SECTION_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE ((klass), CHANNEL_SECTION_TYPE)) typedef struct _ChannelSectionClass ChannelSectionClass; typedef struct _ChannelSection ChannelSection; struct _ChannelSection { GtkVBox parent; /*< private >*/ int patch; GtkWidget* chan_sb; }; struct _ChannelSectionClass { GtkVBoxClass parent_class; /*< private >*/ }; GType channel_section_get_type(void); GtkWidget* channel_section_new(void); void channel_section_set_patch(ChannelSection* self, int patch); int channel_section_get_channel(ChannelSection* self); G_END_DECLS #endif /* __CHANNEL_SECTION__ */ specimen-0.5.2-rc3/pixmaps/0000777000175000017500000000000010575351341012500 500000000000000specimen-0.5.2-rc3/pixmaps/Makefile.am0000644000175000017500000000023410575117614014452 00000000000000pixmaps_DATA = open.png play.png stop.png panic.png \ specimen.png specimen_small.png EXTRA_DIST = $(pixmaps_DATA) pixmapsdir = "$(pkgdatadir)/pixmaps" specimen-0.5.2-rc3/pixmaps/Makefile.in0000644000175000017500000002402510575351312014462 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = pixmaps DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acx_pthread.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pixmapsdir)" pixmapsDATA_INSTALL = $(INSTALL_DATA) DATA = $(pixmaps_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALSA_CFLAGS = @ALSA_CFLAGS@ ALSA_LIBS = @ALSA_LIBS@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ HAVE_LASH_FALSE = @HAVE_LASH_FALSE@ HAVE_LASH_TRUE = @HAVE_LASH_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JACK_CFLAGS = @JACK_CFLAGS@ JACK_LIBS = @JACK_LIBS@ JACK_MIDI_CFLAGS = @JACK_MIDI_CFLAGS@ JACK_MIDI_LIBS = @JACK_MIDI_LIBS@ LASH_CFLAGS = @LASH_CFLAGS@ LASH_LIBS = @LASH_LIBS@ LDFLAGS = @LDFLAGS@ LIBGNOMECANVAS_CFLAGS = @LIBGNOMECANVAS_CFLAGS@ LIBGNOMECANVAS_LIBS = @LIBGNOMECANVAS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSAMPLERATE_CFLAGS = @LIBSAMPLERATE_CFLAGS@ LIBSAMPLERATE_LIBS = @LIBSAMPLERATE_LIBS@ LIBSNDFILE_CFLAGS = @LIBSNDFILE_CFLAGS@ LIBSNDFILE_LIBS = @LIBSNDFILE_LIBS@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ OLD_JACK_MIDI_CFLAGS = @OLD_JACK_MIDI_CFLAGS@ OLD_JACK_MIDI_LIBS = @OLD_JACK_MIDI_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PHAT_CFLAGS = @PHAT_CFLAGS@ PHAT_LIBS = @PHAT_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SPECIMEN_CFLAGS = @SPECIMEN_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ acx_pthread_config = @acx_pthread_config@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ pixmaps_DATA = open.png play.png stop.png panic.png \ specimen.png specimen_small.png EXTRA_DIST = $(pixmaps_DATA) pixmapsdir = "$(pkgdatadir)/pixmaps" all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu pixmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-pixmapsDATA: $(pixmaps_DATA) @$(NORMAL_INSTALL) test -z "$(pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(pixmapsdir)" @list='$(pixmaps_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pixmapsdir)/$$f'"; \ $(pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pixmapsdir)/$$f"; \ done uninstall-pixmapsDATA: @$(NORMAL_UNINSTALL) @list='$(pixmaps_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pixmapsdir)/$$f'"; \ rm -f "$(DESTDIR)$(pixmapsdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(pixmapsdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pixmapsDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pixmapsDATA .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pixmapsDATA install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-info-am uninstall-pixmapsDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: specimen-0.5.2-rc3/pixmaps/open.png0000644000175000017500000000131210466727727014076 00000000000000PNG  IHDRVΎWgAMA abKGD pHYs  @AtIME%9bGIDATxkAݬ4!=JEAO MA( <&*Egf Ð\.GP8 ,ŷv;/L&CjM֖yg S(fnxj̑ScPJA\ @JR bU[yjM,RJVHٌ-Q.Y[:ԣޣXE"emZABRJ%v^g'E*²,QJ!J%jS-`+10 :DkMj\ץRlSCjju`)1Ȧr't&:dIENDB`specimen-0.5.2-rc3/pixmaps/play.png0000644000175000017500000000131010466727727014100 00000000000000PNG  IHDR5TbKGD pHYs  tIME  ;#V9tEXtCommentCreated with The GIMPd%n,IDATxڥKSa?'$ňԋl2tA].?++",Ť,2s.}^ϗi}Jn\.I'oH $.a?A"H: 4ht'g±e`H:T ҡx( ,M-MJ|0yE2ifV3t_Nw] [𫚽bXlUG:}NY)i!h0 $+z;҉5c\)mѶ}Ixx(9RVFYC}#ssSzS1],\ zQ-NuEXMh2gf3bib)_̿jVRJծ5̪<ˬkaiaDiSBENgK)6vRvv3ESʊeY1wbZv$[e]:RlǞ]W5x.4`6m`X| ׀̆;Xd IENDB`specimen-0.5.2-rc3/pixmaps/stop.png0000644000175000017500000000057710466727727014136 00000000000000PNG  IHDRVΎWbKGD pHYs  tIME 3JtEXtCommentCreated with The GIMPd%nIDATxڭjA?sAZK&lRHwrCv6ϧ8j5}H,-U{[*mQ@A5FA٨UAd5? Q>ƀJgt3+(. tGѸ[F՜nsGÎ1f6~bC+M<IENDB`specimen-0.5.2-rc3/pixmaps/panic.png0000644000175000017500000000053610466727727014236 00000000000000PNG  IHDRݶUsBIT|dtEXtSoftwarewww.inkscape.org<IDATx]=JQ~*&b`d` Eu t0 0@:U4SQ&TQ0C+ݴ]prUx5ֈjEC>q",Zr𣑜 In^ $ZsWLbgoҹg$-Oo-eQ)TDu2ކٮsas|RiP)-c-Wy^5po~ƦxEvgIENDB`specimen-0.5.2-rc3/pixmaps/specimen.png0000644000175000017500000010330610466746442014741 00000000000000PNG  IHDR3^bKGD pHYs  tIME36 getEXtCommentCreated with The GIMPd%n IDATxylU TսoQck@FVQ¶A8!BbNB  8Y ^18/'Y,,1#cԒ[juw:TݺƢ~뼪[pΧ{ 6` 6` 6` 6` 6` 6` 6` 6` 6` v#l'XZw[=t 6}p 5m`=a2CNa~q˜@nz tq 0l[ MLOfA4;|=IvofԬ\VN-@ 46~\fϬyï`=TQ  kTlr:?z[u6 |& &'!.2ljֹOz 0lM=|^u VDsld-<^ڠ $c ֟^w.{"A#׺m.&AA򁻍W` oekڠ 6?W+9">B$JK-1GT3]5-)fPDY~1 +l|G2>$Z]7$wn^#$[ТF)2!vDUDg=Yٲ[6@K:EVg{2D+geoz5tSqF:1D::$&l;hiڎeMlyZu_ 6k_y:i,<ϣ?5J&cj㙦)zZj@Cft)ҥHDR«ArFb :EW 0^t'/W'5h&5-nS lImj1Qh,LhD3*1lOSxWRD`0A٬lYATٲ[)bMW\U=i]f=zB/6F M|Sd}avŦH+3t1{5wmguW|WǑpcMֈ7J\ 3j4%6% {2I3::ZW{\vWUs:8&poq"=c5M!FIigI׹ˠK0cjI-kVS: ` w?8r%RSc,T5dB*{D:Х́FFB3!Dd2I(Z!ZR/E䏙Serd XqŵCd2l[zs.o< U؍$j<-Vd[BH dTQ#Ԣb!3 ,NIq# 5$œQBǠsd T2Sez#ЊKJkdûhX6ñ;? xf&k5<_Pav}`zb '*5ƕʔjb0ۯSrWUY 0z.`] gC&:&mlf6k4{bI1)P!줖Y 61VO`[rJ-c@%LbMD'Xa+X!ZuXtFWexa 0{2vǝu75QtTq)w>vZ(-0%߫?gP: "ۗr#Nќ}sYcGeŦ(a$FI2 gHB|T ] $ɈxH&f))"C V 9f0Auf8b'f{Rgo8.{)ARjgYVFu۝4,@fXʵZ?Ν"X0-*g yFIF>ZrjA%5b ӄXZQM=QGdfG~Zp_W#I'*X1]%>5 I׫֥Xip-lY|v%oҠqI5ױax]4E|k8rRzFӓS\BL8ccѕsԞ -YajCqPԀ ޕԒ:w12y:_6#?Ӝ8H,UdaRR&n\F.~a ٰIEN WA Ӆk/MBs<f{W0p,MH{?J)QFnB}Y+*F#Fb̞8(fLy_t__ʍȤ,Mk,rh Y\I"9,6ZTX9,QE $d^Y;%:TYk brg75 9kCFւXk9CV:b@ej+9"T'18Ԁj/ _y{\d4k5oqf7b^gK_xB;{<|C-gOÏ*b?]DLJH)n^ڑr!} 0i0YM ),fҤݷg߃T"\Y},Fp&CJ\}(!uĜM@c&tb.!R&%ِǹQSxou^hΡnfb_g⹼׿})!,48W`V %(QJOΙ"b fa3EqKxEBD8cz/#4HAW5^+4nk[bTUBdhRLss7uqla6ӶkRs @hbUM=#f2mjk*ϧzZv9目I]r!UOȼ)#c`A.7?oWBV}^y?%Baؑ1l X!AȪ=ьH$G'N=9KnݼphٳvW3_U4$̴!TNU4a-(T1v&t #?$D ײYU#5֔n ̜bQ*@";aTxH ;ez|`V/w]Vlp 0 ;IbvXx=?o}HF-`rfyATV] cD 9ЙIC KQ(Zi %PbcfAi‹bFS[0TSaĤcTUrU:~Eਪf Uӟu-6EԖU;/܎~ pRZG3bb,n]$S|cqނ*9%NM6H!rӏB`%uv,e`my1`fnȎVs_\hM]*])l6K!KI1NK0%Dӵ0YgH$#tQsu6/_Idf~ZYA5##f9)(K,Q*~]QA]/>k+Rf̹ԦFHk<29s;LX*9>siu_%RTcNTw֜>Y6^+EBګ F5ɨj*Ǥ߆f7d7 v_wlqyب$)y]*|drS VEcX&.\lL%`;pjIFP290L @}5 룂q59No 6J#JAۆ cr\1k=QIczyZ9,nY Æ3 /،mpV8ldG9\eLhkXq9Ru0s]@nueaX`w_u/`T{ qH`2O6MHG*r>n|X2%Ӆ[GCF;\IQpIR&mSׁH{Yp;9wSY]A)18l1`>˸$L&)/Yq  %2! n'+LXZ &m n$jB:©rc۟r4s@oƞٯrٲ[i0):=˞kcXXl6cZn}՗ ^ /q%bceuBԒDZkmr]FXBE$pgڔI5!ulȯ]Em2;>z.;}t[^i { k=KHKyArFSHS|?IHiD~_rϷZ6H~A`$jBJ0ih5/]]bVZyPecI~5+`x힗pw9o,3Lx*[cq}GE2[nN;~Pfo?$-/bRP&U䘊 Q!H..M`Nfd6d<S:T3YU&)-2G(ъnsBNXmb ,Maóq, dV`Ht?s`P鰥&S#b-CGv1#67ѬC]CŐr.)"1Ipx=J_Vf= ~)\Q)CC>>{; H{g唩7ao9-rɿ{,Y /ٜ_C#f7Uwo$>ƕ $ l285:cڻT,]LsG7AǞD Fj%Er@~o1Zf!)N0D*TvbTr8wj~jHW f)=PDdy -MypP)t,LUdR&] `vq=N?ZQ= {|>vh)Bl9Q4wlآB]r\d2Z{L4jw)B~˾XqSfB T`\˿ x=Mcf^RgLYk%kC[^`5#ZRl8Gkr;G衞4o0iLh.ST yrTMR"EɂFAT $9cF2dcH3!41H 5 cLiĬhCGZ"x]|3ʟ\|ppnyOr&godPѥH6m:/5 ҺNe_PF}ʙu6/K%M;~D& !c+;oCNULÔ.t&㜥 -rL){ӫPej b'KX6Jl:G5U[)mnTj"v;+=4/Š"!I RWr^DNBΊĞ 8b}ZN{ uٔz|ޟ W(/9b]oW _&m;X] IDATcWfN {A`3.N/C""ԮєT:_dhcl*{&(jqs/ФlJJǞpegNS}Qn \0+3U!2qֵ,2,{<֪KBeI֢bFbIq+XCA#I063b]bRI1 YKKg#HΝf#x?Wy z#ڇΏp; `[.J$i 㔹\8s;ۇ/4u 4ZZg`vؙ>?ʷ[mJ#mj{{?aԂU #!w2́?YLNo9\b|U&a[qFcvg0HDiqB6=(!%ܖ5*Mt/I$bHױum[TrO\+5ŏr=OaZaW^OѲ%3aJ-W”3g+mS?o4r#R#sl`n*[v9oīH6#{3v"6t95\d,6+FI.7T‹]VN@n`8Wfc7Gm0򞠥&<z;WzյZk./YzŀG!6vgۄԱ{Rdxn i[uLYZ\N8.6hw7sBA15ƧHSn 8jj|4,Sb!eFS[KU[LѐwMT|g *,¥T-1yp.ޱ$E ZX3WkFu:e|ʇ\'\_oE#KB! aP!)X_"{ziycKvQ݇n:!|}KBL\E5>VSG F\z\/$LD:ʹ{S& eD 7L=㴡cԙEѶ&-[_CŜ*;*[rهO^NÔU>^Cu*/~&1P!& W?,9HKBcf,k3$#`>4k^_^7^idŔ~Ě5PSe*0:ո#&9d"=Eg 9EH)SPEޫHRbC`hc qV~fK׀J(u+^ǁm |y86aqڌv ARK q9w$Yi2>ߋel^n tөdnI3}XS2`?Sw?<6&U.S;>&voExk{)'vES4(&,Fň^}%f``];tu7^zw˘o^G]~iWku'gf\ٻe7If;2X<jf&Q5kGp/ ˫,,[T eErL@U4CG{e(R%5a:;5"E9fFY;Nc8&h”ܖeS+43q%~6=N_wPx-;x%ƣփ F21?zL|hy1Bd58k1eL~\h^^_e$L߽Gxqp/N 2YQsec+~~k= b)'i if]CIJGK9*-Sgnȥ.,ݜXjWvkW^|%XQ-Őss\-h7V[R]ҥ_ԯZ&pw>Qgw~uQ5qX~[] 1{7aTƤ,Tǎ̄l#y&nDrW9]8Ӟ$$PH0JmIc3fPeA~\D5l ;YbKLH6N4dKj#& MZh0{Cd8 3K8*pyy~=fvf?߾~kp$u7`Te(Y7 gFQ7U<3Hx}M`v]M]R j?W&k&i"H J$h$J H,-"KF!k^%h9.#@v5.b>VGaydl(痱b;wy>ǖڢKo3fD"bL]R{s$cvD]Li[ƐUf^tXL̬q3x _~?-nTv$6|}wckoO:: E e&NNdwE^ _3w~ ;M#QZ` ZYVL,GĵWI EZLL:_~ ㍀樘̈́׼g[}$icZQYCHSFՄYcReÞ,B 3RԹp:QZ`n:[ޡiw9~x'^Rb ؑ%"63-MnisGL%74UefzX4ifMi (<%WT-y;L^1N>e׆Rx<Ŕqzp216%7&pjr2iIM$'Et{Gyt7rƥӷ׿/!N,BZ,5(R'iO(To f)Kk Ԯchqquk@ 3&3oo-G.r^dD܉t-anѮ$>GY:W]̴6/}Y0BQ⍺G%rH*&Klrۿ_Ox;\`~Ʀ:G6EO.j9lj,;7 R3|uƒKw2 ~G~//ňrm\xi3Ec Jiߓ4Pݦ`Ҷ6v2H#TJa9hRV 'q]'G(ef ӯ_w~(H)n&&LL7Cl *XU|?q^VDɤ)у 0Ջi yI 'POeťD;B$d'^ PU"_RWAI;K!YQ@;N}(reR> ^zD,tUK^z?ޢpgf`i19]?daޑ#\Z 5 v)!q\~wՄ넉86񜒊l b-,Z5$kFOUbR2M_X(_Ą;-q/J;1,?jkkxsHG(p8LZk{yEwuQQq~3gK @R@МM05sJn!fۼKTe0Wp"ŪNJ3$}Rĵh-s3&cC0u򪋹 f:-dqj}'Q^ǹǩu+ש3EqiSf5"KFCgC`<)}ߟ32A 0[٬m=j). Y2H"jX; O>:7"}W{>Hw7r( !qu ]QgqVٺ[Qכ#cs~5?-%YcM\ۊnjڡ]dl*\=!ΔdStmh i`̞@wSYZRgg;5ӌH"k#,5{0jԌՑqtR~IPjQu)z&|߇3]z#@l-=bDg & [ItQVyOFA 0@;iS=X$ҥYjhSKfYVHӎqYO4Yw?sxٺ*̎ax3cy˟fb4 gK2ܔ)V d8HsZt!)i:CcO5c=ALeNæz68ń ɄMlqH(Ws(ynL7J 1Q5Dt&L$yqKlMX+U {_8ܓ[j[-\Mw=.0 Vj$#:j 8YQὂL*Yl(K-Օ pCe =.fŽnwLן2)7QM(Polp۱0k:֐IB;G#m#OŨOl٭i y77XdF[:#%N9%0 F,6)>Tr趓[1Az|mw(ʬ8~Sp5Y4mj]i}2q=0-.qq'ddžcۀ|xdjx:x eesBɩ!%LҊi1VG8ijZ͠TPG%cXLv)*e!I2QFfOy;W$BBUKVPglD'9y{`K<[;[~V[-Z--DK6zp=c1&F2؎yO0GF #bc$ЃzQU{;sgsOUuUەYu==W9P FXoeb)&l?e,'{u@dU+5BCPAIe9 b0gjU~QZ8\KaPV03|#;ϒcK0*(<>2)PXv,)qє%`#pQB F(WhH '6a>fZg ;}tK^}jmPIPe6̦9 P8 uX>x~+X>|pp< OR)+ĞWsn27ປ@tEisU fG:`zO|{ +^l}`e-vf)R3H%Zh#ri]M C%埼u+Y9ཷy \!0m8Xgyya PaWXs+v%eV&;6@Ӡff.6nKDPn9k_+9G(B2se0Xxw;BK(x@ 8.P\']{@lͅ9Dc`weD 9boЂ8@X@.Ztn5ghYg2j*X-7@4J,D6{fs_ߥs51zʬM38 9BPQ%t{J-pu3͖r0vtdήB;N u:\:;"zq3@Q8#ȸ1Mi9갽4c fO*MMUZMksɏ~*<>"9+ uC*f:8 fG;ƒ'}f@/Rq RK.1w}&@,i3(iw{(Y~3QWs&wuXԦǂ(I#=0p.LdzZ`j+arw%ֺY9f6ّ בFbPf0Ƴ^N"9o%\_iK1De>WUcSkz͎:3]v #p'C @ʞU6t3Y6/K-ۡwZP?֩оQe87䥘ۙf0;v?ȡ3^h4zC8rdn9ԁSD2΢9[O1י'7ZaJi'Ғ+lt\$H5#CL('ɿ"S@6N|,̎"8 (l> IDAT$+ir!mkjݚP2 r:rkM%8f@̣6mk?kGϵe) py3\NwfgDJNbkdmmse38K_{>~}ΡnVQt 6l]^Yn֘F4 i f@sYgA w_X,,>?gÞ 9o|-}Qb"=緾c'eo$DDžՋ}H&ǢӚm^UQ5D@ޒA֛93Y7svZ߻G?EG0IR[ڽ 4 Y#idq`vy9yaOh6",dJ][7Sg~4\MU+hkJL7-l,2;|2K > o+ ^b*47d>ٲmmk8g~ }̎g嶸rR)AA`>XsֵZe0D֘[ct>f0{25hJ?gHgY_ hO&ζ<$d9,̎'m:T0-6=d:I=XxL8vcV.Yn3SD-2=sYd89U@6ۜd 숻C Q.'*,,7wCaA\ߴNd1udnraQp~d v鏟`.uj Ќ[3=,#U=dfdo&" VRA 6 0@\1x+^,[B@xR:0 қ?>W\tdk4Qv 4oTpfVD3]pK՘UFx7 W]{-4(}8ӨF6+s̆ Kg:~מXcj=bv~ue?[q5jTZBQi ^pVSܘ K\pң9h=f0;22U7s *5V~eX^B[RQ@4 YZ kF(Wr125&xk^OLna%/qPIZjT=AUQ@,4o&@j/d(V ftC!pivJO>èBUXaWP 7-'VK#m vJ%кCVĶfk:~{{ +48X5V~m,zhbpQhc2@V3k fĶ-x:$֒,7s_\MXsPkZkxx0u=}5'82zU_^vy*PIeXb+٬Ր"ɛX8C$Zt xz G+-FAlz^X #p@kQǫ%g$X6@69Ze$eMfe`{-)d.zndUb6bgli|ioOXZ|73U W m?!2啷?VlM9?٥wNGGmZiպt^D5R% XZeF x&Ykŀ 3;FܤOpA W<@PA "R[@KO."QV6X : ILInQD,i(DVD&-gG.`Sllۿx`kQްĒK-5cQY# #` &ٲH6hzSIdv]7/_'/ *Zq89D[ 2 k]@a)+TTaMkTT]0,2tƟv-Ml-?3 &1dҳwY_ RBb;֛NzGQk1 [M}ΤZ'|=Y1nq_셯|wPR1p܇%FKa`r.A$X8!+JqؓvT3n* * 0 3Iu 3 f٫db_m}+_2S`Hޏ/RQ(f#s ~qdo!~&l(Sv1͇).}'QrfqM{/F )'hpT;סAWmf0;tS4]U8v<ëLx &t*1YEn]*۬c֞0 fۆeaeŸmYy 5lV~/y X>tB&9ǟ(%H~`gKKWP !\ko![L2̲Z2 x:+f}??"6scзٷ/R*m *XZJtH-C%RZ`dۙ3ߡ2շ˙\i2J`.H38r[(#2TŦ,IKw^] IҮ3 f;o;k-ӛB P\#KM b T1+,dyYK5BTFl#(vY5/ 61^b7ķY" faSB,,bx5ά thD52 1#fe5OO`9idˠj*($|`v8}x{̪R0F2DDӃQk"g1(it!J]"fP]%K+vnDrǐX4Uf~߼D;ʍ\?\÷-+1R̅̇&e,SfJH͙~ LtJv,RB0s$G7'/g0; ^{'W#ЀQIF F¡p 20M h/ytm[LcqJ±xͶ/_xω ,&kģ d3,ř{ b),mJI'n Vfvڅ"5Ekv[TS$N,V&" `A4ESEx AՊT,deFO {.[h,P&̪P 7CF|l7 +] $_cLLrg_!QoPlmLX I u 5H!:<W$m/FSl&U"glf[ĭ'{OHtcc94qR *xpFINzc'#T}|(˼{(myۤKhmYJpwM1OE.eAce#)K{xFЀZ=jipk_ښa15) ~szۇb;Q΀@i'Hn#Q9(beq"<*@z??#D& ԰v5>*APK+@%jSm dې mZ4is it%M]?]΂ V`J`pϻf\%8Kv_y-jG "8[)ǡ&-k@KK#&@c1%vP} FYyyY*aHgC%J4 ^<ٞ,_oIA@*7}-dU$"Ixgh2]6#)@R\@{YjnDQTr&$1& 3 S^/?wņ`80+|`p R h e`O* &He]RO@4O(#o+$u-5֕qV&];F-m\3{Ż˫^wowm);UtT ppԏM[Ihx¹Y flcdŀYF #,xk4g=² x;qlԣP$@ X>L7 Dye/p7B䓇bԋ;F7f.vT Ū9^ha G^Q`66u/?{#kԀEϢa, <,ZA7Ou3fhf~5h֨5jPS_,~1*T88_{+TB-OYFv-1Vg3$^Q .'}#MeZ t-1t)ͱ)%_UܲM'quw@^>8ibEnj܃P^V-Dn"n b-g=#m25/"QU+|ҰG ^ν8Ep3ų_m۔aɧ c~ܒY&&6 V[&xcQ 5n6\8E.() B mPDFPQہ<񉈙ЛDaDbf Hѯ0?Vن~_;H0DHDˬwp(Iz+qG 4VK~$@-k>8`A62"f T Z<>ⅹ1QIGb pb];'k- ۭY l`ƭ܂SF #,fm4KxB= N lɰ<Є?C$fl fWeF b*cE/ģ+b3p(F.0I#Z8EkNvrOy'@Օs {+ш :AQ1YAJgv*C_Vm&%(׌m4Ad9͕fU8"8ErϼqěXጭYj6&AFH(Kwe6dN,\DnJ9#@13XLBbENи H 2R]Z% DzZ ]x Mmf:)b&(R"l0 "^/^+ ,nƵ{סQ^nh2!^k `U\m{WhڂX;,đe^ 5+9p.^ڞ;٣t,w<D.Tv ^'$֕byƥi2XnNZ%e'/ۘ¤-H#QN ^xm \ ZW,ޚ#Ix ,op)ڬCn%׽L,$qQbfza͡B1v,Źp#:f-,bo&ӗ# \I c'i0G2 7]4[DQ 1SOf7SKM),:@E!~_h=W!dF+l7ǧPq+\U^oܴ#Ȃ286,Hh_>aNNf3MJS'2I oy1Of0 qbĊ*3w$jp5xƩpu88b'˓R<~1H5} a8ߝGAÉvC,X.^ܞP$QDrbAB'O~gCO.6AL Rl[]T1%Hwb%%[Pю5ִ{+9y_/Vn,, 4j2p*A)9Y D"*3sr '03DtA*!@QZ) 6|Uiln;3N택  b{a`3.uCѣi]NENP)+GPt$ HԺ3fH.@" 1%"p(4 F"0QfE/߂ni_m pp x9[;r;bs$s )Zőe@f(@#WHb}TkbEU8j!qd{ɘBf2A)>֑7^rd5 iIoh5'QUG "-MZ&8MVHdZZ@kGمh1fbvU:qaͺ"RAŪ R(< qiEK>k[]MtuJ6D=jtm78R!dB6[]G0$Fwيm/*#XX kP5%^2k;ȕzmuh+EnRMLQ[Zler/+mYqcfu HW a!'e 4A,TP?e+q5(FkM"E/ b8Pԍ.[cbY1cbB7P/u]4ZB$JiPJԎήjϪ[bý2@}Sa *S&*6)cbȂm^f%Xp Xa:[`/˜vDG@ vZkl5[fBO2poLX%^8\vpe#AР>SztjVʊW.e} n(94hܬyZ(8 [J1e6'%` p?ۜͲYekeLnܰ5#9hl,`![9f]H`p|sx4QqlHl#V-N5dޒγ "n!w%OA|ip,Z`^<@VVA4/իoq$5W6 Xl/kmhMpnKF|';=2#Je&l\OK$~5沊όvduvyoxk~Q[f&ǿBd!عTGά=e&ck3Ә:k+ǐtl}oِ?RxCl@ z` K,Z>0mڿm8*n/TLc &yyk,1 swq1 tG2Ȼ> "// / hUB ԁTupZĒ;yF#5F)[l E/_5@"қfѼe5D"KnbfRQT``@4@n*>f4@f(3bj<3Be=He^Fy@ V)a,]]ι m~R^b06$#zHmJԱ~O~WaoobGAWl.,]-v.,@ ^eR$(Vwmu+/Ix_U7+h v?ĸGj fulD[ިMذ7ɨ0V<9W7yu3I͙Y x_ { ^4ՉG?b>7scfmp2bc6"/a{2|y8tʖNWs, bYxpE %d͈e7-ng½`}{@"b\qKȨmߦ/P~[m3!f2cdpb̬h7oKl#o7~;9i@k!w3a>cci6Z =m#9lŽ  >ɇ[LJ0DpZjt &O+:(8pb[u * lQ5&Fg rd3ӖoB63Qe |75 4j!mƘc)8/^I~2C.?qMRF#5HR:9 d pWƲbb;x{Z8]Z. L qbC JO`PɲFϳFp=O` pЏngPrZ hᢛb䣇k v-ט#dŁu|kؐ,}2GW%sYAm ˀ(•*Ywq{H(y+%aUi(`&Z6 Xd=~)2aCzo5,G,oVl;gesBʎ=EMnIj)LdNmgz2PWI64keV44f>?w#cVLȌG|͖M%<?$.&٘=1H 8EގCUKdO@˾y-1!,Kثn Ӗ^NƍcbR̄iPT S]' 2P0!ozc3#Peef.Gv0HFަ*@ߨ`%#W2OJA 4BV,m@HbeC9ē+OX8 fOu6&_z6'W"-bXz~@R ΆUL. /3h5[?_&f>zvvʖ]\&'oZˬv D͜7V#Uˈ%J%hh]սp^N3LBSAm6&B,bĚAۑP}j5e&0!;I)eoH[u%1Φ41esƄЫOiz%N>eQL:)˖%`& \4+ Wn@,?{"Jej2e3!uۚʙM`\E*r]80߹'mCp sly e2 /XӋLeM(K! H uq|beڵhiN4Kɮix:-7s)T:z4@Ls)c)2G.V hsdD"l `>>'_|JoreIcR5#@7vT9a"(bX, xt4,hߛ[p>r]۩IG}p+l#䋽Xgrpks #Im#Vd2[d2i 31 =HkGj?XzAmf04Y-ql\էV7bRɮ䶊A&$u&zvc"|Fn $_9xC\Bnp?p_扶I J-V8ϱ"^#<4X4r+ckuBsӜt1묰 Ԥ tfS:k*%dӯYei2M I?rrk2 P:?gF10sCG/p+}xiAgd45ol [[c 49 [󱆬&Wdkp} ᑝ4{lÀŲ߾mP4|Ӯ7nZ_+I?)? }^k1T B67V5P\)<_r*_l2q+ǒ3Q0r5iąnpkx4Zh*fGPEՖLD Mѕiݕts7f 4]})#֟]!<#1)^d!ho'gkhKN/sUH#wF`@ZvJs$/h-lelNOkC'lLɭH.mXh M^g/Tzɴ@LkY%`ʯmN0PHk&#d&6>x4یϮ) ɶi\_ A$)**z_9P*cTx6"H %j {Σs/!rdYXjg ;ɪ͘UTz#M:s0՛ t?Y3=#7qQA֫^Dv ]"_ GϢ1yvVZCtE0,>hq֓}cm-aͬcmCiJRBJz%=,J s* ?^?Ќ6,mqj䶋mbaWs[ Vô=;õt]5~%.&U y<' ˷8?^=Ɔa"֒W^__d3 #D'mS6y`^wMQVrݷ?!DXϰ6.3Znۖ)."Ph s~?a rMYִhn`s.ߐqyCw]N_ZDBb%^.@ScU/bTkhNg.p7\&[ٕYؑSەM1&uX.?()Kz.=F`vj ο z;1҄_i X 8jvGKߗ}Xx=1-/8L%0+wP@8T@Wx0#VU_;O*3@'6?bMׇl,'1ٶA`7#zvMSw1t%O#>q@2sIvi<nÂ6^"4nN$/pk&#i_6h0[Hպ *Ǘ(fU6ŲyX d̆VddnM0'3 J:Y1\fsc>-89ĵۂ.eOޘwĈU}CZwP,XEzQӑ#,?~͸@qxgF5bEYdUϕ.modn{ 4< 0 rS% 0=}Jms72Y(zո*pWuX'&)>nL MV#.z !c09O0r7h.IDAT 2r^F_sAX ,8Y^5҃9tQ.,}OZKJ&g^UwT@S@6GOi&ɯ^Gm>7pqSǶjJClfceSfZc'{)*q#rlW4j"ؚ~LS1E6WbrL2oݖnJ3Zc 6'㺺@-=&1:s%Tl:6|dM3 i-I]1md1x-[Yglc#`F,߹ͽ k؈ͭ˼ =wdًr# IH%=Ҁmu=H1>|ʎ9m荹 c1昲ae؍68B34eʆ ܄E-11 (\njzÄE'dV)fhtn b̚ls cgCW07sךe6`~"0=z lhMg1܈]e6 hJ)Ȟn6@˳Mx-60Xfn =_0[l*ȿkEd-V٘{-.08 XcPvcnfVxljȈ5#Y!f])7nańvrGXa9$:t3,m@6S4ucLf26GpIf) 4!fq\ al˴)@v)$ !Iu2b@uRt`65!.v)"/ݢ\6t`6Ha ]3]`vaty7l 5TIƶx]D@yl &ضr0@;$8ʉxِsW0 Ȉ\„r )v% m$/`lĢρm ĆVXLpX5=TB*mfS2;|*Xh)JR4;\ jƎf8L^nB^ňwF 0 uwYy8-\'!!=lO0XRYӌiu&㉇pU;Cls) 0I#y5^0=`48W>SڐgOT*TP;v190Ka\I돘 dMT3b+D麑9 Bv $K$Gvp]RodWVh-gjg /4Fa[ĆIu> ^fg jU4f}jYG\beQYXKZ;PIZZ5Pb$^)@+):K@_kg]jzdjѲݓ4QPh/W4v75@צNk3I 4avsZ6i LF'v٭+]Y2/oO|2(;ѯIENDB`specimen-0.5.2-rc3/pixmaps/specimen_small.png0000644000175000017500000000461510466746442016134 00000000000000PNG  IHDR0&bKGD pHYs  tIME4"\'VtEXtCommentCreated with The GIMPd%nIDATX՘Iee߽o~^իjGIh4H7D".4* 1ƍ L\!1D0jLEEP]]]Û;~)G7|ywwsħľ,:TXgE',<#{ oe&2+sPat>qkۑRփFnߑŷ=2$2 xG"(5@n$ bgvLzbt%*^iR%,QImc8ңGo/3ݝLޡbMZީ2ۚó=|E*^l(&Sc {mhݮ7YY8G'աY:=j+E|)5ru򣃴VhWPTbt~W~[}}lݷ}ᩝow-kI8i\R>2燨-R} M¬Vֽ l+~o@]a}eK(k4fKz zƊV [~:51Y x\+/M<5=8ISC؉4YҴMpVї$xeYƛA_ Vs3a#x84o:,gAW,rϷla+*@g5鯡ˎjJX tSU46 _AkXq۬vΫhGuK=~PNk >9݉t_LJ>qL*E Xi?E ::0q+Qď#6=eIP@xЙ_n,A~hsp]nZMLQdX6N\g]x6r/Gxq<3Z˲͵͑͟YJ%k֩5=6?C)]jv(9J7 Hm'bW-_|VqVk6kx|yBLҋRVX16Yx%ocm=G @wLlm0] C/%bUDJd1-lcͅ,H4GFS҈vVDIlv LBfLu<=qF"kF׌f) Cm YpҮ֕LtG6;=yOf]4r ;w'y;FƔ- !#h(?IC{~8qS7Mm”1HZU]]F#8 [$EiA{Iu1yW?`"7†00ʺQ 2aYmɎ-H6˝eBX2Ы41u,D]\,nf [( }r!lHGnP^㸝0Y%j6@D % (G|"2^k1뜢d  l('ce`ff8]T$i8F֮va%D;ʋ&.w:ᅙcGVQ[nO :4 d*JwUKγJ( r` ?q["L l,mȲsQ7y l<:uCvDa6oc6Mӝzw`&E7+T?"sN.NKgMsATw9,fS8 ҭ9A`A*^ūyxw١{Cfۛw~ Pe 2z}_Rxj~EX