diff -ruN TiMidity++-2.5.1/ChangeLog TiMidity++-2.6.0/ChangeLog --- TiMidity++-2.5.1/ChangeLog Sat Aug 28 00:26:52 1999 +++ TiMidity++-2.6.0/ChangeLog Tue Sep 21 21:51:36 1999 @@ -1,3 +1,205 @@ +1999-09/21 Masanao Izumo + + * Version 2.6.0 released. + +1999-09/21 Masanao Izumo + + * timidity/rcp.c: Bug fix of SameMeassure. + * interface/vt100_c.c (ctl_current_time): Bug fix of displaying bold. + +1999-09/20 Masanao Izumo + + * timidity/aq.c (aq_samples): Save PM_REQ_GETSAMPLES value if the acntl() + succeeds. + * timidity/sun_a.c: Implement PM_REQ_GETFILLED and PM_REQ_GETSAMPLES of + acntl(). + +1999-09/17 Eric A. Welsh + + * timidity/{timidity.c,playmidi.c,playmidi.h} (new_chorus_voice_alternate): + To use the surround sound instead of detuned chorus. + It is enabled with -EFchorus=2 or -EFchorus=2,level option + (level := [0..63]) + +1999-09-14 Masanao Izumo + + * timidity/timidity.c (set_channel_flag): Bug fixed + +1999-09-12 Shusuke Nisiyama + + * timidity/timidity.c (fpsetmask): On FreeBSD, remove FP_X_DZ frag + from fp mask. + +1999-09-10 Norikatsu Shigemura + + * configure.in: Use $CC instead of ld for $SHLD of NetBSD. + +1999-09-09 Masanao Izumo + + * Version 2.6.0-beta4 released for test version. + +1999-09-08 Masanao Izumo + * interface/x_sherry.c: Bug fix. + * interface/{wrd_read.c,x_sherry.c}: Support part of the sherry ver.2. + +1999-09-07 Masanao Izumo + + * configure.in,common.makefile.in: Fix missing of DEFAULT_PATH. + * acinclude.m4: Add gtk.m4 + +1999-09-06 Katsuhiro Ueno + + * timidity/common.c (pathcmp): Bug fixed. + * timidity/{acinclude.m4,configure.in}: Fix misspelled comment and + remove garbage of output. + +1999-09-06 Masanao Izumo + + * timidity/alsa_c.c: + Check output rate with snd_pcm_playback_status. + acntl: PM_REQ_GETQSIZ, PM_REQ_GETFILLABLE, PM_REQ_GETFILLED, + PM_REQ_GETSAMPLES, and PM_REQ_FLUSH are supported. + +1999-09-05 Masanao Izumo + + * Version 2.6.0-beta3 released for test version. + +1999-09-05 Masanao Izumo + + * timidity/{readmidi.c,playmidi.c}: On XG mode, ignore the program + change without bank select LSB. + +1999-09-05 Yasuhide Oomori + + * interface/gtk_i.c (gtk_set_locale): Enable locale. + +1999-09-04 Masanao Izumo + + * timidity/{common.c,common.h} (pathcmp): New function to compare the path. + * timidity/{common.c,common.h} (pathcasecmp): Obsoleted. + * timidity/common.c (add_to_pathlist): Remove the duplicated path + from `pathlist'. + * interface/w32g_playlist.c: Use pathcmp() to compare the path. + +1999-09-03 Masanao Izumo + + * configure.in (PKGDATADIR, PKGLIBDIR): New macro which is for + $(pkgdatadir) and $(pkglibdir). + * interface/xaw_i.c (XAW_BITMAP_DIR): New macro. + XAW bitmap files are in XAW_BITMAP_DIR. + * configure.in, timidity/timidity.h (TCL_DIR): Remove it from cpp flag. + * configure.in,interface/tk_c.c (TKPROGPATH): Remove it from cpp flag. + Add the definition in tk_c.c. + * configure.in,timidity/timidity.c: SHARED_LIB_PATH -> SHLIB_DIR + +1999-09-02 Masanao Izumo + + * timidity/dl_cygwin32.c -> timidity/dl_w32.c + * timidity/{dl_w32.c,dl_dld.c,dl_dlopen.c,dl_hpux.c,dlutils.h} (dl_free): + New function to unload dynamic link handler. + * interface/dynamic_c.c: Make a hook to call dl_free() on ctl->close(). + * acinclude.m4,configure.in: Search and test for NAS library. + * configure.in: Add --with-nas-library=library to specify NAS + library with absolute path. Note that -laudio can not be used + because it is possible -laudio is not NAS library. + * configure.in: Add --with-nas-includes=dir to specify the NAS + include directory. + * libarc/url_file.c: On Windows, use mapped-file to read the file. + * timidity/timidity.c (handler): Only mark `intr'. + * interface/w32g_i.c: Use WaitSingleObject() to wait to terminate + the thread. + +1999-09-02 Yasuhide Oomori + + * INSTALL,INSTALL.jp: Update documentation to match new configuration + mechanism. + +1999-09-01 Masanao Izumo + + * configure.in: Modify action of --enable-dynamic[=mode_list]. + +1999-09-01 Masanao Izumo + + * Version 2.6.0-beta2 released for test version. + +1999-09-01 Masanao Izumo + + * configure.in: Modify action of --enable-audio[=mode_list]. + * configure.in (--enable-interface[=interface_list]): New configure + option. Specify comma separated interface list. For example: + --enable-interface=ncurses,tcltk,gtk + * configure.in,timidity/timidity.c: If default audio is not specified, + remove TIMIDITY_OUTPUT_ID macro from compiler option. + +1999-08-31 Yasuhide Oomori + + * timidity/oss_a.c: dsp_play_mode -> oss_play_mode + +1999-08-31 Kei Hibino + + * configure.in (SHELL): AC_SUBST() for autoconf-2.12 + * configure.in (slang.h): Add new test. + +1999-08-31 Katsuhiro Ueno + + * acinclude.m4: Bug fixed. + +1999-08-30 Masanao Izumo + + * Version 2.6.0-beta1 released for test version. + +1999-08-30 Masanao Izumo + + * timidity/playmidi.c (midi_program_change): Bug fixed. + * configure.in: enable_audio_opt -> have_audio_opt + * timidity/hpux_a.c: Use 'A' for HPUX network audio (Alib) instead of 'n'. + * configure.in,timidity/{linux_a.c,oss_a.c,output.c}: + Rename linux_a.c to oss_a.c + * configure.in,timidity/output.c: + Rename AU_LINUX to AU_OSS. + Split AU_HPUX into AU_HPUX_AUDIO and AU_HPUX_ALIB. + * configure.in: (Audio options): --enable-audio[=mode_list] + `mode_list' is comma separated mode list: + dev: (default) + /dev/dsp (Linux, FreeBSD, BSD/OS) + /dev/sb_dsp (BSD/OS) + /dev/audio (Sun, NetBSD, HPUX) + IRIX audio or OSF/1 MME + Windows MMS + oss: OSS /dev/dsp (Exclusive dev mode) + alsa: ALSA pcm device + alib: HPUX network audio (Alib) + nas: NAS - Network Audio System + esd: EsounD + Example: + --enable-audio=alsa,nas,esd + compiles and links ALSA, NAS, and EsounD audio output. + By default, --enable-audio=dev. + * timidity.c(TIMIDITY_OUTPUT_ID): Environment shell variable to + specify output mode id. + * configure.in(--with-default-output=): Support more output modes. + +1999-08-28 Katsuhiro Ueno + + * configure.in: + enable-dynamic -> dynamic + If the compiler is gcc, use it for SHLD instead of ld. + * configure.in, timidity/output.c (--with-default-output=): + New configure option to specify default output mode. + * interface/bitmaps/Makefile.am: + $(TIMID_DIR)/bitmaps -> $(TCL_DIR)/bitmaps + * common.makefile.in (TIMID_DIR): + Set $(pkgdatadir) instead of $(pkglibdir). + *** CAUTION ***: The default configuration file is replaced to + /usr/local/share/timidity/timidity.cfg + * configure.in, common.makefile.in, interface/Makefile.am (SHLIB_DIR): + New makefile macro. SHLIB_DIR is used to specify the directory + which contains dynamic TiMidity interfaces. + * configure.in, timidity/Makefile.am: + Add -rdynamic option for gcc if --enable-dynamic. + * interface/dynamic_c.c, timidity/timidity.c: + Pass dynamic_control_mode.flags to dynamic interface. + 1999-08-27 Masanao Izumo * Version 2.5.1 released. @@ -163,7 +365,7 @@ the interface. * timidity/{common.c,timidity.c} (open_file_noise_mode): new global variable to pass `noise_mode' of open_file() to arc_error_handler. - * wrdt.c: Make more elevant. + * wrdt.c: Make more elegant. * x_wrdwindow.c (gscreen_plane_mask): Bug fix. 1999-08-10 Masanao Izumo @@ -338,6 +540,7 @@ to pipe "PAGER" to display help message. For example: > set PAGER=more > timidity -h + Bug fixed (isatty). * configure.in (isatty): Check for `isatty' function. * utils/{nkflib.c,net.c}, libarc/arc_zip.c, interface/{xaw_i.c,gtk_i.c,x_wrdwindow.c,wrdt_x.c,ncurs_c.c}, diff -ruN TiMidity++-2.5.1/INSTALL TiMidity++-2.6.0/INSTALL --- TiMidity++-2.5.1/INSTALL Tue Apr 27 23:42:24 1999 +++ TiMidity++-2.6.0/INSTALL Thu Sep 2 23:48:45 1999 @@ -3,18 +3,18 @@ Installation guide Masanao Izumo - Last updated on Apr.28.1999 + Last updated on Sep.2.1999 ============================================================================== - This document describes how to install TiMidity++(version 2.0.0 or + This document describes how to install TiMidity++(version 2.6.0 or later) for your UNIX-like machine. Methods for Macintosh are not described in this document. - It is enabled to configure and make timidity.exe on CYGNUS + -egcs-compiler(gcc) environment of Windows98/95/NT. If you are in -Windows, install cygnus and egcs (or mingw) if you don't have them -(which is available from http://www.cygnus.com/), and run `cygnus', -and make symbolik link /bin/sh to bash. + It is enabled to configure and make timidity.exe on the Cygwin +environment of Windows98/95/NT. If you are in Windows, install cygnus +and egcs (or mingw) if you don't have them (which is available from +http://sourceware.cygnus.com/cygwin/), and run `cygnus', and make +symbolik link /bin/sh to bash. Installing process: @@ -225,7 +225,7 @@ TiMidity++ uses GUS/patch (Glavis Ultrasound) as the voice data to play. You must get GUS/patch files, and make the configuration file. You must make the configuration file (*.cfg). By default, -timidity.cfg is /usr/local/lib/timidity/timidity.cfg (or +timidity.cfg is /usr/local/share/timidity/timidity.cfg (or C:\WINDOWS\TIMIDITY.CFG on Windows). And please check the following sites for many voice(patch) data: diff -ruN TiMidity++-2.5.1/INSTALL.jp TiMidity++-2.6.0/INSTALL.jp --- TiMidity++-2.5.1/INSTALL.jp Wed Apr 28 00:10:16 1999 +++ TiMidity++-2.6.0/INSTALL.jp Sun Sep 5 21:09:17 1999 @@ -3,16 +3,16 @@ TiMidity++ $B$N%$%s%9%H!<%k(B $B=P1@@5>0(B - $B:G=*=$@5F|(B 1999$BG/(B2$B7n(B4$BF|(B + $B:G=*=$@5F|(B 1999$BG/(B9$B7n(B2$BF|(B ============================================================================== -$B$3$N%I%-%e%a%s%H$O(B TiMidity++ ($B%P!<%8%g%s$O(B 2.0.0 $B0J9_(B) $B$N(B UNIX $B>e$G$N(B +$B$3$N%I%-%e%a%s%H$O(B TiMidity++ ($B%P!<%8%g%s$O(B 2.6.0 $B0J9_(B) $B$N(B UNIX $B>e$G$N(B $B%$%s%9%H!<%kJ}K!$r@bL@$7$F$$$^$9!#(BMacintosh $B$N%$%s%9%H!<%kJ}K!$O!"(B $BK\%I%-%e%a%s%H$G$O@bL@$5$l$F$$$^$;$s!#(B -TiMidity++ $B$O!"(BWindows $B>e$N(B CYGNUS + egcs(gcc) $B4D6-$G(B configure $B$,F0:n$7!"(B -timidity.exe $B$r:n@.$9$k$3$H$,2DG=$G$9!#$b$7!"(Bcygnus $B$,$J$$>l9g$O!"(B -http://www.cygnus.com/ $BEy$+$iF~e$N(B Cygwin $B4D6-$G$b(B configure $B$,F0:n$7!"(B +timidity.exe $B$r:n@.$9$k$3$H$,2DG=$G$9!#$b$7!"(Bcygwin $B$,$J$$>l9g$O!"(B +http://sourceware.cygnus.com/cygwin/ $B$+$iF~l9g$O!"(Bcommon.makefile, Makefile, timidity.h -$BFb$N%Q%i%a%?$r=$@5$7$F$/$@$5$$!#(B +----------------------------------------------- +$B$b$7!"@5$7$/%3%s%Q%$%k$G$-$J$$>l9g$d!"MM!9$J%Q%i%a%?$r=$@5$7$?$$>l9g$O!"(B +common.makefile, Makefile, timidity.h $BFb$N%Q%i%a%?$r=$@5$7$F$/$@$5$$!#(B 3. make ------- @@ -231,7 +232,7 @@ $B$3$N%Q%C%1!<%8$N(B TiMidity $B$r%$%s%9%H!<%k$7$?$@$1$G$O!"2;$,$J$j$^$;$s!#(B $B1iAU$9$k$K$O!"(BGUS $B$N2;8;%U%!%$%k$rF~e$G$O!"(B +/usr/local/share/timidity/timidity.cfg $B$K$J$j$^$9(B($B$?$@$7!"(BWindows $B>e$G$O!"(B (C:/WINDOWS/TIMIDITY.CFG)$B!#%Q%C%A$rC5$9$N$K!"0J2<$N%5%$%H$rK,$l$F$_$F2<$5$$!#(B http://www.goice.co.jp/member/mo/timidity/link.html#gus diff -ruN TiMidity++-2.5.1/Makefile.am TiMidity++-2.6.0/Makefile.am --- TiMidity++-2.5.1/Makefile.am Wed Aug 25 16:43:40 1999 +++ TiMidity++-2.6.0/Makefile.am Wed Sep 1 02:01:11 1999 @@ -18,8 +18,6 @@ # # This Makefile is known to work with GNU make. -include $(top_builddir)/common.makefile - SUBDIRS = \ utils \ libarc \ diff -ruN TiMidity++-2.5.1/Makefile.in TiMidity++-2.6.0/Makefile.in --- TiMidity++-2.5.1/Makefile.in Sat Aug 28 00:29:50 1999 +++ TiMidity++-2.6.0/Makefile.in Tue Sep 21 23:18:00 1999 @@ -102,6 +102,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -111,6 +112,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ SUBDIRS = utils libarc interface timidity doc @@ -348,6 +350,7 @@ fi; \ done $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook + info-am: info: info-recursive dvi-am: @@ -421,8 +424,6 @@ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean - -include $(top_builddir)/common.makefile dynamics: cd interface; $(MAKE) $@ diff -ruN TiMidity++-2.5.1/NEWS TiMidity++-2.6.0/NEWS --- TiMidity++-2.5.1/NEWS Fri Aug 27 23:43:30 1999 +++ TiMidity++-2.6.0/NEWS Tue Sep 21 19:11:58 1999 @@ -1,3 +1,9 @@ +9/21, 1999 + * Version 2.6.0 released. + * Some configurations and installations are changed. + * -EFchorus=2 for the surround sound instead of detuned chorus. + * Bug fix. + 8/27, 1999 * Version 2.5.1 released. * Bug fix. diff -ruN TiMidity++-2.5.1/acinclude.m4 TiMidity++-2.6.0/acinclude.m4 --- TiMidity++-2.5.1/acinclude.m4 Fri Apr 9 20:28:52 1999 +++ TiMidity++-2.6.0/acinclude.m4 Tue Sep 7 00:53:00 1999 @@ -76,6 +76,8 @@ dnl Check for the presence of the library dnl if test $enable_alsatest = yes; then dnl AC_MSG_CHECKING(for working libasound) +dnl KEEP_LDFLAGS="$LDFLAGS" +dnl LDFLAGS="$LDFLAGS $ALSA_LIBS" dnl AC_TRY_RUN([ dnl #include dnl void main(void) @@ -90,6 +92,7 @@ dnl [AC_MSG_RESULT(unsopported) dnl AC_MSG_ERROR(Cross-compiling isn't supported...)] dnl ) +dnl LDFLAGS="$KEEP_LDFLAGS" dnl fi dnl Check for a working version of libasound that is of the right version. @@ -382,8 +385,8 @@ EOM : Call the object file tmp-dyna.o in case dlext=o. if ${CC-cc} $CFLAGS $SHCFLAGS $CPPFLAGS -c dyna.c > /dev/null 2>&1 && - mv dyna.o tmp-dyna.o > /dev/null 2>&1 && - $SHLD $SHLDFLAGS -o dyna.$so tmp-dyna.o > /dev/null 2>&1 && + mv dyna.o tmp-dyna.o > /dev/null 2>&1 && + $SHLD $SHLDFLAGS -o dyna.$so tmp-dyna.o > /dev/null 2>&1 && ${CC-cc} -o fred $CFLAGS $CPPFLAGS $LDFLAGS fred.c $LIBS $lib_dl_opt > /dev/null 2>&1; then xxx=`./fred` case $xxx in @@ -520,3 +523,231 @@ esac done ]) + + +dnl CHECK_COMPILER_OPTION(OPTIONS [, ACTION-IF-SUCCEED [, ACTION-IF-FAILED]]) +AC_DEFUN(CHECK_COMPILER_OPTION, +[AC_MSG_CHECKING([whether -$1 option is recognized]) +ac_ccoption=`echo $1 | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(timidity_cv_ccoption_$ac_ccoption, +[cat > conftest.$ac_ext < conftest.out 2>&1; then + if test -s conftest.out; then + eval "timidity_cv_ccoption_$ac_ccoption=no" + else + eval "timidity_cv_ccoption_$ac_ccoption=yes" + fi +else + eval "timidity_cv_ccoption_$ac_ccoption=no" +fi +]) +if eval "test \"`echo '$timidity_cv_ccoption_'$ac_ccoption`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , , [$2 +]) +else + AC_MSG_RESULT(no) +ifelse([$3], , , [$3 +]) +fi +]) + + +dnl MY_SEARCH_LIBS(FUNCTION, LIBRARIES [, ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) +dnl Search for a library defining FUNC, if it's not already available. + +AC_DEFUN(MY_SEARCH_LIBS, +[AC_CACHE_CHECK([for library containing $1], [timidity_cv_search_$1], +[ac_func_search_save_LIBS="$LIBS" +timidity_cv_search_$1="no" +for i in $2; do + LIBS="$i $5 $ac_func_search_save_LIBS" + AC_TRY_LINK_FUNC([$1], [timidity_cv_search_$1="$i"; break]) +done +LIBS="$ac_func_search_save_LIBS"]) +if test "$timidity_cv_search_$1" != "no"; then + $3 +else : + $4 +fi]) + + +# beginning of gtk.m4 +# Configure paths for GTK+ +# Owen Taylor 97-11-3 + +dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS +dnl +AC_DEFUN(AM_PATH_GTK, +[dnl +dnl Get the cflags and libraries from the gtk-config script +dnl +AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], + gtk_config_prefix="$withval", gtk_config_prefix="") +AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], + gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") +AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], + , enable_gtktest=yes) + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + AC_PATH_PROG(GTK_CONFIG, gtk-config, no) + min_gtk_version=ifelse([$1], ,0.99.7,$1) + AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" +dnl +dnl Now check if the installed GTK is sufficiently new. (Also sanity +dnl checks the results of gtk-config to some extent +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) + +# end of gtk.m4 diff -ruN TiMidity++-2.5.1/aclocal.m4 TiMidity++-2.6.0/aclocal.m4 --- TiMidity++-2.5.1/aclocal.m4 Sat Aug 28 00:28:51 1999 +++ TiMidity++-2.6.0/aclocal.m4 Mon Sep 20 18:44:11 1999 @@ -88,6 +88,8 @@ dnl Check for the presence of the library dnl if test $enable_alsatest = yes; then dnl AC_MSG_CHECKING(for working libasound) +dnl KEEP_LDFLAGS="$LDFLAGS" +dnl LDFLAGS="$LDFLAGS $ALSA_LIBS" dnl AC_TRY_RUN([ dnl #include dnl void main(void) @@ -102,6 +104,7 @@ dnl [AC_MSG_RESULT(unsopported) dnl AC_MSG_ERROR(Cross-compiling isn't supported...)] dnl ) +dnl LDFLAGS="$KEEP_LDFLAGS" dnl fi dnl Check for a working version of libasound that is of the right version. @@ -394,8 +397,8 @@ EOM : Call the object file tmp-dyna.o in case dlext=o. if ${CC-cc} $CFLAGS $SHCFLAGS $CPPFLAGS -c dyna.c > /dev/null 2>&1 && - mv dyna.o tmp-dyna.o > /dev/null 2>&1 && - $SHLD $SHLDFLAGS -o dyna.$so tmp-dyna.o > /dev/null 2>&1 && + mv dyna.o tmp-dyna.o > /dev/null 2>&1 && + $SHLD $SHLDFLAGS -o dyna.$so tmp-dyna.o > /dev/null 2>&1 && ${CC-cc} -o fred $CFLAGS $CPPFLAGS $LDFLAGS fred.c $LIBS $lib_dl_opt > /dev/null 2>&1; then xxx=`./fred` case $xxx in @@ -533,168 +536,58 @@ done ]) -# Define a conditional. - -AC_DEFUN(AM_CONDITIONAL, -[AC_SUBST($1_TRUE) -AC_SUBST($1_FALSE) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi]) - -# Do all the work for Automake. 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. - -# serial 1 - -dnl Usage: -dnl AM_INIT_AUTOMAKE(package,version, [no-define]) - -AC_DEFUN(AM_INIT_AUTOMAKE, -[AC_REQUIRE([AC_PROG_INSTALL]) -PACKAGE=[$1] -AC_SUBST(PACKAGE) -VERSION=[$2] -AC_SUBST(VERSION) -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 -ifelse([$3],, -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) -AC_REQUIRE([AM_SANITY_CHECK]) -AC_REQUIRE([AC_ARG_PROGRAM]) -dnl FIXME This is truly gross. -missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -AC_REQUIRE([AC_PROG_MAKE_SET])]) -# -# Check to make sure that the build environment is sane. -# - -AC_DEFUN(AM_SANITY_CHECK, -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftestfile -# 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 conftestfile 2> /dev/null` - if test "[$]*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftestfile` - fi - if test "[$]*" != "X $srcdir/configure conftestfile" \ - && test "[$]*" != "X conftestfile $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" = conftestfile - ) -then - # Ok. - : +dnl CHECK_COMPILER_OPTION(OPTIONS [, ACTION-IF-SUCCEED [, ACTION-IF-FAILED]]) +AC_DEFUN(CHECK_COMPILER_OPTION, +[AC_MSG_CHECKING([whether -$1 option is recognized]) +ac_ccoption=`echo $1 | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(timidity_cv_ccoption_$ac_ccoption, +[cat > conftest.$ac_ext < conftest.out 2>&1; then + if test -s conftest.out; then + eval "timidity_cv_ccoption_$ac_ccoption=no" + else + eval "timidity_cv_ccoption_$ac_ccoption=yes" + fi else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) + eval "timidity_cv_ccoption_$ac_ccoption=no" fi -rm -f conftest* -AC_MSG_RESULT(yes)]) - -dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) -dnl The program must properly implement --version. -AC_DEFUN(AM_MISSING_PROG, -[AC_MSG_CHECKING(for working $2) -# Run test in a subshell; some versions of sh will print an error if -# an executable is not found, even if stderr is redirected. -# Redirect stdin to placate older versions of autoconf. Sigh. -if ($2 --version) < /dev/null > /dev/null 2>&1; then - $1=$2 - AC_MSG_RESULT(found) +]) +if eval "test \"`echo '$timidity_cv_ccoption_'$ac_ccoption`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , , [$2 +]) else - $1="$3/missing $2" - AC_MSG_RESULT(missing) + AC_MSG_RESULT(no) +ifelse([$3], , , [$3 +]) fi -AC_SUBST($1)]) - -# Like AC_CONFIG_HEADER, but automatically create stamp file. - -AC_DEFUN(AM_CONFIG_HEADER, -[AC_PREREQ([2.12]) -AC_CONFIG_HEADER([$1]) -dnl When config.status generates a header, we must update the stamp-h file. -dnl This file resides in the same directory as the config header -dnl that is generated. We must strip everything past the first ":", -dnl and everything past the last "/". -AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl -ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, -<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, -<>; do - case " <<$>>CONFIG_HEADERS " in - *" <<$>>am_file "*<<)>> - echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx - ;; - esac - am_indx=`expr "<<$>>am_indx" + 1` -done<<>>dnl>>) -changequote([,]))]) +]) -# serial 1 +dnl MY_SEARCH_LIBS(FUNCTION, LIBRARIES [, ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) +dnl Search for a library defining FUNC, if it's not already available. + +AC_DEFUN(MY_SEARCH_LIBS, +[AC_CACHE_CHECK([for library containing $1], [timidity_cv_search_$1], +[ac_func_search_save_LIBS="$LIBS" +timidity_cv_search_$1="no" +for i in $2; do + LIBS="$i $5 $ac_func_search_save_LIBS" + AC_TRY_LINK_FUNC([$1], [timidity_cv_search_$1="$i"; break]) +done +LIBS="$ac_func_search_save_LIBS"]) +if test "$timidity_cv_search_$1" != "no"; then + $3 +else : + $4 +fi]) -AC_DEFUN(AM_PATH_LISPDIR, - [# If set to t, that means we are running in a shell under Emacs. - # If you have an Emacs named "t", then use the full path. - test "$EMACS" = t && EMACS= - AC_PATH_PROGS(EMACS, emacs xemacs, no) - if test $EMACS != "no"; then - AC_MSG_CHECKING([where .elc files should go]) - dnl Set default value - lispdir="\$(datadir)/emacs/site-lisp" - emacs_flavor=`echo "$EMACS" | sed -e 's,^.*/,,'` - if test "x$prefix" = "xNONE"; then - if test -d $ac_default_prefix/share/$emacs_flavor/site-lisp; then - lispdir="\$(prefix)/share/$emacs_flavor/site-lisp" - else - if test -d $ac_default_prefix/lib/$emacs_flavor/site-lisp; then - lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp" - fi - fi - else - if test -d $prefix/share/$emacs_flavor/site-lisp; then - lispdir="\$(prefix)/share/$emacs_flavor/site-lisp" - else - if test -d $prefix/lib/$emacs_flavor/site-lisp; then - lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp" - fi - fi - fi - AC_MSG_RESULT($lispdir) - fi - AC_SUBST(lispdir)]) +# beginning of gtk.m4 # Configure paths for GTK+ # Owen Taylor 97-11-3 @@ -868,4 +761,168 @@ AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) + +# end of gtk.m4 + +# Define a conditional. + +AC_DEFUN(AM_CONDITIONAL, +[AC_SUBST($1_TRUE) +AC_SUBST($1_FALSE) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi]) + +# Do all the work for Automake. 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. + +# serial 1 + +dnl Usage: +dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +AC_DEFUN(AM_INIT_AUTOMAKE, +[AC_REQUIRE([AC_PROG_INSTALL]) +PACKAGE=[$1] +AC_SUBST(PACKAGE) +VERSION=[$2] +AC_SUBST(VERSION) +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 +ifelse([$3],, +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) +dnl FIXME This is truly gross. +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_REQUIRE([AC_PROG_MAKE_SET])]) + +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN(AM_SANITY_CHECK, +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# 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 conftestfile 2> /dev/null` + if test "[$]*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $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" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) + +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN(AM_CONFIG_HEADER, +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + + +# serial 1 + +AC_DEFUN(AM_PATH_LISPDIR, + [# If set to t, that means we are running in a shell under Emacs. + # If you have an Emacs named "t", then use the full path. + test "$EMACS" = t && EMACS= + AC_PATH_PROGS(EMACS, emacs xemacs, no) + if test $EMACS != "no"; then + AC_MSG_CHECKING([where .elc files should go]) + dnl Set default value + lispdir="\$(datadir)/emacs/site-lisp" + emacs_flavor=`echo "$EMACS" | sed -e 's,^.*/,,'` + if test "x$prefix" = "xNONE"; then + if test -d $ac_default_prefix/share/$emacs_flavor/site-lisp; then + lispdir="\$(prefix)/share/$emacs_flavor/site-lisp" + else + if test -d $ac_default_prefix/lib/$emacs_flavor/site-lisp; then + lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp" + fi + fi + else + if test -d $prefix/share/$emacs_flavor/site-lisp; then + lispdir="\$(prefix)/share/$emacs_flavor/site-lisp" + else + if test -d $prefix/lib/$emacs_flavor/site-lisp; then + lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp" + fi + fi + fi + AC_MSG_RESULT($lispdir) + fi + AC_SUBST(lispdir)]) diff -ruN TiMidity++-2.5.1/common.makefile.in TiMidity++-2.6.0/common.makefile.in --- TiMidity++-2.5.1/common.makefile.in Wed Aug 11 17:49:20 1999 +++ TiMidity++-2.6.0/common.makefile.in Tue Sep 7 00:44:11 1999 @@ -17,6 +17,8 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Define follows if you want to change. +# Note that the definition of beginning with just one `#' implies +# default value from configure. SHELL=@SHELL@ @@ -26,8 +28,8 @@ #CC= @CC@ #CFLAGS = @CFLAGS@ # For pentium gcc -#CFLAGS = -O3 -mpentium -march=pentium -fomit-frame-pointer \ -# -funroll-all-loops -malign-double -ffast-math +##CFLAGS = -O3 -mpentium -march=pentium -fomit-frame-pointer \ +## -funroll-all-loops -malign-double -ffast-math #CPPFLAGS = @CPPFLAGS@ #DEFS = @DEFS@ @@ -43,14 +45,39 @@ #exec_prefix = @exec_prefix@ #bindir = @bindir@ #libdir = @libdir@ +#datadir = @datadir@ #mandir = @mandir@ pkglibdir = $(libdir)/timidity +pkgdatadir = $(datadir)/timidity #INSTALL = @INSTALL@ -# Where to install the patches, config files, and MIDI files. -# If you change this, it's a good idea to recompile the binary, -# or you'll need to invoke timidity with the -L option. -TIMID_DIR = $(pkglibdir) +# Where to install the patches, config files. +PKGDATADIR = $(pkgdatadir) -# Where to install the Tcl code, if you use the Tcl code that is. -TCL_DIR = $(pkglibdir) +# Where to install the Tcl code and the bitmaps. +# It also contains bitmaps which are shared with XAW interface. +PKGLIBDIR = $(pkglibdir) + +# Where to install the dynamic link interface. +SHLIB_DIR = $(pkglibdir) + +# Where to install timidity.el +ELISP_DIR = $(pkgdatadir) + +# Define the timidity default file search path. (optional) +DEF_DEFAULT_PATH = -DDEFAULT_PATH=\"$(PKGDATADIR)\" + +# If you want to change TCL_DIR, please do follows. +# * Add -DTKPROGPATH=\"$(TCL_DIR)/tkmidity.tcl\" to CPPFLAGS. +# * Make a symbolic link $(PKGLIBDIR)/bitmaps to $(TCL_DIR)/bitmaps +TCL_DIR = $(PKGLIBDIR) +##CPPFLAGS += -DTKPROGPATH=\"$(TCL_DIR)/tkmidity.tcl\" + +# Comment out if you don't want default path. +DEF_DEFAULT_PATH = -DDEFAULT_PATH=\"$(PKGDATADIR)\" + +# You sould not change follows definitions. +DEF_PKGDATADIR = -DPKGDATADIR=\"$(PKGDATADIR)\" +DEF_PKGLIBDIR = -DPKGLIBDIR=\"$(PKGLIBDIR)\" +DEF_SHLIB_DIR = -DSHLIB_DIR=\"$(SHLIB_DIR)\" +BITMAP_DIR = $(TCL_DIR)/bitmaps diff -ruN TiMidity++-2.5.1/config.h.in TiMidity++-2.6.0/config.h.in --- TiMidity++-2.5.1/config.h.in Sat Jul 17 15:39:26 1999 +++ TiMidity++-2.6.0/config.h.in Wed Sep 1 01:32:23 1999 @@ -158,6 +158,9 @@ /* Define if you have the header file. */ #undef HAVE_NDIR_H +/* Define if you have the header file. */ +#undef HAVE_SLANG_H + /* Define if you have the header file. */ #undef HAVE_SLANG_SLANG_H diff -ruN TiMidity++-2.5.1/configs/msc-config.h TiMidity++-2.6.0/configs/msc-config.h --- TiMidity++-2.5.1/configs/msc-config.h Sat Aug 28 00:30:47 1999 +++ TiMidity++-2.6.0/configs/msc-config.h Tue Sep 21 23:18:29 1999 @@ -217,7 +217,7 @@ #define HAVE_MMSYSTEM_H /* In VDS Macro AAA=BBB is not available. */ -#define TIMID_VERSION "2.5.1" +#define TIMID_VERSION "2.6.0" #define DEFAULT_PATH ".\\" #define AU_W32 #define WINSOCK diff -ruN TiMidity++-2.5.1/configure TiMidity++-2.6.0/configure --- TiMidity++-2.5.1/configure Sat Aug 28 00:28:53 1999 +++ TiMidity++-2.6.0/configure Mon Sep 20 18:44:15 1999 @@ -18,29 +18,44 @@ ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help - --with-tcl-includes=dir Tcl include file path " + --with-tcl-includes=DIR Tcl include file path " ac_help="$ac_help - --with-tcl-libs=dir Tcl include file path " + --with-tcl-libs=DIR Tcl library file path " ac_help="$ac_help - --with-tk-includes=dir Tk include file path " + --with-tk-includes=DIR Tk include file path " ac_help="$ac_help - --with-tk-libs=dir Tk include file path " + --with-tk-libs=DIR Tk library file path " ac_help="$ac_help - --with-offix-includes=dir Offix include file path " + --with-offix-includes=DIR Offix include file path " ac_help="$ac_help - --with-offix-libs=dir Offix include file path " + --with-offix-libs=DIR Offix include file path " ac_help="$ac_help - --enable-esd Enable EsounD output (default is no)" + --with-nas-library=library NAS absolute library path (Don't use -laudio)" ac_help="$ac_help - --with-esd-prefix=PFX Prefix where ESD is installed (optional)" + --with-nas-includes=DIR NAS include files are in dir" ac_help="$ac_help - --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)" + --enable-audio[=mode_list] Enable audio (Specify comma separated mode list): + default: Automatically select audio device. + oss: OSS /dev/dsp + sun: SunOS /dev/audio + hpux: HPUX /dev/audio + irix: IRIX audio library + mme: OSF/1 MME + sb_dsp: BSD/OS 2.0 /dev/sb_dsp + w32: Windows MMS + alsa: ALSA pcm device + alib: HPUX network audio (Alib) + nas: NAS - Network Audio System + esd: EsounD" ac_help="$ac_help - --disable-esdtest Do not try to compile and run a test ESD program" + --with-default-output= Specify default output mode (optional): + default|alsa|alib|nas|esd|wav|au|aiff|list" +ac_help="$ac_help + --enable-esd EsounD (Obsoleted. Use --enable-audio=esd)" ac_help="$ac_help - --enable-audio Enable audio (default if you use supported platform) " + --enable-nas NAS (Obsoleted. Use --enable-audio=nas)" ac_help="$ac_help - --enable-nas NAS (Network Audio Sound) support " + --enable-alsa ALSA (Obsoleted. Use --enable-audio=alsa)" ac_help="$ac_help --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)" ac_help="$ac_help @@ -48,7 +63,16 @@ ac_help="$ac_help --disable-alsatest Do not try to compile and run a test Alsa program" ac_help="$ac_help - --enable-dynamic Enable dynamic link interface (default is no)" + --with-esd-prefix=PFX Prefix where ESD is installed (optional)" +ac_help="$ac_help + --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)" +ac_help="$ac_help + --disable-esdtest Do not try to compile and run a test ESD program" +ac_help="$ac_help + --enable-interface=[interface_list] Comma separated interface list " +ac_help="$ac_help + --enable-dynamic Enable dynamic link interface (default is no) + --enable-dynamic=dynamic_list Comma separated dynamic interface list" ac_help="$ac_help --enable-ncurses Enable ncurses interface (default is no)" ac_help="$ac_help @@ -597,6 +621,7 @@ fi +SHELL=${CONFIG_SHELL-/bin/sh} ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -644,7 +669,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:648: checking host system type" >&5 +echo "configure:673: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -665,7 +690,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:669: checking target system type" >&5 +echo "configure:694: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -683,7 +708,7 @@ echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:687: checking build system type" >&5 +echo "configure:712: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -717,7 +742,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:721: checking for a BSD compatible install" >&5 +echo "configure:746: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -770,7 +795,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:774: checking whether build environment is sane" >&5 +echo "configure:799: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -827,7 +852,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:831: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:856: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -856,7 +881,7 @@ PACKAGE=TiMidity++ -VERSION=2.5.1 +VERSION=2.6.0 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -866,7 +891,7 @@ missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:870: checking for working aclocal" >&5 +echo "configure:895: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -879,7 +904,7 @@ fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:883: checking for working autoconf" >&5 +echo "configure:908: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -892,7 +917,7 @@ fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:896: checking for working automake" >&5 +echo "configure:921: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -905,7 +930,7 @@ fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:909: checking for working autoheader" >&5 +echo "configure:934: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -918,7 +943,7 @@ fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:922: checking for working makeinfo" >&5 +echo "configure:947: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -933,7 +958,7 @@ echo $ac_n "checking whether grep returns status""... $ac_c" 1>&6 -echo "configure:937: checking whether grep returns status" >&5 +echo "configure:962: checking whether grep returns status" >&5 echo "grimblepritz" >grimble if grep blurfldyick grimble >/dev/null 2>&1 ; then contains="./contains" @@ -968,7 +993,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:972: checking for $ac_word" >&5 +echo "configure:997: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EMACS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1006,7 +1031,7 @@ if test $EMACS != "no"; then echo $ac_n "checking where .elc files should go""... $ac_c" 1>&6 -echo "configure:1010: checking where .elc files should go" >&5 +echo "configure:1035: checking where .elc files should go" >&5 lispdir="\$(datadir)/emacs/site-lisp" emacs_flavor=`echo "$EMACS" | sed -e 's,^.*/,,'` if test "x$prefix" = "xNONE"; then @@ -1045,6 +1070,7 @@ EXTRADEFS= EXTRALIBS= SYSEXTRAS= +timidity_LDFLAGS= lib_xm_opt= lib_xaw_opt= @@ -1091,7 +1117,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1095: checking for $ac_word" >&5 +echo "configure:1121: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1121,7 +1147,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1125: checking for $ac_word" >&5 +echo "configure:1151: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1172,7 +1198,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1176: checking for $ac_word" >&5 +echo "configure:1202: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1204,7 +1230,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1208: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1234: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1215,12 +1241,12 @@ cat > conftest.$ac_ext << EOF -#line 1219 "configure" +#line 1245 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1246,12 +1272,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1250: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1276: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1255: checking whether we are using GNU C" >&5 +echo "configure:1281: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1260,7 +1286,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1279,7 +1305,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1283: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1309: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1322,7 +1348,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1326: checking for a BSD compatible install" >&5 +echo "configure:1352: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1377,7 +1403,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1381: checking for $ac_word" >&5 +echo "configure:1407: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1405,7 +1431,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1409: checking whether ln -s works" >&5 +echo "configure:1435: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1425,6 +1451,34 @@ echo "$ac_t""no" 1>&6 fi +echo $ac_n "checking whether -rdynamic option is recognized""... $ac_c" 1>&6 +echo "configure:1456: checking whether -rdynamic option is recognized" >&5 +ac_ccoption=`echo rdynamic | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'timidity_cv_ccoption_$ac_ccoption'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < conftest.out 2>&1; then + if test -s conftest.out; then + eval "timidity_cv_ccoption_$ac_ccoption=no" + else + eval "timidity_cv_ccoption_$ac_ccoption=yes" + fi +else + eval "timidity_cv_ccoption_$ac_ccoption=no" +fi + +fi + +if eval "test \"`echo '$timidity_cv_ccoption_'$ac_ccoption`\" = yes"; then + echo "$ac_t""yes" 1>&6 + +else + echo "$ac_t""no" 1>&6 + +fi # Check whether --with-elf or --without-elf was given. @@ -1448,7 +1502,7 @@ so="so" ;; *-*-netbsd*) - test -n "$SHLD" || SHLD="ld -Bforcearchive -Bshareable" + test -n "$SHLD" || SHLD="$CC -shared -nostartfiles" so="so" ;; @@ -1503,14 +1557,19 @@ so="so" ;; *) - test -n "$SHLD" || SHLD="ld -Bdynamic -G" + test -n "$SHLD" || \ + if test "x$GCC" = xyes; then + SHLD="$CC -shared" + else + SHLD="ld -Bdynamic -G" + fi so="so" ;; esac echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6 -echo "configure:1514: checking for sqrt in -lm" >&5 +echo "configure:1573: checking for sqrt in -lm" >&5 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1518,7 +1577,7 @@ ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1557,7 +1616,7 @@ fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1561: checking for socket in -lsocket" >&5 +echo "configure:1620: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1565,7 +1624,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1604,7 +1663,7 @@ fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1608: checking for dlopen in -ldl" >&5 +echo "configure:1667: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1612,7 +1671,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1646,12 +1705,12 @@ for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1650: checking for $ac_func" >&5 +echo "configure:1709: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1696,7 +1755,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1700: checking for gethostbyname in -lnsl" >&5 +echo "configure:1759: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1704,7 +1763,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1746,7 +1805,7 @@ done echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1750: checking how to run the C preprocessor" >&5 +echo "configure:1809: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1761,13 +1820,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1778,13 +1837,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1795,13 +1854,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1830,7 +1889,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1834: checking for X" >&5 +echo "configure:1893: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1892,12 +1951,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1966,14 +2025,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -2079,17 +2138,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2083: checking whether -R must be followed by a space" >&5 +echo "configure:2142: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -2105,14 +2164,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -2144,7 +2203,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:2148: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:2207: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2152,7 +2211,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2185,7 +2244,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:2189: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:2248: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2193,7 +2252,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2233,12 +2292,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2237: checking for gethostbyname" >&5 +echo "configure:2296: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2282,7 +2341,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2286: checking for gethostbyname in -lnsl" >&5 +echo "configure:2345: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2290,7 +2349,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2331,12 +2390,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2335: checking for connect" >&5 +echo "configure:2394: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2380,7 +2439,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2384: checking for connect in -lsocket" >&5 +echo "configure:2443: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2388,7 +2447,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2423,12 +2482,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2427: checking for remove" >&5 +echo "configure:2486: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2472,7 +2531,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2476: checking for remove in -lposix" >&5 +echo "configure:2535: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2480,7 +2539,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2515,12 +2574,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2519: checking for shmat" >&5 +echo "configure:2578: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2564,7 +2623,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2568: checking for shmat in -lipc" >&5 +echo "configure:2627: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2572,7 +2631,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2616,7 +2675,7 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2620: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2679: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2624,7 +2683,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2683,7 +2742,7 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:2687: checking for XOpenDisplay in -lX11" >&5 +echo "configure:2746: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2691,7 +2750,7 @@ ac_save_LIBS="$LIBS" LIBS="-lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2730,12 +2789,12 @@ fi echo $ac_n "checking X11 version 6""... $ac_c" 1>&6 -echo "configure:2734: checking X11 version 6" >&5 +echo "configure:2793: checking X11 version 6" >&5 if eval "test \"`echo '$''{'timidity_cv_x11_version_6'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -2745,7 +2804,7 @@ ; return 0; } EOF -if { (eval echo configure:2749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* timidity_cv_x11_version_6=yes else @@ -2765,7 +2824,7 @@ KEEPLIBS=$LIBS echo $ac_n "checking for XShapeCombineMask in -lXext""... $ac_c" 1>&6 -echo "configure:2769: checking for XShapeCombineMask in -lXext" >&5 +echo "configure:2828: checking for XShapeCombineMask in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeCombineMask | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2773,7 +2832,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXext $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2806,7 +2865,7 @@ fi echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2810: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2869: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2814,7 +2873,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2853,7 +2912,7 @@ fi echo $ac_n "checking for SmcOpenConnection in -lSM""... $ac_c" 1>&6 -echo "configure:2857: checking for SmcOpenConnection in -lSM" >&5 +echo "configure:2916: checking for SmcOpenConnection in -lSM" >&5 ac_lib_var=`echo SM'_'SmcOpenConnection | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2861,7 +2920,7 @@ ac_save_LIBS="$LIBS" LIBS="-lSM $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2894,7 +2953,7 @@ fi echo $ac_n "checking for XtVaAppInitialize in -lXt""... $ac_c" 1>&6 -echo "configure:2898: checking for XtVaAppInitialize in -lXt" >&5 +echo "configure:2957: checking for XtVaAppInitialize in -lXt" >&5 ac_lib_var=`echo Xt'_'XtVaAppInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2902,7 +2961,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2935,7 +2994,7 @@ fi echo $ac_n "checking for XmuInternAtom in -lXmu""... $ac_c" 1>&6 -echo "configure:2939: checking for XmuInternAtom in -lXmu" >&5 +echo "configure:2998: checking for XmuInternAtom in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuInternAtom | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2943,7 +3002,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXmu $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2977,12 +3036,12 @@ for ac_func in XmuRegisterExternalAgent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2981: checking for $ac_func" >&5 +echo "configure:3040: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3030,7 +3089,7 @@ done echo $ac_n "checking for XawInitializeWidgetSet in -lXaw3d""... $ac_c" 1>&6 -echo "configure:3034: checking for XawInitializeWidgetSet in -lXaw3d" >&5 +echo "configure:3093: checking for XawInitializeWidgetSet in -lXaw3d" >&5 ac_lib_var=`echo Xaw3d'_'XawInitializeWidgetSet | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3038,7 +3097,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXaw3d $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3068,7 +3127,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for XawInitializeWidgetSet in -lXaw""... $ac_c" 1>&6 -echo "configure:3072: checking for XawInitializeWidgetSet in -lXaw" >&5 +echo "configure:3131: checking for XawInitializeWidgetSet in -lXaw" >&5 ac_lib_var=`echo Xaw'_'XawInitializeWidgetSet | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3076,7 +3135,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXaw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3111,7 +3170,7 @@ fi echo $ac_n "checking for XmCreateForm in -lXm""... $ac_c" 1>&6 -echo "configure:3115: checking for XmCreateForm in -lXm" >&5 +echo "configure:3174: checking for XmCreateForm in -lXm" >&5 ac_lib_var=`echo Xm'_'XmCreateForm | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3119,7 +3178,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3154,12 +3213,12 @@ for ac_func in XShmCreatePixmap do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3158: checking for $ac_func" >&5 +echo "configure:3217: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3215,12 +3274,12 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3219: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3278: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3228,7 +3287,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3253,7 +3312,7 @@ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3257: checking for opendir in -ldir" >&5 +echo "configure:3316: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3261,7 +3320,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3294,7 +3353,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3298: checking for opendir in -lx" >&5 +echo "configure:3357: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3302,7 +3361,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3336,12 +3395,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3340: checking for ANSI C header files" >&5 +echo "configure:3399: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3349,7 +3408,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3366,7 +3425,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3384,7 +3443,7 @@ 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 < EOF @@ -3405,7 +3464,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3416,7 +3475,7 @@ exit (0); } EOF -if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3440,12 +3499,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3444: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3503: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3461,7 +3520,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3485,21 +3544,21 @@ unistd.h dlfcn.h glob.h getopt.h errno.h machine/endian.h \ stropts.h sys/audioio.h sun/audioio.h sys/types.h \ sys/ipc.h sys/shm.h sys/param.h X11/extensions/XShm.h \ - X11/Xmu/ExtAgent.h + X11/Xmu/ExtAgent.h sys/soundcard.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3493: checking for $ac_hdr" >&5 +echo "configure:3552: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3527,17 +3586,17 @@ ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:3531: checking for string.h" >&5 +echo "configure:3590: checking for string.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3561,12 +3620,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3565: checking for working const" >&5 +echo "configure:3624: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3636,14 +3695,14 @@ fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3640: checking whether char is unsigned" >&5 +echo "configure:3699: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3699,14 +3758,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3703: checking whether byte ordering is bigendian" >&5 +echo "configure:3762: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -3717,11 +3776,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:3721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -3732,7 +3791,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3752,7 +3811,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3789,21 +3848,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3793: checking for inline" >&5 +echo "configure:3852: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3829,12 +3888,12 @@ esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3833: checking for off_t" >&5 +echo "configure:3892: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3862,12 +3921,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3866: checking for pid_t" >&5 +echo "configure:3925: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3895,12 +3954,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3899: checking for size_t" >&5 +echo "configure:3958: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3928,12 +3987,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3932: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3991: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3942,7 +4001,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3964,19 +4023,19 @@ echo $ac_n "checking volatile declaration""... $ac_c" 1>&6 -echo "configure:3968: checking volatile declaration" >&5 +echo "configure:4027: checking volatile declaration" >&5 if eval "test \"`echo '$''{'timidity_cv_type_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* timidity_cv_type_volatile=yes else @@ -3994,12 +4053,12 @@ fi echo $ac_n "checking union semun declaration""... $ac_c" 1>&6 -echo "configure:3998: checking union semun declaration" >&5 +echo "configure:4057: checking union semun declaration" >&5 if eval "test \"`echo '$''{'timidity_cv_type_union_semun'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4008,7 +4067,7 @@ union semun x ; return 0; } EOF -if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* timidity_cv_type_union_semun=yes else @@ -4027,13 +4086,13 @@ if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:4031: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:4090: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -4051,7 +4110,7 @@ if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -4073,7 +4132,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4077: checking for 8-bit clean memcmp" >&5 +echo "configure:4136: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4081,7 +4140,7 @@ ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4112,17 +4171,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4116: checking for $ac_hdr" >&5 +echo "configure:4175: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4151,12 +4210,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4155: checking for $ac_func" >&5 +echo "configure:4214: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4204,7 +4263,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4208: checking for working mmap" >&5 +echo "configure:4267: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4212,7 +4271,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -4375,7 +4434,7 @@ fi echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6 -echo "configure:4379: checking whether setvbuf arguments are reversed" >&5 +echo "configure:4438: checking whether setvbuf arguments are reversed" >&5 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4383,7 +4442,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < /* If setvbuf has the reversed format, exit 0. */ @@ -4397,7 +4456,7 @@ exit(0); /* Non-reversed systems segv here. */ } EOF -if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_setvbuf_reversed=yes else @@ -4421,12 +4480,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4425: checking return type of signal handlers" >&5 +echo "configure:4484: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4443,7 +4502,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:4447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4462,12 +4521,12 @@ echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4466: checking for vprintf" >&5 +echo "configure:4525: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4514,12 +4573,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4518: checking for _doprnt" >&5 +echo "configure:4577: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4570,12 +4629,12 @@ sleep usleep strncasecmp strerror getopt getcwd popen signal isatty do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4574: checking for $ac_func" >&5 +echo "configure:4633: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4627,12 +4686,12 @@ case "$ac_cv_header_dirent_dirent_h$ac_cv_header_dirent_sys_ndir_h$ac_cv_header_dirent_sys_dir_h$ac_cv_header_dirent_ndir_h" in *yes*) echo $ac_n "checking for opendir""... $ac_c" 1>&6 -echo "configure:4631: checking for opendir" >&5 +echo "configure:4690: checking for opendir" >&5 if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_opendir=yes" else @@ -4683,12 +4742,12 @@ esac if test "x$enable_network" = "xyes"; then echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:4687: checking for socket" >&5 +echo "configure:4746: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -4729,7 +4788,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for WSAStartup in -lwsock32""... $ac_c" 1>&6 -echo "configure:4733: checking for WSAStartup in -lwsock32" >&5 +echo "configure:4792: checking for WSAStartup in -lwsock32" >&5 ac_lib_var=`echo wsock32'_'WSAStartup | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'wapi_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4737,7 +4796,7 @@ ac_save_LIBS="$LIBS" LIBS="-lwsock32 $LIBS" cat > conftest.$ac_ext < #include @@ -4746,7 +4805,7 @@ WSAStartup(0,0); ; return 0; } EOF -if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "wapi_cv_lib_$ac_lib_var=yes" else @@ -4831,313 +4890,254 @@ -# Check whether --enable-esd or --disable-esd was given. -if test "${enable_esd+set}" = set; then - enableval="$enable_esd" - if test "$enableval" = "yes"; then - KEEPCFLAGS=$CFLAGS - KEEPLIBS=$LIBS - KEEPLDFLAGS=$LDFLAGS - # Check whether --with-esd-prefix or --without-esd-prefix was given. -if test "${with_esd_prefix+set}" = set; then - withval="$with_esd_prefix" - esd_prefix="$withval" -else - esd_prefix="" -fi -# Check whether --with-esd-exec-prefix or --without-esd-exec-prefix was given. -if test "${with_esd_exec_prefix+set}" = set; then - withval="$with_esd_exec_prefix" - esd_exec_prefix="$withval" -else - esd_exec_prefix="" +audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas esd' + +# Check whether --with-nas-library or --without-nas-library was given. +if test "${with_nas_library+set}" = set; then + withval="$with_nas_library" + : fi -# Check whether --enable-esdtest or --disable-esdtest was given. -if test "${enable_esdtest+set}" = set; then - enableval="$enable_esdtest" +# Check whether --with-nas-includes or --without-nas-includes was given. +if test "${with_nas_includes+set}" = set; then + withval="$with_nas_includes" : -else - enable_esdtest=yes fi - if test x$esd_exec_prefix != x ; then - esd_args="$esd_args --exec-prefix=$esd_exec_prefix" - if test x${ESD_CONFIG+set} != xset ; then - ESD_CONFIG=$esd_exec_prefix/bin/esd-config - fi - fi - if test x$esd_prefix != x ; then - esd_args="$esd_args --prefix=$esd_prefix" - if test x${ESD_CONFIG+set} != xset ; then - ESD_CONFIG=$esd_prefix/bin/esd-config - fi - fi - # Extract the first word of "esd-config", so it can be a program name with args. -set dummy esd-config; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4883: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +# Check whether --enable-audio or --disable-audio was given. +if test "${enable_audio+set}" = set; then + enableval="$enable_audio" + enable_audio=$enableval + have_audio_opt=yes else - case "$ESD_CONFIG" in - /*) - ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no" - ;; -esac + enable_audio=yes + have_audio_opt=no fi -ESD_CONFIG="$ac_cv_path_ESD_CONFIG" -if test -n "$ESD_CONFIG"; then - echo "$ac_t""$ESD_CONFIG" 1>&6 -else - echo "$ac_t""no" 1>&6 + + +test "x$enable_audio" = xyes && enable_audio=default + +if test "x$enable_audio" != xno; then + for i in `echo $enable_audio | sed 's/,/ /g'`; do + eval "au_enable_$i=yes" + done fi - min_esd_version=0.2.7 - echo $ac_n "checking for ESD - version >= $min_esd_version""... $ac_c" 1>&6 -echo "configure:4918: checking for ESD - version >= $min_esd_version" >&5 - no_esd="" - if test "$ESD_CONFIG" = "no" ; then - no_esd=yes - else - ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` - ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` +DEFAULT_PLAYMODE= +# Check whether --with-default-output or --without-default-output was given. +if test "${with_default_output+set}" = set; then + withval="$with_default_output" + if test "$enable_audio" != no; then + DEFAULT_PLAYMODE=$withval + eval "au_enable_$DEFAULT_PLAYMODE=yes" + else + echo "configure: warning: --with-default-output=$withval: audio is not enabled" 1>&2 + fi +fi - esd_major_version=`$ESD_CONFIG $esd_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - esd_minor_version=`$ESD_CONFIG $esd_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test "x$enable_esdtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $ESD_CFLAGS" - LIBS="$LIBS $ESD_LIBS" - rm -f conf.esdtest - if test "$cross_compiling" = yes; then - echo $ac_n "cross compiling; assumed OK... $ac_c" -else - cat > conftest.$ac_ext < -#include -#include -#include +# Check whether --enable-esd or --disable-esd was given. +if test "${enable_esd+set}" = set; then + enableval="$enable_esd" + au_enable_esd=$enableval +fi -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} +# Check whether --enable-nas or --disable-nas was given. +if test "${enable_nas+set}" = set; then + enableval="$enable_nas" + au_enable_nas=$enableval +fi -int main () -{ - int major, minor, micro; - char *tmp_version; +# Check whether --enable-alsa or --disable-alsa was given. +if test "${enable_alsa+set}" = set; then + enableval="$enable_alsa" + au_enable_nas=$enableval +fi - system ("touch conf.esdtest"); - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_esd_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_esd_version"); - exit(1); - } +if test "x$au_enable_default" = xyes; then + case "$target" in + *-*-linux*|*-*-freebsd*) + au_enable_oss=yes + ;; + *-*-bsdi2.0) + au_enable_sb_dsp=yes + ;; + *-*-bsdi2.1|*-*-bsdi3.?|*-*-bsdi4.?) + au_enable_oss=yes + ;; + *-*-hpux*) + au_enable_hpux=yes + ;; + *-dec-*) + au_enable_mme=yes + ;; + *irix*) + au_enable_irix=yes + ;; + *-*-sunos4*) + au_enable_sun=yes + ;; + *-*-solaris*) + au_enable_sun=yes + ;; + *-*-netbsd*) + au_enable_sun=yes + ;; + *-*-cygwin32*) + au_enable_w32=yes + ;; + *) + echo "configure: warning: No --enable-audio=default audio for $target" 1>&2 + ;; + esac +fi - if (($esd_major_version > major) || - (($esd_major_version == major) && ($esd_minor_version > minor)) || - (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) - { - return 0; - } +echo $ac_n "checking enable_audio=oss""... $ac_c" 1>&6 +echo "configure:5001: checking enable_audio=oss" >&5 +if test "x$au_enable_oss" = xyes; then + EXTRADEFS="$EXTRADEFS -DAU_OSS" + SYSEXTRAS="$SYSEXTRAS oss_a.c" + if test "x$ac_cv_header_sys_soundcard_h" = xyes; then + echo "$ac_t""yes - " 1>&6 else - { - printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); - printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); - printf("*** to point to the correct copy of esd-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - + case "$target" in + *linux*|*freebsd*) + echo "$ac_t""yes" 1>&6 + ;; + *) + echo "configure: warning: is not found" 1>&2 + ;; + esac + fi +else + echo "$ac_t""no" 1>&6 +fi -EOF -if { (eval echo configure:5000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : +echo $ac_n "checking enable_audio=sun""... $ac_c" 1>&6 +echo "configure:5022: checking enable_audio=sun" >&5 +if test "x$au_enable_sun" = xyes; then + case "$target" in + *-*-sunos4*) + if test -f /usr/demo/SOUND/libaudio.a; then + EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/libaudio.a" + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""Notice: libaudio.a is not found (ignore)" 1>&6 + fi + ;; + *-*-solaris*) + if test -f /usr/demo/SOUND/lib/libaudio.a; then + EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/lib/libaudio.a" + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""Notice: libaudio.a is not found (ignore)" 1>&6 + fi + ;; + *) echo "$ac_t""yes" 1>&6 + ;; + esac + EXTRADEFS="$EXTRADEFS -DAU_SUN" + SYSEXTRAS="$SYSEXTRAS sun_a.c" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - no_esd=yes + echo "$ac_t""no" 1>&6 fi -rm -fr conftest* + +echo $ac_n "checking enable_audio=hpux""... $ac_c" 1>&6 +echo "configure:5051: checking enable_audio=hpux" >&5 +if test "x$au_enable_hpux" = xyes; then + case "$target" in + *-*-hpux*) echo "$ac_t""yes" 1>&6 ;; + *) echo "configure: warning: may not work on $target" 1>&2 ;; + esac + EXTRADEFS="$EXTRADEFS -DAU_HPUX_AUDIO" + SYSEXTRAS="$SYSEXTRAS hpux_d_a.c" +else + echo "$ac_t""no" 1>&6 fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_esd" = x ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - if test "$ESD_CONFIG" = "no" ; then - echo "*** The esd-config script installed by ESD could not be found" - echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the ESD_CONFIG environment variable to the" - echo "*** full path to esd-config." - else - if test -f conf.esdtest ; then - : - else - echo "*** Could not run ESD test program, checking why..." - CFLAGS="$CFLAGS $ESD_CFLAGS" - LIBS="$LIBS $ESD_LIBS" - cat > conftest.$ac_ext < -#include - -int main() { - return 0; -; return 0; } -EOF -if { (eval echo configure:5044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding ESD or finding the wrong" - echo "*** version of ESD. If it is not finding ESD, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +echo $ac_n "checking enable_audio=irix""... $ac_c" 1>&6 +echo "configure:5064: checking enable_audio=irix" >&5 +if test "x$au_enable_irix" = xyes; then + case "$target" in + *-sgi-irix5*|*-sgi-irix6.2) + EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_OLDAL" + echo "$ac_t""yes" 1>&6 + ;; + *-sgi-irix6*) + EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_NEWAL" + echo "$ac_t""yes" 1>&6 + ;; + *) echo "configure: warning: may not work on $target" 1>&2 ;; + esac + SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_al.c" + EXTRALIBS="$EXTRASLIBS -laudio" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means ESD was incorrectly installed" - echo "*** or that you have moved ESD since it was installed. In the latter case, you" - echo "*** may want to edit the esd-config script: $ESD_CONFIG" + echo "$ac_t""no" 1>&6 fi -rm -f conftest* - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - ESD_CFLAGS="" - ESD_LIBS="" - : - fi - - - rm -f conf.esdtest - CFLAGS=$KEEPCFLAGS - LIBS=$KEEPLIBS - LDFLAGS=$KEEPLDFLAGS - if test "x$no_esd" = x; then - EXTRADEFS="$EXTRADEFS -DAU_ESD" - SYSEXTRAS="$SYSEXTRAS esd_a.c" - for f in $ESD_CFLAGS; do - case ".$f" in - .-I?*|.-D?*) CPPFLAGS="$CPPFLAGS $f" ;; - *) CFLAGS="$CPPFLAGS $f" ;; - esac -done - - LIBS="$LIBS $ESD_LIBS" - else - echo "configure: warning: EsounD: Couldn't configure" 1>&2 - fi - fi +echo $ac_n "checking enable_audio=mme""... $ac_c" 1>&6 +echo "configure:5084: checking enable_audio=mme" >&5 +if test "x$au_enable_mme" = xyes; then + case "$target" in + *-dec-*) echo "$ac_t""yes" 1>&6 ;; + *) echo "configure: warning: may not work on $target" 1>&2 ;; + esac + EXTRADEFS="$EXTRADEFS -DAU_DEC -DAU_AUDRIV" + SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_mme.c" + CPPFLAGS="$CPPFLAGS -I/usr/opt/MME210/include" + EXTRALIBS="$EXTRALIBS /usr/opt/MME220/lib/libmme.a" +else + echo "$ac_t""no" 1>&6 fi - - -echo $ac_n "checking whether to enable audio""... $ac_c" 1>&6 -echo "configure:5100: checking whether to enable audio" >&5 -# Check whether --enable-audio or --disable-audio was given. -if test "${enable_audio+set}" = set; then - enableval="$enable_audio" - enable_audio=$enableval +echo $ac_n "checking enable_audio=sb_dsp""... $ac_c" 1>&6 +echo "configure:5099: checking enable_audio=sb_dsp" >&5 +if test "x$au_enable_sb_dsp" = xyes; then + case "$target" in + *-*-bsdi2.0) echo "$ac_t""yes" 1>&6 ;; + *) echo "configure: warning: may not work on $target" 1>&2 ;; + esac + EXTRADEFS="$EXTRADEFS -DAU_BSDI -DDEFAULT_RATE=22500" + SYSEXTRAS="$SYSEXTRAS bsd20_a.c" else - enable_audio=yes - enable_audio_opt=no + echo "$ac_t""no" 1>&6 fi - -# Check whether --enable-nas or --disable-nas was given. -if test "${enable_nas+set}" = set; then - enableval="$enable_nas" - if test "x$with_x" != xyes; then - { echo "configure: error: nas: --with-x option must be specified" 1>&2; exit 1; } - fi - EXTRADEFS="$EXTRADEFS -DAU_NAS" - SYSEXTRAS="$SYSEXTRAS nas_a.c" - - EXTRALIBS="$EXTRALIBS $x_libraries/libaudio.a" - lib_xt_opt=-lXt - if test "x$have_xext" = xyes; then - lib_xext_opt=-lXext - fi - if test "x$have_xprelibs" = xyes; then - lib_xprelibs_opt='-lSM -lICE' - fi - +echo $ac_n "checking enable_audio=w32""... $ac_c" 1>&6 +echo "configure:5112: checking enable_audio=w32" >&5 +if test "x$au_enable_w32" = xyes; then + case "$target" in + *-*-cygwin32*) + if test "x$enable_w32gui" = xyes; then + SYSEXTRAS="$SYSEXTRAS w32g_a.c" + else + SYSEXTRAS="$SYSEXTRAS w32_a.c" + fi + echo "$ac_t""yes" 1>&6 + ;; + *) + echo "configure: warning: may not work on $target" 1>&2 + SYSEXTRAS="$SYSEXTRAS w32_a.c" + ;; + esac + EXTRALIBS="$EXTRALIBS -lwinmm" + EXTRADEFS="$EXTRADEFS -DAU_W32" +else + echo "$ac_t""no" 1>&6 fi - -if test "$enable_audio" = "yes"; then - case "$target" in - *-*-linux*|*-*-freebsd*) - EXTRADEFS="$EXTRADEFS -DAU_LINUX" - SYSEXTRAS="$SYSEXTRAS linux_a.c" - echo "$ac_t""yes linux" 1>&6 - KEEPCFLAGS=$CFLAGS - KEEPLIBS=$LIBS - KEEPLDFLAGS=$LDFLAGS - have_alsa=no +echo $ac_n "checking enable_audio=alsa""... $ac_c" 1>&6 +echo "configure:5135: checking enable_audio=alsa" >&5 +if test "x$au_enable_alsa" = xyes; then + echo "$ac_t""" 1>&6 + KEEPCFLAGS=$CFLAGS + KEEPLIBS=$LIBS + KEEPLDFLAGS=$LDFLAGS + have_alsa=no # Check whether --with-alsa-prefix or --without-alsa-prefix was given. if test "${with_alsa_prefix+set}" = set; then withval="$with_alsa_prefix" @@ -5301,175 +5301,501 @@ - CFLAGS=$KEEPCFLAGS - LIBS=$KEEPLIBS - LDFLAGS=$KEEPLDFLAGS - if test "x$have_alsa" = "xyes"; then - EXTRADEFS="$EXTRADEFS -DAU_ALSA" - SYSEXTRAS="$SYSEXTRAS alsa_a.c" - for f in $ALSA_CFLAGS; do + if test have_alsa = no; then + echo "configure: warning: ALSA: Couldn't configure" 1>&2 + CFLAGS=$KEEPCFLAGS + LIBS=$KEEPLIBS + LDFLAGS=$KEEPLDFLAGS + else + echo "$ac_t""ALSA: Enabled" 1>&6 + EXTRADEFS="$EXTRADEFS -DAU_ALSA" + SYSEXTRAS="$SYSEXTRAS alsa_a.c" + for f in $ALSA_CFLAGS; do case ".$f" in .-I?*|.-D?*) CPPFLAGS="$CPPFLAGS $f" ;; *) CFLAGS="$CPPFLAGS $f" ;; esac done - LIBS="$LIBS $ALSA_LIBS" - fi - ;; - *-*-bsdi2.0) - EXTRADEFS="$EXTRADEFS -DAU_BSDI -DDEFAULT_RATE=22500" - SYSEXTRAS="$SYSEXTRAS bsd20_a.c" - echo "$ac_t""yes bsdi" 1>&6 - ;; - *-*-bsdi2.1|*-*-bsdi3.?|*-*-bsdi4.?) - EXTRADEFS="$EXTRADEFS -DAU_LINUX" - SYSEXTRAS="$SYSEXTRAS linux_a.c" - echo "$ac_t""yes bsdi" 1>&6 - ;; - *-*-hpux*) - EXTRADEFS="$EXTRADEFS -DAU_HPUX" - SYSEXTRAS="$SYSEXTRAS hpux_d_a.c hpux_a.c" - if test -d /opt/audio/include; then - CPPFLAGS="$CPPFLAGS -I/opt/audio/include" - fi - if test -d /opt/audio/lib; then - EXTRALIBS="$EXTRALIBS -L/opt/audio/lib" - fi - EXTRALIBS="$EXTRALIBS -lAlib" - echo "$ac_t""yes hpux" 1>&6 - ;; - *-dec-*) - EXTRADEFS="$EXTRADEFS -DAU_DEC -DAU_AUDRIV" - SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_mme.c" - CPPFLAGS="$CPPFLAGS -I/usr/opt/MME210/include" - EXTRALIBS="$EXTRALIBS /usr/opt/MME220/lib/libmme.a" - echo "$ac_t""yes dec" 1>&6 - ;; - *-sgi-irix5*|*-sgi-irix6.2) - EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_OLDAL" - SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_al.c" - EXTRALIBS="$EXTRALIBS -laudio" - echo "$ac_t""yes irix5.x or irix6.2" 1>&6 - ;; - *-sgi-irix6*) - EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_NEWAL" - SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_al.c" - EXTRALIBS="$EXTRASLIBS -laudio" - echo "$ac_t""yes irix6" 1>&6 - ;; - *-*-sunos4*) - EXTRADEFS="$EXTRADEFS -DAU_SUN" - SYSEXTRAS="$SYSEXTRAS sun_a.c" - echo "$ac_t""yes sunos4" 1>&6 - if test -f /usr/demo/SOUND/libaudio.a; then - EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/libaudio.a" - else - echo "$ac_t""Notice: libaudio.a is not found (ignore)" 1>&6 - fi - ;; - *-*-solaris*) - EXTRADEFS="$EXTRADEFS -DAU_SUN" - SYSEXTRAS="$SYSEXTRAS sun_a.c" - echo "$ac_t""yes solaris" 1>&6 - if test -f /usr/demo/SOUND/lib/libaudio.a; then - EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/lib/libaudio.a" - else - echo "$ac_t""Notice: libaudio.a is not found (ignore)" 1>&6 - fi - ;; - *-*-netbsd*) - EXTRADEFS="$EXTRADEFS -DAU_SUN" - SYSEXTRAS="$SYSEXTRAS sun_a.c" - echo "$ac_t""yes netbsd" 1>&6 - ;; - *-*-cygwin32*) - EXTRADEFS="$EXTRADEFS -DAU_W32" - if test "x$enable_w32gui" = xyes; then - SYSEXTRAS="$SYSEXTRAS w32g_a.c" - else - SYSEXTRAS="$SYSEXTRAS w32_a.c" - fi - EXTRALIBS="$EXTRALIBS -lwinmm" - echo "$ac_t""yes cygnus" 1>&6 - ;; - *) - echo "configure: warning: no method to play" 1>&2 - if test "x$enable_audio_opt" != xno; then - EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV" - SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_none.c" - fi - ;; + LIBS="$LIBS $ALSA_LIBS" + fi +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking enable_audio=alib""... $ac_c" 1>&6 +echo "configure:5328: checking enable_audio=alib" >&5 +if test "x$au_enable_alib" = xyes; then + case "$target" in + *-*-hpux*) echo "$ac_t""yes" 1>&6 ;; + *) echo "configure: warning: may not work on $target" 1>&2 ;; esac + SYSEXTRAS="$SYSEXTRAS hpux_a.c" + EXTRADEFS="$EXTRADEFS -DAU_HPUX_ALIB" + if test -d /opt/audio/include; then + CPPFLAGS="$CPPFLAGS -I/opt/audio/include" + fi + if test -d /opt/audio/lib; then + EXTRALIBS="$EXTRALIBS -L/opt/audio/lib" + fi + EXTRALIBS="$EXTRALIBS -lAlib" +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking enable_audio=nas""... $ac_c" 1>&6 +echo "configure:5348: checking enable_audio=nas" >&5 +if test "x$au_enable_nas" = xyes; then + if test "x$with_x" != xyes; then + { echo "configure: error: nas: --with-x option must be specified" 1>&2; exit 1; } + fi + EXTRADEFS="$EXTRADEFS -DAU_NAS" + SYSEXTRAS="$SYSEXTRAS nas_a.c" + + + if test "x$with_nas_library" != x; then + echo "$ac_t""$with_nas_library" 1>&6; + EXTRALIBS="$EXTRALIBS $with_nas_library" + else + echo "$ac_t""" 1>&6 + echo $ac_n "checking for library containing AuOpenServer""... $ac_c" 1>&6 +echo "configure:5363: checking for library containing AuOpenServer" >&5 +if eval "test \"`echo '$''{'timidity_cv_search_AuOpenServer'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_func_search_save_LIBS="$LIBS" +timidity_cv_search_AuOpenServer="no" +for i in $x_libraries/libaudio.a \ + /usr/lib/libaudio.so \ + /usr/lib/libaudio.a ; do + LIBS="$i $ac_func_search_save_LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + timidity_cv_search_AuOpenServer="$i"; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done +LIBS="$ac_func_search_save_LIBS" +fi + +echo "$ac_t""$timidity_cv_search_AuOpenServer" 1>&6 +if test "$timidity_cv_search_AuOpenServer" != "no"; then + echo "$ac_t""NAS: $timidity_cv_search_AuOpenServer" 1>&6 + EXTRALIBS="$EXTRALIBS $timidity_cv_search_AuOpenServer" +else : + echo "configure: warning: NAS library is not found." 1>&2 +fi + fi + test "x$with_nas_includes" != x && CPPFLAGS="$CPPFLAGS -I$with_nas_includes" + lib_xt_opt=-lXt + if test "x$have_xext" = xyes; then + lib_xext_opt=-lXext + fi + if test "x$have_xprelibs" = xyes; then + lib_xprelibs_opt='-lSM -lICE' + fi +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking enable_audio=esd""... $ac_c" 1>&6 +echo "configure:5418: checking enable_audio=esd" >&5 +if test "x$au_enable_esd" = xyes; then + echo "$ac_t""" 1>&6 + KEEPCFLAGS=$CFLAGS + KEEPLIBS=$LIBS + KEEPLDFLAGS=$LDFLAGS + # Check whether --with-esd-prefix or --without-esd-prefix was given. +if test "${with_esd_prefix+set}" = set; then + withval="$with_esd_prefix" + esd_prefix="$withval" +else + esd_prefix="" +fi + +# Check whether --with-esd-exec-prefix or --without-esd-exec-prefix was given. +if test "${with_esd_exec_prefix+set}" = set; then + withval="$with_esd_exec_prefix" + esd_exec_prefix="$withval" +else + esd_exec_prefix="" +fi + +# Check whether --enable-esdtest or --disable-esdtest was given. +if test "${enable_esdtest+set}" = set; then + enableval="$enable_esdtest" + : +else + enable_esdtest=yes +fi + + + if test x$esd_exec_prefix != x ; then + esd_args="$esd_args --exec-prefix=$esd_exec_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_exec_prefix/bin/esd-config + fi + fi + if test x$esd_prefix != x ; then + esd_args="$esd_args --prefix=$esd_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_prefix/bin/esd-config + fi + fi + + # Extract the first word of "esd-config", so it can be a program name with args. +set dummy esd-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:5465: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$ESD_CONFIG" in + /*) + ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no" + ;; +esac +fi +ESD_CONFIG="$ac_cv_path_ESD_CONFIG" +if test -n "$ESD_CONFIG"; then + echo "$ac_t""$ESD_CONFIG" 1>&6 else echo "$ac_t""no" 1>&6 fi + min_esd_version=0.2.7 + echo $ac_n "checking for ESD - version >= $min_esd_version""... $ac_c" 1>&6 +echo "configure:5500: checking for ESD - version >= $min_esd_version" >&5 + no_esd="" + if test "$ESD_CONFIG" = "no" ; then + no_esd=yes + else + ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` + ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` + esd_major_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + esd_minor_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_esdtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" + rm -f conf.esdtest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext < +#include +#include +#include -# Check whether --enable-enable-dynamic or --disable-enable-dynamic was given. -if test "${enable_enable_dynamic+set}" = set; then - enableval="$enable_enable_dynamic" - test "x$enable_dynamic" = xyes && enable_dynamic=dynamic +char* +my_strdup (char *str) +{ + char *new_str; + if (str) + { + new_str = malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.esdtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_esd_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_esd_version"); + exit(1); + } + + if (($esd_major_version > major) || + (($esd_major_version == major) && ($esd_minor_version > minor)) || + (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); + printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); + printf("*** to point to the correct copy of esd-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + + +EOF +if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_esd=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_esd" = x ; then + echo "$ac_t""yes" 1>&6 + : + else + echo "$ac_t""no" 1>&6 + if test "$ESD_CONFIG" = "no" ; then + echo "*** The esd-config script installed by ESD could not be found" + echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the ESD_CONFIG environment variable to the" + echo "*** full path to esd-config." + else + if test -f conf.esdtest ; then + : + else + echo "*** Could not run ESD test program, checking why..." + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" + cat > conftest.$ac_ext < +#include + +int main() { + return 0; +; return 0; } +EOF +if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding ESD or finding the wrong" + echo "*** version of ESD. If it is not finding ESD, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means ESD was incorrectly installed" + echo "*** or that you have moved ESD since it was installed. In the latter case, you" + echo "*** may want to edit the esd-config script: $ESD_CONFIG" +fi +rm -f conftest* + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + ESD_CFLAGS="" + ESD_LIBS="" + : + fi + + + rm -f conf.esdtest + + CFLAGS=$KEEPCFLAGS + LIBS=$KEEPLIBS + LDFLAGS=$KEEPLDFLAGS + if test "x$no_esd" = x; then + echo "$ac_t""EsounD: Enabled" 1>&6 + EXTRADEFS="$EXTRADEFS -DAU_ESD" + SYSEXTRAS="$SYSEXTRAS esd_a.c" + for f in $ESD_CFLAGS; do + case ".$f" in + .-I?*|.-D?*) CPPFLAGS="$CPPFLAGS $f" ;; + *) CFLAGS="$CPPFLAGS $f" ;; + esac +done + + LIBS="$LIBS $ESD_LIBS" + else + echo "configure: warning: EsounD: Couldn't configure" 1>&2 + fi +else + echo "$ac_t""no" 1>&6 +fi + +if test "x$au_enable_none" = xyes; then + EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV" + SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_none.c" +fi + + +echo $ac_n "checking default output mode""... $ac_c" 1>&6 +echo "configure:5688: checking default output mode" >&5 +if test "x$DEFAULT_PLAYMODE" = x; then + DEFAULT_PLAYMODE=`echo $enable_audio | sed 's/,.*//'` fi +case ".$DEFAULT_PLAYMODE" in + .default) TIMIDITY_OUTPUT_ID=d ;; + .oss) TIMIDITY_OUTPUT_ID=d ;; + .alsa) TIMIDITY_OUTPUT_ID=s ;; + .sun) TIMIDITY_OUTPUT_ID=d ;; + .hpux) TIMIDITY_OUTPUT_ID=d ;; + .irix) TIMIDITY_OUTPUT_ID=d ;; + .mme) TIMIDITY_OUTPUT_ID=d ;; + .sb_dsp) TIMIDITY_OUTPUT_ID=d ;; + .w32) TIMIDITY_OUTPUT_ID=d ;; + .alib) TIMIDITY_OUTPUT_ID=A ;; + .nas) TIMIDITY_OUTPUT_ID=n ;; + .esd) TIMIDITY_OUTPUT_ID=e ;; + .wav) TIMIDITY_OUTPUT_ID=w ;; + .au) TIMIDITY_OUTPUT_ID=u ;; + .aiff) TIMIDITY_OUTPUT_ID=a ;; + .list) TIMIDITY_OUTPUT_ID=l ;; + *) TIMIDITY_OUTPUT_ID= ;; +esac +echo "$ac_t""$DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID" 1>&6 + -case "$enable_ncurses$enable_slang$enable_motif$enable_tcltk$enable_emacs$enable_vt100$enable_xaw$enable_xskin$enable_gtk$enable_dynamic" in -*dynamic*) NEEDDLOPEN=yes;; -*) NEEDDLOPEN=no;; + +interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk' + +# Check whether --enable-interface or --disable-interface was given. +if test "${enable_interface+set}" = set; then + enableval="$enable_interface" + for i in `echo $enableval | sed 's/,/ /g'`; do + eval "enable_$i=yes" + done +fi + + +# Check whether --enable-dynamic or --disable-dynamic was given. +if test "${enable_dynamic+set}" = set; then + enableval="$enable_dynamic" + if test "x$enable_dynamic" = xyes; then + enable_dynamic=dynamic + elif test "x$enable_dynamic" != xno; then + for i in `echo $enableval | sed 's/,/ /g'`; do + eval "enable_$i=dynamic" + done + fi +fi + + +join_targets= +for i in $interface_targets; do + eval "join_targets=$join_targets\$enable_$i" +done + +case ".$join_targets" in +.*dynamic*) NEEDDLOPEN=yes;; +*) NEEDDLOPEN=no;; esac -if test "$GCC" = yes; then SHCFLAGS="$SHCFLAGS -fPIC"; fi +if test "x$GCC" = xyes; then SHCFLAGS="$SHCFLAGS -fPIC"; fi case "x$enable_ump" in xyes|xdynamic) EXTRACFLAGS="$EXTRACFLAGS -DXP_UNIX $SHCFLAGS";; esac if test "$NEEDDLOPEN" = "yes"; then have_dl=no - echo $ac_n "checking for LoadLibraryExA""... $ac_c" 1>&6 -echo "configure:5431: checking for LoadLibraryExA" >&5 -if eval "test \"`echo '$''{'wapi_cv_func_LoadLibraryExA'+set}'`\" = set"; then + echo $ac_n "checking for LoadLibrary""... $ac_c" 1>&6 +echo "configure:5757: checking for LoadLibrary" >&5 +if eval "test \"`echo '$''{'wapi_cv_func_LoadLibrary'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { -LoadLibraryExA(0,0,0); +LoadLibrary(0); ; return 0; } EOF -if { (eval echo configure:5445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - wapi_cv_func_LoadLibraryExA=yes + wapi_cv_func_LoadLibrary=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - wapi_cv_func_LoadLibraryExA=no + wapi_cv_func_LoadLibrary=no fi rm -f conftest* fi -if eval "test \"`echo '$wapi_cv_func_'LoadLibraryExA`\" = yes"; then +if eval "test \"`echo '$wapi_cv_func_'LoadLibrary`\" = yes"; then echo "$ac_t""yes" 1>&6 - have_dl=cygwin + have_dl=w32 else echo "$ac_t""no" 1>&6 fi - test $wapi_cv_func_LoadLibraryExA = yes && have_dl=cygwin + test $wapi_cv_func_LoadLibrary = yes && have_dl=w32 if test "$have_dl" = "no"; then echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "configure:5468: checking for shl_load" >&5 +echo "configure:5794: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" else @@ -5517,12 +5843,12 @@ fi if test "$have_dl" = "no"; then echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:5521: checking for dlopen" >&5 +echo "configure:5847: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else @@ -5567,12 +5893,12 @@ fi if test "$have_dl" = "no"; then echo $ac_n "checking for dld_init""... $ac_c" 1>&6 -echo "configure:5571: checking for dld_init" >&5 +echo "configure:5897: checking for dld_init" >&5 if eval "test \"`echo '$''{'ac_cv_func_dld_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dld_init=yes" else @@ -5617,7 +5943,7 @@ fi if test "$have_dl" = "no"; then echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:5621: checking for dld_init in -ldld" >&5 +echo "configure:5947: checking for dld_init in -ldld" >&5 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5625,7 +5951,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5659,13 +5985,13 @@ fi echo $ac_n "checking dynamic link method""... $ac_c" 1>&6 -echo "configure:5663: checking dynamic link method" >&5 +echo "configure:5989: checking dynamic link method" >&5 case "$have_dl" in dlopen) echo "$ac_t""use dl_dlopen.c" 1>&6 SYSEXTRAS="$SYSEXTRAS dl_dlopen.c" echo $ac_n "checking whether your dlsym() needs a leading underscore""... $ac_c" 1>&6 -echo "configure:5669: checking whether your dlsym() needs a leading underscore" >&5 +echo "configure:5995: checking whether your dlsym() needs a leading underscore" >&5 if eval "test \"`echo '$''{'timidity_cv_func_dlsym_underscore'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5724,8 +6050,8 @@ EOM : Call the object file tmp-dyna.o in case dlext=o. if ${CC-cc} $CFLAGS $SHCFLAGS $CPPFLAGS -c dyna.c > /dev/null 2>&1 && - mv dyna.o tmp-dyna.o > /dev/null 2>&1 && - $SHLD $SHLDFLAGS -o dyna.$so tmp-dyna.o > /dev/null 2>&1 && + mv dyna.o tmp-dyna.o > /dev/null 2>&1 && + $SHLD $SHLDFLAGS -o dyna.$so tmp-dyna.o > /dev/null 2>&1 && ${CC-cc} -o fred $CFLAGS $CPPFLAGS $LDFLAGS fred.c $LIBS $lib_dl_opt > /dev/null 2>&1; then xxx=`./fred` case $xxx in @@ -5764,9 +6090,9 @@ SYSEXTRAS="$SYSEXTRAS dl_hpux.c" LDFLAGS="$LDFLAGS -Wl,-E $LDFLAGS" ;; - cygwin) - echo "$ac_t""use dl_cygwin32.c" 1>&6 - SYSEXTRAS="$SYSEXTRAS dl_cygwin32.c" + w32) + echo "$ac_t""use dl_w32.c" 1>&6 + SYSEXTRAS="$SYSEXTRAS dl_w32.c" ;; *) NEEDDLOPEN="no" @@ -5776,16 +6102,17 @@ fi if test "$NEEDDLOPEN" = "yes"; then - SHARED_LIB_PATH="\$(TIMID_DIR)" cat >> confdefs.h <&6 -echo "configure:5817: checking for $ac_hdr" >&5 +echo "configure:6143: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5864,7 +6190,7 @@ esac echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:5868: checking for initscr in -lncurses" >&5 +echo "configure:6194: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5872,7 +6198,7 @@ ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5902,7 +6228,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for PDC_set_ctrl_break in -lcurses""... $ac_c" 1>&6 -echo "configure:5906: checking for PDC_set_ctrl_break in -lcurses" >&5 +echo "configure:6232: checking for PDC_set_ctrl_break in -lcurses" >&5 ac_lib_var=`echo curses'_'PDC_set_ctrl_break | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5910,7 +6236,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcurses $lib_user32_test $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6008,7 +6334,7 @@ if test "${enable_slang+set}" = set; then enableval="$enable_slang" case "x$enable_slang" in xyes|xdynamic) echo $ac_n "checking for SLang_init_tty in -lslang""... $ac_c" 1>&6 -echo "configure:6012: checking for SLang_init_tty in -lslang" >&5 +echo "configure:6338: checking for SLang_init_tty in -lslang" >&5 ac_lib_var=`echo slang'_'SLang_init_tty | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6016,7 +6342,7 @@ ac_save_LIBS="$LIBS" LIBS="-lslang $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6049,21 +6375,21 @@ echo "configure: warning: slang interface is not enabled" 1>&2 fi - for ac_hdr in slang/slang.h + for ac_hdr in slang/slang.h slang.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6057: checking for $ac_hdr" >&5 +echo "configure:6383: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6115,7 +6441,7 @@ dynamic_targets="$dynamic_targets interface_s.\$(so)" s_so_libs="-lslang" echo $ac_n "checking for initscr in -ltermcap""... $ac_c" 1>&6 -echo "configure:6119: checking for initscr in -ltermcap" >&5 +echo "configure:6445: checking for initscr in -ltermcap" >&5 ac_lib_var=`echo termcap'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6123,7 +6449,7 @@ ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6254,7 +6580,7 @@ tk_lib= for l in tcl tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76; do case "x$tcl_lib" in x) echo $ac_n "checking for Tcl_Init in -l$l""... $ac_c" 1>&6 -echo "configure:6258: checking for Tcl_Init in -l$l" >&5 +echo "configure:6584: checking for Tcl_Init in -l$l" >&5 ac_lib_var=`echo $l'_'Tcl_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6262,7 +6588,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$l $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6297,7 +6623,7 @@ LIBS="$LIBS $tcl_lib" for l in tk tk8.0jp tk4.2jp tk80jp tk42jp tk8.0 tk4.2 tk80 tk42; do case "x$tk_lib" in x) echo $ac_n "checking for Tk_Init in -l$l""... $ac_c" 1>&6 -echo "configure:6301: checking for Tk_Init in -l$l" >&5 +echo "configure:6627: checking for Tk_Init in -l$l" >&5 ac_lib_var=`echo $l'_'Tk_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6305,7 +6631,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$l $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6366,7 +6692,6 @@ ENABLE_TCLTK_FALSE= fi LIBS=`echo $LIBS | sed "s/-lX11/$tk_lib $tcl_lib -lX11/"` - EXTRADEFS="$EXTRADEFS -DTKPROGPATH=\\\"\$(TCL_DIR)/tkmidity.tcl\\\"" case "$target" in *-*-bsdi*) EXTRALIBS="$EXTRALIBS -lipc" @@ -6377,8 +6702,7 @@ ;; xdynamic) dynamic_targets="$dynamic_targets interface_k.\$(so)" - EXTRADEFS="$EXTRADEFS -DTKPROGPATH=\\\"\$(TCL_DIR)/tkmidity.tcl\\\"" - k_so_libs="$tcl_libdir $tk_libdir $tcl_lib $tk_lib $lib_dl_opt" + k_so_libs="$tcl_libdir $tk_libdir $tcl_lib $tk_lib $lib_dl_opt" case "$target" in *-*-bsdi*) k_so_libs="$k_so_libs -lipc" @@ -6682,7 +7006,7 @@ # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6686: checking for $ac_word" >&5 +echo "configure:7010: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6717,7 +7041,7 @@ min_gtk_version=1.1.3 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:6721: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:7045: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -6740,7 +7064,7 @@ echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -6806,7 +7130,7 @@ } EOF -if { (eval echo configure:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -6840,7 +7164,7 @@ CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -6850,7 +7174,7 @@ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" @@ -6918,7 +7242,7 @@ ;; xdynamic) dynamic_targets="$dynamic_targets interface_g.\$(so)" - if test "$GCC" = yes; then + if test "x$GCC" = xyes; then for i in $GTK_LIBS; do case "x$i" in x-rdynamic) ;; @@ -7000,17 +7324,17 @@ fi ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6 -echo "configure:7004: checking for X11/xpm.h" >&5 +echo "configure:7328: checking for X11/xpm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7033,7 +7357,7 @@ fi echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6 -echo "configure:7037: checking for XpmCreatePixmapFromData in -lXpm" >&5 +echo "configure:7361: checking for XpmCreatePixmapFromData in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7041,7 +7365,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXpm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7148,17 +7472,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7152: checking for $ac_hdr" >&5 +echo "configure:7476: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7209,7 +7533,7 @@ LDFLAGS="$LDFLAGS $offix_lib_dir" LIBS="$LIBS $lib_xmu_opt $lib_xt_opt $lib_xprelibs_opt $lib_xext_opt -lX11" echo $ac_n "checking for DndInitialize in -lDnd""... $ac_c" 1>&6 -echo "configure:7213: checking for DndInitialize in -lDnd" >&5 +echo "configure:7537: checking for DndInitialize in -lDnd" >&5 ac_lib_var=`echo Dnd'_'DndInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7217,7 +7541,7 @@ ac_save_LIBS="$LIBS" LIBS="-lDnd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7311,7 +7635,7 @@ EXTRADEFS="$EXTRADEFS -DWRDT_X" enable_sherry_wrd=yes echo $ac_n "checking for zlibVersion in -lz""... $ac_c" 1>&6 -echo "configure:7315: checking for zlibVersion in -lz" >&5 +echo "configure:7639: checking for zlibVersion in -lz" >&5 ac_lib_var=`echo z'_'zlibVersion | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7319,7 +7643,7 @@ ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7353,17 +7677,17 @@ ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:7357: checking for png.h" >&5 +echo "configure:7681: checking for png.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7386,7 +7710,7 @@ fi echo $ac_n "checking for png_init_io in -lpng""... $ac_c" 1>&6 -echo "configure:7390: checking for png_init_io in -lpng" >&5 +echo "configure:7714: checking for png_init_io in -lpng" >&5 ac_lib_var=`echo png'_'png_init_io | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7394,7 +7718,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpng -lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7520,7 +7844,12 @@ CPPFLAGS="$val" rm -f wordtmp >/dev/null 2>&1 -CPPFLAGS="$CPPFLAGS -DDEFAULT_PATH=\\\"\$(TIMID_DIR)\\\"" + +CPPFLAGS="$CPPFLAGS \$(DEF_PKGDATADIR) \$(DEF_PKGLIBDIR) \$(DEF_DEFAULT_PATH)" + +if test "x$TIMIDITY_OUTPUT_ID" != x; then + CPPFLAGS="$CPPFLAGS -DTIMIDITY_OUTPUT_ID=\\\"$TIMIDITY_OUTPUT_ID\\\"" +fi if test "x$with_x" = xyes; then LIBS=`echo $LIBS | sed "s/-lX11/$lib_offix_opt $lib_xm_opt $lib_xaw_opt $lib_xmu_opt $lib_xt_opt $lib_xprelibs_opt $lib_xext_opt -lX11/"` @@ -7542,6 +7871,8 @@ + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -7724,11 +8055,11 @@ s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g s%@LIBOBJS@%$LIBOBJS%g +s%@ALSA_CFLAGS@%$ALSA_CFLAGS%g +s%@ALSA_LIBS@%$ALSA_LIBS%g s%@ESD_CONFIG@%$ESD_CONFIG%g s%@ESD_CFLAGS@%$ESD_CFLAGS%g s%@ESD_LIBS@%$ESD_LIBS%g -s%@ALSA_CFLAGS@%$ALSA_CFLAGS%g -s%@ALSA_LIBS@%$ALSA_LIBS%g s%@NEEDDLOPEN_TRUE@%$NEEDDLOPEN_TRUE%g s%@NEEDDLOPEN_FALSE@%$NEEDDLOPEN_FALSE%g s%@ENABLE_NCURSES_TRUE@%$ENABLE_NCURSES_TRUE%g @@ -7784,6 +8115,7 @@ s%@CYGNUS_FALSE@%$CYGNUS_FALSE%g s%@W32READDIR_TRUE@%$W32READDIR_TRUE%g s%@W32READDIR_FALSE@%$W32READDIR_FALSE%g +s%@timidity_LDFLAGS@%$timidity_LDFLAGS%g s%@SYSEXTRAS@%$SYSEXTRAS%g s%@EXTRALIBS@%$EXTRALIBS%g s%@NETSRCS@%$NETSRCS%g diff -ruN TiMidity++-2.5.1/configure.in TiMidity++-2.6.0/configure.in --- TiMidity++-2.5.1/configure.in Sat Aug 28 00:25:51 1999 +++ TiMidity++-2.6.0/configure.in Mon Sep 20 18:44:08 1999 @@ -44,16 +44,18 @@ dnl WISH - wish dnl LN_S - ln -s dnl tcltk_dep - make dependencies for tcl/tk interface - +dnl dnl so - File extension of shared object library. dnl SHLD - Linker to make shared object library. dnl SHLDFLAGS - Link flags to link shared object library. dnl SHCFLAGS - Additional flags to compile shared object library. - (such as -fPIC) +dnl (such as -fPIC) +dnl AC_INIT(timidity/timidity.c) +SHELL=${CONFIG_SHELL-/bin/sh} AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(TiMidity++, 2.5.1, no-define) +AM_INIT_AUTOMAKE(TiMidity++, 2.6.0, no-define) dnl To use CONTAINS() macro (See acinclude.m4) CONTAINS_INIT @@ -75,6 +77,7 @@ EXTRADEFS= EXTRALIBS= SYSEXTRAS= +timidity_LDFLAGS= dnl Optional library dependent lib_xm_opt= @@ -127,7 +130,7 @@ AC_PROG_INSTALL AC_PROG_RANLIB AC_PROG_LN_S - +CHECK_COMPILER_OPTION(rdynamic) dnl Target dependent AC_ARG_WITH(elf, @@ -147,7 +150,7 @@ so="so" ;; *-*-netbsd*) - test -n "$SHLD" || SHLD="ld -Bforcearchive -Bshareable" + test -n "$SHLD" || SHLD="$CC -shared -nostartfiles" so="so" ;; @@ -202,7 +205,12 @@ so="so" ;; *) - test -n "$SHLD" || SHLD="ld -Bdynamic -G" + test -n "$SHLD" || \ + if test "x$GCC" = xyes; then + SHLD="$CC -shared" + else + SHLD="ld -Bdynamic -G" + fi so="so" ;; esac @@ -280,7 +288,7 @@ unistd.h dlfcn.h glob.h getopt.h errno.h machine/endian.h \ stropts.h sys/audioio.h sun/audioio.h sys/types.h \ sys/ipc.h sys/shm.h sys/param.h X11/extensions/XShm.h \ - X11/Xmu/ExtAgent.h) + X11/Xmu/ExtAgent.h sys/soundcard.h) AC_CHECK_HEADER(string.h,, [ EXTRADEFS="$EXTRADEFS -DNO_STRING_H " ]) dnl Checks for typedefs, structures, and compiler characteristics. @@ -346,26 +354,26 @@ dnl tcltk path AC_ARG_WITH(tcl-includes, - [ --with-tcl-includes=dir Tcl include file path ], + [ --with-tcl-includes=DIR Tcl include file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi tcl_include_dir="-I$withval" ]) AC_ARG_WITH(tcl-libs, - [ --with-tcl-libs=dir Tcl include file path ], + [ --with-tcl-libs=DIR Tcl library file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi tcl_libdir="-L$withval" ]) AC_ARG_WITH(tk-includes, - [ --with-tk-includes=dir Tk include file path ], + [ --with-tk-includes=DIR Tk include file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi tk_includes="-I$withval" ]) AC_ARG_WITH(tk-libs, - [ --with-tk-libs=dir Tk include file path ], + [ --with-tk-libs=DIR Tk library file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi @@ -373,198 +381,450 @@ dnl offix paths AC_ARG_WITH(offix-includes, - [ --with-offix-includes=dir Offix include file path ], + [ --with-offix-includes=DIR Offix include file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi offix_include_dir="-I$withval" ]) AC_ARG_WITH(offix-libs, - [ --with-offix-libs=dir Offix include file path ], + [ --with-offix-libs=DIR Offix include file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi offix_lib_dir="-L$withval" ]) -AC_ARG_ENABLE(esd, - [ --enable-esd Enable EsounD output (default is no)], - [ if test "$enableval" = "yes"; then - KEEPCFLAGS=$CFLAGS - KEEPLIBS=$LIBS - KEEPLDFLAGS=$LDFLAGS - AM_PATH_ESD() - CFLAGS=$KEEPCFLAGS - LIBS=$KEEPLIBS - LDFLAGS=$KEEPLDFLAGS - if test "x$no_esd" = x; then - EXTRADEFS="$EXTRADEFS -DAU_ESD" - SYSEXTRAS="$SYSEXTRAS esd_a.c" - EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ESD_CFLAGS) - LIBS="$LIBS $ESD_LIBS" - else - AC_MSG_WARN(EsounD: Couldn't configure) - fi - fi ]) +dnl +dnl Audio section +dnl +dnl default(d): auto selection +dnl oss(d): OSS /dev/dsp +dnl alsa(d): ALSA pcm device +dnl sun(d): SunOS /dev/audio +dnl hpux(d): HPUX /dev/audio +dnl irix(d): IRIX audio +dnl mme(d): OSF/1 MME +dnl sb_dsp(d): BSD/OS 2.0 /dev/sb_dsp +dnl w32(d): Windows MMS +dnl alsa(s): ALSA pcm device +dnl alib(A): HPUX network audio (Alib) +dnl nas(n): Network Audio System +dnl esd(e): EsounD + +audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas esd' + +AC_ARG_WITH(nas-library, + [ --with-nas-library=library NAS absolute library path (Don't use -laudio)]) +AC_ARG_WITH(nas-includes, + [ --with-nas-includes=DIR NAS include files are in dir]) -AC_MSG_CHECKING(whether to enable audio) AC_ARG_ENABLE(audio, - [ --enable-audio Enable audio (default if you use supported platform) ], - [ enable_audio=$enableval ], + [ --enable-audio[=mode_list] Enable audio (Specify comma separated mode list): + default: Automatically select audio device. + oss: OSS /dev/dsp + sun: SunOS /dev/audio + hpux: HPUX /dev/audio + irix: IRIX audio library + mme: OSF/1 MME + sb_dsp: BSD/OS 2.0 /dev/sb_dsp + w32: Windows MMS + alsa: ALSA pcm device + alib: HPUX network audio (Alib) + nas: NAS - Network Audio System + esd: EsounD], + [ enable_audio=$enableval + have_audio_opt=yes ], [ enable_audio=yes - enable_audio_opt=no ]) + have_audio_opt=no ]) -AC_ARG_ENABLE(nas, - [ --enable-nas NAS (Network Audio Sound) support ], - [ if test "x$with_x" != xyes; then - AC_MSG_ERROR(nas: --with-x option must be specified) - fi - EXTRADEFS="$EXTRADEFS -DAU_NAS" - SYSEXTRAS="$SYSEXTRAS nas_a.c" +dnl yes -> default +test "x$enable_audio" = xyes && enable_audio=default - dnl -laudio conflicts another audio library, - dnl so I specify NAS library directly - EXTRALIBS="$EXTRALIBS $x_libraries/libaudio.a" - lib_xt_opt=-lXt - if test "x$have_xext" = xyes; then - lib_xext_opt=-lXext - fi - if test "x$have_xprelibs" = xyes; then - lib_xprelibs_opt='-lSM -lICE' - fi - ]) +if test "x$enable_audio" != xno; then + for i in `echo $enable_audio | sed 's/,/ /g'`; do + eval "au_enable_$i=yes" + done +fi + +dnl Turn on default output mode +DEFAULT_PLAYMODE= +AC_ARG_WITH(default-output, + [ --with-default-output= Specify default output mode (optional): + default|alsa|alib|nas|esd|wav|au|aiff|list], + [ if test "$enable_audio" != no; then + DEFAULT_PLAYMODE=$withval + eval "au_enable_$DEFAULT_PLAYMODE=yes" + else + AC_MSG_WARN(--with-default-output=$withval: audio is not enabled) + fi]) -if test "$enable_audio" = "yes"; then - case "$target" in +dnl +dnl for upper compatibility. +dnl +AC_ARG_ENABLE(esd, + [ --enable-esd EsounD (Obsoleted. Use --enable-audio=esd)], + [ au_enable_esd=$enableval ]) +AC_ARG_ENABLE(nas, + [ --enable-nas NAS (Obsoleted. Use --enable-audio=nas)], + [ au_enable_nas=$enableval ]) +AC_ARG_ENABLE(alsa, + [ --enable-alsa ALSA (Obsoleted. Use --enable-audio=alsa)], + [ au_enable_nas=$enableval ]) + +if test "x$au_enable_default" = xyes; then + case "$target" in *-*-linux*|*-*-freebsd*) - EXTRADEFS="$EXTRADEFS -DAU_LINUX" - SYSEXTRAS="$SYSEXTRAS linux_a.c" - AC_MSG_RESULT(yes linux) - KEEPCFLAGS=$CFLAGS - KEEPLIBS=$LIBS - KEEPLDFLAGS=$LDFLAGS - AM_PATH_ALSA_LOCAL() - CFLAGS=$KEEPCFLAGS - LIBS=$KEEPLIBS - LDFLAGS=$KEEPLDFLAGS - if test "x$have_alsa" = "xyes"; then - EXTRADEFS="$EXTRADEFS -DAU_ALSA" - SYSEXTRAS="$SYSEXTRAS alsa_a.c" - EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ALSA_CFLAGS) - LIBS="$LIBS $ALSA_LIBS" - fi + au_enable_oss=yes ;; *-*-bsdi2.0) - EXTRADEFS="$EXTRADEFS -DAU_BSDI -DDEFAULT_RATE=22500" - SYSEXTRAS="$SYSEXTRAS bsd20_a.c" - AC_MSG_RESULT(yes bsdi) + au_enable_sb_dsp=yes ;; *-*-bsdi2.1|*-*-bsdi3.?|*-*-bsdi4.?) - EXTRADEFS="$EXTRADEFS -DAU_LINUX" - SYSEXTRAS="$SYSEXTRAS linux_a.c" - AC_MSG_RESULT(yes bsdi) + au_enable_oss=yes ;; *-*-hpux*) - EXTRADEFS="$EXTRADEFS -DAU_HPUX" - SYSEXTRAS="$SYSEXTRAS hpux_d_a.c hpux_a.c" - if test -d /opt/audio/include; then - CPPFLAGS="$CPPFLAGS -I/opt/audio/include" - fi - if test -d /opt/audio/lib; then - EXTRALIBS="$EXTRALIBS -L/opt/audio/lib" - fi - EXTRALIBS="$EXTRALIBS -lAlib" - AC_MSG_RESULT(yes hpux) + au_enable_hpux=yes ;; *-dec-*) - EXTRADEFS="$EXTRADEFS -DAU_DEC -DAU_AUDRIV" - SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_mme.c" - CPPFLAGS="$CPPFLAGS -I/usr/opt/MME210/include" - EXTRALIBS="$EXTRALIBS /usr/opt/MME220/lib/libmme.a" - AC_MSG_RESULT(yes dec) + au_enable_mme=yes ;; - *-sgi-irix5*|*-sgi-irix6.2) - EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_OLDAL" - SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_al.c" - EXTRALIBS="$EXTRALIBS -laudio" - AC_MSG_RESULT(yes irix5.x or irix6.2) + *irix*) + au_enable_irix=yes ;; - *-sgi-irix6*) - EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_NEWAL" - SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_al.c" - EXTRALIBS="$EXTRASLIBS -laudio" - AC_MSG_RESULT(yes irix6) + *-*-sunos4*) + au_enable_sun=yes ;; + *-*-solaris*) + au_enable_sun=yes + ;; + *-*-netbsd*) + au_enable_sun=yes + ;; + *-*-cygwin32*) + au_enable_w32=yes + ;; + *) + AC_MSG_WARN(No --enable-audio=default audio for $target) + ;; + esac +fi + +dnl +dnl oss +dnl +AC_MSG_CHECKING(enable_audio=oss) +if test "x$au_enable_oss" = xyes; then + EXTRADEFS="$EXTRADEFS -DAU_OSS" + SYSEXTRAS="$SYSEXTRAS oss_a.c" + if test "x$ac_cv_header_sys_soundcard_h" = xyes; then + AC_MSG_RESULT(yes - ) + else + case "$target" in + *linux*|*freebsd*) + dnl or + AC_MSG_RESULT(yes) + ;; + *) + AC_MSG_WARN( is not found) + ;; + esac + fi +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(enable_audio=sun) +if test "x$au_enable_sun" = xyes; then + case "$target" in *-*-sunos4*) - EXTRADEFS="$EXTRADEFS -DAU_SUN" - SYSEXTRAS="$SYSEXTRAS sun_a.c" - AC_MSG_RESULT(yes sunos4) if test -f /usr/demo/SOUND/libaudio.a; then EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/libaudio.a" + AC_MSG_RESULT(yes) else AC_MSG_RESULT(Notice: libaudio.a is not found [(ignore)]) fi ;; *-*-solaris*) - EXTRADEFS="$EXTRADEFS -DAU_SUN" - SYSEXTRAS="$SYSEXTRAS sun_a.c" - AC_MSG_RESULT(yes solaris) if test -f /usr/demo/SOUND/lib/libaudio.a; then EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/lib/libaudio.a" + AC_MSG_RESULT(yes) else AC_MSG_RESULT(Notice: libaudio.a is not found [(ignore)]) fi ;; - *-*-netbsd*) - EXTRADEFS="$EXTRADEFS -DAU_SUN" - SYSEXTRAS="$SYSEXTRAS sun_a.c" - AC_MSG_RESULT(yes netbsd) + *) AC_MSG_RESULT(yes) + ;; + esac + EXTRADEFS="$EXTRADEFS -DAU_SUN" + SYSEXTRAS="$SYSEXTRAS sun_a.c" +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(enable_audio=hpux) +if test "x$au_enable_hpux" = xyes; then + case "$target" in + *-*-hpux*) AC_MSG_RESULT(yes) ;; + *) AC_MSG_WARN(may not work on $target) ;; + esac + EXTRADEFS="$EXTRADEFS -DAU_HPUX_AUDIO" + SYSEXTRAS="$SYSEXTRAS hpux_d_a.c" +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(enable_audio=irix) +if test "x$au_enable_irix" = xyes; then + case "$target" in + *-sgi-irix5*|*-sgi-irix6.2) + EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_OLDAL" + AC_MSG_RESULT(yes) + ;; + *-sgi-irix6*) + EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_NEWAL" + AC_MSG_RESULT(yes) ;; + *) AC_MSG_WARN(may not work on $target) ;; + esac + SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_al.c" + EXTRALIBS="$EXTRASLIBS -laudio" +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(enable_audio=mme) +if test "x$au_enable_mme" = xyes; then + case "$target" in + *-dec-*) AC_MSG_RESULT(yes) ;; + *) AC_MSG_WARN(may not work on $target) ;; + esac + EXTRADEFS="$EXTRADEFS -DAU_DEC -DAU_AUDRIV" + SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_mme.c" + CPPFLAGS="$CPPFLAGS -I/usr/opt/MME210/include" + EXTRALIBS="$EXTRALIBS /usr/opt/MME220/lib/libmme.a" +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(enable_audio=sb_dsp) +if test "x$au_enable_sb_dsp" = xyes; then + case "$target" in + *-*-bsdi2.0) AC_MSG_RESULT(yes) ;; + *) AC_MSG_WARN(may not work on $target) ;; + esac + EXTRADEFS="$EXTRADEFS -DAU_BSDI -DDEFAULT_RATE=22500" + SYSEXTRAS="$SYSEXTRAS bsd20_a.c" +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(enable_audio=w32) +if test "x$au_enable_w32" = xyes; then + case "$target" in *-*-cygwin32*) - EXTRADEFS="$EXTRADEFS -DAU_W32" - if test "x$enable_w32gui" = xyes; then + if test "x$enable_w32gui" = xyes; then SYSEXTRAS="$SYSEXTRAS w32g_a.c" - else + else SYSEXTRAS="$SYSEXTRAS w32_a.c" - fi - EXTRALIBS="$EXTRALIBS -lwinmm" - AC_MSG_RESULT(yes cygnus) - ;; - *) - AC_MSG_WARN(no method to play) - if test "x$enable_audio_opt" != xno; then - EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV" - SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_none.c" - fi - ;; + fi + AC_MSG_RESULT(yes) + ;; + *) + AC_MSG_WARN(may not work on $target) + SYSEXTRAS="$SYSEXTRAS w32_a.c" + ;; esac + EXTRALIBS="$EXTRALIBS -lwinmm" + EXTRADEFS="$EXTRADEFS -DAU_W32" else AC_MSG_RESULT(no) fi +AC_MSG_CHECKING(enable_audio=alsa) +if test "x$au_enable_alsa" = xyes; then + AC_MSG_RESULT() + KEEPCFLAGS=$CFLAGS + KEEPLIBS=$LIBS + KEEPLDFLAGS=$LDFLAGS + AM_PATH_ALSA_LOCAL() + if test have_alsa = no; then + AC_MSG_WARN(ALSA: Couldn't configure) + CFLAGS=$KEEPCFLAGS + LIBS=$KEEPLIBS + LDFLAGS=$KEEPLDFLAGS + else + AC_MSG_RESULT(ALSA: Enabled) + EXTRADEFS="$EXTRADEFS -DAU_ALSA" + SYSEXTRAS="$SYSEXTRAS alsa_a.c" + EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ALSA_CFLAGS) + LIBS="$LIBS $ALSA_LIBS" + fi +else + AC_MSG_RESULT(no) +fi -dnl Dynamic link configuration +AC_MSG_CHECKING(enable_audio=alib) +if test "x$au_enable_alib" = xyes; then + case "$target" in + *-*-hpux*) AC_MSG_RESULT(yes) ;; + *) AC_MSG_WARN(may not work on $target) ;; + esac + SYSEXTRAS="$SYSEXTRAS hpux_a.c" + EXTRADEFS="$EXTRADEFS -DAU_HPUX_ALIB" + if test -d /opt/audio/include; then + CPPFLAGS="$CPPFLAGS -I/opt/audio/include" + fi + if test -d /opt/audio/lib; then + EXTRALIBS="$EXTRALIBS -L/opt/audio/lib" + fi + EXTRALIBS="$EXTRALIBS -lAlib" +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(enable_audio=nas) +if test "x$au_enable_nas" = xyes; then + if test "x$with_x" != xyes; then + AC_MSG_ERROR(nas: --with-x option must be specified) + fi + EXTRADEFS="$EXTRADEFS -DAU_NAS" + SYSEXTRAS="$SYSEXTRAS nas_a.c" -AC_ARG_ENABLE(enable-dynamic, - [ --enable-dynamic Enable dynamic link interface (default is no)], + dnl -laudio conflicts another audio library, + dnl so I specify NAS library with absolete path. + + if test "x$with_nas_library" != x; then + AC_MSG_RESULT($with_nas_library); + EXTRALIBS="$EXTRALIBS $with_nas_library" + else + AC_MSG_RESULT() + MY_SEARCH_LIBS(AuOpenServer, + [$x_libraries/libaudio.a \ + /usr/lib/libaudio.so \ + /usr/lib/libaudio.a ], + [ AC_MSG_RESULT(NAS: $timidity_cv_search_AuOpenServer) + EXTRALIBS="$EXTRALIBS $timidity_cv_search_AuOpenServer"], + [AC_MSG_WARN(NAS library is not found.)]) + fi + test "x$with_nas_includes" != x && CPPFLAGS="$CPPFLAGS -I$with_nas_includes" + lib_xt_opt=-lXt + if test "x$have_xext" = xyes; then + lib_xext_opt=-lXext + fi + if test "x$have_xprelibs" = xyes; then + lib_xprelibs_opt='-lSM -lICE' + fi +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(enable_audio=esd) +if test "x$au_enable_esd" = xyes; then + AC_MSG_RESULT() + KEEPCFLAGS=$CFLAGS + KEEPLIBS=$LIBS + KEEPLDFLAGS=$LDFLAGS + AM_PATH_ESD() + CFLAGS=$KEEPCFLAGS + LIBS=$KEEPLIBS + LDFLAGS=$KEEPLDFLAGS + if test "x$no_esd" = x; then + AC_MSG_RESULT(EsounD: Enabled) + EXTRADEFS="$EXTRADEFS -DAU_ESD" + SYSEXTRAS="$SYSEXTRAS esd_a.c" + EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ESD_CFLAGS) + LIBS="$LIBS $ESD_LIBS" + else + AC_MSG_WARN(EsounD: Couldn't configure) + fi +else + AC_MSG_RESULT(no) +fi + +dnl Pseudo audio device (Undocumented). +if test "x$au_enable_none" = xyes; then + EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV" + SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_none.c" +fi + + +dnl +dnl TIMIDITY_OUTPUT_ID +dnl +AC_MSG_CHECKING(default output mode) +if test "x$DEFAULT_PLAYMODE" = x; then + DEFAULT_PLAYMODE=`echo $enable_audio | sed 's/,.*//'` +fi +case ".$DEFAULT_PLAYMODE" in + .default) TIMIDITY_OUTPUT_ID=d ;; + .oss) TIMIDITY_OUTPUT_ID=d ;; + .alsa) TIMIDITY_OUTPUT_ID=s ;; + .sun) TIMIDITY_OUTPUT_ID=d ;; + .hpux) TIMIDITY_OUTPUT_ID=d ;; + .irix) TIMIDITY_OUTPUT_ID=d ;; + .mme) TIMIDITY_OUTPUT_ID=d ;; + .sb_dsp) TIMIDITY_OUTPUT_ID=d ;; + .w32) TIMIDITY_OUTPUT_ID=d ;; + .alib) TIMIDITY_OUTPUT_ID=A ;; + .nas) TIMIDITY_OUTPUT_ID=n ;; + .esd) TIMIDITY_OUTPUT_ID=e ;; + .wav) TIMIDITY_OUTPUT_ID=w ;; + .au) TIMIDITY_OUTPUT_ID=u ;; + .aiff) TIMIDITY_OUTPUT_ID=a ;; + .list) TIMIDITY_OUTPUT_ID=l ;; + *) TIMIDITY_OUTPUT_ID= ;; +esac +AC_MSG_RESULT($DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID) + + + +dnl +dnl Interface section +dnl + +interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk' + +AC_ARG_ENABLE(interface, + [ --enable-interface=[interface_list] Comma separated interface list ], + [ for i in `echo $enableval | sed 's/,/ /g'`; do + eval "enable_$i=yes" + done ]) + +dnl +dnl Dynamic link configuration +dnl +AC_ARG_ENABLE(dynamic, + [ --enable-dynamic Enable dynamic link interface (default is no) + --enable-dynamic=dynamic_list Comma separated dynamic interface list], [ dnl --enable-dynamic=yes to --enable-dynamic=dynamic - test "x$enable_dynamic" = xyes && enable_dynamic=dynamic - ]) + if test "x$enable_dynamic" = xyes; then + enable_dynamic=dynamic + elif test "x$enable_dynamic" != xno; then + for i in `echo $enableval | sed 's/,/ /g'`; do + eval "enable_$i=dynamic" + done + fi]) + +join_targets= +for i in $interface_targets; do + eval "join_targets=$join_targets\$enable_$i" +done -case "$enable_ncurses$enable_slang$enable_motif$enable_tcltk$enable_emacs$enable_vt100$enable_xaw$enable_xskin$enable_gtk$enable_dynamic" in -*dynamic*) NEEDDLOPEN=yes;; -*) NEEDDLOPEN=no;; +case ".$join_targets" in +.*dynamic*) NEEDDLOPEN=yes;; +*) NEEDDLOPEN=no;; esac dnl check -fpic option for gcc -if test "$GCC" = yes; then SHCFLAGS="$SHCFLAGS -fPIC"; fi +if test "x$GCC" = xyes; then SHCFLAGS="$SHCFLAGS -fPIC"; fi case "x$enable_ump" in xyes|xdynamic) EXTRACFLAGS="$EXTRACFLAGS -DXP_UNIX $SHCFLAGS";; esac if test "$NEEDDLOPEN" = "yes"; then have_dl=no - WAPI_CHECK_FUNC(LoadLibraryExA,,[LoadLibraryExA(0,0,0);],have_dl=cygwin) - test $wapi_cv_func_LoadLibraryExA = yes && have_dl=cygwin + WAPI_CHECK_FUNC(LoadLibrary,,[LoadLibrary(0);],have_dl=w32) + test $wapi_cv_func_LoadLibrary = yes && have_dl=w32 if test "$have_dl" = "no"; then AC_CHECK_FUNC(shl_load,have_dl=hpux) @@ -598,9 +858,9 @@ SYSEXTRAS="$SYSEXTRAS dl_hpux.c" LDFLAGS="$LDFLAGS -Wl,-E $LDFLAGS" ;; - cygwin) - AC_MSG_RESULT(use dl_cygwin32.c) - SYSEXTRAS="$SYSEXTRAS dl_cygwin32.c" + w32) + AC_MSG_RESULT(use dl_w32.c) + SYSEXTRAS="$SYSEXTRAS dl_w32.c" ;; *) NEEDDLOPEN="no" @@ -610,16 +870,18 @@ fi if test "$NEEDDLOPEN" = "yes"; then - SHARED_LIB_PATH="\$(TIMID_DIR)" MY_DEFINE(IA_DYNAMIC) EXTRADEFS="$EXTRADEFS -DSHARED_LIB_EXT=\\\".$so\\\"" - EXTRADEFS="$EXTRADEFS -DSHARED_LIB_PATH=\\\"$SHARED_LIB_PATH\\\"" + EXTRADEFS="$EXTRADEFS \$(DEF_SHLIB_DIR)" + test "x$GCC" = xyes -a "x$timidity_cv_ccoption_rdynamic" = xyes && timidity_LDFLAGS="-rdynamic" fi -AM_CONDITIONAL(NEEDDLOPEN, test "$NEEDDLOPEN" = "yes") +AM_CONDITIONAL(NEEDDLOPEN, test "$NEEDDLOPEN" = "yes") -dnl Select interfaces +dnl +dnl Each interface section +dnl dnl ncurses AM_CONDITIONAL(ENABLE_NCURSES, false) @@ -682,7 +944,7 @@ [ AC_CHECK_LIB(slang,SLang_init_tty,:, [ enable_slang=no AC_MSG_WARN(slang interface is not enabled) ]) - AC_CHECK_HEADERS(slang/slang.h) + AC_CHECK_HEADERS(slang/slang.h slang.h) ], [ LIBS="$LIBS -lslang" INTERFACE_SRCS="$INTERFACE_SRCS slang_c.c" @@ -757,7 +1019,6 @@ fi ], [ LIBS=`echo $LIBS | sed "s/-lX11/$tk_lib $tcl_lib -lX11/"` - EXTRADEFS="$EXTRADEFS -DTKPROGPATH=\\\"\$(TCL_DIR)/tkmidity.tcl\\\"" case "$target" in *-*-bsdi*) EXTRALIBS="$EXTRALIBS -lipc" @@ -765,8 +1026,7 @@ esac INTERFACE_SRCS="$INTERFACE_SRCS tk_c.c" ], - [ EXTRADEFS="$EXTRADEFS -DTKPROGPATH=\\\"\$(TCL_DIR)/tkmidity.tcl\\\"" - k_so_libs="$tcl_libdir $tk_libdir $tcl_lib $tk_lib $lib_dl_opt" + [ k_so_libs="$tcl_libdir $tk_libdir $tcl_lib $tk_lib $lib_dl_opt" case "$target" in *-*-bsdi*) k_so_libs="$k_so_libs -lipc" @@ -863,7 +1123,7 @@ EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$GTK_CFLAGS) INTERFACE_SRCS="$INTERFACE_SRCS gtk_c.c gtk_i.c gtk_p.c" ], - [ if test "$GCC" = yes; then + [ if test "x$GCC" = xyes; then dnl Do not include -rdynamic option in $g_so_libs. for i in $GTK_LIBS; do case "x$i" in @@ -942,7 +1202,7 @@ ] ) -dnl Network selection +dnl Network section AC_ARG_ENABLE(network, [ --enable-network Enable network support (default is no)], [ if test "$enableval" = "yes"; then @@ -993,7 +1253,12 @@ SET_UNIQ_WORDS(SHLDFLAGS,$SHLDFLAGS) SET_UNIQ_WORDS(CFLAGS,$EXTRACFLAGS $CFLAGS) SET_UNIQ_WORDS(CPPFLAGS,$CPPFLAGS $EXTRADEFS) -CPPFLAGS="$CPPFLAGS -DDEFAULT_PATH=\\\"\$(TIMID_DIR)\\\"" + +CPPFLAGS="$CPPFLAGS \$(DEF_PKGDATADIR) \$(DEF_PKGLIBDIR) \$(DEF_DEFAULT_PATH)" + +if test "x$TIMIDITY_OUTPUT_ID" != x; then + CPPFLAGS="$CPPFLAGS -DTIMIDITY_OUTPUT_ID=\\\"$TIMIDITY_OUTPUT_ID\\\"" +fi if test "x$with_x" = xyes; then dnl Order of X-library is: -lXm -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 @@ -1002,6 +1267,8 @@ LIBS="$LIBS $lib_dl_opt $lib_png_opt $lib_zip_opt $lib_user32_opt $lib_w32gui_opt $EXTRALIBS" SHLD="$SHLD $SHLDFLAGS" +AC_SUBST(SHELL) +AC_SUBST(timidity_LDFLAGS) AC_SUBST(SYSEXTRAS) AC_SUBST(EXTRALIBS) AC_SUBST(NETSRCS) diff -ruN TiMidity++-2.5.1/doc/C/Makefile.in TiMidity++-2.6.0/doc/C/Makefile.in --- TiMidity++-2.5.1/doc/C/Makefile.in Sat Aug 28 00:30:42 1999 +++ TiMidity++-2.6.0/doc/C/Makefile.in Tue Sep 21 23:18:26 1999 @@ -100,6 +100,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -109,6 +110,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ EXTRA_DIST = timidity.1 timidity.cfg.5 CHANGES.02i FAQ README.dl README.sf README.tk README.xskin README.xaw diff -ruN TiMidity++-2.5.1/doc/Makefile.in TiMidity++-2.6.0/doc/Makefile.in --- TiMidity++-2.5.1/doc/Makefile.in Sat Aug 28 00:30:38 1999 +++ TiMidity++-2.6.0/doc/Makefile.in Tue Sep 21 23:18:24 1999 @@ -100,6 +100,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -109,6 +110,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ SUFFIXES = .1 .5 .txt .ps SUBDIRS = C ja_JP.ujis diff -ruN TiMidity++-2.5.1/doc/ja_JP.ujis/Makefile.in TiMidity++-2.6.0/doc/ja_JP.ujis/Makefile.in --- TiMidity++-2.5.1/doc/ja_JP.ujis/Makefile.in Sat Aug 28 00:30:46 1999 +++ TiMidity++-2.6.0/doc/ja_JP.ujis/Makefile.in Tue Sep 21 23:18:28 1999 @@ -100,6 +100,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -109,6 +110,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ EXTRA_DIST = timidity.1 timidity.cfg.5 README.dl README.sf README.tk README.xskin README.xaw diff -ruN TiMidity++-2.5.1/interface/Makefile.am TiMidity++-2.6.0/interface/Makefile.am --- TiMidity++-2.5.1/interface/Makefile.am Thu Aug 26 12:58:07 1999 +++ TiMidity++-2.6.0/interface/Makefile.am Sat Sep 4 07:45:54 1999 @@ -166,7 +166,7 @@ timidity.el .ptcl.tcl: - sed -e s@%TCL_DIR%@$(TCL_DIR)@g -e s@%TIMID_DIR%@$(TIMID_DIR)@g $< > $@ + sed -e 's@%TCL_DIR%@$(TCL_DIR)@g' $< > $@ clean: rm -f tkmidity.tcl rm -f *.o @@ -205,14 +205,13 @@ endif install.el: $(ELFILES) - test -d $(DESTDIR)$(TIMID_DIR) || mkdir -p $(DESTDIR)$(TIMID_DIR) - for f in $(ELFILES) ''; do case ".$$f" in .);; *) $(INSTALL_DATA) $$f $(DESTDIR)$(TIMID_DIR);; esac; done + test -d $(DESTDIR)$(ELISP_DIR) || mkdir -p $(DESTDIR)$(ELISP_DIR) + for f in $(ELFILES) ''; do case ".$$f" in .);; *) $(INSTALL_DATA) $$f $(DESTDIR)$(ELISP_DIR);; esac; done w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \ w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp windres -o $@ -O coff w32g_res.rc - ### ### For dynamic interfaces ### @@ -233,7 +232,8 @@ all-am: $(dynamic_targets) install.dynamics: $(dynamic_targets) - for f in $(dynamic_targets) ''; do case ".$$f" in .);; *) $(INSTALL_PROGRAM) $$f $(DESTDIR)$(TIMID_DIR);; esac; done + test -d $(DESTDIR)$(SHLIB_DIR) || mkdir -p $(DESTDIR)$(SHLIB_DIR) + for f in $(dynamic_targets) ''; do case ".$$f" in .);; *) $(INSTALL_PROGRAM) $$f $(DESTDIR)$(SHLIB_DIR);; esac; done .c.$(so): $(COMPILE) $(SHCFLAGS) -c $< -o $@ diff -ruN TiMidity++-2.5.1/interface/Makefile.in TiMidity++-2.6.0/interface/Makefile.in --- TiMidity++-2.5.1/interface/Makefile.in Sat Aug 28 00:30:08 1999 +++ TiMidity++-2.6.0/interface/Makefile.in Tue Sep 21 23:18:09 1999 @@ -99,6 +99,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -107,6 +108,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ SUFFIXES = .ptcl .tcl .@so@ @@ -364,6 +366,10 @@ ../timidity/output.h ../timidity/controls.h \ ../timidity/instrum.h ../timidity/playmidi.h \ ../timidity/readmidi.h +dynamic_c.o: dynamic_c.c ../config.h ../timidity/timidity.h \ + ../utils/support.h ../timidity/common.h ../libarc/url.h \ + ../utils/mblock.h ../timidity/output.h ../timidity/controls.h \ + ../timidity/dlutils.h emacs_c.o: emacs_c.c ../config.h ../timidity/timidity.h \ ../utils/support.h ../timidity/common.h ../libarc/url.h \ ../utils/mblock.h ../timidity/output.h ../timidity/controls.h \ @@ -569,7 +575,7 @@ include $(top_builddir)/common.makefile .ptcl.tcl: - sed -e s@%TCL_DIR%@$(TCL_DIR)@g -e s@%TIMID_DIR%@$(TIMID_DIR)@g $< > $@ + sed -e 's@%TCL_DIR%@$(TCL_DIR)@g' $< > $@ clean: rm -f tkmidity.tcl rm -f *.o @@ -588,8 +594,8 @@ cd bitmaps; $(MAKE) install.bitmaps install.el: $(ELFILES) - test -d $(DESTDIR)$(TIMID_DIR) || mkdir -p $(DESTDIR)$(TIMID_DIR) - for f in $(ELFILES) ''; do case ".$$f" in .);; *) $(INSTALL_DATA) $$f $(DESTDIR)$(TIMID_DIR);; esac; done + test -d $(DESTDIR)$(ELISP_DIR) || mkdir -p $(DESTDIR)$(ELISP_DIR) + for f in $(ELFILES) ''; do case ".$$f" in .);; *) $(INSTALL_DATA) $$f $(DESTDIR)$(ELISP_DIR);; esac; done w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \ w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp @@ -598,7 +604,8 @@ @NEEDDLOPEN_TRUE@all-am: $(dynamic_targets) @NEEDDLOPEN_TRUE@install.dynamics: $(dynamic_targets) -@NEEDDLOPEN_TRUE@ for f in $(dynamic_targets) ''; do case ".$$f" in .);; *) $(INSTALL_PROGRAM) $$f $(DESTDIR)$(TIMID_DIR);; esac; done +@NEEDDLOPEN_TRUE@ test -d $(DESTDIR)$(SHLIB_DIR) || mkdir -p $(DESTDIR)$(SHLIB_DIR) +@NEEDDLOPEN_TRUE@ for f in $(dynamic_targets) ''; do case ".$$f" in .);; *) $(INSTALL_PROGRAM) $$f $(DESTDIR)$(SHLIB_DIR);; esac; done @NEEDDLOPEN_TRUE@.c.$(so): @NEEDDLOPEN_TRUE@ $(COMPILE) $(SHCFLAGS) -c $< -o $@ diff -ruN TiMidity++-2.5.1/interface/bitmaps/Makefile.am TiMidity++-2.6.0/interface/bitmaps/Makefile.am --- TiMidity++-2.5.1/interface/bitmaps/Makefile.am Thu Jan 21 03:50:06 1999 +++ TiMidity++-2.6.0/interface/bitmaps/Makefile.am Sat Sep 4 07:47:26 1999 @@ -34,5 +34,5 @@ EXTRA_DIST = $(BITMAPS) install.bitmaps: $(BITMAPS) - test -d $(DESTDIR)$(TCL_DIR)/bitmaps || mkdir -p $(DESTDIR)$(TCL_DIR)/bitmaps - for f in $(BITMAPS) ''; do case ".$$f" in .);; *) $(INSTALL) -m 644 $$f $(DESTDIR)$(TIMID_DIR)/bitmaps;; esac; done + test -d $(DESTDIR)$(BITMAP_DIR) || mkdir -p $(DESTDIR)$(BITMAP_DIR) + for f in $(BITMAPS) ''; do case ".$$f" in .);; *) $(INSTALL) -m 644 $$f $(DESTDIR)$(BITMAP_DIR);; esac; done diff -ruN TiMidity++-2.5.1/interface/bitmaps/Makefile.in TiMidity++-2.6.0/interface/bitmaps/Makefile.in --- TiMidity++-2.5.1/interface/bitmaps/Makefile.in Sat Aug 28 00:30:19 1999 +++ TiMidity++-2.6.0/interface/bitmaps/Makefile.in Tue Sep 21 23:18:15 1999 @@ -100,6 +100,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -109,6 +110,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ BITMAPS = back.xbm fwrd.xbm next.xbm pause.xbm play.xbm prev.xbm quit.xbm stop.xbm random.xbm repeat.xbm timidity.xbm @@ -216,8 +218,8 @@ include $(top_builddir)/common.makefile install.bitmaps: $(BITMAPS) - test -d $(DESTDIR)$(TCL_DIR)/bitmaps || mkdir -p $(DESTDIR)$(TCL_DIR)/bitmaps - for f in $(BITMAPS) ''; do case ".$$f" in .);; *) $(INSTALL) -m 644 $$f $(DESTDIR)$(TIMID_DIR)/bitmaps;; esac; done + test -d $(DESTDIR)$(BITMAP_DIR) || mkdir -p $(DESTDIR)$(BITMAP_DIR) + for f in $(BITMAPS) ''; do case ".$$f" in .);; *) $(INSTALL) -m 644 $$f $(DESTDIR)$(BITMAP_DIR);; esac; done # 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. diff -ruN TiMidity++-2.5.1/interface/dynamic_c.c TiMidity++-2.6.0/interface/dynamic_c.c --- TiMidity++-2.5.1/interface/dynamic_c.c Fri Mar 12 18:56:56 1999 +++ TiMidity++-2.6.0/interface/dynamic_c.c Fri Sep 3 00:46:23 1999 @@ -44,15 +44,18 @@ #include "dlutils.h" static int ctl_open(int using_stdin, int using_stdout); +static void ctl_close(void); extern char *dynamic_interface_module(int id); static void ctl_event(){} /* Do nothing */ static int cmsg(int type, int verbosity_level, char *fmt, ...); +static void *libhandle; +static void (* ctl_close_hook)(void); ControlMode dynamic_control_mode = { "Dynamic interface", 0, 1,0,0,0, - ctl_open, NULL, NULL, NULL, cmsg, ctl_event, + ctl_open, ctl_close, NULL, NULL, cmsg, ctl_event, }; static int cmsg(int type, int verbosity_level, char *fmt, ...) @@ -80,7 +83,6 @@ static int ctl_open(int using_stdin, int using_stdout) { - void *libhandle; ControlMode *(* inferface_loader)(void); char *path; char buff[256]; @@ -110,6 +112,19 @@ ctl->verbosity = dynamic_control_mode.verbosity; ctl->trace_playing = dynamic_control_mode.trace_playing; + ctl->flags = dynamic_control_mode.flags; + ctl_close_hook = ctl->close; + ctl->close = dynamic_control_mode.close; /* ctl_close() */ return ctl->open(using_stdin, using_stdout); +} + +static void ctl_close(void) +{ + if(ctl_close_hook) + { + ctl_close_hook(); + dl_free(libhandle); + ctl_close_hook = NULL; + } } diff -ruN TiMidity++-2.5.1/interface/gtk_i.c TiMidity++-2.6.0/interface/gtk_i.c --- TiMidity++-2.5.1/interface/gtk_i.c Sat Jul 17 18:25:06 1999 +++ TiMidity++-2.6.0/interface/gtk_i.c Sun Sep 5 13:44:15 1999 @@ -343,6 +343,9 @@ GtkWidget *vbox, *hbox, *vscrollbar, *vbox2; GtkObject *adj; + /* enable locale */ + gtk_set_locale (); + gtk_init (&argc, NULL); ttip = create_yellow_tooltips(); diff -ruN TiMidity++-2.5.1/interface/motif_bitmaps/Makefile.in TiMidity++-2.6.0/interface/motif_bitmaps/Makefile.in --- TiMidity++-2.5.1/interface/motif_bitmaps/Makefile.in Sat Aug 28 00:30:15 1999 +++ TiMidity++-2.6.0/interface/motif_bitmaps/Makefile.in Tue Sep 21 23:18:13 1999 @@ -100,6 +100,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -109,6 +110,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ BITMAPS = back.xbm fwd.xbm next.xbm pause.xbm prev.xbm quit.xbm restart.xbm timidity.xbm diff -ruN TiMidity++-2.5.1/interface/pixmaps/Makefile.in TiMidity++-2.6.0/interface/pixmaps/Makefile.in --- TiMidity++-2.5.1/interface/pixmaps/Makefile.in Sat Aug 28 00:30:24 1999 +++ TiMidity++-2.6.0/interface/pixmaps/Makefile.in Tue Sep 21 23:18:17 1999 @@ -100,6 +100,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -109,6 +110,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ PIXMAPS = ff.xpm loud.xpm nextdisc.xpm nexttrk.xpm playpaus.xpm prevdisc.xpm prevtrk.xpm quiet.xpm quit.xpm rew.xpm stop.xpm open.xpm fast.xpm slow.xpm restart.xpm keyup.xpm keydown.xpm timidity.xpm diff -ruN TiMidity++-2.5.1/interface/tk_c.c TiMidity++-2.6.0/interface/tk_c.c --- TiMidity++-2.5.1/interface/tk_c.c Sat Apr 10 00:40:30 1999 +++ TiMidity++-2.6.0/interface/tk_c.c Sat Sep 4 06:38:52 1999 @@ -65,6 +65,11 @@ #include "miditrace.h" #include "aq.h" +#ifndef TKPROGPATH +#define TKPROGPATH PKGLIBDIR "/tkmidity.tcl" +#endif /* TKPROGPATH */ + + static void ctl_refresh(void); static void ctl_total_time(int tt); static void ctl_master_volume(int mv); diff -ruN TiMidity++-2.5.1/interface/vt100_c.c TiMidity++-2.6.0/interface/vt100_c.c --- TiMidity++-2.5.1/interface/vt100_c.c Sun Aug 8 22:27:32 1999 +++ TiMidity++-2.6.0/interface/vt100_c.c Tue Sep 21 10:54:58 1999 @@ -196,7 +196,7 @@ static void ctl_current_time(int secs, int v) { - int mins; + int mins, bold_flag = 0; static int last_voices = -1, last_secs = -1; if(last_secs != secs) @@ -207,15 +207,19 @@ vt100_move(4, 6); vt100_set_attr(VT100_ATTR_BOLD); printf("%3d:%02d", mins, secs); + bold_flag = 1; } if(!ctl.trace_playing || midi_trace.flush_flag) { - vt100_reset_attr(); + if(bold_flag) + vt100_reset_attr(); return; } vt100_move(4, 47); + if(!bold_flag) + vt100_set_attr(VT100_ATTR_BOLD); printf("%3d", v); vt100_reset_attr(); diff -ruN TiMidity++-2.5.1/interface/w32g_i.c TiMidity++-2.6.0/interface/w32g_i.c --- TiMidity++-2.5.1/interface/w32g_i.c Wed Aug 25 15:36:42 1999 +++ TiMidity++-2.6.0/interface/w32g_i.c Fri Sep 3 03:01:05 1999 @@ -137,7 +137,6 @@ HANDLE hMainThreadInfo = 0; DWORD dwMainThreadID = 0; static volatile int wait_thread_flag = 1; -volatile int IsMainThreadExit = 0; typedef struct MAINTHREAD_ARGS_ { int *pArgc; char ***pArgv; @@ -3107,7 +3106,6 @@ { MSG msg; - IsMainThreadExit = 0; ThreadNumMax++; #ifdef W32GUI_DEBUG @@ -3153,7 +3151,6 @@ OnExitReady(); w32g_send_rc(RC_QUIT, 0); } - IsMainThreadExit = 1; crt_endthread(); } @@ -3613,17 +3610,29 @@ return 0; } -void w32g_close(void) +static void terminate_main_thread(void) { - if(!IsMainThreadExit) + DWORD status; + + switch(WaitForSingleObject(hMainThread, 0)) { + case WAIT_OBJECT_0: + break; + case WAIT_TIMEOUT: OnQuit(); - do - { - sleep(100); - VOLATILE_TOUCH(IsMainThreadExit); - } while(!IsMainThreadExit); + status = WaitForSingleObject(hMainThread, 5000); + if(status == WAIT_TIMEOUT) + TerminateThread(hMainThread, 0); + break; + default: + TerminateThread(hMainThread, 0); + break; } +} + +void w32g_close(void) +{ + terminate_main_thread(); CloseHandle(w32g_lock_sem); CloseHandle(w32g_empty_sem); } @@ -3631,17 +3640,7 @@ void w32g_restart(void) { w32g_restart_gui_flag = 1; - - /* Terminate MainThread */ - if(!IsMainThreadExit) - { - OnQuit(); - do - { - usleep(200); - } while(!IsMainThreadExit); - } - + terminate_main_thread(); CloseHandle(w32g_lock_sem); CloseHandle(w32g_empty_sem); diff -ruN TiMidity++-2.5.1/interface/w32g_ini.c TiMidity++-2.6.0/interface/w32g_ini.c --- TiMidity++-2.5.1/interface/w32g_ini.c Wed Aug 25 13:20:44 1999 +++ TiMidity++-2.6.0/interface/w32g_ini.c Fri Sep 3 13:57:19 1999 @@ -210,11 +210,7 @@ IniPutKeyInt(INI_SEC_PLAYER,"WrdWndFlag",&(sp->WrdWndFlag)); IniPutKeyInt(INI_SEC_PLAYER,"SoundSpecWndFlag",&(sp->SoundSpecWndFlag)); IniPutKeyInt(INI_SEC_PLAYER,"SubWindowMax",&(sp->SubWindowMax)); -//#### -// if(sp->ConfigFile[0]) - IniPutKeyStringN(INI_SEC_PLAYER,"ConfigFile",sp->ConfigFile,MAXPATH + 32); -// else -// IniPutKeyStringN(INI_SEC_PLAYER,"ConfigFile",W32G_TIMIDITY_CFG,MAXPATH + 32); + IniPutKeyStringN(INI_SEC_PLAYER,"ConfigFile",sp->ConfigFile,MAXPATH + 32); IniPutKeyStringN(INI_SEC_PLAYER,"PlaylistFile",sp->PlaylistFile,MAXPATH + 32); IniPutKeyStringN(INI_SEC_PLAYER,"PlaylistHistoryFile",sp->PlaylistHistoryFile,MAXPATH + 32); IniPutKeyStringN(INI_SEC_PLAYER,"MidiFileOpenDir",sp->MidiFileOpenDir,MAXPATH + 32); diff -ruN TiMidity++-2.5.1/interface/w32g_playlist.c TiMidity++-2.6.0/interface/w32g_playlist.c --- TiMidity++-2.5.1/interface/w32g_playlist.c Wed Aug 25 11:22:06 1999 +++ TiMidity++-2.6.0/interface/w32g_playlist.c Sun Sep 5 13:48:52 1999 @@ -66,7 +66,7 @@ { int i; for(i = 0; i < playlist.nfiles; i++) - if(strcasecmp(filename, playlist.list[i].filename) == 0) + if(pathcmp(filename, playlist.list[i].filename, 0) == 0) return 0; } @@ -111,12 +111,10 @@ if(SeachDirRecursive) { -//printf("## dir expand: %d\n"); new_files1 = FilesExpandDir(&nfiles, files); if(new_files1 == NULL) return 0; expand_flag = 1; -//printf("## dir expand done %d\n", nfiles); } else new_files1 = files; @@ -125,9 +123,7 @@ new_files2 = new_files1; else { -//printf("## expand...%d\n", nfiles); new_files2 = expand_file_archives(new_files1, &nfiles); -//printf("## expand...done (%d)\n", nfiles); if(new_files2 == NULL) { if(new_files1 != files) @@ -138,11 +134,9 @@ } } -//printf("## checking files...\n", nfiles); n = 0; for(i = 0; i < nfiles; i++) n += w32g_add_playlist1(new_files2[i], uniq, refine); -//printf("## checking files...done\n", nfiles); if(new_files2 != new_files1) { @@ -155,10 +149,8 @@ free(new_files1); } -//printf("## update...\n", nfiles); if(n > 0) w32g_update_playlist(); -//printf("## update...done\n", nfiles); return n; } @@ -391,8 +383,8 @@ save_n = n; while(j2 < save_n) /* j1 <= j2 */ { - if(strcasecmp(playlist.list[i].filename, - playlist.list[j2].filename) == 0) + if(pathcmp(playlist.list[i].filename, + playlist.list[j2].filename, 0) == 0) { nremoved++; n--; diff -ruN TiMidity++-2.5.1/interface/w32g_utl.c TiMidity++-2.6.0/interface/w32g_utl.c --- TiMidity++-2.5.1/interface/w32g_utl.c Thu Aug 26 16:28:58 1999 +++ TiMidity++-2.6.0/interface/w32g_utl.c Fri Sep 3 13:58:02 1999 @@ -33,7 +33,6 @@ #else #include #endif -//#####include #include #include "timidity.h" diff -ruN TiMidity++-2.5.1/interface/x_sherry.c TiMidity++-2.6.0/interface/x_sherry.c --- TiMidity++-2.5.1/interface/x_sherry.c Sat Aug 28 00:27:51 1999 +++ TiMidity++-2.6.0/interface/x_sherry.c Thu Sep 9 00:27:37 1999 @@ -74,6 +74,10 @@ #define JISX0201 "-*-fixed-*-r-normal--16-*-*-*-*-*-jisx0201.1976-*" #define JISX0208 "-*-fixed-*-r-normal--16-*-*-*-*-*-jisx0208.1983-*" +/* (mask & src) | (~mask & dst) equals as Windows API BitBlt ROP 0x00CA0749 */ +/* #define ROP3_CA0749(ptn, src, dst) (((ptn) & (src)) | (~(ptn) & (dst))) */ +#define ROP3_CA0749(ptn, src, dst) ((dst) ^ ((ptn) & ((src) ^ (dst)))) + typedef struct _ImagePixmap { Pixmap pm; @@ -129,7 +133,8 @@ static VirtualScreen **virtualScreen; /* MAX_VIRTUAL_SCREENS */ static VirtualScreen *tmpScreen; static VirtualScreen *alloc_vscreen(int width, int height, int transParent); -static void free_vscreen(VirtualScreen *scr); +static void free_vscreen(VirtualScreen *scr); + #define VSCREEN_PIXEL(scr, x, y) ((scr)->data[(scr)->width * (y) + (x)]) static unsigned long basePixel; /* base pixel */ @@ -139,7 +144,7 @@ static SherryPalette **virtualPalette; /* MAX_VIRTUAL_PALETTES, ²¾Áۥѥì¥Ã¥È */ static SherryPaletteEntry realPalette[MAX_PALETTES]; -static uint8 *pseudoImage; /* For TrueColor */ +static uint8 *pseudoImage = NULL; /* For TrueColor */ static int draw_ctl_flag = True; static int err_to_stop = 0; @@ -414,10 +419,12 @@ return error_flag; } - if(strchr(opts, 'p')) - try_pseudo = 1; - else - try_pseudo = 0; + try_pseudo = 0; + if(opts) + { + if(strchr(opts, 'p')) + try_pseudo = 1; + } if((theDisplay = XOpenDisplay(NULL)) == NULL) { @@ -523,7 +530,7 @@ for(i = 0; i < MAX_VIRTUAL_SCREENS; i++) if(virtualScreen[i] != NULL) { - free(virtualScreen[i]); + free_vscreen(virtualScreen[i]); virtualScreen[i] = NULL; } free(virtualScreen); @@ -539,7 +546,8 @@ virtualPalette[i] = NULL; } free(virtualPalette); - free(pseudoImage); + if(pseudoImage) + free(pseudoImage); XFreeFont(theDisplay, theFont8); XFreeFont(theDisplay, theFont16); XCloseDisplay(theDisplay); @@ -607,7 +615,7 @@ n = SRY_GET_SHORT(data + i) & 0xffff; if(virtualScreen[n] != NULL) { - free(virtualScreen[n]); + free_vscreen(virtualScreen[n]); virtualScreen[n] = NULL; } } @@ -939,6 +947,7 @@ png_read_update_info(pngPtr, infoPtr); rowbytes = png_get_rowbytes(pngPtr, infoPtr); + /* rowbytes == width */ rowPointers = (png_bytep *)safe_malloc(height * sizeof(png_bytep)); rowPointers[0] = (png_byte *)safe_malloc(rowbytes * height * sizeof(png_byte)); @@ -961,13 +970,16 @@ } if(scr == NULL) scr = virtualScreen[screen] = - alloc_vscreen(width, height, transParent); + alloc_vscreen(width, height*2, transParent); else scr->transParent = transParent; if(virtualPalette[vpalette] == NULL) + { virtualPalette[vpalette] = (SherryPalette *)safe_malloc(sizeof(SherryPalette)); + memset(virtualPalette[vpalette], 0, sizeof(SherryPalette)); + } entry = virtualPalette[vpalette]->entry; for(i = 0; i < numPalette; i++) @@ -1007,6 +1019,9 @@ printf("Trans all: %d:(%d,%d)\n", screen, sx, sy); #endif /* SRY_DEBUG */ + if(!check_range(scr, sx, sy, + sx + REAL_SCREEN_SIZE_X - 1, sy + REAL_SCREEN_SIZE_Y - 1)) + return; if(theClass != TrueColor) { @@ -1104,17 +1119,15 @@ height_require = REAL_SCREEN_SIZE_Y; return tmpScreen = alloc_vscreen(width_require, height_require, 0); } -/* if(tmpScreen->width * tmpScreen->height >= width_require * height_require) { tmpScreen->width = width_require; tmpScreen->height = height_require; return tmpScreen; } - free(tmpScreen); + if(tmpScreen) + free_vscreen(tmpScreen); return tmpScreen = alloc_vscreen(width_require, height_require, 0); -*/ - return tmpScreen; } static void normalize_rect(int *x1, int *y1, int *x2, int *y2) @@ -1223,7 +1236,7 @@ continue; i = (dest_y + y) * dw + dest_x + x; q = target[i]; - target[i] = (mask & p) | (~mask & q); + target[i] = ROP3_CA0749(mask, p, q); } } } @@ -1346,7 +1359,7 @@ { dstP = VSCREEN_PIXEL(dest, toX + x, toY + y); VSCREEN_PIXEL(dest, toX + x, toY + y) = - (planeMask & srcP) | (~planeMask & dstP); + ROP3_CA0749(planeMask, srcP, dstP); } } } @@ -1394,7 +1407,7 @@ int i; i = v->width * y + x; p = v->data[i]; - v->data[i] = (mask & color) | (~mask & p); + v->data[i] = ROP3_CA0749(mask, color, p); } } } @@ -1407,6 +1420,7 @@ if(scr == NULL) return; + if(x1 < 0 || y1 < 0 || x2 >= scr->width || @@ -1444,7 +1458,7 @@ } idx = scr->width * y + x; - scr->data[idx] = (mask & pixel) | (~mask & scr->data[idx]); + scr->data[idx] = ROP3_CA0749(mask, pixel, scr->data[idx]); if((y2 - y1) * ydirflag > 0) { while(x < xend) @@ -1458,7 +1472,7 @@ d += incr2; } idx = scr->width * y + x; - scr->data[idx] = (mask & pixel) | (~mask & scr->data[idx]); + scr->data[idx] = ROP3_CA0749(mask, pixel, scr->data[idx]); } } else @@ -1474,7 +1488,7 @@ d += incr2; } idx = scr->width * y + x; - scr->data[idx] = (mask & pixel) | (~mask & scr->data[idx]); + scr->data[idx] = ROP3_CA0749(mask, pixel, scr->data[idx]); } } } @@ -1498,7 +1512,7 @@ xdirflag = 1; } idx = scr->width * y + x; - scr->data[idx] = (mask & pixel) | (~mask & scr->data[idx]); + scr->data[idx] = ROP3_CA0749(mask, pixel, scr->data[idx]); if((x2 - x1) * xdirflag > 0) { while(y < yend) @@ -1512,7 +1526,7 @@ d += incr2; } idx = scr->width * y + x; - scr->data[idx] = (mask & pixel) | (~mask & scr->data[idx]); + scr->data[idx] = ROP3_CA0749(mask, pixel, scr->data[idx]); } } else @@ -1528,7 +1542,7 @@ d += incr2; } idx = scr->width * y + x; - scr->data[idx] = (mask & pixel) | (~mask & scr->data[idx]); + scr->data[idx] = ROP3_CA0749(mask, pixel, scr->data[idx]); } } } @@ -1739,7 +1753,7 @@ { p = VSCREEN_PIXEL(scr, tx + bx, ty + by); VSCREEN_PIXEL(scr, tx + bx, ty + by) = - (mask & fg) | (~mask & p); + ROP3_CA0749(mask, fg, p); } } else @@ -1748,7 +1762,7 @@ { p = VSCREEN_PIXEL(scr, tx + bx, ty + by); VSCREEN_PIXEL(scr, tx + bx, ty + by) = - (mask & bg) | (~mask & p); + ROP3_CA0749(mask, bg, p); } } } @@ -1772,6 +1786,7 @@ err_to_stop = 0; init_palette(); + XSetWindowBackground(theDisplay, theWindow, basePixel); XClearWindow(theDisplay, theWindow); @@ -1780,9 +1795,14 @@ for(i = 0; i < MAX_VIRTUAL_SCREENS; i++) if(virtualScreen[i] != NULL) { - free(virtualScreen[i]); + free_vscreen(virtualScreen[i]); virtualScreen[i] = NULL; } + if(tmpScreen) + { + free(tmpScreen); + tmpScreen = NULL; + } for(i = 0; i < MAX_VIRTUAL_PALETTES; i++) if(virtualPalette[i] != NULL) @@ -1790,6 +1810,9 @@ free(virtualPalette[i]); virtualPalette[i] = NULL; } + memset(realPalette, 0, sizeof(realPalette)); + if(theClass == TrueColor) + memset(pseudoImage, 0, REAL_SCREEN_SIZE_X * REAL_SCREEN_SIZE_Y); } @@ -1829,9 +1852,12 @@ skip_bit = op & 0x80; if(skip_bit && aq_filled_ratio() < 0.2) return; + op &= 0x7F; - switch(op & 0x7F) + switch(op) { + case 0x00: /* DataEnd */ + break; case 0x01: ctl->cmsg(CMSG_INFO, VERB_DEBUG, "sherry start"); wrd_init_path(); @@ -1912,11 +1938,25 @@ ctl->cmsg(CMSG_INFO, VERB_DEBUG, "image copy 0x62"); sry_trans_partial_mask(data); break; - - case 0: - case 0x20: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1a: + case 0x1b: + case 0x1c: + case 0x1d: + case 0x1e: + case 0x1f: case 0x71: case 0x72: + case 0x7f: ctl->cmsg(CMSG_WARNING, VERB_DEBUG, "Sherry WRD 0x%x: not supported, ignore", op); break; @@ -2243,14 +2283,7 @@ } - - /**** VirtualScreen intarfaces ****/ -static void free_vscreen(VirtualScreen *scr) -{ - free(scr); -} - static VirtualScreen *alloc_vscreen(int width, int height, int transParent) { VirtualScreen *scr; @@ -2260,8 +2293,14 @@ scr = (VirtualScreen *)safe_malloc(sizeof(VirtualScreen) + size); scr->width = width; scr->height = height; + scr->transParent = transParent; memset(scr->data, transParent, size); return scr; +} + +static void free_vscreen(VirtualScreen *scr) +{ + free(scr); } void x_sry_event(void) diff -ruN TiMidity++-2.5.1/interface/xaw_i.c TiMidity++-2.6.0/interface/xaw_i.c --- TiMidity++-2.5.1/interface/xaw_i.c Tue Aug 24 20:23:53 1999 +++ TiMidity++-2.6.0/interface/xaw_i.c Sat Sep 4 07:12:09 1999 @@ -254,7 +254,12 @@ static char local_buf[300]; static char window_title[300], *w_title; int amplitude = DEFAULT_AMPLIFICATION; -String bitmapdir = DEFAULT_PATH "/bitmaps"; + +#ifndef XAW_BITMAP_DIR +#define XAW_BITMAP_DIR PKGLIBDIR "/bitmaps" +#endif /* XAW_BITMAP_DIR */ + +String bitmapdir = XAW_BITMAP_DIR; Boolean arrangetitle,savelist; static char **current_flist = NULL; static int voices = 0, last_voice = 0, voices_num_width; @@ -407,7 +412,7 @@ static XtResource xaw_resources[] ={ #define offset(entry) XtOffset(struct _app_resources*, entry) {"bitmapDir", "BitmapDir", XtRString, sizeof(String), - offset(bitmap_dir), XtRString, DEFAULT_PATH "/bitmaps"}, + offset(bitmap_dir), XtRString, XAW_BITMAP_DIR }, {"arrangeTitle", "ArrangeTitle", XtRBoolean, sizeof(Boolean), offset(arrange_title), XtRImmediate, (XtPointer)False}, {"saveList", "SaveList", XtRBoolean, sizeof(Boolean), @@ -2899,7 +2904,7 @@ "*cwd_label.font: -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*", "*time_label*cwd_info.font: -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*", "*time_label.font: -adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*", - "*BitmapDir: " DEFAULT_PATH "/bitmaps/", + "*BitmapDir: " XAW_BITMAP_DIR "/", #ifdef XAW3D "*volume_bar.translations: #override\\n\ ~Ctrl Shift: do-volupdown(-50)\\n\ diff -ruN TiMidity++-2.5.1/libarc/Makefile.in TiMidity++-2.6.0/libarc/Makefile.in --- TiMidity++-2.5.1/libarc/Makefile.in Sat Aug 28 00:30:01 1999 +++ TiMidity++-2.6.0/libarc/Makefile.in Tue Sep 21 23:18:05 1999 @@ -100,6 +100,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -109,6 +110,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/timidity -I$(top_srcdir)/utils $(EXTRAINCS) diff -ruN TiMidity++-2.5.1/libarc/url.h TiMidity++-2.6.0/libarc/url.h --- TiMidity++-2.5.1/libarc/url.h Wed Aug 25 09:50:10 1999 +++ TiMidity++-2.6.0/libarc/url.h Fri Sep 3 02:30:27 1999 @@ -6,7 +6,7 @@ * http://www.goice.co.jp/member/mo/release/index.html#liburl */ -#define URL_LIB_VERSION "1.9.3" +#define URL_LIB_VERSION "1.9.4" /* Define if you want to enable pipe command scheme ("command|") */ #define PIPE_SCHEME_ENABLE diff -ruN TiMidity++-2.5.1/libarc/url_file.c TiMidity++-2.6.0/libarc/url_file.c --- TiMidity++-2.5.1/libarc/url_file.c Wed Aug 18 02:08:56 1999 +++ TiMidity++-2.6.0/libarc/url_file.c Fri Sep 3 02:31:39 1999 @@ -14,6 +14,10 @@ #include #endif /* HAVE_UNISTD_H */ +#ifdef __W32__ +#include +#endif /* __W32__ */ + #include "timidity.h" #ifdef HAVE_MMAP @@ -26,8 +30,13 @@ #else /* mmap is not supported */ +#ifdef __W32__ +#define try_mmap(fname, size_ret) w32_mmap(fname, size_ret, &hFile, &hMap) +#define munmap(addr, size) w32_munmap(addr, size, hFile, hMap) +#else #define try_mmap(dmy1, dmy2) NULL #define munmap(addr, size) /* Do nothing */ +#endif /* __W32__ */ #endif #include "url.h" @@ -47,6 +56,10 @@ long mapsize; long pos; +#ifdef __W32__ + HANDLE hFile, hMap; +#endif /* __W32__ */ + FILE *fp; /* Non NULL if mmap is failure */ } URL_file; @@ -125,6 +138,43 @@ *size = (long)st.st_size; return p; } +#elif defined(__W32__) +static void *w32_mmap(char *fname, long *size_ret, HANDLE *hFilePtr, HANDLE *hMapPtr) +{ + void *map; + + *hFilePtr = CreateFile(fname, GENERIC_READ, 0, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if(*hFilePtr == INVALID_HANDLE_VALUE) + return NULL; + *size_ret = GetFileSize(*hFilePtr, NULL); + if(*size_ret == 0xffffffff) + { + CloseHandle(*hFilePtr); + return NULL; + } + *hMapPtr = CreateFileMapping(*hFilePtr, NULL, PAGE_READONLY, + 0, 0, NULL); + if(*hMapPtr == NULL) + { + CloseHandle(*hFilePtr); + return NULL; + } + map = MapViewOfFile(*hMapPtr, FILE_MAP_READ, 0, 0, 0); + if(map == NULL) + { + CloseHandle(*hMapPtr); + CloseHandle(*hFilePtr); + return NULL; + } + return map; +} +static void w32_munmap(void *ptr, long size, HANDLE hFile, HANDLE hMap) +{ + UnmapViewOfFile(ptr); + CloseHandle(hMap); + CloseHandle(hFile); +} #endif /* HAVE_MMAP */ URL url_file_open(char *fname) @@ -133,6 +183,9 @@ char *mapptr; /* Non NULL if mmap is success */ long mapsize; FILE *fp; /* Non NULL if mmap is failure */ +#ifdef __W32__ + HANDLE hFile, hMap; +#endif /* __W32__ */ #ifdef DEBUG printf("url_file_open(%s)\n", fname); @@ -233,6 +286,10 @@ url->mapsize = mapsize; url->pos = 0; url->fp = fp; +#ifdef __W32__ + url->hFile = hFile; + url->hMap = hMap; +#endif /* __W32__ */ return (URL)url; } @@ -321,7 +378,13 @@ URL_file *urlp = (URL_file *)url; if(urlp->mapptr != NULL) + { +#ifdef __W32__ + HANDLE hFile = urlp->hFile; + HANDLE hMap = urlp->hMap; +#endif /* __W32__ */ munmap(urlp->mapptr, urlp->mapsize); + } if(urlp->fp != NULL) { if(urlp->fp == stdin) diff -ruN TiMidity++-2.5.1/timidity/Makefile.am TiMidity++-2.6.0/timidity/Makefile.am --- TiMidity++-2.5.1/timidity/Makefile.am Sat Aug 21 02:21:35 1999 +++ TiMidity++-2.6.0/timidity/Makefile.am Thu Sep 2 23:05:51 1999 @@ -96,7 +96,7 @@ audriv_al.c \ audriv_mme.c \ audriv_none.c \ - dl_cygwin32.c \ + dl_w32.c \ dl_dld.c \ dl_dlopen.c \ dl_hpux.c \ @@ -104,7 +104,7 @@ esd_a.c \ hpux_a.c \ hpux_d_a.c \ - linux_a.c \ + oss_a.c \ mac_a.c \ mac_qt_a.c \ mac_com.h \ @@ -130,7 +130,6 @@ $(top_builddir)/libarc/libarc.a \ $(top_builddir)/utils/libutils.a \ $(W32GUI_RES) - timidity_DEPENDENCIES = $(SYSEXTRAS:.c=.o) \ $(top_builddir)/interface/libinterface.a \ diff -ruN TiMidity++-2.5.1/timidity/Makefile.in TiMidity++-2.6.0/timidity/Makefile.in --- TiMidity++-2.5.1/timidity/Makefile.in Sat Aug 28 00:30:31 1999 +++ TiMidity++-2.6.0/timidity/Makefile.in Tue Sep 21 23:18:20 1999 @@ -100,6 +100,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -109,6 +110,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libarc -I$(top_srcdir)/interface -I$(top_srcdir)/utils $(EXTRAINCS) @@ -118,7 +120,7 @@ timidity_SOURCES = aenc.h aiff_a.c aq.c aq.h au_a.c audio_cnv.c audio_cnv.h common.c common.h controls.c controls.h dlutils.h effect.c filter.c filter.h instrum.c instrum.h list_a.c load_mod.c loadtab.c mid-j.defs mid.defs miditrace.c miditrace.h mix.c mix.h mod.c mod.h output.c output.h playmidi.c playmidi.h raw_a.c rcp.c readmidi.c readmidi.h recache.c recache.h resample.c resample.h reverb.c reverb.h sbkconv.c sffile.c sffile.h sfitem.c sfitem.h sflayer.h smfconv.c smfconv.h sndfont.c tables.c tables.h timidity.c timidity.h version.c wave_a.c wrd.h wrd_read.c wrdt.c -EXTRA_timidity_SOURCES = alsa_a.c audriv.h audriv_a.c audriv_al.c audriv_mme.c audriv_none.c dl_cygwin32.c dl_dld.c dl_dlopen.c dl_hpux.c bsd20_a.c esd_a.c hpux_a.c hpux_d_a.c linux_a.c mac_a.c mac_qt_a.c mac_com.h mac_dlog.c mac_main.c mac_main.h mac_soundspec.c mfnode.c mfnode.h nas_a.c sun_a.c w32_a.c w32g_a.c timpp32g.ini +EXTRA_timidity_SOURCES = alsa_a.c audriv.h audriv_a.c audriv_al.c audriv_mme.c audriv_none.c dl_w32.c dl_dld.c dl_dlopen.c dl_hpux.c bsd20_a.c esd_a.c hpux_a.c hpux_d_a.c oss_a.c mac_a.c mac_qt_a.c mac_com.h mac_dlog.c mac_main.c mac_main.h mac_soundspec.c mfnode.c mfnode.h nas_a.c sun_a.c w32_a.c w32g_a.c timpp32g.ini @ENABLE_W32GUI_TRUE@W32GUI_RES = $(top_builddir)/interface/w32g_res.res @@ -147,7 +149,6 @@ mix.o mod.o output.o playmidi.o raw_a.o rcp.o readmidi.o recache.o \ resample.o reverb.o sbkconv.o sffile.o sfitem.o smfconv.o sndfont.o \ tables.o timidity.o version.o wave_a.o wrd_read.o wrdt.o -timidity_LDFLAGS = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -279,6 +280,8 @@ ../libarc/arc.h ../utils/nkflib.h wrd.h ../utils/strtab.h controls.o: controls.c ../config.h ../interface.h timidity.h \ ../utils/support.h controls.h +dl_dlopen.o: dl_dlopen.c ../config.h timidity.h ../utils/support.h \ + dlutils.h effect.o: effect.c ../config.h timidity.h ../utils/support.h instrum.h \ playmidi.h output.h reverb.h filter.o: filter.c ../config.h timidity.h ../utils/support.h common.h \ diff -ruN TiMidity++-2.5.1/timidity/alsa_a.c TiMidity++-2.6.0/timidity/alsa_a.c --- TiMidity++-2.5.1/timidity/alsa_a.c Mon Feb 22 18:31:48 1999 +++ TiMidity++-2.6.0/timidity/alsa_a.c Mon Sep 6 06:42:38 1999 @@ -51,17 +51,11 @@ #include "playmidi.h" #include "miditrace.h" -/* Define if you want to use soft audio buffering (AUDIO_FILLING_SEC sec.) */ -/* #define AUDIO_FILLING_MILSEC 3000 */ - -/* Defined if you want to use initial audio buffering */ -/* #define INITIAL_FILLING */ - static int open_output(void); /* 0=success, 1=warning, -1=fatal error */ static void close_output(void); static int output_data(char *buf, int32 nbytes); static int acntl(int request, void *arg); - +static int total_bytes, output_counter; /* export the playback mode */ @@ -87,7 +81,7 @@ /*ALSA PCM handler*/ -static void* handle = NULL; +static snd_pcm_t* handle = NULL; static int card = 0; static int device = 0; @@ -107,7 +101,7 @@ /*Search sound cards*/ struct snd_ctl_hw_info ctl_hw_info; snd_pcm_info_t pcm_info; - void* ctl_handle; + snd_ctl_t* ctl_handle; const char* env_sound_card = getenv ("TIMIDITY_SOUND_CARD"); const char* env_pcm_device = getenv ("TIMIDITY_PCM_DEVICE"); int tmp; @@ -219,6 +213,7 @@ snd_pcm_playback_info_t playback_info; snd_pcm_format_t pcm_format; struct snd_pcm_playback_params playback_params; + struct snd_pcm_playback_status playback_status; int tmp; memset (&pcm_format, 0, sizeof (pcm_format)); memset (&playback_params, 0, sizeof (playback_params)); @@ -282,7 +277,7 @@ else { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, - "%s doesn't support mono or stereo samples", + "%s doesn't support 16 bit sample width", dpm.name); return -1; } @@ -304,7 +299,7 @@ else { ctl->cmsg(CMSG_ERROR, VERB_NORMAL, - "%s doesn't support mono or stereo samples", + "%s doesn't support 8 bit sample width", dpm.name); return -1; } @@ -331,13 +326,6 @@ ((*encoding__ & PE_MONO) != 0)? "mono" : "stereo"); ret_val = 1; } - if (pcm_format.rate != orig_rate) - { - ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, - "Output rate adjusted to %d Hz (requested %d Hz)", - pcm_format.rate, orig_rate); - ret_val = 1; - } /* Set buffer fragments (in extra_param[0]) */ tmp = AUDIO_BUFFER_BITS; @@ -354,10 +342,12 @@ playback_params.fragments_max = extra_param[0]; #else playback_params.fragment_size = (1 << tmp); + if (extra_param[0] == 0) playback_params.fragments_max = 15;/*default value. What's value is apporpriate?*/ else playback_params.fragments_max = extra_param[0]; + #endif playback_params.fragments_room = 1; tmp = snd_pcm_playback_params (handle__, &playback_params); @@ -373,6 +363,21 @@ ret_val =1; } + if(snd_pcm_playback_status(handle__, &playback_status) == 0) + { + if (playback_status.rate != orig_rate) + { + ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, + "Output rate adjusted to %d Hz (requested %d Hz)", + playback_status.rate, orig_rate); + dpm.rate = playback_status.rate; + ret_val = 1; + } + total_bytes = playback_status.count; + } + else + total_bytes = -1; /* snd_pcm_playback_status fails */ + return ret_val; } @@ -405,6 +410,7 @@ } dpm.fd = snd_pcm_file_descriptor (handle); + output_counter = 0; return warnings; } @@ -440,6 +446,7 @@ } buf += n; nbytes -= n; + output_counter += n; } return 0; @@ -447,11 +454,54 @@ static int acntl(int request, void *arg) { + struct snd_pcm_playback_status playback_status; + int i; + switch(request) { + case PM_REQ_GETQSIZ: + if(total_bytes == -1) + return -1; + *((int *)arg) = total_bytes; + return 0; + + case PM_REQ_GETFILLABLE: + if(total_bytes == -1) + return -1; + if(snd_pcm_playback_status(handle, &playback_status) != 0) + return -1; + *((int *)arg) = playback_status.count; + return 0; + + case PM_REQ_GETFILLED: + if(total_bytes == -1) + return -1; + if(snd_pcm_playback_status(handle, &playback_status) != 0) + return -1; + *((int *)arg) = playback_status.queue; + return 0; + + case PM_REQ_GETSAMPLES: + if(total_bytes == -1) + return -1; + if(snd_pcm_playback_status(handle, &playback_status) != 0) + return -1; + i = output_counter - playback_status.queue; + if(!(dpm.encoding & PE_MONO)) i >>= 1; + if(dpm.encoding & PE_16BIT) i >>= 1; + *((int *)arg) = i; + return 0; + case PM_REQ_DISCARD: if(snd_pcm_drain_playback (handle) != 0) return -1; /* error */ + output_counter = 0; + return 0; + + case PM_REQ_FLUSH: + if(snd_pcm_flush_playback(handle) != 0) + return -1; /* error */ + output_counter = 0; return 0; } return -1; diff -ruN TiMidity++-2.5.1/timidity/aq.c TiMidity++-2.6.0/timidity/aq.c --- TiMidity++-2.5.1/timidity/aq.c Fri Aug 27 23:27:10 1999 +++ TiMidity++-2.6.0/timidity/aq.c Mon Sep 20 18:41:33 1999 @@ -407,7 +407,16 @@ int s; if(play_mode->acntl(PM_REQ_GETSAMPLES, &s) != -1) + { + /* Reset counter & timer */ + if(play_counter) + { + play_start_time = get_current_calender_time(); + play_offset_counter = s; + play_counter = 0; + } return s; + } if(!IS_STREAM_TRACE) return -1; diff -ruN TiMidity++-2.5.1/timidity/common.c TiMidity++-2.6.0/timidity/common.c --- TiMidity++-2.5.1/timidity/common.c Thu Aug 19 02:18:33 1999 +++ TiMidity++-2.6.0/timidity/common.c Mon Sep 6 19:09:48 1999 @@ -558,10 +558,33 @@ /* This adds a directory to the path list */ void add_to_pathlist(char *s) { - PathList *plp=safe_malloc(sizeof(PathList)); - strcpy((plp->path=safe_malloc(strlen(s)+1)),s); - plp->next=pathlist; - pathlist=plp; + PathList *cur, *prev, *plp; + + /* Check duplicated path in the pathlist. */ + plp = prev = NULL; + for(cur = pathlist; cur; prev = cur, cur = cur->next) + if(pathcmp(s, cur->path, 0) == 0) + { + plp = cur; + break; + } + + if(plp) /* found */ + { + if(prev == NULL) /* first */ + pathlist = pathlist->next; + else + prev->next = plp->next; + } + else + { + /* Allocate new path */ + plp = safe_malloc(sizeof(PathList)); + plp->path = safe_strdup(s); + } + + plp->next = pathlist; + pathlist = plp; } #ifndef HAVE_VOLATILE @@ -970,34 +993,39 @@ } } -int pathcasecmp(const char *p1, const char *p2) +int pathcmp(const char *p1, const char *p2, int ignore_case) { - const unsigned char *s1, *s2; int c1, c2; - s1 = *(const unsigned char **)p1; - s2 = *(const unsigned char **)p2; - while(*s1 && *s2) - { - c1 = tolower((int)*s1); - c2 = tolower((int)*s2); - if(IS_PATH_SEP(c1)) c1 = 0; - if(IS_PATH_SEP(c2)) c2 = 0; - if(c1 != c2) - return c1 - c2; - s1++; - s2++; - } +#ifdef __W32__ + ignore_case = 1; /* Always ignore the case */ +#endif + + do { + c1 = *p1++ & 0xff; + c2 = *p2++ & 0xff; + if(ignore_case) + { + c1 = tolower(c1); + c2 = tolower(c2); + } + if(IS_PATH_SEP(c1)) c1 = *p1 ? 0x100 : 0; + if(IS_PATH_SEP(c2)) c2 = *p2 ? 0x100 : 0; + } while(c1 == c2 && c1 /* && c2 */); - c1 = tolower((int)*s1); - c2 = tolower((int)*s2); return c1 - c2; } +static int pathcmp_qsort(const char **p1, + const char **p2) +{ + return pathcmp(*(const char **)p1, *(const char **)p2, 1); +} + void sort_pathname(char **files, int nfiles) { qsort(files, nfiles, sizeof(char *), - (int (*)(const void *, const void *))pathcasecmp); + (int (*)(const void *, const void *))pathcmp_qsort); } char *pathsep_strchr(char *path) diff -ruN TiMidity++-2.5.1/timidity/common.h TiMidity++-2.6.0/timidity/common.h --- TiMidity++-2.5.1/timidity/common.h Wed Aug 18 02:08:56 1999 +++ TiMidity++-2.6.0/timidity/common.h Sat Sep 4 06:57:58 1999 @@ -69,7 +69,7 @@ extern char *safe_strdup(char *s); extern char **expand_file_archives(char **files, int *nfiles_in_out); extern void randomize_string_list(char **strlist, int nstr); -extern int pathcasecmp(const char *path1, const char *path2); +extern int pathcmp(const char *path1, const char *path2, int ignore_case); extern void sort_pathname(char **files, int nfiles); extern int load_table(char *file); extern char *pathsep_strrchr(char *path); diff -ruN TiMidity++-2.5.1/timidity/dl_cygwin32.c TiMidity++-2.6.0/timidity/dl_cygwin32.c --- TiMidity++-2.5.1/timidity/dl_cygwin32.c Thu Feb 4 15:46:44 1999 +++ TiMidity++-2.6.0/timidity/dl_cygwin32.c Thu Jan 1 09:00:00 1970 @@ -1,113 +0,0 @@ -/* - - TiMidity++ -- MIDI to WAVE converter and player - Copyright (C) 1999 Masanao Izumo - Copyright (C) 1995 Tuukka Toivonen - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ -#define WIN32_LEAN_AND_MEAN -// Defines from windows needed for this function only. Can't include full -// Cygwin32 windows headers because of problems with CONTEXT redefinition -// Removed logic to tell not dynamically load static modules. It is assumed that all -// modules are dynamically built. This should be similar to the behavoir on sunOS. -// Leaving in the logic would have required changes to the standard perlmain.c code -// -// // Includes call a dll function to initialize it's impure_ptr. -#include -void (*impure_setupptr)(struct _reent *); // pointer to the impure_setup routine - -//#include -#define LOAD_WITH_ALTERED_SEARCH_PATH (8) -typedef void *HANDLE; -typedef HANDLE HINSTANCE; -#define STDCALL __attribute__ ((stdcall)) -typedef int STDCALL (*FARPROC)(); - -HINSTANCE -STDCALL -LoadLibraryExA( - char *lpLibFileName, - HANDLE hFile, - unsigned int dwFlags - ); -unsigned int -STDCALL -GetLastError( - void - ); -FARPROC -STDCALL -GetProcAddress( - HINSTANCE hModule, - char *lpProcName - ); - -#ifndef NO_STRING_H -#include -#else -#include -#endif -#include "timidity.h" -#include "dlutils.h" - -/*ARGSUSED*/ -void dl_init(int argc, char **argv) -{ -} - -void *dl_load_file(char *filename) -{ - int flags = 0; - void *RETVAL; - - RETVAL = (void*) LoadLibraryExA(filename, NULL, - LOAD_WITH_ALTERED_SEARCH_PATH); - if(RETVAL == NULL) - fprintf(stderr, "%d", GetLastError()); - -#if 0 - else - { - // setup the dll's impure_ptr: - impure_setupptr = GetProcAddress(RETVAL, "impure_setup"); - if(impure_setupptr == NULL) - { - fprintf(stderr, - "Cygwin32 dynaloader error: could not load impure_setup symbol\n"); - RETVAL = NULL; - } - else{ - // setup the DLLs impure_ptr: - (*impure_setupptr)(_impure_ptr); - } - } -#endif - - return RETVAL; -} - -void *dl_find_symbol(void *libhandle, char *symbolname) -{ - RETVAL = (void*) GetProcAddress((HINSTANCE) libhandle, symbolname); - if(RETVAL == NULL) - fprintf(stderr, "%d", GetLastError()); - return RETVAL; -} diff -ruN TiMidity++-2.5.1/timidity/dl_dld.c TiMidity++-2.6.0/timidity/dl_dld.c --- TiMidity++-2.5.1/timidity/dl_dld.c Mon Nov 30 17:35:30 1998 +++ TiMidity++-2.6.0/timidity/dl_dld.c Thu Sep 2 23:03:38 1999 @@ -75,3 +75,7 @@ } return RETVAL; } + +void dl_free(void *libhandle) +{ +} diff -ruN TiMidity++-2.5.1/timidity/dl_dlopen.c TiMidity++-2.6.0/timidity/dl_dlopen.c --- TiMidity++-2.5.1/timidity/dl_dlopen.c Tue Feb 2 15:55:26 1999 +++ TiMidity++-2.6.0/timidity/dl_dlopen.c Thu Sep 2 23:03:40 1999 @@ -56,3 +56,8 @@ fprintf(stderr, "%s\n", dlerror()); return RETVAL; } + +void dl_free(void *libhandle) +{ + dlclose(libhandle); +} diff -ruN TiMidity++-2.5.1/timidity/dl_hpux.c TiMidity++-2.6.0/timidity/dl_hpux.c --- TiMidity++-2.5.1/timidity/dl_hpux.c Tue Feb 2 16:06:32 1999 +++ TiMidity++-2.6.0/timidity/dl_hpux.c Thu Sep 2 23:03:40 1999 @@ -83,3 +83,7 @@ } return symaddr; } + +void dl_free(void *libhandle) +{ +} diff -ruN TiMidity++-2.5.1/timidity/dl_w32.c TiMidity++-2.6.0/timidity/dl_w32.c --- TiMidity++-2.5.1/timidity/dl_w32.c Thu Jan 1 09:00:00 1970 +++ TiMidity++-2.6.0/timidity/dl_w32.c Thu Sep 2 23:03:40 1999 @@ -0,0 +1,61 @@ +/* + + TiMidity++ -- MIDI to WAVE converter and player + Copyright (C) 1999 Masanao Izumo + Copyright (C) 1995 Tuukka Toivonen + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#include +#include +#ifndef NO_STRING_H +#include +#else +#include +#endif +#include "timidity.h" +#include "dlutils.h" + +/*ARGSUSED*/ +void dl_init(int argc, char **argv) +{ +} + +void *dl_load_file(char *filename) +{ + void *RETVAL; + + RETVAL = (void*)LoadLibrary(filename); + return RETVAL; +} + +void *dl_find_symbol(void *libhandle, char *symbolname) +{ + void *RETVAL; + + RETVAL = (void*) GetProcAddress((HINSTANCE) libhandle, symbolname); + return RETVAL; +} + +void dl_free(void *libhandle) +{ + FreeLibrary((HINSTANCE)libhandle); +} diff -ruN TiMidity++-2.5.1/timidity/dlutils.h TiMidity++-2.6.0/timidity/dlutils.h --- TiMidity++-2.5.1/timidity/dlutils.h Mon Nov 30 17:35:50 1998 +++ TiMidity++-2.6.0/timidity/dlutils.h Thu Sep 2 23:03:40 1999 @@ -26,5 +26,6 @@ extern void dl_init(int argc, char **argv); extern void *dl_load_file(char *path); extern void *dl_find_symbol(void *libhandle, char *symbol); +extern void dl_free(void *libhandle); #endif /* ___DLUTILS_H_ */ diff -ruN TiMidity++-2.5.1/timidity/hpux_a.c TiMidity++-2.6.0/timidity/hpux_a.c --- TiMidity++-2.5.1/timidity/hpux_a.c Fri Feb 26 12:49:34 1999 +++ TiMidity++-2.6.0/timidity/hpux_a.c Mon Aug 30 15:07:18 1999 @@ -85,7 +85,7 @@ DEFAULT_RATE, DEFAULT_HP_ENCODING, PF_PCM_STREAM|PF_CAN_TRACE, -1, {0}, /* default: get all the buffer fragments you can */ - "HPUX network audio", 'n', + "HPUX network audio (Alib)", 'A', "", /* THIS STRING IS THE NAME OF THE AUDIO SERVER (default =none)*/ open_output, diff -ruN TiMidity++-2.5.1/timidity/linux_a.c TiMidity++-2.6.0/timidity/linux_a.c --- TiMidity++-2.5.1/timidity/linux_a.c Fri Aug 27 21:35:30 1999 +++ TiMidity++-2.6.0/timidity/linux_a.c Thu Jan 1 09:00:00 1970 @@ -1,342 +0,0 @@ -/* - - TiMidity++ -- MIDI to WAVE converter and player - Copyright (C) 1999 Masanao Izumo - Copyright (C) 1995 Tuukka Toivonen - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - - linux_audio.c - - Functions to play sound on the VoxWare audio driver (Linux or FreeBSD) - -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ -#define _GNU_SOURCE -#include -#include -#include - -#ifndef NO_STRING_H -#include -#else -#include -#endif - -#ifdef linux -#include /* new with 1.2.0? Didn't need this under 1.1.64 */ -#include -#endif - -#ifdef __FreeBSD__ -#include -#include -#endif - -#ifdef __bsdi__ -#include -#endif - -#include "timidity.h" -#include "common.h" -#include "output.h" -#include "controls.h" -#include "timer.h" -#include "instrum.h" -#include "playmidi.h" -#include "miditrace.h" - -#ifndef AFMT_S16_NE -#ifdef LITTLE_ENDIAN -#define AFMT_S16_NE AFMT_S16_LE -#else -#define AFMT_S16_NE AFMT_S16_BE -#endif -#endif /* AFMT_S16_NE */ - -static int open_output(void); /* 0=success, 1=warning, -1=fatal error */ -static void close_output(void); -static int output_data(char *buf, int32 nbytes); -static int acntl(int request, void *arg); -static int output_counter, counter_offset; -static int total_bytes; /* Maximum buffer size in bytes */ - -/* export the playback mode */ - -#define dpm linux_play_mode - -PlayMode dpm = { - DEFAULT_RATE, - PE_16BIT|PE_SIGNED, - PF_PCM_STREAM|PF_CAN_TRACE|PF_BUFF_FRAGM_OPT, - -1, - {0}, /* default: get all the buffer fragments you can */ - "Linux dsp device", 'd', - "/dev/dsp", - open_output, - close_output, - output_data, - acntl -}; - -/*************************************************************************/ -/* We currently only honor the PE_MONO bit, the sample rate, and the - number of buffer fragments. We try 16-bit signed data first, and - then 8-bit unsigned if it fails. If you have a sound device that - can't handle either, let me know. */ - -static int open_output(void) -{ - int fd, tmp, i, warnings = 0; - int include_enc, exclude_enc; -#ifdef SNDCTL_DSP_GETOSPACE - audio_buf_info info; -#endif /* SNDCTL_DSP_GETOSPACE */ - - /* Open the audio device */ - fd = open(dpm.name, O_WRONLY); - if(fd < 0) - { - ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", - dpm.name, strerror(errno)); - return -1; - } - - /* - * Modified: Fri Nov 20 1998 - * - * Reported from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html - * by Thomas Sailer - * OSS/Free sets nonblocking mode with an ioctl, unlike the rest of the - * kernel, which uses the O_NONBLOCK flag. I want to regularize that API, - * and this trips on Timidity. - */ - fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NDELAY); - - include_enc = 0; - exclude_enc = PE_ULAW|PE_ALAW|PE_BYTESWAP; /* They can't mean these */ - if(dpm.encoding & PE_16BIT) - include_enc |= PE_SIGNED; - else - exclude_enc |= PE_SIGNED; - dpm.encoding = validate_encoding(dpm.encoding, include_enc, exclude_enc); - - /* Set sample width to whichever the user wants. If it fails, try - the other one. */ - - i = tmp = (dpm.encoding & PE_16BIT) ? AFMT_S16_NE : AFMT_U8; - if(ioctl(fd, SNDCTL_DSP_SAMPLESIZE, &tmp) < 0 || tmp != i) - { - /* Try the other one */ - i = tmp = (dpm.encoding & PE_16BIT) ? AFMT_U8 : AFMT_S16_NE; - if(ioctl(fd, SNDCTL_DSP_SAMPLESIZE, &tmp) < 0 || tmp != i) - { - ctl->cmsg(CMSG_ERROR, VERB_NORMAL, - "%s doesn't support 16- or 8-bit sample width", - dpm.name); - close(fd); - return -1; - } - ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, - "Sample width adjusted to %d bits", tmp); - dpm.encoding ^= PE_16BIT; - warnings = 1; - } - - /* Try stereo or mono, whichever the user wants. If it fails, try - the other. */ - - i = tmp = (dpm.encoding & PE_MONO) ? 0 : 1; - if((ioctl(fd, SNDCTL_DSP_STEREO, &tmp) < 0) || tmp != i) - { - i = tmp = (dpm.encoding & PE_MONO) ? 1 : 0; - - if((ioctl(fd, SNDCTL_DSP_STEREO, &tmp) < 0) || tmp != i) - { - ctl->cmsg(CMSG_ERROR, VERB_NORMAL, - "%s doesn't support mono or stereo samples", - dpm.name); - close(fd); - return -1; - } - if(tmp == 0) dpm.encoding |= PE_MONO; - else dpm.encoding &= ~PE_MONO; - ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "Sound adjusted to %sphonic", - (tmp==0) ? "mono" : "stereo"); - warnings = 1; - } - - - /* Set the sample rate */ - - tmp = dpm.rate; - if(ioctl(fd, SNDCTL_DSP_SPEED, &tmp) < 0) - { - ctl->cmsg(CMSG_ERROR, VERB_NORMAL, - "%s doesn't support a %d Hz sample rate", - dpm.name, dpm.rate); - close(fd); - return -1; - } - if(tmp != dpm.rate) - { - ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, - "Output rate adjusted to %d Hz (requested %d Hz)", - tmp, dpm.rate); - dpm.rate = tmp; - warnings = 1; - } - - /* Older VoxWare drivers don't have buffer fragment capabilities */ -#ifdef SNDCTL_DSP_SETFRAGMENT - /* Set buffer fragments (in extra_param[0]) */ - - tmp = AUDIO_BUFFER_BITS; - if(!(dpm.encoding & PE_MONO)) tmp++; - if(dpm.encoding & PE_16BIT) tmp++; - i = tmp; - tmp |= (dpm.extra_param[0] << 16); - if(ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &tmp) < 0) - { - ctl->cmsg(CMSG_WARNING, VERB_NORMAL, - "%s doesn't support %d-byte buffer fragments (%d)", - dpm.name, 1<cmsg(CMSG_WARNING, VERB_NORMAL, - "%s doesn't support buffer fragments", dpm.name); - warnings = 1; - } -#endif - -#ifdef SNDCTL_DSP_GETOSPACE - if(ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) != -1) - total_bytes = info.fragstotal * info.fragsize; - else -#endif /* SNDCTL_DSP_GETOSPACE */ - total_bytes = -1; /* Unknown */ - - dpm.fd = fd; - output_counter = counter_offset = 0; - - return warnings; -} - -static int output_data(char *buf, int32 nbytes) -{ - int n; - - while(nbytes > 0) - { - if((n = write(dpm.fd, buf, nbytes)) == -1) - { -#if 0 - if(errno != ???) /* I don't know what error should be ignored. - * ??? := EWOULDBLOCK?? - */ - { - usleep(100000); - continue; - } - ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, - "%s: %s", dpm.name, strerror(errno)); - return -1; -#endif - - /* Now, Ignore error */ - usleep(100000); - continue; - } - buf += n; - nbytes -= n; - output_counter += n; - } - - return 0; -} - -static void close_output(void) -{ - if(dpm.fd == -1) - return; - close(dpm.fd); - dpm.fd = -1; -} - -static int acntl(int request, void *arg) -{ - int i; - - switch(request) - { - case PM_REQ_DISCARD: - counter_offset = output_counter = 0; - return ioctl(dpm.fd, SNDCTL_DSP_RESET); - - case PM_REQ_FLUSH: - counter_offset = output_counter = 0; - return ioctl(dpm.fd, SNDCTL_DSP_SYNC); - - case PM_REQ_RATE: - i = *(int *)arg; /* sample rate in and out */ - if(ioctl(dpm.fd, SNDCTL_DSP_SPEED, &i) < 0) - return -1; - play_mode->rate = i; - return 0; - - case PM_REQ_GETQSIZ: - if(total_bytes <= 0) - return -1; - *((int *)arg) = total_bytes; - return 0; - -#ifdef SNDCTL_DSP_GETODELAY - case PM_REQ_GETFILLED: - if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) - return -1; - if(!(dpm.encoding & PE_MONO)) i >>= 1; - if(dpm.encoding & PE_16BIT) i >>= 1; - *((int *)arg) = i; - return 0; - - case PM_REQ_GETFILLABLE: - if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) - return -1; - i = total_bytes - i; - if(!(dpm.encoding & PE_MONO)) i >>= 1; - if(dpm.encoding & PE_16BIT) i >>= 1; - *((int *)arg) = i; - return 0; - - case PM_REQ_GETSAMPLES: - if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) - return -1; - i = output_counter - i; - if(!(dpm.encoding & PE_MONO)) i >>= 1; - if(dpm.encoding & PE_16BIT) i >>= 1; - *((int *)arg) = i; - return 0; -#endif /* SNDCTL_DSP_GETODELAY */ - } - return -1; -} diff -ruN TiMidity++-2.5.1/timidity/oss_a.c TiMidity++-2.6.0/timidity/oss_a.c --- TiMidity++-2.5.1/timidity/oss_a.c Thu Jan 1 09:00:00 1970 +++ TiMidity++-2.6.0/timidity/oss_a.c Mon Sep 20 18:29:12 1999 @@ -0,0 +1,340 @@ +/* + + TiMidity++ -- MIDI to WAVE converter and player + Copyright (C) 1999 Masanao Izumo + Copyright (C) 1995 Tuukka Toivonen + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + + oss_a.c (linux_a.c) + + Functions to play sound on the OSS audio driver (Linux or FreeBSD) + +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ +#define _GNU_SOURCE +#include +#include +#include + +#ifndef NO_STRING_H +#include +#else +#include +#endif + +#if defined(HAVE_SYS_SOUNDCARD_H) +#include +#elif defined(linux) +#include /* new with 1.2.0? Didn't need this under 1.1.64 */ +#include +#elif defined(__FreeBSD__) +#include +#include +#else +#include +#endif /* HAVE_SYS_SOUNDCARD_H */ + +#include "timidity.h" +#include "common.h" +#include "output.h" +#include "controls.h" +#include "timer.h" +#include "instrum.h" +#include "playmidi.h" +#include "miditrace.h" + +#ifndef AFMT_S16_NE +#ifdef LITTLE_ENDIAN +#define AFMT_S16_NE AFMT_S16_LE +#else +#define AFMT_S16_NE AFMT_S16_BE +#endif +#endif /* AFMT_S16_NE */ + +static int open_output(void); /* 0=success, 1=warning, -1=fatal error */ +static void close_output(void); +static int output_data(char *buf, int32 nbytes); +static int acntl(int request, void *arg); +static int output_counter; +static int total_bytes; /* Maximum buffer size in bytes */ + +/* export the playback mode */ + +#define dpm oss_play_mode + +PlayMode dpm = { + DEFAULT_RATE, + PE_16BIT|PE_SIGNED, + PF_PCM_STREAM|PF_CAN_TRACE|PF_BUFF_FRAGM_OPT, + -1, + {0}, /* default: get all the buffer fragments you can */ + "dsp device", 'd', + "/dev/dsp", + open_output, + close_output, + output_data, + acntl +}; + +/*************************************************************************/ +/* We currently only honor the PE_MONO bit, the sample rate, and the + number of buffer fragments. We try 16-bit signed data first, and + then 8-bit unsigned if it fails. If you have a sound device that + can't handle either, let me know. */ + +static int open_output(void) +{ + int fd, tmp, i, warnings = 0; + int include_enc, exclude_enc; +#ifdef SNDCTL_DSP_GETOSPACE + audio_buf_info info; +#endif /* SNDCTL_DSP_GETOSPACE */ + + /* Open the audio device */ + fd = open(dpm.name, O_WRONLY); + if(fd < 0) + { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s", + dpm.name, strerror(errno)); + return -1; + } + + /* + * Modified: Fri Nov 20 1998 + * + * Reported from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html + * by Thomas Sailer + * OSS/Free sets nonblocking mode with an ioctl, unlike the rest of the + * kernel, which uses the O_NONBLOCK flag. I want to regularize that API, + * and this trips on Timidity. + */ + fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NDELAY); + + include_enc = 0; + exclude_enc = PE_ULAW|PE_ALAW|PE_BYTESWAP; /* They can't mean these */ + if(dpm.encoding & PE_16BIT) + include_enc |= PE_SIGNED; + else + exclude_enc |= PE_SIGNED; + dpm.encoding = validate_encoding(dpm.encoding, include_enc, exclude_enc); + + /* Set sample width to whichever the user wants. If it fails, try + the other one. */ + + i = tmp = (dpm.encoding & PE_16BIT) ? AFMT_S16_NE : AFMT_U8; + if(ioctl(fd, SNDCTL_DSP_SAMPLESIZE, &tmp) < 0 || tmp != i) + { + /* Try the other one */ + i = tmp = (dpm.encoding & PE_16BIT) ? AFMT_U8 : AFMT_S16_NE; + if(ioctl(fd, SNDCTL_DSP_SAMPLESIZE, &tmp) < 0 || tmp != i) + { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, + "%s doesn't support 16- or 8-bit sample width", + dpm.name); + close(fd); + return -1; + } + ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, + "Sample width adjusted to %d bits", tmp); + dpm.encoding ^= PE_16BIT; + warnings = 1; + } + + /* Try stereo or mono, whichever the user wants. If it fails, try + the other. */ + + i = tmp = (dpm.encoding & PE_MONO) ? 0 : 1; + if((ioctl(fd, SNDCTL_DSP_STEREO, &tmp) < 0) || tmp != i) + { + i = tmp = (dpm.encoding & PE_MONO) ? 1 : 0; + + if((ioctl(fd, SNDCTL_DSP_STEREO, &tmp) < 0) || tmp != i) + { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, + "%s doesn't support mono or stereo samples", + dpm.name); + close(fd); + return -1; + } + if(tmp == 0) dpm.encoding |= PE_MONO; + else dpm.encoding &= ~PE_MONO; + ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "Sound adjusted to %sphonic", + (tmp==0) ? "mono" : "stereo"); + warnings = 1; + } + + + /* Set the sample rate */ + + tmp = dpm.rate; + if(ioctl(fd, SNDCTL_DSP_SPEED, &tmp) < 0) + { + ctl->cmsg(CMSG_ERROR, VERB_NORMAL, + "%s doesn't support a %d Hz sample rate", + dpm.name, dpm.rate); + close(fd); + return -1; + } + if(tmp != dpm.rate) + { + ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, + "Output rate adjusted to %d Hz (requested %d Hz)", + tmp, dpm.rate); + dpm.rate = tmp; + warnings = 1; + } + + /* Older VoxWare drivers don't have buffer fragment capabilities */ +#ifdef SNDCTL_DSP_SETFRAGMENT + /* Set buffer fragments (in extra_param[0]) */ + + tmp = AUDIO_BUFFER_BITS; + if(!(dpm.encoding & PE_MONO)) tmp++; + if(dpm.encoding & PE_16BIT) tmp++; + i = tmp; + tmp |= (dpm.extra_param[0] << 16); + if(ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &tmp) < 0) + { + ctl->cmsg(CMSG_WARNING, VERB_NORMAL, + "%s doesn't support %d-byte buffer fragments (%d)", + dpm.name, 1<cmsg(CMSG_WARNING, VERB_NORMAL, + "%s doesn't support buffer fragments", dpm.name); + warnings = 1; + } +#endif + +#ifdef SNDCTL_DSP_GETOSPACE + if(ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) != -1) + total_bytes = info.fragstotal * info.fragsize; + else +#endif /* SNDCTL_DSP_GETOSPACE */ + total_bytes = -1; /* Unknown */ + + dpm.fd = fd; + output_counter = 0; + + return warnings; +} + +static int output_data(char *buf, int32 nbytes) +{ + int n; + + while(nbytes > 0) + { + if((n = write(dpm.fd, buf, nbytes)) == -1) + { +#if 0 + if(errno != ???) /* I don't know what error should be ignored. + * ??? := EWOULDBLOCK?? + */ + { + usleep(100000); + continue; + } + ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, + "%s: %s", dpm.name, strerror(errno)); + return -1; +#endif + + /* Now, Ignore error */ + usleep(100000); + continue; + } + buf += n; + nbytes -= n; + output_counter += n; + } + + return 0; +} + +static void close_output(void) +{ + if(dpm.fd == -1) + return; + close(dpm.fd); + dpm.fd = -1; +} + +static int acntl(int request, void *arg) +{ + int i; + + switch(request) + { + case PM_REQ_DISCARD: + output_counter = 0; + return ioctl(dpm.fd, SNDCTL_DSP_RESET); + + case PM_REQ_FLUSH: + output_counter = 0; + return ioctl(dpm.fd, SNDCTL_DSP_SYNC); + + case PM_REQ_RATE: + i = *(int *)arg; /* sample rate in and out */ + if(ioctl(dpm.fd, SNDCTL_DSP_SPEED, &i) < 0) + return -1; + play_mode->rate = i; + return 0; + + case PM_REQ_GETQSIZ: + if(total_bytes <= 0) + return -1; + *((int *)arg) = total_bytes; + return 0; + +#ifdef SNDCTL_DSP_GETODELAY + case PM_REQ_GETFILLED: + if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) + return -1; + if(!(dpm.encoding & PE_MONO)) i >>= 1; + if(dpm.encoding & PE_16BIT) i >>= 1; + *((int *)arg) = i; + return 0; + + case PM_REQ_GETFILLABLE: + if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) + return -1; + i = total_bytes - i; + if(!(dpm.encoding & PE_MONO)) i >>= 1; + if(dpm.encoding & PE_16BIT) i >>= 1; + *((int *)arg) = i; + return 0; + + case PM_REQ_GETSAMPLES: + if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) + return -1; + i = output_counter - i; + if(!(dpm.encoding & PE_MONO)) i >>= 1; + if(dpm.encoding & PE_16BIT) i >>= 1; + *((int *)arg) = i; + return 0; +#endif /* SNDCTL_DSP_GETODELAY */ + } + return -1; +} diff -ruN TiMidity++-2.5.1/timidity/output.c TiMidity++-2.6.0/timidity/output.c --- TiMidity++-2.5.1/timidity/output.c Sat Jul 17 18:34:14 1999 +++ TiMidity++-2.6.0/timidity/output.c Mon Aug 30 18:13:10 1999 @@ -38,79 +38,88 @@ #include "audio_cnv.h" + +extern PlayMode alsa_play_mode; + + +extern PlayMode hpux_nplay_mode; + + + /* These are very likely mutually exclusive.. */ -#ifdef AU_AUDRIV +#if defined(AU_AUDRIV) extern PlayMode audriv_play_mode; -#define DEFAULT_PLAY_MODE &audriv_play_mode -#endif +#define DEV_PLAY_MODE &audriv_play_mode -#ifdef AU_SUN +#elif defined(AU_SUN) extern PlayMode sun_play_mode; -#define DEFAULT_PLAY_MODE &sun_play_mode -#endif +#define DEV_PLAY_MODE &sun_play_mode -#ifdef AU_LINUX -extern PlayMode linux_play_mode; -#define DEFAULT_PLAY_MODE &linux_play_mode -#endif +#elif defined(AU_OSS) +extern PlayMode oss_play_mode; +#define DEV_PLAY_MODE &oss_play_mode -#ifdef AU_ALSA -extern PlayMode alsa_play_mode; -#endif - -#ifdef AU_ESD -extern PlayMode esd_play_mode; -#endif - -#ifdef AU_HPUX +#elif defined(AU_HPUX_AUDIO) extern PlayMode hpux_play_mode; -extern PlayMode hpux_nplay_mode; -#define DEFAULT_PLAY_MODE &hpux_play_mode -#define NETWORK_PLAY_MODE &hpux_nplay_mode -#endif +#define DEV_PLAY_MODE &hpux_play_mode -#ifdef AU_W32 +#elif defined(AU_W32) extern PlayMode w32_play_mode; -#define DEFAULT_PLAY_MODE &w32_play_mode -#endif +#define DEV_PLAY_MODE &w32_play_mode -#ifdef AU_BSDI +#elif defined(AU_BSDI) extern PlayMode bsdi_play_mode; -#define DEFAULT_PLAY_MODE &bsdi_play_mode +#define DEV_PLAY_MODE &bsdi_play_mode + +#elif defined(__MACOS__) +extern PlayMode mac_play_mode; +#define DEV_PLAY_MODE &mac_play_mode #endif +#ifdef AU_ALSA +extern PlayMode alsa_play_mode; +#endif /* AU_ALSA */ + +#ifdef AU_HPUX_ALIB +extern PlayMode hpux_nplay_mode +#endif /* AU_HPUX_ALIB */ + +#ifdef AU_ESD +extern PlayMode esd_play_mode; +#endif /* AU_ESD */ + #ifdef AU_NAS extern PlayMode nas_play_mode; -#ifndef DEFAULT_PLAY_MODE -#define DEFAULT_PLAY_MODE &nas_play_mode -#endif /* DEFAULT_PLAY_MODE */ #endif /* AU_NAS */ #ifndef __MACOS__ /* These are always compiled in. */ extern PlayMode raw_play_mode, wave_play_mode, au_play_mode, aiff_play_mode; extern PlayMode list_play_mode; -#else /* __MACOS__ */ -extern PlayMode mac_play_mode; -#define DEFAULT_PLAY_MODE &mac_play_mode -#endif /* __MACOS__ */ +#endif /* !__MACOS__ */ + PlayMode *play_mode_list[] = { -#ifdef DEFAULT_PLAY_MODE - DEFAULT_PLAY_MODE, +#ifdef DEV_PLAY_MODE + DEV_PLAY_MODE, #endif + #ifdef AU_ALSA &alsa_play_mode, -#endif -#ifdef AU_ESD +#endif /* AU_ALSA */ + +#ifdef AU_HPUX_ALIB + &hpux_nplay_mode, +#endif /* AU_HPUX_ALIB */ + +#if defined(AU_ESD) &esd_play_mode, -#endif -#ifdef AU_NAS +#endif /* AU_ESD */ + +#if defined(AU_NAS) &nas_play_mode, #endif /* AU_NAS */ -#ifdef NETWORK_PLAY_MODE - NETWORK_PLAY_MODE, -#endif + #ifndef __MACOS__ &wave_play_mode, &raw_play_mode, @@ -121,11 +130,7 @@ 0 }; -#ifdef DEFAULT_PLAY_MODE - PlayMode *play_mode=DEFAULT_PLAY_MODE; -#else - PlayMode *play_mode=&wave_play_mode; -#endif +PlayMode *play_mode = NULL; PlayMode *target_play_mode = NULL; /*****************************************************************/ diff -ruN TiMidity++-2.5.1/timidity/playmidi.c TiMidity++-2.6.0/timidity/playmidi.c --- TiMidity++-2.5.1/timidity/playmidi.c Thu Aug 26 10:45:53 1999 +++ TiMidity++-2.6.0/timidity/playmidi.c Mon Sep 20 12:19:38 1999 @@ -141,6 +141,7 @@ #else int opt_chorus_control = 0; #endif /* CHORUS_CONTROL_ALLOW */ +int opt_surround_chorus = 0; #ifdef GM_CHANNEL_PRESSURE_ALLOW int opt_channel_pressure = 1; @@ -1572,6 +1573,46 @@ recompute_freq(cv); } +/* Yet another chorus implementation + * by Eric A. Welsh . + */ +static void new_chorus_voice_alternate(int v, int level) +{ + int cv, ch; + uint8 vol, pan; + + if((cv = find_free_voice()) == -1) + return; + ch = voice[v].channel; + + vol = voice[v].velocity; + voice[cv] = voice[v]; + voice[v].velocity = (uint8)(vol * CHORUS_VELOCITY_TUNING1); + voice[cv].velocity = (uint8)(vol * CHORUS_VELOCITY_TUNING2); + + /* set panning & delay */ + if(play_mode->encoding & PE_MONO) + voice[cv].delay = 0; + else + { + double delay; + + pan = voice[v].panning; + if (pan - level < 0) level = pan; + if (pan + level > 127) level = 127 - pan; + voice[v].panning -= level; + voice[cv].panning += level; + delay = DEFAULT_CHORUS_DELAY2; + + voice[cv].delay = (int)(play_mode->rate * delay); + } + + recompute_amp(v); + apply_envelope_to_amp(v); + recompute_amp(cv); + apply_envelope_to_amp(cv); +} + static void note_on(MidiEvent *e) { int i, nv, v, ch; @@ -1587,7 +1628,12 @@ v = vlist[i]; start_note(e, v, vid, nv - i - 1); if(channel[ch].chorus_level && voice[v].sample->sample_rate) - new_chorus_voice(v, channel[ch].chorus_level); + { + if(opt_surround_chorus) + new_chorus_voice_alternate(v, channel[ch].chorus_level); + else + new_chorus_voice(v, channel[ch].chorus_level); + } } } @@ -1919,6 +1965,8 @@ break; case XG_SYSTEM_MODE: /* XG */ + if(channel[ch].bank_lsb == -1) + return; switch(channel[ch].bank_msb) { case 0: /* Normal */ @@ -1940,8 +1988,8 @@ default: break; } - if(channel[ch].bank_lsb >= 0) - newbank = channel[ch].bank_lsb; + dr = ISDRUMCHANNEL(ch); + newbank = channel[ch].bank_lsb; break; default: @@ -1966,7 +2014,7 @@ channel[ch].altassign = NULL; } - if(!ISDRUMCHANNEL(ch) && default_program[ch] == SPECIAL_PROGRAM) + if(!dr && default_program[ch] == SPECIAL_PROGRAM) channel[ch].program = SPECIAL_PROGRAM; else channel[ch].program = prog; diff -ruN TiMidity++-2.5.1/timidity/playmidi.h TiMidity++-2.6.0/timidity/playmidi.h --- TiMidity++-2.5.1/timidity/playmidi.h Sat Aug 21 15:53:06 1999 +++ TiMidity++-2.6.0/timidity/playmidi.h Mon Sep 20 12:19:44 1999 @@ -302,6 +302,7 @@ extern int opt_nrpn_vibrato; extern int opt_reverb_control; extern int opt_chorus_control; +extern int opt_surround_chorus; extern int opt_channel_pressure; extern int opt_overlap_voice_allow; extern int noise_sharp_type; diff -ruN TiMidity++-2.5.1/timidity/rcp.c TiMidity++-2.6.0/timidity/rcp.c --- TiMidity++-2.5.1/timidity/rcp.c Mon Nov 30 17:42:44 1998 +++ TiMidity++-2.6.0/timidity/rcp.c Tue Sep 21 21:40:26 1999 @@ -1072,12 +1072,16 @@ if(!gfmt) { jmp = (long)a | ((long)b << 8); -#if 1 + if(jmp & 0x03) /* ##?? */ - continue; -#else - jmp &= ~3; /* jmp=(jmp/4)*4 */ -#endif + { + /* What do these two bits mean? */ + /* Clear them here. */ + ctl->cmsg(CMSG_WARNING, VERB_DEBUG, + "Jump %d is changed to %d", + jmp, jmp & ~3); + jmp &= ~3; /* jmp=(jmp/4)*4 */ + } } else { diff -ruN TiMidity++-2.5.1/timidity/readmidi.c TiMidity++-2.6.0/timidity/readmidi.c --- TiMidity++-2.5.1/timidity/readmidi.c Wed Aug 11 11:48:42 1999 +++ TiMidity++-2.6.0/timidity/readmidi.c Tue Sep 21 19:55:19 1999 @@ -1633,6 +1633,8 @@ break; case XG_SYSTEM_MODE: /* XG */ + if(bank_lsb[ch] == -1) + goto end_of_event_switch; switch(bank_msb[ch]) { case 0: /* Normal */ @@ -1790,6 +1792,7 @@ skip_this_event = 1; break; } + end_of_event_switch: /* Recompute time in samples*/ if((dt = meep->event.time - at) && !counting_time) diff -ruN TiMidity++-2.5.1/timidity/sun_a.c TiMidity++-2.6.0/timidity/sun_a.c --- TiMidity++-2.5.1/timidity/sun_a.c Sun Apr 25 23:15:44 1999 +++ TiMidity++-2.6.0/timidity/sun_a.c Mon Sep 20 18:51:15 1999 @@ -78,6 +78,7 @@ static void close_output(void); static int output_data(char *buf, int32 bytes); static int acntl(int request, void *arg); +static int output_counter, play_samples_offset; /* export the playback mode */ #define dpm sun_play_mode @@ -137,6 +138,8 @@ struct stat sb; audio_info_t auinfo; + output_counter = play_samples_offset = 0; + /* Open the audio device */ if((audioctl_fd = open(AUDIO_CTLDEV, O_RDWR)) < 0) { @@ -267,6 +270,8 @@ return -1; } + output_counter += n; + return n; } @@ -299,10 +304,41 @@ static int acntl(int request, void *arg) { + audio_info_t auinfo; + int i; + switch(request) { + case PM_REQ_GETFILLED: + if(ioctl(audioctl_fd, AUDIO_GETINFO, &auinfo) < 0) + return -1; + if(auinfo.play.samples == play_samples_offset) + return -1; /* auinfo.play.samples is not active */ + i = output_counter; + if(!(dpm.encoding & PE_MONO)) i >>= 1; + if(dpm.encoding & PE_16BIT) i >>= 1; + *((int *)arg) = i - (auinfo.play.samples - play_samples_offset); + return 0; + + case PM_REQ_GETSAMPLES: + if(ioctl(audioctl_fd, AUDIO_GETINFO, &auinfo) < 0) + return -1; + if(auinfo.play.samples == play_samples_offset) + return -1; /* auinfo.play.samples is not active */ + *((int *)arg) = auinfo.play.samples - play_samples_offset; + return 0; + case PM_REQ_DISCARD: + if(ioctl(audioctl_fd, AUDIO_GETINFO, &auinfo) != -1) + play_samples_offset = auinfo.play.samples; + output_counter = 0; return sun_discard_playing(); + + case PM_REQ_FLUSH: + if(ioctl(audioctl_fd, AUDIO_GETINFO, &auinfo) != -1) + play_samples_offset = auinfo.play.samples; + output_counter = 0; + return 0; case PM_REQ_RATE: { audio_info_t auinfo; diff -ruN TiMidity++-2.5.1/timidity/timidity.c TiMidity++-2.6.0/timidity/timidity.c --- TiMidity++-2.5.1/timidity/timidity.c Tue Aug 24 20:52:17 1999 +++ TiMidity++-2.6.0/timidity/timidity.c Mon Sep 20 12:19:30 1999 @@ -156,11 +156,10 @@ #ifdef IA_DYNAMIC #include "dlutils.h" -#ifdef SHARED_LIB_PATH -static char *dynamic_lib_root = SHARED_LIB_PATH; -#else -static char *dynamic_lib_root = "."; +#ifndef SHARED_LIB_PATH +#define SHARED_LIB_PATH PKGLIBDIR #endif /* SHARED_LIB_PATH */ +static char *dynamic_lib_root = SHARED_LIB_PATH; #endif /* IA_DYNAMIC */ #ifndef MAXPATHLEN @@ -175,17 +174,11 @@ CRITICAL_SECTION critSect; #pragma argsused -static BOOL WINAPI handler (DWORD dw) +static BOOL WINAPI handler(DWORD dw) { - if(dw == CTRL_C_EVENT || dw == CTRL_BREAK_EVENT) - printf ("***BREAK" NLS); fflush(stdout); - intr = TRUE; - aq_flush(1); - play_mode->close_output(); - ctl->close(); - wrdt->close(); - ExitProcess(-1); - return TRUE; + printf ("***BREAK" NLS); fflush(stdout); + intr++; + return TRUE; } #endif @@ -408,13 +401,7 @@ " -k msec Specify audio queue time limit to reduce voice", " -L dir Append dir to search path", " -O mode Select output mode and format (see below for list)", -#if defined(AU_HPUX) -" -o file Output to another file (or audio server) (Use \"-\" for stdout)", -#elif defined (AU_LINUX) -" -o file Output to another file (or device) (Use \"-\" for stdout)", -#else -" -o file Output to another file (Use \"-\" for stdout)", -#endif +" -o file Output to another file (or device/server) (Use \"-\" for stdout)", " -P file Use patch file for all programs", " -p n(a) Allow n-voice polyphony. Optional auto polyphony reduction toggle." , @@ -544,6 +531,8 @@ " -EFchorus=0 : Disable MIDI chorus effect control" NLS " -EFchorus=1[,level] : Enable MIDI chorus effect control" NLS " `level' is optional to specify chorus level [0..127]" NLS +" -EFchorus=2[,level] : Use the surround sound instead of detuned chorus." NLS +" `level' is optional to specify level [0..63]" NLS " -EFreverb=0 : Disable MIDI reverb effect control" NLS " -EFreverb=1[,level] : Enable MIDI reverb effect control" NLS " `level' is optional to specify reverb level [0..127]" NLS @@ -604,7 +593,7 @@ if(i > 0) SET_CHANNELMASK(*flags, i - 1); else - UNSET_CHANNELMASK(*flags, -(i - 1)); + UNSET_CHANNELMASK(*flags, -i - 1); } return 0; } @@ -797,6 +786,21 @@ case 't': /* toggle */ cmp->trace_playing = !cmp->trace_playing; break; + case 'l': + cmp->flags ^= CTLF_LIST_LOOP; + break; + case 'r': + cmp->flags ^= CTLF_LIST_RANDOM; + break; + case 's': + cmp->flags ^= CTLF_LIST_SORT; + break; + case 'a': + cmp->flags ^= CTLF_AUTOSTART; + break; + case 'x': + cmp->flags ^= CTLF_AUTOEXIT; + break; default: ctl->cmsg(CMSG_ERROR, VERB_NORMAL, @@ -2166,8 +2170,12 @@ { case '0': opt_chorus_control = 0; + opt_surround_chorus = 0; break; + case '1': + case '2': + opt_surround_chorus = (*effect_opts == 2); if(*(effect_opts + 1) == ',') opt_chorus_control = -(atoi(effect_opts + 2) & 0x7f); else @@ -2726,7 +2734,7 @@ fp_except_t fpexp; fpexp = fpgetmask(); - fpsetmask(fpexp & ~FP_X_INV); + fpsetmask(fpexp & ~(FP_X_INV|FP_X_DZ)); #endif if(!output_text_code) @@ -2769,6 +2777,28 @@ } arc_error_handler = timidity_arc_error_handler; + if(play_mode == NULL) + { + char *output_id; + int i; + + play_mode = play_mode_list[0]; + output_id = getenv("TIMIDITY_OUTPUT_ID"); +#ifdef TIMIDITY_OUTPUT_ID + if(output_id == NULL) + output_id = TIMIDITY_OUTPUT_ID; +#endif /* TIMIDITY_OUTPUT_ID */ + if(output_id != NULL) + { + for(i = 0; play_mode_list[i]; i++) + if(play_mode_list[i]->id_character == *output_id) + { + play_mode = play_mode_list[i]; + break; + } + } + } + if(is_first) /* initialize once time */ { got_a_configuration = 0; @@ -2999,18 +3029,18 @@ { #endif /* BORLANDC_EXCEPTION */ #ifdef __W32__ + #ifdef HAVE_SIGNAL - signal(SIGINT, sigterm_exit); signal(SIGTERM, sigterm_exit); #endif + SetConsoleCtrlHandler(handler, TRUE); ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY, "Initialize for Critical Section"); - SetConsoleCtrlHandler (handler, TRUE); - InitializeCriticalSection (&critSect); + InitializeCriticalSection(&critSect); if(opt_evil_mode) - if (!SetThreadPriority(GetCurrentThread(), - THREAD_PRIORITY_ABOVE_NORMAL)) + if(!SetThreadPriority(GetCurrentThread(), + THREAD_PRIORITY_ABOVE_NORMAL)) ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "Error raising process priority"); @@ -3074,6 +3104,9 @@ "pass_playing_list() nfiles=%d", nfiles); ctl->pass_playing_list(nfiles, files); + + if(intr) + aq_flush(1); #ifdef XP_UNIX return 0; diff -ruN TiMidity++-2.5.1/timidity/timidity.h TiMidity++-2.6.0/timidity/timidity.h --- TiMidity++-2.5.1/timidity/timidity.h Wed Aug 25 18:17:10 1999 +++ TiMidity++-2.6.0/timidity/timidity.h Tue Sep 7 01:23:08 1999 @@ -29,8 +29,14 @@ /* You could specify a complete path, e.g. "/etc/timidity.cfg", and then specify the library directory in the configuration file. */ /* #define CONFIG_FILE "/etc/timidity.cfg" */ -#define CONFIG_FILE DEFAULT_PATH "/timidity.cfg" +#ifndef CONFIG_FILE +#ifdef DEFAULT_PATH +#define CONFIG_FILE DEFAULT_PATH "/timidity.cfg" +#else +#define CONFIG_FILE PKGDATADIR "/timidity.cfg" +#endif /* DEFAULT_PATH */ +#endif /* CONFIG_FILE */ /* Filename extension, followed by command to run decompressor so that output is written to stdout. Terminate the list with a 0. diff -ruN TiMidity++-2.5.1/timidity/wrd_read.c TiMidity++-2.6.0/timidity/wrd_read.c --- TiMidity++-2.5.1/timidity/wrd_read.c Sun Jul 18 02:12:50 1999 +++ TiMidity++-2.6.0/timidity/wrd_read.c Thu Sep 9 00:11:20 1999 @@ -1771,6 +1771,8 @@ static int sherry_started; /* 0 - before start command 0x01*/ /* 1 - after start command 0x01*/ +static int sry_timebase_mode = 0; /* 0 is default */ + static int32 sry_getVariableLength(struct timidity_file *tf) { int32 value= 0; @@ -1886,7 +1888,7 @@ return 0; } -static void sry_readinit(struct wrd_step_tracer* wrdstep, int timebase) +static void sry_timebase21(struct wrd_step_tracer* wrdstep, int timebase) { sherry_started=0; memset(wrdstep, 0, sizeof(struct wrd_step_tracer)); @@ -1928,6 +1930,41 @@ #endif /* DEBUG */ } +static void sry_timebase22(struct wrd_step_tracer* wrdstep, int mode) +{ + sry_timebase_mode = mode; + if(sry_timebase_mode) + ctl->cmsg(CMSG_WARNING, VERB_NORMAL, + "Sherry time synchronize mode is not supported"); +} + +static void sry_wrdinfo(uint8 *info, int len) +{ + char *info1, *info2, *desc; + int i; + + /* "info1\0info2\0desc\0" */ + /* FIXME: Need to convert SJIS to "output_text_code" */ + + i = 0; + info1 = (char *)info; + while(i < len && info[i]) + i++; + i++; /* skip '\0' */ + if(i >= len) + return; + info2 = info + i; + while(i < len && info[i]) + i++; + i++; /* skip '\0' */ + if(i >= len) + return; + desc = info + i; + + ctl->cmsg(CMSG_INFO, VERB_VERBOSE, + "Sherry WRD: %s: %s: %s", info1, info2, desc); +} + static void sry_show_debug(uint8 *data) { switch(data[0]) @@ -1937,11 +1974,13 @@ ctl->cmsg(CMSG_INFO, VERB_NOISY, "Sherry WRD Compiler: %s", data + 1); break; - case 0x72: + case 0x72: /* Source Name */ if(data[1]) ctl->cmsg(CMSG_INFO, VERB_NOISY, "Sherry WRD Compiled from %s", data + 1); break; + case 0x7f: /* Compiler Private */ + break; } } @@ -1960,12 +1999,24 @@ err= sry_read_datapacket(tf, &packet); if( err ) break; sry_regist_datapacket(wrdstep , &packet); - if( packet.data[0]==0x21 || packet.data[0]==0x20 ){ - sry_readinit(wrdstep, SRY_GET_SHORT(packet.data+1)); - } else if( (packet.data[0]&0x70) == 0x70) { - sry_show_debug(packet.data); + switch(packet.data[0]) + { + case 0x00: /* end of header */ + return; + case 0x21: + sry_timebase21(wrdstep, SRY_GET_SHORT(packet.data+1)); + break; + case 0x22: + sry_timebase22(wrdstep, packet.data[1]); + break; + case 0x61: + sry_wrdinfo(packet.data + 1, packet.len - 1); + break; + default: + if((packet.data[0] & 0x70) == 0x70) + sry_show_debug(packet.data); + break; } - if( packet.data[0] == 0x00 ) break; /* end of header */ } } @@ -1985,7 +2036,7 @@ WRD_ADDEVENT(wrdstep->at, WRD_SHERRY_UPDATE, WRD_NOARG); need_update = 0; } - err= sry_read_datapacket(tf, &packet); + err = sry_read_datapacket(tf, &packet); if( err ) break; /* cur_time =+ delta_time;*/ /* wrdstep_wait(wrdstep, delta_time,0); */ @@ -2058,6 +2109,4 @@ return 1; } - #endif /*ENABLE_SHERRY*/ - diff -ruN TiMidity++-2.5.1/utils/Makefile.in TiMidity++-2.6.0/utils/Makefile.in --- TiMidity++-2.5.1/utils/Makefile.in Sat Aug 28 00:29:56 1999 +++ TiMidity++-2.6.0/utils/Makefile.in Tue Sep 21 23:18:03 1999 @@ -100,6 +100,7 @@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ SHCFLAGS = @SHCFLAGS@ +SHELL = @SHELL@ SHLD = @SHLD@ SYSEXTRAS = @SYSEXTRAS@ VERSION = @VERSION@ @@ -109,6 +110,7 @@ program_transform_name = @program_transform_name@ so = @so@ tcltk_dep = @tcltk_dep@ +timidity_LDFLAGS = @timidity_LDFLAGS@ INCLUDES = -I$(top_srcdir)/libarc -I$(top_srcdir)/timidity $(EXTRAINCS)