1 dnl TiMidity++ -- MIDI to WAVE converter and player
2 dnl Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
3 dnl Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 2 of the License, or
8 dnl (at your option) any later version.
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; if not, write to the Free Software
17 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 dnl configure.in created from configure.scan
20 dnl by URABE, Shyouhei <root@mput.dip.jp> on 2002.07.06
23 dnl CFLAGS - Flags for compile.
24 dnl CPPFLAGS - Flags for cpp
25 dnl LDFLAGS - Flags for linker
26 dnl ac_cpp: $CPP $CPPFLAGS
27 dnl ac_compile: ${CC-cc} -c $CFLAGS $CPPFLAGS
28 dnl ac_link: ${CC-cc} -o * $CFLAGS $CPPFLAGS $LDFLAGS *.c $LIBS
29 dnl EXTRACFLAGS - Extra flags to compile. Adds to CFLAGS.
30 dnl EXTRADEFS - Extra define macros. Adds to CPPFLAGS.
31 dnl EXTRALIBS - Extra libraries Adds to LIBS.
32 dnl SYSEXTRAS - Additional source codes to compile.
33 dnl lib_*_opt - Optional libraries. Adds to LIBS.
35 dnl - add to -L LDFLAGS
37 dnl - add to -I CPPFLAGS
38 dnl CYGNUS - `yes' if cygnus windows environment.
39 dnl MINGW - `yes' if Mingw windows environment.
42 dnl tcltk_dep - make dependencies for tcl/tk interface
44 dnl so - File extension of shared object library.
45 dnl SHLD - Linker to make shared object library.
46 dnl SHLDFLAGS - Link flags to link shared object library.
47 dnl SHCFLAGS - Additional flags to compile shared object library.
50 # This is a autoscan-generated configure.scan.
53 # "AC_INIT(timidity/timidity.c)" is obsolate yet.
54 AC_INIT([TiMidity++],[2.12.0-pre1b],[root@mput.dip.jp],[TiMidity++])
55 AC_CONFIG_AUX_DIR([autoconf])
57 AM_INIT_AUTOMAKE([gnu dist-bzip2])
58 AC_CONFIG_SRCDIR([timidity/timidity.c])
59 AC_CONFIG_HEADERS([config.h interface.h])
62 SHELL=${CONFIG_SHELL-"/bin/sh"}
65 dnl to use contains() macro (see autoconf/acinclude.m4)
68 # Check for compiler options -- such as debug flags.
70 dnl "--enable-debug" turnes -g on.
71 AC_MSG_CHECKING(if --enable-debug option specified)
73 [ --enable-debug Build a debugging version.],
74 [timidity_cv_debug="yes"], [timidity_cv_debug="no"])
75 if test "x$timidity_cv_debug" = "xyes"; then
76 AC_DEFINE(DEBUG,1,Define to 1 if you are in debug mode)
79 if test "x$timidity_cv_debug" = "xno"; then
80 AC_DEFINE(NDEBUG,1,Define to 1 if you are NOT in debug mode)
82 AC_MSG_RESULT($timidity_cv_debug)
84 CFLAGS=${CFLAGS-"-O2"}
86 dnl --with-x turns on if `--with-x' is NOT specified.
87 if test "x$with_x" = x; then
93 # Checking gcc environment
94 for i in `echo $LIBRARY_PATH|sed -e 's,:, ,g'`; do
95 LDFLAGS="$LDFLAGS -L${i}"
97 for i in `echo $C_INCLUDE_PATH|sed -e 's,:, ,g'`; do
98 CPPFLAGS="$CPPFLAGS -I${i}"
101 # add $prefix if specified.
102 if test "x$prefix" != xNONE -a "x$prefix" != "x$ac_default_prefix" -a "x$prefix" != "x/usr"; then
103 LDFLAGS="-L$prefix/lib $LDFLAGS"
104 SHLDFLAGS="-L$prefix/lib $SHLDFLAGS"
105 CPPFLAGS="-I$prefix/include $CPPFLAGS"
108 dnl add --with-includes, --with-libraries
109 AC_ARG_WITH(includes,
110 [ --with-includes=DIR Specify include directories (colon separated)],
112 for i in `echo "$withval"|sed -e 's,:, ,g'`; do
115 CPPFLAGS="$j$CPPFLAGS"
118 AC_ARG_WITH(libraries,
119 [ --with-libraries=DIR Specify library directories (colon separated)],
121 for i in `echo "$withval"|sed -e 's,:, ,g'`; do
128 dnl a bit hairly yet.(20020718:mput)
129 dnl CPPFLAGS="$CPPFLAGS \$(DEF_PKGDATADIR) \$(DEF_PKGLIBDIR) \$(DEF_DEFAULT_PATH)"
130 AC_ARG_WITH(default-path,
131 [ --with-default-path=DIR Where timidity.cfg is (PREFIX/share/timidity)],
132 [pkgdatadir=$withval],
134 if test "x$prefix" != "xNONE"; then
135 pkgdatadir='${prefix}/share/timidity'
137 pkgdatadir='/usr/local/share/timidity'
140 tmpdefpath="`eval \"echo ${pkgdatadir}\"`"
141 AC_DEFINE_UNQUOTED(DEFAULT_PATH,"$tmpdefpath",place to install patches)
142 AC_DEFINE(PKGDATADIR,DEFAULT_PATH,a compatibility matter. ignore it.)
144 AC_ARG_WITH(module-dir,
145 [ --with-module-dir=DIR Where to install interfaces (PREFIX/lib/timidity)],
146 [pkglibdir=$withval],
148 if test "x$prefix" != "xNONE"; then
149 pkglibdir='${prefix}/lib/timidity'
151 pkglibdir='/usr/local/lib/timidity'
154 tmplibdir="`eval \"echo ${pkglibdir}\"`"
155 AC_DEFINE_UNQUOTED(PKGLIBDIR,"$tmplibdir",place to install modules)
158 # Checks for programs.
161 AC_PROG_GCC_TRADITIONAL
166 CHECK_COMPILER_OPTION(rdynamic)
168 # Checks for target dependencies
171 [ --with-elf create ELF shared object instead of AOUT ],
172 [ ELFFORMAT=$withval ], [ ELFFORMAT="yes" ])
175 [ --with-simd create SIMD friendly binary (default is no) ],
176 [ SIMD=$withval ], [ SIMD="no" ])
181 test -n "$SHLD" || SHLD="ld -b"
185 dnl IRIX cc needs -signed option
186 case ".$CC" in .cc*) EXTRACFLAGS="-signed";; esac
187 test -n "$SHLD" || SHLD="cc -shared -all"
191 test -n "$SHLD" || SHLD="$CC -shared -nostartfiles"
196 dnl EXTRALIBS="$EXTRALIBS -lxpg4"
197 test -n "$SHLD" || SHLD="ld -Bshareable"
201 if test "$ELFFORMAT" = yes; then
202 test -n "$SHLD" || SHLD="ld -Bshareable"
205 SHLDFLAGS="-L/usr/X11R6/lib/aout $SHLDFLAGS"
206 test -n "$SHLD" || SHLD="env OBJFORMAT=aout ld -shared"
208 dnl EXTRALIBS="$EXTRALIBS -lxpg4"
213 # EXTRALIBS="$EXTRALIBS -lxpg4"
214 # test -n "$SHLD" || SHLD="ld -Bshareable"
219 EXTRADEFS="-D__W32__"
222 "xbcc32 "*) test -n "$SHLD" || SHLD="tlink32 -Tpd" ;;
223 "xcl "*) test -n "$SHLD" || SHLD="link -dll" ;;
224 "xgcc "*) test -n "$SHLD" || SHLD="gcc -mdll" ;;
225 *) test -n "$SHLD" || SHLD="unknown" ;;
229 lib_user32_test=-luser32
232 EXTRADEFS="-D__W32__"
235 "xbcc32 "*) test -n "$SHLD" || SHLD="tlink32 -Tpd" ;;
236 "xcl "*) test -n "$SHLD" || SHLD="link -dll" ;;
237 "xgcc "*) test -n "$SHLD" || SHLD="gcc -mdll" ;;
238 *) test -n "$SHLD" || SHLD="unknown" ;;
242 lib_user32_test=-luser32
246 test -n "$SHLD" || SHLD="ld -Bdynamic -G"
250 EXTRADEFS="-DSOLARIS"
251 test -n "$SHLD" || SHLD="/usr/ccs/bin/ld -G"
255 test -n "$SHLD" || SHLD="/usr/ccs/bin/ld -G"
259 if test "x$SIMD" = "xyes"; then
260 AC_DEFINE(USE_ALTIVEC,1,Define to 1 if you use altivec)
261 # EXTRACFLAGS="$EXTRACFLAGS -faltivec -mabi=altivec -maltivec" # for GCC3.
262 EXTRACFLAGS="$EXTRACFLAGS -faltivec"
264 AC_DEFINE(USE_ALTIVEC,0,Define to 1 if you use altivec)
266 CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
267 LDOPTS="-dynamic -undefined suppress -flat_namespace $LDOPTS"
268 test -n "$SHLD" || SHLD="$CC -dynamic -bundle -undefined suppress -flat_namespace $LDFLAGS"
273 if test "x$GCC" = xyes; then
276 SHLD="ld -Bdynamic -G"
283 dnl AC_EXEEX # obsolate
285 # Checks for libraries.
287 AC_CHECK_LIB(socket,socket)
288 AC_CHECK_LIB(dl,dlopen,lib_dl_opt=-ldl)
289 AC_CHECK_LIB(objc,NSLinkModule,lib_dl_opt=-lobjc) # Mac OS X need this.
290 AC_CHECK_LIB(xpg4,setlocale) # Mac OS X (and maybe NetBSD) need this.
291 AC_CHECK_FUNCS(gethostbyname,,[ AC_CHECK_LIB(nsl,gethostbyname) ])
295 if test "x$with_x" = xyes; then
296 if test "x$have_x" = xno; then
297 if test "x$x_config_flag" = xyes; then
298 AC_MSG_ERROR(Could not configure X)
300 AC_MSG_WARN(Could not configure X)
304 if test "x$with_x" = xyes -a "x$have_x" = xyes; then
305 if test "x$x_libraries" != x; then
306 ldflags_x_opt="-L$x_libraries"
307 LDFLAGS="$LDFLAGS $ldflags_x_opt"
308 SHLDFLAGS="$SHLDFLAGS $ldflags_x_opt"
312 if test "x$x_includes" != x; then
313 CPPFLAGS="$CPPFLAGS -I$x_includes"
316 AC_CHECK_LIB(X11,XOpenDisplay)
317 AC_MSG_CHECKING(X11 version 6)
318 AC_CACHE_VAL(timidity_cv_x11_version_6,
319 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[
320 #if XlibSpecificationRelease < 6
323 ]])],[timidity_cv_x11_version_6=yes],[timidity_cv_x11_version_6=no]))
324 if test "$timidity_cv_x11_version_6" = "yes"; then
325 AC_MSG_RESULT(6 or newer)
326 dnl AC_DEFINE(HAVE_X11R6)
328 AC_MSG_RESULT(before 6)
331 dnl checking order required
333 AC_CHECK_LIB(Xext,XShapeCombineMask,have_xext=yes; LIBS="-lXext $LIBS",have_xext=no)
334 AC_CHECK_LIB(ICE,IceConnectionNumber)
335 AC_CHECK_LIB(SM,SmcOpenConnection,have_xprelibs=yes; LIBS="-lSM $LIBS",have_xprelibs=no)
336 AC_CHECK_LIB(Xt,XtVaAppInitialize,have_xt=yes; LIBS="-lXt $LIBS",have_xt=no)
337 AC_CHECK_LIB(Xmu,XmuInternAtom,LIBS="-lXmu $LIBS")
338 AC_CHECK_FUNCS(XmuRegisterExternalAgent)
339 AC_CHECK_LIB(Xaw3d,XawInitializeWidgetSet,have_xaw=3d,
340 [ AC_CHECK_LIB(Xaw,XawInitializeWidgetSet,have_xaw=yes,have_xaw=no) ])
341 AC_CHECK_LIB(Xm,XmCreateForm,have_xm=yes,have_xm=no)
342 AC_CHECK_FUNCS(XShmCreatePixmap)
345 dnl End of X configure
347 # Checks for header files.
391 X11/extensions/XShm.h \
393 AC_CHECK_HEADER(string.h,, [ AC_DEFINE(NO_STRING_H,1,Define to 1 if you do not have <string.h>.)])
395 # Checks for typedefs, structures, and compiler characteristics.
408 dnl keyword "volatile" check
409 AC_CACHE_CHECK(volatile declaration,timidity_cv_type_volatile,
410 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[volatile int x]])],[timidity_cv_type_volatile=yes],[timidity_cv_type_volatile=no]))
411 if test $timidity_cv_type_volatile = no; then
412 AC_DEFINE(NO_VOLATILE,1,Define to 1 if you cannot use volatile keyword)
415 dnl union usenum check
416 AC_CACHE_CHECK(union semun declaration,timidity_cv_type_union_semun,
417 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
418 #include <sys/types.h>
421 ]], [[union semun x]])],[timidity_cv_type_union_semun=yes],[timidity_cv_type_union_semun=no]))
422 if test $timidity_cv_type_union_semun = yes; then
423 AC_DEFINE(HAVE_UNION_SEMUN,1,Define to 1 if you use semun keyword)
426 dnl Cygnus mmsystem check
427 if test "x$CYGNUS" = xyes; then
428 AC_CACHE_CHECK(Cygwin new mmsystem,timidity_cv_header_new_mmsystem,
429 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
431 #include <mmsystem.h>
432 ]], [[return WOM_OPEN != 0x3BB]])],[timidity_cv_header_new_mmsystem=yes],[timidity_cv_header_new_mmsystem=no]))
433 if test $timidity_cv_header_new_mmsystem = yes; then
434 AC_DEFINE(HAVE_NEW_MMSYSTEM,1,Define to 1 if you have <mmsystem.h> file)
438 dnl MINGW mmsystem check
439 if test "x$MINGW" = xyes; then
440 AC_CACHE_CHECK(Mingw new mmsystem,timidity_cv_header_new_mmsystem,
441 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
443 #include <mmsystem.h>
444 ]], [[return WOM_OPEN != 0x3BB]])],[timidity_cv_header_new_mmsystem=yes],[timidity_cv_header_new_mmsystem=no]))
445 if test $timidity_cv_header_new_mmsystem = yes; then
446 AC_DEFINE(HAVE_NEW_MMSYSTEM,1,Define to 1 if you have <mmsystem.h> file)
450 # Checks for library functions.
451 AC_FUNC_ERROR_AT_LINE
455 AC_FUNC_SETVBUF_REVERSED
492 AC_CHECK_FUNC(getopt_long,
493 AC_DEFINE([HAVE_GETOPT_LONG],1,[Define to 1 if you have `getopt_long function'])
494 tm_cv_needgetopt="no",
495 tm_cv_needgetopt="yes")
496 AM_CONDITIONAL([NEEDGETOPT], test "x$tm_cv_needgetopt" = "xyes")
499 if test "x$CYGNUS" = xyes; then
500 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
502 AC_CHECK_FUNC(opendir,,
503 [ EXTRADEFS="$EXTRADEFS -D__W32READDIR__"
506 *)EXTRADEFS="$EXTRADEFS -D__W32READDIR__"
510 if test "x$enable_network" = "xyes"; then
511 AC_CHECK_FUNC(socket,,
512 WAPI_CHECK_LIB(wsock32,WSAStartup,
513 [#include <winsock.h>],
515 [ EXTRALIBS="$EXTRALIBS -lwsock32"
516 EXTRADEFS="$EXTRADEFS -DWINSOCK" ]))
521 if test "x$CYGWIN" = xyes; then
522 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
524 AC_CHECK_FUNC(opendir,,
525 [ EXTRADEFS="$EXTRADEFS -D__W32READDIR__"
528 *)EXTRADEFS="$EXTRADEFS -D__W32READDIR__"
532 if test "x$enable_network" = "xyes"; then
533 AC_CHECK_FUNC(socket,,
534 WAPI_CHECK_LIB(wsock32,WSAStartup,
535 [#include <winsock.h>],
537 [ EXTRALIBS="$EXTRALIBS -lwsock32"
538 EXTRADEFS="$EXTRADEFS -DWINSOCK" ]))
542 # Checks on extra paths
545 AC_ARG_WITH(tcl-includes,
546 [ --with-tcl-includes=DIR Tcl include file path ],
547 [ if test ! -d $withval; then
548 AC_MSG_WARN($withval is not found.)
550 tcl_include_dir="-I$withval"
552 AC_ARG_WITH(tcl-libs,
553 [ --with-tcl-libs=DIR Tcl library file path ],
554 [ if test ! -d $withval; then
555 AC_MSG_WARN($withval is not found.)
557 tcl_libdir="-L$withval" ])
558 AC_ARG_WITH(tk-includes,
559 [ --with-tk-includes=DIR Tk include file path ],
560 [ if test ! -d $withval; then
561 AC_MSG_WARN($withval is not found.)
563 tk_includes="-I$withval" ])
565 [ --with-tk-libs=DIR Tk library file path ],
566 [ if test ! -d $withval; then
567 AC_MSG_WARN($withval is not found.)
569 tk_libdir="-L$withval" ])
572 AC_ARG_WITH(offix-includes,
573 [ --with-offix-includes=DIR Offix include file path ],
574 [ if test ! -d $withval; then
575 AC_MSG_WARN($withval is not found.)
577 offix_include_dir="-I$withval" ])
578 AC_ARG_WITH(offix-libs,
579 [ --with-offix-libs=DIR Offix include file path ],
580 [ if test ! -d $withval; then
581 AC_MSG_WARN($withval is not found.)
583 offix_lib_dir="-L$withval" ])
589 dnl default(d): auto selection
590 dnl oss(d): OSS /dev/dsp
591 dnl alsa(d): ALSA pcm device
592 dnl sun(d): SunOS /dev/audio
593 dnl hpux(d): HPUX /dev/audio
594 dnl irix(d): IRIX audio
595 dnl mme(d): OSF/1 MME
596 dnl sb_dsp(d): BSD/OS 2.0 /dev/sb_dsp
597 dnl w32(d): Windows MMS
598 dnl darwin(d): Mac OS X pcm device
599 dnl alsa(s): ALSA pcm device
600 dnl alib(A): HPUX network audio (Alib)
601 dnl nas(n): Network Audio System
604 dnl portaudio(p) PortAudio
605 dnl vorbis(v): Ogg Vorbis
606 dnl gogo(g): MP3 GOGO
609 audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts esd vorbis gogo portaudio jack'
611 AC_ARG_WITH(nas-library,
612 [ --with-nas-library=library NAS absolute library path(Don't use -laudio)])
613 AC_ARG_WITH(nas-includes,
614 [ --with-nas-includes=DIR NAS include files are in dir])
618 [ --enable-audio[=mode_list] Enable audio (Specify comma separated mode list):
619 default: Automatically select audio device.
621 sun: SunOS /dev/audio
622 hpux: HPUX /dev/audio
623 irix: IRIX audio library
625 sb_dsp: BSD/OS 2.0 /dev/sb_dsp
627 darwin: Darwin CoreAudio
628 alsa: ALSA pcm device
629 alib: HPUX network audio (Alib)
630 nas: NAS - Network Audio System
632 esd: EsounD - Enlightened Sound Daemon
636 gogo: MP3 GOGO (Only Windows is supported)],
637 [ enable_audio=$enableval
638 have_audio_opt=yes ],
643 test "x$enable_audio" = xyes && enable_audio=default
645 if test "x$enable_audio" != xno; then
646 for i in `echo $enable_audio | sed 's/,/ /g'`; do
647 eval "au_enable_$i=yes"
651 dnl Turn on default output mode
653 AC_ARG_WITH(default-output,
654 [ --with-default-output=<mode> Specify default output mode (optional):
655 (default|alsa|alib|arts|nas|
656 esd|wav|au|aiff|list|vorbis|
657 gogo|portaudio|jack)],
658 [ if test "$enable_audio" != no; then
659 DEFAULT_PLAYMODE=$withval
660 eval "au_enable_$DEFAULT_PLAYMODE=yes"
662 AC_MSG_WARN(--with-default-output=$withval: audio is not enabled)
665 dnl compatibility matters.
666 dnl AC_ARG_ENABLE(esd,
667 dnl [ --enable-esd EsounD (Obsoleted. Use --enable-audio=esd)],
668 dnl [ au_enable_esd=$enableval ])
669 dnl AC_ARG_ENABLE(nas,
670 dnl [ --enable-nas NAS (Obsoleted. Use --enable-audio=nas)],
671 dnl [ au_enable_nas=$enableval ])
672 dnl AC_ARG_ENABLE(alsa,
673 dnl [ --enable-alsa ALSA (Obsoleted. Use --enable-audio=alsa)],
674 dnl [ au_enable_alsa=$enableval ])
676 dnl target-specific defaults
677 if test "x$au_enable_default" = xyes; then
679 *-*-linux*|*-*-freebsd*)
685 *-*-bsdi2.1|*-*-bsdi3.?|*-*-bsdi4.?)
716 AC_MSG_WARN(No --enable-audio=default audio for $target)
722 # Each audio mode's configurations
724 AC_MSG_CHECKING(enable_audio=oss)
725 if test "x$au_enable_oss" = xyes; then
726 EXTRADEFS="$EXTRADEFS -DAU_OSS"
727 SYSEXTRAS="$SYSEXTRAS oss_a.c"
728 if test "x$ac_cv_header_sys_soundcard_h" = xyes; then
729 AC_MSG_RESULT(yes - <sys/soundcard.h>)
733 dnl <linux/soundcard.h> or <machine/soundcard.h>
737 if test "x$ac_cv_header_soundcard_h" = xyes; then
738 AC_MSG_RESULT(yes - <soundcard.h>)
740 AC_MSG_WARN(<sys/soundcard.h> is not found)
745 AC_CHECK_LIB(ossaudio,open)
747 dnl Why OpenBSD use /dev/audio instead of /dev/dsp for OSS
750 if test ! -e "/dev/dsp"; then
751 oss_device=/dev/audio
760 AC_MSG_CHECKING(enable_audio=sun)
761 if test "x$au_enable_sun" = xyes; then
764 if test -f /usr/demo/SOUND/libaudio.a; then
765 EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/libaudio.a"
768 AC_MSG_RESULT(Notice: libaudio.a is not found [(ignore)])
772 if test -f /usr/demo/SOUND/lib/libaudio.a; then
773 EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/lib/libaudio.a"
776 AC_MSG_RESULT(Notice: libaudio.a is not found [(ignore)])
779 *) AC_MSG_RESULT(yes)
782 EXTRADEFS="$EXTRADEFS -DAU_SUN"
783 SYSEXTRAS="$SYSEXTRAS sun_a.c"
789 AC_MSG_CHECKING(enable_audio=hpux)
790 if test "x$au_enable_hpux" = xyes; then
792 *-*-hpux*) AC_MSG_RESULT(yes) ;;
793 *) AC_MSG_WARN(may not work on $target) ;;
795 EXTRADEFS="$EXTRADEFS -DAU_HPUX_AUDIO"
796 SYSEXTRAS="$SYSEXTRAS hpux_d_a.c"
802 AC_MSG_CHECKING(enable_audio=irix)
803 if test "x$au_enable_irix" = xyes; then
805 *-sgi-irix5*|*-sgi-irix6.2)
806 EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_OLDAL"
810 EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_NEWAL"
813 *) AC_MSG_WARN(may not work on $target) ;;
815 SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_al.c"
816 EXTRALIBS="$EXTRASLIBS -laudio"
822 AC_MSG_CHECKING(enable_audio=mme)
823 if test "x$au_enable_mme" = xyes; then
825 *-dec-*) AC_MSG_RESULT(yes) ;;
826 *) AC_MSG_WARN(may not work on $target) ;;
828 EXTRADEFS="$EXTRADEFS -DAU_DEC -DAU_AUDRIV"
829 SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_mme.c"
830 CPPFLAGS="$CPPFLAGS -I/usr/opt/MME210/include"
831 EXTRALIBS="$EXTRALIBS /usr/opt/MME220/lib/libmme.a"
837 AC_MSG_CHECKING(enable_audio=sb_dsp)
838 if test "x$au_enable_sb_dsp" = xyes; then
840 *-*-bsdi2.0) AC_MSG_RESULT(yes) ;;
841 *) AC_MSG_WARN(may not work on $target) ;;
843 EXTRADEFS="$EXTRADEFS -DAU_BSDI -DDEFAULT_RATE=22500"
844 SYSEXTRAS="$SYSEXTRAS bsd20_a.c"
850 AC_MSG_CHECKING(enable_audio=w32)
851 if test "x$au_enable_w32" = xyes; then
860 AC_MSG_WARN(may not work on $target)
863 SYSEXTRAS="$SYSEXTRAS w32_a.c"
864 EXTRALIBS="$EXTRALIBS -lwinmm"
865 EXTRADEFS="$EXTRADEFS -DAU_W32"
870 dnl Mac OS X / darwin-x86
871 AC_MSG_CHECKING(enable_audio=darwin)
872 if test "x$au_enable_darwin" = xyes; then
873 EXTRADEFS="$EXTRADEFS -DAU_DARWIN"
874 SYSEXTRAS="$SYSEXTRAS darwin_a.c"
875 EXTRALIBS="$EXTRALIBS -framework CoreAudio"
876 dnl just say yes or no :-P
881 AC_MSG_WARN(may not work on $target)
889 dnl alsa - Advanced Linux Sound Architecture
890 AC_MSG_CHECKING(enable_audio=alsa)
891 if test "x$au_enable_alsa" = xyes; then
892 AC_MSG_RESULT([yes, configuring alsa])
897 if test "x$alsa_found" = "xyes" ; then
898 dnl AC_MSG_RESULT(yes)
899 EXTRADEFS="$EXTRADEFS -DAU_ALSA"
900 SYSEXTRAS="$SYSEXTRAS alsa_a.c"
901 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ALSA_CFLAGS)
902 LIBS="$KEEPLIBS $ALSA_LIBS"
903 AC_CHECK_FUNCS(snd_seq_port_info_set_timestamping)
905 AC_MSG_WARN(Couldn't configure alsa.)
915 AC_MSG_CHECKING(enable_audio=alib)
916 if test "x$au_enable_alib" = xyes; then
918 *-*-hpux*) AC_MSG_RESULT(yes) ;;
919 *) AC_MSG_WARN(may not work on $target) ;;
921 SYSEXTRAS="$SYSEXTRAS hpux_a.c"
922 EXTRADEFS="$EXTRADEFS -DAU_HPUX_ALIB"
923 if test -d /opt/audio/include; then
924 CPPFLAGS="$CPPFLAGS -I/opt/audio/include"
926 if test -d /opt/audio/lib; then
927 EXTRALIBS="$EXTRALIBS -L/opt/audio/lib"
929 EXTRALIBS="$EXTRALIBS -lAlib"
935 AC_MSG_CHECKING(enable_audio=nas)
936 if test "x$au_enable_nas" = xyes; then
937 if test "x$with_x" != xyes; then
938 AC_MSG_ERROR(nas: --with-x option must be specified)
940 EXTRADEFS="$EXTRADEFS -DAU_NAS"
941 SYSEXTRAS="$SYSEXTRAS nas_a.c"
943 dnl -laudio conflicts another audio library,
944 dnl so I specify NAS library with absolete path.
946 if test "x$with_nas_library" != x; then
947 AC_MSG_RESULT($with_nas_library);
948 EXTRALIBS="$EXTRALIBS $with_nas_library"
951 MY_SEARCH_LIBS(AuOpenServer,
952 [$x_libraries/libaudio.a \
953 /usr/lib/libaudio.so \
954 /usr/lib/libaudio.a ],
955 [ AC_MSG_RESULT(NAS: $timidity_cv_search_AuOpenServer)
956 EXTRALIBS="$EXTRALIBS $timidity_cv_search_AuOpenServer"],
957 [AC_MSG_WARN(NAS library is not found.)])
959 test "x$with_nas_includes" != x && CPPFLAGS="$CPPFLAGS -I$with_nas_includes"
961 if test "x$have_xext" = xyes; then
964 if test "x$have_xprelibs" = xyes; then
965 lib_xprelibs_opt='-lSM -lICE'
972 AC_MSG_CHECKING(enable_audio=arts)
973 if test "x$au_enable_arts" = xyes; then
974 AC_MSG_RESULT([yes, configuring aRts])
982 if test "x$no_arts" = x; then
983 dnl AC_MSG_RESULT(aRts: Enabled)
984 EXTRADEFS="$EXTRADEFS -DAU_ARTS"
985 SYSEXTRAS="$SYSEXTRAS aRts_a.c"
986 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ARTS_CFLAGS)
987 LIBS="$LIBS $ARTS_LIBS"
989 AC_MSG_WARN(aRts: Couldn't configure)
996 AC_MSG_CHECKING(enable_audio=esd)
997 if test "x$au_enable_esd" = xyes; then
998 AC_MSG_RESULT([yes, configuring esd])
1001 KEEPLDFLAGS=$LDFLAGS
1005 LDFLAGS=$KEEPLDFLAGS
1006 if test "x$no_esd" = x; then
1007 dnl AC_MSG_RESULT(EsounD: Enabled)
1008 EXTRADEFS="$EXTRADEFS -DAU_ESD"
1009 SYSEXTRAS="$SYSEXTRAS esd_a.c"
1010 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ESD_CFLAGS)
1011 LIBS="$LIBS $ESD_LIBS"
1013 AC_MSG_WARN(EsounD: Couldn't configure)
1020 AC_MSG_CHECKING(enable_audio=portaudio)
1021 if test "x$au_enable_portaudio" = xyes; then
1023 SYSEXTRAS="$SYSEXTRAS portaudio_a.c"
1024 EXTRALIBS="$EXTRALIBS -lportaudio"
1025 EXTRADEFS="$EXTRADEFS -DAU_PORTAUDIO"
1031 AC_MSG_CHECKING(enable_audio=jack)
1032 if test "x$au_enable_jack" = xyes; then
1034 SYSEXTRAS="$SYSEXTRAS jack_a.c"
1035 EXTRALIBS="$EXTRALIBS $(pkg-config --libs jack)"
1036 EXTRADEFS="$EXTRADEFS -DAU_JACK $(pkg-config --cflags jack)"
1042 AC_MSG_CHECKING(enable_audio=vorbis)
1043 if test "x$au_enable_vorbis" = xyes; then
1044 AC_MSG_RESULT([yes, configuring vorbis])
1048 SYSEXTRAS="$SYSEXTRAS vorbis_a.c"
1049 EXTRADEFS="$EXTRADEFS -DAU_VORBIS $OGG_CFLAGS $VORBIS_CFLAGS"
1050 EXTRALIBS="$EXTRALIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
1051 if test "x$CYGNUS" = "xyes"; then
1052 EXTRADEFS="-DAU_VORBIS_DLL $EXTRALIBS"
1053 SYSEXTRAS="$SYSEXTRAS w32g_vorbisenc_dll.c w32g_vorbis_dll.c w32g_ogg_dll.c"
1055 if test "x$MINGW" = "xyes"; then
1056 EXTRADEFS="-DAU_VORBIS_DLL $EXTRALIBS"
1057 SYSEXTRAS="$SYSEXTRAS w32g_vorbisenc_dll.c w32g_vorbis_dll.c w32g_ogg_dll.c"
1060 AC_MSG_WARN([Unable to configure vorbis, but ogg is there (???)])
1063 AC_MSG_WARN(Unable to configure vorbis!)
1070 dnl Win32 Gogo-no-coder
1071 AC_MSG_CHECKING(enable_audio=gogo)
1072 if test "x$au_enable_gogo" = xyes; then
1073 if test "x$CYGNUS" = "xyes"; then
1074 AC_MSG_RESULT(yes, configuring gogo)
1076 if test "x$MINGW" = "xyes"; then
1077 AC_MSG_RESULT(yes, configuring gogo)
1079 AC_MSG_WARN(May be gogo is not supported. You need hack the gogo_a.c)
1083 SYSEXTRAS="$SYSEXTRAS gogo_a.c w32_gogo.c"
1084 EXTRADEFS="$EXTRADEFS -DAU_GOGO -DAU_GOGO_DLL"
1085 EXTRALIBS="$EXTRALIBS -lgogo"
1090 dnl Pseudo audio device (Undocumented).
1091 if test "x$au_enable_none" = xyes; then
1092 EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV"
1093 SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_none.c"
1096 dnl TIMIDITY_OUTPUT_ID
1098 AC_MSG_CHECKING(default output mode)
1099 if test "x$DEFAULT_PLAYMODE" = x; then
1100 DEFAULT_PLAYMODE=`echo $enable_audio | sed 's/,.*//'`
1102 case ".$DEFAULT_PLAYMODE" in
1103 .default) TIMIDITY_OUTPUT_ID=d ;;
1104 .oss) TIMIDITY_OUTPUT_ID=d ;;
1105 .alsa) TIMIDITY_OUTPUT_ID=s ;;
1106 .sun) TIMIDITY_OUTPUT_ID=d ;;
1107 .hpux) TIMIDITY_OUTPUT_ID=d ;;
1108 .irix) TIMIDITY_OUTPUT_ID=d ;;
1109 .mme) TIMIDITY_OUTPUT_ID=d ;;
1110 .sb_dsp) TIMIDITY_OUTPUT_ID=d ;;
1111 .darwin) TIMIDITY_OUTPUT_ID=d ;;
1112 .w32) TIMIDITY_OUTPUT_ID=d ;;
1113 .alib) TIMIDITY_OUTPUT_ID=A ;;
1114 .nas) TIMIDITY_OUTPUT_ID=n ;;
1115 .arts) TIMIDITY_OUTPUT_ID=R ;;
1116 .esd) TIMIDITY_OUTPUT_ID=e ;;
1117 .portaudio) TIMIDITY_OUTPUT_ID=p ;;
1118 .wav) TIMIDITY_OUTPUT_ID=w ;;
1119 .au) TIMIDITY_OUTPUT_ID=u ;;
1120 .aiff) TIMIDITY_OUTPUT_ID=a ;;
1121 .list) TIMIDITY_OUTPUT_ID=l ;;
1122 .vorbis) TIMIDITY_OUTPUT_ID=v ;;
1123 .gogo) TIMIDITY_OUTPUT_ID=g ;;
1124 .jack) TIMIDITY_OUTPUT_ID=j ;;
1125 *) TIMIDITY_OUTPUT_ID= ;;
1127 AC_MSG_RESULT($DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID)
1133 interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk alsaseq winsyn winsyng portmidisyng'
1135 AC_ARG_ENABLE(interface,
1136 [ --enable-interface=[interface_list]
1137 Comma separated interface list ],
1138 [ for i in `echo $enableval | sed 's/,/ /g'`; do
1139 eval "enable_$i=yes"
1142 # Dynamic link configuration
1143 AC_ARG_ENABLE(dynamic,
1144 [ --enable-dynamic Enable dynamic link interface (default is no)
1145 --enable-dynamic=dynamic_list
1146 Comma separated dynamic interface list],
1147 [ dnl --enable-dynamic=yes to --enable-dynamic=dynamic
1148 if test "x$enable_dynamic" = xyes; then
1149 enable_dynamic=dynamic
1150 elif test "x$enable_dynamic" != xno; then
1151 for i in `echo $enableval | sed 's/,/ /g'`; do
1152 eval "enable_$i=dynamic"
1157 for i in $interface_targets; do
1158 eval "join_targets=$join_targets\$enable_$i"
1161 case ".$join_targets" in
1162 .*dynamic*) NEEDDLOPEN=yes;;
1166 dnl check -fpic option for gcc
1167 if test "x$GCC" = xyes; then SHCFLAGS="$SHCFLAGS -fPIC"; fi
1168 case "x$enable_ump" in xyes|xdynamic) EXTRACFLAGS="$EXTRACFLAGS -DXP_UNIX $SHCFLAGS";; esac
1170 dnl Which type of dynamic loader?
1171 if test "$NEEDDLOPEN" = "yes"; then
1174 WAPI_CHECK_FUNC(LoadLibrary,,[LoadLibrary(0);],have_dl=w32)
1175 test $wapi_cv_func_LoadLibrary = yes && have_dl=w32
1177 if test "$have_dl" = "no"; then
1178 AC_CHECK_FUNC(shl_load,have_dl=hpux)
1180 if test "$have_dl" = "no"; then
1181 dnl darwin has both dyld and libdl: in case user installed dlcompat.
1182 dnl dyld is recommended because libdl is a wrapper for dyld.
1183 AC_CHECK_FUNC(NSLinkModule,have_dl=dyld)
1185 if test "$have_dl" = "no" -a "x$ac_cv_lib_dl_dlopen" = xyes; then
1188 if test "$have_dl" = "no"; then
1189 AC_CHECK_FUNC(dlopen,have_dl=dlopen)
1191 if test "$have_dl" = "no"; then
1192 AC_CHECK_FUNC(dld_init,have_dl=dld)
1194 if test "$have_dl" = "no"; then
1195 AC_CHECK_LIB(dld,dld_init,have_dl=dld;lib_dl_opt=-ldld)
1198 AC_MSG_CHECKING(dynamic link method)
1201 AC_MSG_RESULT(use dl_dlopen.c)
1202 SYSEXTRAS="$SYSEXTRAS dl_dlopen.c"
1203 CHECK_DLSYM_UNDERSCORE(AC_DEFINE(DLSYM_NEEDS_UNDERSCORE,1,Define to 1 if you have to add "_" to every identifiers.))
1206 AC_MSG_RESULT(use dl_dld.c)
1207 SYSEXTRAS="$SYSEXTRAS dl_dld.c"
1210 AC_MSG_RESULT(use dl_hpux.c)
1211 SYSEXTRAS="$SYSEXTRAS dl_hpux.c"
1212 LDFLAGS="$LDFLAGS -Wl,-E $LDFLAGS"
1215 AC_MSG_RESULT(use dl_w32.c)
1216 SYSEXTRAS="$SYSEXTRAS dl_w32.c"
1219 AC_MSG_RESULT(use dl_dyld.c)
1220 SYSEXTRAS="$SYSEXTRAS dl_dyld.c"
1224 AC_MSG_WARN(no method to open a shared object)
1229 if test "$NEEDDLOPEN" = "yes"; then
1230 MY_DEFINE(IA_DYNAMIC)
1231 AC_DEFINE_UNQUOTED(SHARED_LIB_EXT,".$so", shared library extention)
1233 dnl EXTRADEFS="$EXTRADEFS \$(DEF_SHLIB_DIR)"
1234 test "x$GCC" = xyes -a "x$timidity_cv_ccoption_rdynamic" = xyes && timidity_LDFLAGS="-rdynamic"
1237 AM_CONDITIONAL(NEEDDLOPEN, test "$NEEDDLOPEN" = "yes")
1240 dnl Each interface section
1244 AM_CONDITIONAL(ENABLE_NCURSES, false)
1245 CONFIG_INTERFACE(ncurses,NCURSES,n,
1246 [ --enable-ncurses Enable ncurses interface (default is no)],
1247 [ AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h)
1249 dnl #include <ncurses/curses.h> is failure on Plamo Linux 1.3/ncurses 1.9.9e
1250 dnl because <ncurses/curses.h> includes <unctrl.h>:
1251 dnl /usr/include/ncurses/curses.h:34: unctrl.h: No such file or directory
1252 dnl But surely there is unctl.h at /usr/include/ncurses/unctrl.h.
1253 dnl configure must check ncurses header with -I/usr/include/ncurses option.
1255 case "$ac_cv_header_curses_h$ac_cv_header_ncurses_curses_h$ac_cv_header_ncurses_h" in
1257 *) for i in /usr/include /usr/local/include; do
1258 if test -f "$i/ncurses/curses.h" -a -f "$i/ncurses/unctrl.h"; then
1259 AC_MSG_WARN(ncurses test is failure. Please check config.h and common.makefile later)
1260 CPPFLAGS="$CPPFLAGS -I$i/ncurses"
1267 AC_CHECK_LIB(ncurses,initscr,lib_curses_opt=-lncurses,
1268 [ dnl checking pdcurses
1269 AC_CHECK_LIB(curses,PDC_set_ctrl_break,
1270 [ lib_curses_opt=-lcurses
1271 AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses)
1272 lib_user32_opt="$lib_user32_test"
1274 [ dnl checking libpdcurses
1275 AC_CHECK_LIB(pdcurses,PDC_set_ctrl_break,
1276 [ lib_curses_opt=-lpdcurses
1277 AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses)
1278 lib_user32_opt="$lib_user32_test"
1280 [ dnl OpenBSD use -lcurses instead of -lncurses.
1283 AC_CHECK_LIB(curses,initscr,lib_curses_opt=-lcurses,
1284 [ AC_MSG_WARN(ncurses interface is not enabled)
1285 enable_ncurses=no ])
1288 AC_MSG_WARN(ncurses interface is not enabled)
1297 [ LIBS="$LIBS $lib_curses_opt"
1300 EXTRALIBS="$EXTRALIBS -lmytinfo"
1303 INTERFACE_SRCS="$INTERFACE_SRCS ncurs_c.c"
1305 [ n_so_libs="$lib_curses_opt"
1308 EXTRALIBS="$EXTRALIBS -lmytinfo"
1313 AM_CONDITIONAL(ENABLE_SLANG, false)
1314 CONFIG_INTERFACE(slang,SLANG,s,
1315 [ --enable-slang Enable slang interface (default is no)],
1316 [ AC_CHECK_LIB(slang,SLang_init_tty,:,
1318 AC_MSG_WARN(slang interface is not enabled)
1320 AC_CHECK_HEADERS(slang/slang.h slang.h)
1322 [ LIBS="$LIBS -lslang"
1323 INTERFACE_SRCS="$INTERFACE_SRCS slang_c.c"
1325 [ s_so_libs="-lslang"
1326 AC_CHECK_LIB(termcap,initscr,s_so_libs="$s_so_libs -ltermcap")
1330 AM_CONDITIONAL(ENABLE_MOTIF, false)
1331 CONFIG_INTERFACE(motif,MOTIF,m,
1332 [ --enable-motif Enable motif interface (default is no)],
1333 [ if test "x$with_x" != xyes; then
1334 AC_MSG_ERROR(motif: --with-x option must be specified)
1336 if test "x$have_xm" != xyes; then
1337 AC_MSG_WARN(Motif library is not found.)
1344 if test "x$have_xprelibs" = xyes; then
1345 lib_xprelibs_opt='-lSM -lICE'
1347 INTERFACE_SRCS="$INTERFACE_SRCS motif_c.c motif_i.c motif_p.c"
1349 [ if test x$have_xprelibs = xyes; then
1350 m_so_libs="-lXext -lSM -lICE"
1352 m_so_libs="$ldflags_x_opt -lXm -lXt $m_so_libs -lX11"
1356 AM_CONDITIONAL(ENABLE_TCLTK, false)
1357 CONFIG_INTERFACE(tcltk,TCLTK,k,
1358 [ --enable-tcltk Enable tcltk interface (default is no)],
1359 [ if test "x$with_x" != xyes; then
1360 AC_MSG_ERROR(tcltk: --with-x option must be specified)
1364 KEEPCPPFLAGS=$CPPFLAGS
1365 KEEPLDFLAGS=$LDFLAGS
1368 CPPFLAGS="$tcl_include_dir $tk_includes $CPPFLAGS"
1369 LDFLAGS="$tcl_libdir $tk_libdir $LDFLAGS"
1370 LIBS="$LIBS $lib_dl_opt"
1374 for l in tcl tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76 tcl8.3 tcl8.4; do
1375 case "x$tcl_lib" in x) AC_CHECK_LIB($l,Tcl_Init,tcl_lib=-l$l);; esac
1377 LIBS="$LIBS $tcl_lib"
1378 for l in tk tk8.0jp tk4.2jp tk80jp tk42jp tk8.0 tk4.2 tk80 tk42 tk8.3 tk8.4; do
1379 case "x$tk_lib" in x) AC_CHECK_LIB($l,Tk_Init,tk_lib=-l$l);; esac
1383 if test "x$tcl_lib" = x -o "x$tk_lib" = x; then
1384 CPPFLAGS=$KEEPCPPFLAGS
1385 LDFLAGS=$KEEPLDFLAGS
1387 AC_MSG_WARN(tcl/tk is not enable)
1389 tcltk_dep='tclIndex'
1392 [ LIBS=`echo $LIBS | sed "s/-lX11/$tk_lib $tcl_lib -lX11/"`
1395 EXTRALIBS="$EXTRALIBS -lipc"
1398 INTERFACE_SRCS="$INTERFACE_SRCS tk_c.c"
1400 [ k_so_libs="$tcl_libdir $tk_libdir $tcl_lib $tk_lib $lib_dl_opt"
1403 k_so_libs="$k_so_libs -lipc"
1406 k_so_libs="$k_so_libs -lX11 -lm"
1408 AM_CONDITIONAL(ENABLE_DYNAMIC_TCLTK, test "x$enable_tcltk" = "xdynamic")
1411 AM_CONDITIONAL(ENABLE_EMACS, false)
1412 CONFIG_INTERFACE(emacs,EMACS,e,
1413 [ --enable-emacs Enable emacs interface (default is no)],
1415 [ ELFILES="$ELFILES timidity.el"
1416 INTERFACE_SRCS="$INTERFACE_SRCS emacs_c.c"
1418 [ ELFILES="$ELFILES timidity.el" ])
1421 AM_CONDITIONAL(ENABLE_VT100, false)
1422 CONFIG_INTERFACE(vt100,VT100,T,
1423 [ --enable-vt100 Enable VT100 interface (default is no)],
1425 [ INTERFACE_SRCS="$INTERFACE_SRCS vt100_c.c vt100.c" ])
1428 AM_CONDITIONAL(ENABLE_XAW, false)
1429 CONFIG_INTERFACE(xaw,XAW,a,
1430 [ --enable-xaw Enable athena interface (default is no)],
1431 [ if test "x$with_x" != xyes; then
1432 AC_MSG_ERROR(xaw: --with-x option must be specified)
1434 if test "x$have_xaw" != "xyes" -a "x$have_xaw" != "x3d"; then
1435 AC_MSG_WARN(X Athena Widget library is not found.)
1438 [ dnl Add -lXext -lSM -lICE -lXmu -lXt {-lXaw|-lXaw3d}
1439 if test "x$have_xext" = xyes; then
1442 if test "x$have_xprelibs" = xyes; then
1443 lib_xprelibs_opt='-lSM -lICE'
1447 if test "x$have_xaw" = x3d; then
1448 AC_DEFINE(XAW3D,1,Define to 1 if you have libXaw3d.)
1453 INTERFACE_SRCS="$INTERFACE_SRCS xaw_c.c xaw_i.c"
1455 [ if test "x$have_xext" = xyes; then
1456 a_so_libs="-lXext -lX11"
1462 a_so_libs="$a_so_libs -lcc_dynamic"
1465 if test "x$have_xprelibs" = xyes; then
1466 a_so_libs="-lSM -lICE $a_so_libs"
1468 if test "x$have_xaw" = xyes; then
1469 a_so_libs="-lXaw -lXmu -lXt $a_so_libs"
1470 elif test "x$have_xaw" = x3d; then
1471 AC_DEFINE(XAW3D,1,Define to 1 if you have libXaw3d.)
1472 a_so_libs="-lXaw3d -lXmu -lXt $a_so_libs"
1474 a_so_libs="$ldflags_x_opt $a_so_libs"
1476 AM_CONDITIONAL(ENABLE_DYNAMIC_XAW, test "x$enable_xaw" = "xdynamic")
1479 AM_CONDITIONAL(ENABLE_XSKIN, false)
1480 CONFIG_INTERFACE(xskin,XSKIN,i,
1481 [ --enable-xskin Enable X skin interface (default is no)],
1482 [ if test "x$with_x" != xyes; then
1483 AC_MSG_ERROR(xskin: --with-x option must be specified)
1486 [ INTERFACE_SRCS="$INTERFACE_SRCS xskin_c.c xskin_i.c xskin_loadBMP.c xskin_spectrum.c" ],
1487 [ i_so_libs="$ldflags_x_opt -lX11" ])
1490 AM_CONDITIONAL(ENABLE_GTK, false)
1491 CONFIG_INTERFACE(gtk, GTK, g,
1492 [ --enable-gtk Enable GTK+ interface (default is no)],
1493 [ AM_PATH_GTK(1.1.3,,enable_gtk=no) ],
1494 [ LIBS="$LIBS $GTK_LIBS"
1495 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$GTK_CFLAGS)
1496 INTERFACE_SRCS="$INTERFACE_SRCS gtk_c.c gtk_i.c gtk_p.c"
1498 [ if test "x$GCC" = xyes; then
1499 dnl Do not include -rdynamic option in $g_so_libs.
1500 for i in $GTK_LIBS; do
1503 *) g_so_libs="$g_so_libs $i" ;;
1507 g_so_libs="$GTK_LIBS"
1509 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$GTK_CFLAGS) ])
1511 dnl TiMidity Network MIDI Server
1512 AM_CONDITIONAL(ENABLE_SERVER, false)
1513 CONFIG_INTERFACE(server,SERVER,r,
1514 [ --enable-server Enable server interface (default is no)],
1516 [ INTERFACE_SRCS="$INTERFACE_SRCS server_c.c"
1517 AC_CHECK_HEADERS(sys/soundcard.h)
1520 dnl TiMidity ALSA sequencer server
1521 AM_CONDITIONAL(ENABLE_ALSASEQ, false)
1522 CONFIG_INTERFACE(alsaseq,ALSASEQ,A,
1523 [ --enable-alsaseq Enable ALSA sequencer server interface
1526 [ INTERFACE_SRCS="$INTERFACE_SRCS alsaseq_c.c"
1527 AC_CHECK_HEADERS(sys/asoundlib.h)
1530 dnl TiMidity Windows synthesizer server
1531 AM_CONDITIONAL(ENABLE_WINSYN, false)
1532 CONFIG_INTERFACE(winsyn,WINSYN,W,
1533 [ --enable-winsyn Enable Windows Synthesizer interface
1536 [ INTERFACE_SRCS="$INTERFACE_SRCS winsyn_c.c rtsyn_common.c rtsyn_winmm.c" ])
1538 dnl TiMidity PortMIDI synthesizer server
1539 AM_CONDITIONAL(ENABLE_PORTMIDISYN, false)
1540 CONFIG_INTERFACE(portmidisyn,PORTMIDISYN,P,
1541 [ --enable-portmidisyn Enable PortMIDI Synthesizer interface
1544 [ INTERFACE_SRCS="$INTERFACE_SRCS portmidisyn_c.c rtsyn_common.c rtsyn_portmidi.c" ])
1546 dnl TiMidity Windows GUI synthesizer server
1547 AM_CONDITIONAL(ENABLE_W32G_SYN, false)
1548 CONFIG_INTERFACE(winsyng,W32G_SYN,W,
1549 [ --enable-winsyng Enable Windows GUI Synthesizer interface
1552 [ lib_w32gui_opt='-lgdi32 -lcomctl32 -lcomdlg32 -lole32'
1553 lib_user32_opt='-luser32'
1554 LDFLAGS="-mwindows $LDFLAGS"
1555 INTERFACE_SRCS="$INTERFACE_SRCS w32g_ini.c w32g_pref.c w32g_syn_escaped.c w32g_utl.c winsyn_c.c rtsyn_common.c rtsyn_winmm.c"
1560 AM_CONDITIONAL(ENABLE_W32GUI, false)
1561 CONFIG_INTERFACE(w32gui, W32GUI, w,
1562 [ --enable-w32gui Enable Windows GUI interface (default is no)],
1564 [ lib_w32gui_opt='-lgdi32 -lcomctl32 -lcomdlg32 -lole32'
1565 lib_user32_opt='-luser32'
1566 LDFLAGS="-mwindows $LDFLAGS"
1567 INTERFACE_SRCS="$INTERFACE_SRCS w32g_c.c w32g_ini.c w32g_i.c w32g_playlist.c w32g_utl.c w32g_pref.c w32g_subwin_escaped.c w32g_subwin2.c w32g_subwin3.c w32g_ut2.c w32g_dib.c wrdt_w32g.c w32g_mag.c"
1570 dnl UMP configuration
1571 AM_CONDITIONAL(ENABLE_PLUGIN, false)
1572 CONFIG_INTERFACE(ump, PLUGIN, p,
1573 [ --enable-ump UMP configuration (default is no)],
1574 [ if test ! -d ump; then
1575 AC_MSG_ERROR(UMP Package is not exists. Can't configure it.)
1577 AC_CHECK_HEADER(X11/xpm.h,,AC_MSG_ERROR([UMP Package needs xpm.h[,] but could not find it.]))
1578 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,:,AC_MSG_ERROR([UMP Package needs libXpm.a[,] but could not find it.]))
1579 if test "x$have_xext" = xyes; then
1582 if test "x$have_xprelibs" = xyes; then
1583 lib_xprelibs_opt='-lSM -lICE'
1591 dnl this rely on CFLAGS and LIBS
1592 AC_ARG_ENABLE(offix,
1593 [ --enable-offix Enable offix support (default is no)],
1594 [ if test "$enableval" = "yes"; then
1595 KEEPCPPFLAGS=$CPPFLAGS
1597 KEEPLDFLAGS=$LDFLAGS
1598 CPPFLAGS="$CPPFLAGS $offix_include_dir"
1599 LDFLAGS="$LDFLAGS $offix_lib_dir"
1600 LIBS="$LIBS $lib_xmu_opt $lib_xt_opt $lib_xprelibs_opt $lib_xext_opt -lX11"
1601 AC_CHECK_LIB(Dnd,DndInitialize,[
1603 lib_offix_opt="-lDnd"
1604 AC_DEFINE(OFFIX,1,Define to 1 if you need offix support)
1606 [ LDFLAGS=$KEEPLDFLAGS
1607 CPPFLAGS=$KEEPCPPFLAGS
1614 AC_ARG_ENABLE(network,
1615 [ --enable-network Enable network support (default is no)],
1616 [ if test "$enableval" = "yes"; then
1617 AC_DEFINE(SUPPORT_SOCKET,1,Define to 1 if you need network support)
1619 AM_CONDITIONAL(ENABLE_NETWORK, test "x$enable_network" = "xyes")
1621 dnl Sound Spectrogram Viewer
1622 AC_ARG_ENABLE(spectrogram,
1623 [ --enable-spectrogram Enable Sound Spectrogram Viewer (default is no)],
1624 [ if test "$enableval" = "yes"; then
1625 if test "x$with_x" != xyes; then
1626 AC_MSG_ERROR(spectrogram: --with-x option must be specified)
1628 AC_DEFINE(SUPPORT_SOUNDSPEC,1,Define to 1 if you need spectrogram vewer.)
1630 AM_CONDITIONAL(ENABLE_SOUND_SPEC, test "x$enable_spectrogram" = "xyes")
1632 dnl Wave Spline Interpolations
1633 AC_ARG_ENABLE(spline,
1634 [ --enable-spline=[method] Specify spline method.
1635 one of no,linear,cubic,lagrange,newton,gauss
1636 (default is linear)],
1637 [ case "x$enableval" in
1639 AC_DEFINE(LINEAR_INTERPOLATION,1,Define to 1 if you use linear interpolation.)
1642 AC_DEFINE(CSPLINE_INTERPOLATION,1,Define to 1 if you use cubic-spline interpolation.)
1645 AC_DEFINE(LAGRANGE_INTERPOLATION,1,Define to 1 if you use Lagrange-polynomial interpolation.)
1648 AC_DEFINE(NEWTON_INTERPOLATION,1,Define to 1 if you use Newton-polynomial interpolation.)
1651 AC_DEFINE(GAUSS_INTERPOLATION,1,Define to 1 if you use Gauss interpolation.)
1654 AC_DEFINE(NO_INTERPOLATION,1,Define to 1 if you do not use complemention.)
1657 AC_MSG_ERROR(Invalid method of --enable-spline)
1663 [ --enable-wrd Enable WRD interface for X (default is no)],
1664 [ if test "$enableval" = "yes"; then
1665 if test "x$with_x" != xyes; then
1666 AC_MSG_ERROR(wrd: --with-x option must be specified)
1668 AC_DEFINE(WRDT_X,1,Define to 1 if you need wrd support for X.)
1669 enable_sherry_wrd=yes
1670 AC_CHECK_LIB(z,zlibVersion,:,enable_sherry_wrd=no)
1671 AC_CHECK_HEADER(png.h,,enable_sherry_wrd=no)
1672 AC_CHECK_LIB(png,png_init_io,:,enable_sherry_wrd=no,-lz)
1673 if test "$enable_sherry_wrd" = yes; then
1674 AC_DEFINE(ENABLE_SHERRY,1,Define to 1 if you enable Sherry WRD)
1678 AC_MSG_WARN([Sherry WRD is disabled: png.h, libpng.a, libz.a are required])
1680 if test "x$have_xext" = xyes; then
1685 dnl end of interfaces
1692 AM_CONDITIONAL(ENABLE_WRD, test "x$enable_wrd" = "xyes")
1694 AM_CONDITIONAL(CYGNUS, test "x$CYGNUS" = xyes)
1695 AM_CONDITIONAL(MINGW, test "x$MINGW" = xyes)
1696 AM_CONDITIONAL(W32READDIR, test "x$W32READDIR" = "xyes")
1698 SET_UNIQ_WORDS(LDFLAGS,$LDFLAGS)
1699 SET_UNIQ_WORDS(SHLDFLAGS,$SHLDFLAGS)
1700 SET_UNIQ_WORDS(CFLAGS,$EXTRACFLAGS $CFLAGS)
1701 SET_UNIQ_WORDS(CPPFLAGS,$CPPFLAGS $EXTRADEFS)
1703 if test "x$oss_device" != x; then
1704 AC_DEFINE_UNQUOTED(OSS_DEVICE,"$oss_device", oss device name)
1707 if test "x$TIMIDITY_OUTPUT_ID" != x; then
1708 AC_DEFINE_UNQUOTED(TIMIDITY_OUTPUT_ID,"$TIMIDITY_OUTPUT_ID", the output specification)
1711 if test "x$with_x" = xyes; then
1712 dnl Order of X-library is: -lXm -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11
1713 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/"`
1715 LIBS="$LIBS $lib_dl_opt $lib_png_opt $lib_zip_opt $lib_user32_opt $lib_w32gui_opt $EXTRALIBS"
1716 SHLD="$SHLD $SHLDFLAGS"
1719 AC_SUBST(timidity_LDFLAGS)
1726 AC_SUBST(dynamic_targets)
1731 AC_SUBST(program_transform_name)
1732 AC_SUBST(INTERFACE_SRCS)
1733 AC_SUBST(pkgdatadir)
1743 doc/ja_JP.ujis/Makefile
1745 interface/motif_bitmaps/Makefile
1746 interface/bitmaps/Makefile
1747 interface/pixmaps/Makefile