1 dnl Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
2 dnl Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 2 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; if not, write to the Free Software
16 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 dnl configure.in created from configure.scan
19 dnl by URABE, Shyouhei <root@mput.dip.jp> on 2002.07.06
22 dnl CFLAGS - Flags for compile.
23 dnl CPPFLAGS - Flags for cpp
24 dnl LDFLAGS - Flags for linker
25 dnl ac_cpp: $CPP $CPPFLAGS
26 dnl ac_compile: ${CC-cc} -c $CFLAGS $CPPFLAGS
27 dnl ac_link: ${CC-cc} -o * $CFLAGS $CPPFLAGS $LDFLAGS *.c $LIBS
28 dnl EXTRACFLAGS - Extra flags to compile. Adds to CFLAGS.
29 dnl EXTRADEFS - Extra define macros. Adds to CPPFLAGS.
30 dnl EXTRALIBS - Extra libraries Adds to LIBS.
31 dnl SYSEXTRAS - Additional source codes to compile.
32 dnl lib_*_opt - Optional libraries. Adds to LIBS.
34 dnl - add to -L LDFLAGS
36 dnl - add to -I CPPFLAGS
37 dnl MSYS - `yes' if cygnus or Mingw windows environment.
40 dnl tcltk_dep - make dependencies for tcl/tk interface
42 dnl so - File extension of shared object library.
43 dnl SHLD - Linker to make shared object library.
44 dnl SHLDFLAGS - Link flags to link shared object library.
45 dnl SHCFLAGS - Additional flags to compile shared object library.
48 # This is a autoscan-generated configure.scan.
51 # "AC_INIT(timidity/timidity.c)" is obsolate yet.
52 AC_INIT([TiMidity++],[2.15.0],[timidity-talk@lists.sourceforge.net],[TiMidity++])
53 AC_CONFIG_AUX_DIR([autoconf])
55 AM_INIT_AUTOMAKE([gnu dist-bzip2])
56 AC_CONFIG_SRCDIR([timidity/timidity.c])
57 AC_CONFIG_HEADERS([config.h interface.h])
60 SHELL=${CONFIG_SHELL-"/bin/sh"}
61 TCLSH=${TCLSH-"tclsh"}
63 dnl to use contains() macro (see autoconf/acinclude.m4)
66 # Check for compiler options -- such as debug flags.
68 dnl "--enable-debug" turnes -g on.
69 AC_MSG_CHECKING(if --enable-debug option specified)
71 AS_HELP_STRING([--enable-debug], [Build a debugging version.]),
72 [timidity_cv_debug="yes"], [timidity_cv_debug="no"])
73 if test "x$timidity_cv_debug" = xyes; then
74 AC_DEFINE(DEBUG,1,Define to 1 if you are in debug mode)
77 if test "x$timidity_cv_debug" = "xno"; then
78 AC_DEFINE(NDEBUG,1,Define to 1 if you are NOT in debug mode)
80 AC_MSG_RESULT($timidity_cv_debug)
82 if test "x$CFLAGS" = "x"; then
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 AS_HELP_STRING([--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 AS_HELP_STRING([--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 AS_HELP_STRING([--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 AS_HELP_STRING([--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)
157 AC_ARG_WITH(xaw-resource-prefix,
158 AS_HELP_STRING([--with-xaw-resource-prefix=DIR], [What prefix to install X resource files to (optional, used by Xaw/Motif interfaces)]),
159 [xawresdir=$withval], [])
160 AM_CONDITIONAL(XAW_INSTALL_RESOURCE_FILES, test "x$xawresdir" != "x")
163 # Checks for programs.
166 AC_PROG_GCC_TRADITIONAL
171 AC_CHECK_PROG([WINDRES], [${ac_tool_prefix}windres], [${ac_tool_prefix}windres])
172 CHECK_COMPILER_OPTION(rdynamic)
174 if test "x$NOCFLAGS" = xyes; then
175 if test "x$GCC" = xyes; then
182 # Checks for target dependencies
185 AS_HELP_STRING([--with-elf], [create ELF shared object instead of AOUT]),
186 [ ELFFORMAT=$withval ], [ ELFFORMAT="yes" ])
189 # AS_HELP_STRING([--with-simd], [create SIMD friendly binary (default is no) ]),
190 # [ SIMD=$withval ], [ SIMD="no" ])
195 test -n "$SHLD" || SHLD="ld -b"
199 dnl IRIX cc needs -signed option
200 case ".$CC" in .cc*) EXTRACFLAGS="-signed";; esac
201 test -n "$SHLD" || SHLD="cc -shared -all"
205 test -n "$SHLD" || SHLD="$CC -shared -nostartfiles"
210 dnl EXTRALIBS="$EXTRALIBS -lxpg4"
211 test -n "$SHLD" || SHLD="ld -Bshareable"
215 if test "$ELFFORMAT" = yes; then
216 test -n "$SHLD" || SHLD="ld -Bshareable"
219 SHLDFLAGS="-L/usr/X11R6/lib/aout $SHLDFLAGS"
220 test -n "$SHLD" || SHLD="env OBJFORMAT=aout ld -shared"
222 dnl EXTRALIBS="$EXTRALIBS -lxpg4"
227 # EXTRALIBS="$EXTRALIBS -lxpg4"
228 # test -n "$SHLD" || SHLD="ld -Bshareable"
232 *-*-cygwin*|*-*-mingw*)
233 EXTRADEFS="-D__W32__"
234 EXTRAINCS="$EXTRAINCS -I\${top_srcdir}"
235 EXTRAINCS="$EXTRAINCS -I\${top_srcdir}/speex"
236 EXTRAINCS="$EXTRAINCS -I\${top_srcdir}/rcpcv"
237 EXTRAINCS="$EXTRAINCS -I\${top_srcdir}/portaudio/pa_common"
238 EXTRAINCS="$EXTRAINCS -I\${top_srcdir}/portmidi/pm_common"
239 EXTRAINCS="$EXTRAINCS -I\${top_srcdir}/portmidi/porttime"
240 CPPFLAGS="$CPPFLAGS -I. -I../cygwin/"
244 # test -n "$SHLD" || SHLD="tlink32 -Tpd"
245 test -n "$SHLD" || SHLD="BCC32 -WD"
247 BORLANDC_LDFLAGS="kernel32.lib winspool.lib comdlg32.lib advapi32.lib oleaut32.lib uuid.lib odbc32.lib ws2_32.lib user32.lib shell32.lib cw32mt.lib"
248 BORLANDC_START='C0X32.OBJ'
249 CFLAGS="$CFLAGS -tWM -VM"
250 EXTRADEFS="$EXTRADEFS -D_WINDOWS -DWIN32"
253 test -n "$SHLD" || SHLD="polink -DLL"
256 *" -MT "*) NODEF="-nodefaultlib:pocrt.lib -nodefaultlib:crt.lib -defaultlib:crtmt.lib" ;;
257 *" -MD "*) NODEF="-nodefaultlib:crtmt.lib -nodefaultlib:crt.lib -defaultlib:pocrt.lib" ;;
258 *) CFLAGS="$CFLAGS -MT"; NODEF="-nodefaultlib:pocrt.lib -nodefaultlib:crtmt.lib -defaultlib:crt.lib" ;;
260 POCC_LDFLAGS="$NODEF winmm.lib ws2_32.lib user32.lib kernel32.lib shell32.lib gdi32.lib comctl32.lib comdlg32.lib ole32.lib advapi32.lib oldnames.lib"
261 CFLAGS="$CFLAGS -Ze -D__POCC__OLDNAMES"
262 EXTRADEFS="$EXTRADEFS -D_WINDOWS -DWIN32"
265 test -n "$SHLD" || SHLD="dmc -WD"
267 DMC_LDFLAGS="winmm.lib ws2_32.lib user32.lib kernel32.lib shell32.lib gdi32.lib comctl32.lib comdlg32.lib ole32.lib advapi32.lib"
268 CFLAGS="$CFLAGS -mn -j0"
270 EXTRADEFS="$EXTRADEFS -D_WINDOWS -DWIN32"
272 "xwcc386_w.sh "*|xwcc386)
274 CFLAGS="$CFLAGS -br -bm -5s -zk0 -zp=16 -w=4 -D_WINDOWS -DWIN32 -DINCLUDE_WINDOWS_H"
277 EXTRALIBS="$EXTRALIBS kernel32.lib winspool.lib comdlg32.lib advapi32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib user32.lib shell32.lib"
280 test -n "$SHLD" || SHLD="link -dll"
283 *" -MT "*) NODEF="-nodefaultlib:msvcrt.lib -nodefaultlib:msvcrtd.lib -nodefaultlib:libcmtd.lib -nodefaultlib:libc.lib -nodefaultlib:libcd.lib" ;;
284 *" -MD "*) NODEF="-nodefaultlib:libcmt.lib -nodefaultlib:libcmtd.lib -nodefaultlib:msvcrtd.lib -nodefaultlib:libc.lib -nodefaultlib:libcd.lib" ;;
285 *" -MTd "*) NODEF="-nodefaultlib:msvcrt.lib -nodefaultlib:msvcrtd.lib -nodefaultlib:libcmt.lib -nodefaultlib:libc.lib -nodefaultlib:libcd.lib" ;;
286 *" -MDd "*) NODEF="-nodefaultlib:libcmt.lib -nodefaultlib:libcmtd.lib -nodefaultlib:msvcrt.lib -nodefaultlib:libc.lib -nodefaultlib:libcd.lib" ;;
287 *) CFLAGS="$CFLAGS -MT"; NODEF="-nodefaultlib:msvcrt.lib -nodefaultlib:msvcrtd.lib -nodefaultlib:libcmtd.lib -nodefaultlib:libc.lib -nodefaultlib:libcd.lib" ;;
289 VCPP_LDFLAGS="-nologo -incremental:no $NODEF kernel32.lib winspool.lib comdlg32.lib advapi32.lib oleaut32.lib uuid.lib ws2_32.lib user32.lib shell32.lib"
290 CFLAGS="$CFLAGS -nologo -Zp16 -W3 -GX -Ob2"
291 EXTRADEFS="$EXTRADEFS -DNDEBUG -D_WINDOWS -DWIN32 -DMBCS -D_MT -YX -FD -c"
293 x*gcc*) test -n "$SHLD" || SHLD="gcc -mdll"; MINGWGCC=yes ;;
294 *) test -n "$SHLD" || SHLD="unknown" ;;
298 lib_user32_test=-luser32
302 test -n "$SHLD" || SHLD="ld -Bdynamic -G"
306 EXTRADEFS="-DSOLARIS"
307 test -n "$SHLD" || SHLD="/usr/ccs/bin/ld -G"
311 test -n "$SHLD" || SHLD="/usr/ccs/bin/ld -G"
315 if test "x$SIMD" = xyes; then
316 AC_DEFINE(USE_ALTIVEC,1,Define to 1 if you use altivec)
317 # EXTRACFLAGS="$EXTRACFLAGS -faltivec -mabi=altivec -maltivec" # for GCC3.
318 EXTRACFLAGS="$EXTRACFLAGS -faltivec"
320 AC_DEFINE(USE_ALTIVEC,0,Define to 1 if you use altivec)
322 CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
323 LDOPTS="-dynamic -undefined suppress -flat_namespace $LDOPTS"
324 test -n "$SHLD" || SHLD="$CC -dynamic -bundle -undefined suppress -flat_namespace $LDFLAGS"
329 if test "x$GCC" = xyes; then
332 SHLD="ld -Bdynamic -G"
339 dnl AC_EXEEX # obsolate
341 # Checks for libraries.
343 AC_CHECK_LIB(socket,socket)
344 AC_CHECK_LIB(dl,dlopen,lib_dl_opt=-ldl)
345 AC_CHECK_LIB(objc,NSLinkModule,lib_dl_opt=-lobjc) # Mac OS X need this.
346 if test "x$VCPP" != xyes && test "x$BORLANDC" != xyes && test "x$WATCOM_C" != xyes && test "x$POCC" != xyes; then
347 AC_CHECK_LIB(xpg4,setlocale) # Mac OS X (and maybe NetBSD) need this.
349 AC_CHECK_FUNCS(gethostbyname,,[ AC_CHECK_LIB(nsl,gethostbyname) ])
352 dnl Xft for trace window
354 AS_HELP_STRING([--enable-xft], [Enable use of Xft in X trace mode]))
357 [ --with-xawlib=lib Try to link to these xaw widget libraries by the
358 order specified by the comma separated value list:
363 default is --with-xawlib=xaw3d,xaw],
364 [ with_xawlib="$withval" ], [ with_xawlib="xaw3d,xaw" ])
367 if test "x$with_x" = xyes; then
368 if test "x$have_x" = "xno"; then
369 if test "x$x_config_flag" = xyes; then
370 AC_MSG_ERROR(Could not configure X)
372 AC_MSG_WARN(Could not configure X)
376 if test "x$with_x" = xyes -a "x$have_x" = xyes; then
377 if test "x$x_libraries" != "x"; then
378 ldflags_x_opt="-L$x_libraries"
379 LDFLAGS="$LDFLAGS $ldflags_x_opt"
380 SHLDFLAGS="$SHLDFLAGS $ldflags_x_opt"
384 if test "x$x_includes" != "x"; then
385 CPPFLAGS="$CPPFLAGS -I$x_includes"
388 AC_CHECK_LIB(X11,XOpenDisplay,
389 AC_DEFINE(HAVE_LIBX11,1,Define to 1 if you have the `X11' library (-lX11).))
390 AC_MSG_CHECKING(X11 version 6)
391 AC_CACHE_VAL(timidity_cv_x11_version_6,
392 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[
393 #if XlibSpecificationRelease < 6
396 ]])],[timidity_cv_x11_version_6=yes],[timidity_cv_x11_version_6=no]))
397 if test "$timidity_cv_x11_version_6" = "yes"; then
398 AC_MSG_RESULT(6 or newer)
399 dnl AC_DEFINE(HAVE_X11R6)
401 AC_MSG_RESULT(before 6)
404 dnl checking order required
406 AC_CHECK_LIB(Xext,XShapeCombineMask,have_xext=yes; LIBS="-lXext $LIBS",have_xext=no)
407 AC_CHECK_LIB(ICE,IceConnectionNumber)
408 AC_CHECK_LIB(SM,SmcOpenConnection,have_xprelibs=yes; LIBS="-lSM $LIBS",have_xprelibs=no)
409 AC_CHECK_LIB(Xt,XtVaAppInitialize,have_xt=yes; LIBS="-lXt $LIBS",have_xt=no)
410 AC_CHECK_LIB(Xmu,XmuInternAtom,LIBS="-lXmu $LIBS")
411 AC_CHECK_FUNCS(XmuRegisterExternalAgent)
412 if test "x$enable_xft" = xyes; then
413 AC_CHECK_LIB(Xft,XftInit,
414 AC_DEFINE(HAVE_LIBXFT,1,Define to 1 if you have the 'Xft' library.),
417 for i in `echo $with_xawlib | sed 's/,/ /g'`; do
420 AC_CHECK_LIB(Xaw,XawInitializeWidgetSet,have_xaw=yes,have_xaw=no)
423 AC_CHECK_LIB(Xaw3d,XawInitializeWidgetSet,
425 AC_CHECK_HEADER(X11/Xaw3d/Tip.h,
426 AC_DEFINE(HAVE_XAW3D_TIP,1,Define to 1 if you have the <X11/Xaw3d/Tip.h> header file.),
433 AC_CHECK_LIB(neXtaw,XawInitializeWidgetSet,have_xaw=next,have_xaw=no)
436 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData)
437 AC_CHECK_LIB(XawPlus,XawInitializeWidgetSet,have_xaw=plus,have_xaw=no)
443 if test "x$have_xaw" != "xno"; then break; fi
445 AC_CHECK_LIB(Xm,XmCreateForm,have_xm=yes,have_xm=no)
446 AC_CHECK_FUNCS(XShmCreatePixmap)
449 dnl End of X configure
451 # Checks for header files.
455 if test "x$WATCOM_C" != xyes ; then
501 if test "x$DMC" != xyes ; then
508 [X11/extensions/XShm.h X11/Xmu/ExtAgent.h],[],[],[
509 #ifdef HAVE_X11_XLIB_H
510 #include <X11/Xlib.h>
513 AC_CHECK_HEADER(string.h,, [ AC_DEFINE(NO_STRING_H,1,Define to 1 if you do not have <string.h>.)])
515 # Checks for typedefs, structures, and compiler characteristics.
516 if test "x$WATCOM_C" != xyes ; then
526 if test "x$DMC" != xyes ; then
529 if test "x$POCC" != xyes ; then
534 # Older versions of MinGW do not define ssize_t in sys/types
535 AC_MSG_CHECKING([for ssize_t])
536 AC_CACHE_VAL(ac_cv_type_$1,
537 [AC_EGREP_CPP([ssize_t@<:@^a-zA-Z_0-9@:>@],
538 [#include <sys/types.h>
542 #endif], [ac_cv_type_ssize_t=yes], [ac_cv_type_ssize_t=no])])
544 AC_MSG_RESULT([$ac_cv_type_ssize_t])
545 if test $ac_cv_type_ssize_t = yes; then
546 AC_DEFINE(HAVE_SSIZE_T, 1,
547 [Define to 1 if the system has the type `ssize_t'.])
550 dnl keyword "volatile" check
551 AC_CACHE_CHECK(volatile declaration,timidity_cv_type_volatile,
552 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[volatile int x]])],[timidity_cv_type_volatile=yes],[timidity_cv_type_volatile=no]))
553 if test $timidity_cv_type_volatile = no; then
554 AC_DEFINE(NO_VOLATILE,1,Define to 1 if you cannot use volatile keyword)
557 dnl union usenum check
558 AC_CACHE_CHECK(union semun declaration,timidity_cv_type_union_semun,
559 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
560 #include <sys/types.h>
563 ]], [[union semun x]])],[timidity_cv_type_union_semun=yes],[timidity_cv_type_union_semun=no]))
564 if test $timidity_cv_type_union_semun = yes; then
565 AC_DEFINE(HAVE_UNION_SEMUN,1,Define to 1 if you use semun keyword)
568 dnl Cygnus and Mingw memory struct optiontest
569 if test "x$MSYS" = xyes ; then
573 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
574 if test -z "$ac_cv_prog_CC"; then
577 our_gcc="$ac_cv_prog_CC"
579 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
581 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
582 msnative_struct='-fnative-struct'
586 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
587 msnative_struct='-mms-bitfields'
591 if test x"$msnative_struct" = "x"; then
592 AC_MSG_RESULT([no way])
593 AC_MSG_WARN([produced binary will be incompatible with windows' GUI ])
595 CFLAGS="$CFLAGS $msnative_struct"
596 CPPFLAGS="$CPPFLAGS $msnative_struct"
597 AC_MSG_RESULT([${msnative_struct}])
604 dnl Cygnus Mingw32 mmsystem check
605 if test "x$MSYS" = xyes ; then
606 AC_CACHE_CHECK(Cygwin new mmsystem,timidity_cv_header_new_mmsystem,
607 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
609 #include <mmsystem.h>
610 ]], [[return WOM_OPEN != 0x3BB]])],[timidity_cv_header_new_mmsystem=yes],[timidity_cv_header_new_mmsystem=no]))
611 if test $timidity_cv_header_new_mmsystem = yes; then
612 AC_DEFINE(HAVE_NEW_MMSYSTEM,1,Define to 1 if you have <mmsystem.h> file)
616 # Checks for library functions.
617 AC_FUNC_ERROR_AT_LINE
618 if test "x$DMC" != xyes ; then
622 if test "x$DMC" != xyes ; then
625 AC_FUNC_SETVBUF_REVERSED
627 if test "x$VCPP" != xyes && test "x$BORLANDC" != xyes && test "x$WATCOM_C" != xyes && test "x$POCC" != xyes; then
630 AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(HAVE_PTHREAD_CREATE,1,[Define to 1 if you have the `pthread_create' function.])])
670 if test "x$VCPP" = xyes; then
671 AC_DEFINE(RETSIGTYPE,int)
672 AC_DEFINE(HAVE_GETCWD,1)
674 if test "x$POCC" = xyes; then
675 AC_DEFINE(HAVE_GETCWD,1)
676 AC_DEFINE(HAVE_GETHOSTBYNAME,1)
677 AC_DEFINE(HAVE_POPEN,1)
678 AC_DEFINE(HAVE_SELECT,1)
679 AC_DEFINE(HAVE_SNPRINTF,1)
680 AC_DEFINE(HAVE_STRDUP,1)
681 AC_DEFINE(HAVE_STRERROR,1)
682 AC_DEFINE(HAVE_STRCASECMP,1)
683 AC_DEFINE(HAVE_STRSTR,1)
684 AC_DEFINE(HAVE_SOCKET,1)
685 AC_DEFINE(HAVE_VSNPRINTF,1)
686 AC_DEFINE(HAVE_GETOPT,1)
687 AC_DEFINE(TIMID_VERSION,[$(PACKAGE_VERSION)],[for windows gui])
689 if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes || test "x$WATCOM_C" = xyes; then
690 AC_DEFINE(HAVE_GETHOSTBYNAME,1)
691 AC_DEFINE(HAVE_POPEN,1)
692 AC_DEFINE(popen,_popen,[for VC])
693 AC_DEFINE(pclose,_pclose,[for VC])
694 AC_DEFINE(HAVE_SELECT,1)
695 AC_DEFINE(HAVE_SNPRINTF,1)
696 AC_DEFINE(HAVE_STRDUP,1)
697 AC_DEFINE(HAVE_STRERROR,1)
698 AC_DEFINE(HAVE_STRNCASECMP,1)
699 AC_DEFINE(HAVE_STRSTR,1)
700 AC_DEFINE(snprintf,_snprintf,[for VC])
701 AC_DEFINE(HAVE_SOCKET,1)
702 AC_DEFINE(HAVE_VSNPRINTF,1)
703 dnl AC_DEFINE(vsnprintf,_vsnprintf,[for VC])
704 AC_DEFINE(TIMID_VERSION,[$(PACKAGE_VERSION)],[for windows gui])
707 AC_CHECK_FUNC(getopt_long,
708 AC_DEFINE([HAVE_GETOPT_LONG],1,[Define to 1 if you have `getopt_long' function])
709 tm_cv_needgetopt="no",
710 tm_cv_needgetopt="yes")
711 AM_CONDITIONAL([NEEDGETOPT], test "x$tm_cv_needgetopt" = xyes)
713 AC_CHECK_FUNC(open_memstream, [
714 AC_DEFINE([HAVE_OPEN_MEMSTREAM],1,[Define to 1 if you have `open_memstream' function])
718 dnl *** va_copy checks (from GLIB)
721 AC_CACHE_CHECK([for an implementation of va_copy()],lib_cv_va_copy,[
722 AC_RUN_IFELSE([AC_LANG_SOURCE([[
724 void f (int i, ...) {
725 va_list args1, args2;
727 va_copy (args2, args1);
728 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
730 va_end (args1); va_end (args2);
736 [lib_cv_va_copy=yes],
741 AC_CACHE_CHECK([for an implementation of __va_copy()],lib_cv___va_copy,[
742 AC_RUN_IFELSE([AC_LANG_SOURCE([[
744 void f (int i, ...) {
745 va_list args1, args2;
747 __va_copy (args2, args1);
748 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
750 va_end (args1); va_end (args2);
756 [lib_cv___va_copy=yes],
757 [lib_cv___va_copy=no],
758 [lib_cv___va_copy=no])
761 if test "x$lib_cv_va_copy" = xyes; then
763 else if test "x$lib_cv___va_copy" = xyes; then
764 va_copy_func=__va_copy
768 if test -n "$va_copy_func"; then
769 AC_DEFINE_UNQUOTED(VA_COPY,$va_copy_func,[A 'va_copy' style function])
772 AC_CACHE_CHECK([whether va_lists can be copied by value],lib_cv_va_val_copy,[
773 AC_RUN_IFELSE([AC_LANG_SOURCE([[
775 void f (int i, ...) {
776 va_list args1, args2;
779 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
781 va_end (args1); va_end (args2);
787 [lib_cv_va_val_copy=yes],
788 [lib_cv_va_val_copy=no],
789 [lib_cv_va_val_copy=no])
792 if test "x$lib_cv_va_val_copy" = "xno"; then
793 AC_DEFINE(VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
796 # Checks on cygnus and MSYS
797 if test "x$MSYS" = xyes ; then
798 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
800 AC_CHECK_FUNC(opendir,,
801 [ EXTRADEFS="$EXTRADEFS -D__W32READDIR__"
804 *)EXTRADEFS="$EXTRADEFS -D__W32READDIR__"
808 if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes || test "x$WATCOM_C" = xyes || test "x$DMC" = xyes || test "x$POCC" = xyes; then
809 EXTRALIBS="$EXTRALIBS ws2_32.lib"
810 EXTRADEFS="$EXTRADEFS -DWINSOCK"
812 AC_CHECK_FUNC(socket,,
813 WAPI_CHECK_LIB(ws2_32,WSAStartup,
814 [#include <winsock.h>],
816 [ EXTRALIBS="$EXTRALIBS -lws2_32"
817 EXTRADEFS="$EXTRADEFS -DWINSOCK" ]
823 # Checks on extra paths
826 AC_ARG_WITH(tcl-includes,
827 AS_HELP_STRING([--with-tcl-includes=DIR], [Tcl include file path]),
828 [ if test ! -d $withval; then
829 AC_MSG_WARN($withval is not found.)
831 tcl_include_dir="-I$withval"
833 AC_ARG_WITH(tcl-libs,
834 AS_HELP_STRING([--with-tcl-libs=DIR], [Tcl library file path]),
835 [ if test ! -d $withval; then
836 AC_MSG_WARN($withval is not found.)
838 tcl_libdir="-L$withval" ])
839 AC_ARG_WITH(tk-includes,
840 AS_HELP_STRING([--with-tk-includes=DIR], [Tk include file path]),
841 [ if test ! -d $withval; then
842 AC_MSG_WARN($withval is not found.)
844 tk_includes="-I$withval" ])
846 AS_HELP_STRING([--with-tk-libs=DIR], [Tk library file path]),
847 [ if test ! -d $withval; then
848 AC_MSG_WARN($withval is not found.)
850 tk_libdir="-L$withval" ])
853 AC_ARG_WITH(offix-includes,
854 AS_HELP_STRING([--with-offix-includes=DIR], [Offix include file path]),
855 [ if test ! -d $withval; then
856 AC_MSG_WARN($withval is not found.)
858 offix_include_dir="-I$withval" ])
859 AC_ARG_WITH(offix-libs,
860 AS_HELP_STRING([--with-offix-libs=DIR], [Offix include file path]),
861 [ if test ! -d $withval; then
862 AC_MSG_WARN($withval is not found.)
864 offix_lib_dir="-L$withval" ])
870 dnl default(d): auto selection
871 dnl oss(d): OSS /dev/dsp
872 dnl alsa(d): ALSA pcm device
873 dnl sun(d): SunOS /dev/audio
874 dnl hpux(d): HPUX /dev/audio
875 dnl irix(d): IRIX audio
876 dnl mme(d): OSF/1 MME
877 dnl sb_dsp(d): BSD/OS 2.0 /dev/sb_dsp
878 dnl w32(d): Windows MMS
879 dnl darwin(d): Mac OS X pcm device
880 dnl alsa(s): ALSA pcm device
881 dnl alib(A): HPUX network audio (Alib)
882 dnl nas(n): Network Audio System
885 dnl portaudio(p) PortAudio
886 dnl npipe(N) Windows named pipe;
887 dnl vorbis(v): Ogg Vorbis
888 dnl flac(F): FLAC / OggFLAC
889 dnl opus(U): Ogg Opus
890 dnl speex(S): Ogg Speex
891 dnl gogo(g): MP3 GOGO
896 audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts esd vorbis flac opus lame gogo portaudio npipe jack ao'
898 AC_ARG_WITH(nas-library,
899 AS_HELP_STRING([--with-nas-library=library], [NAS absolute library path(Don't use -laudio)]))
900 AC_ARG_WITH(nas-includes,
901 AS_HELP_STRING([--with-nas-includes=DIR], [NAS include files are in dir]))
905 [ --enable-audio[=mode_list] Enable audio (Specify comma separated mode list):
906 default: Automatically select audio device.
908 sun: SunOS /dev/audio
909 hpux: HPUX /dev/audio
910 irix: IRIX audio library
912 sb_dsp: BSD/OS 2.0 /dev/sb_dsp
914 darwin: Darwin CoreAudio
915 alsa: ALSA pcm device
916 alib: HPUX network audio (Alib)
917 nas: NAS - Network Audio System
919 esd: EsounD - Enlightened Sound Daemon
921 npipe: Named Pipe(windows)
928 gogo: MP3 GOGO (Only Windows is supported)
929 lame: LAME (Only Windows is supported)
931 [ enable_audio=$enableval
932 have_audio_opt=yes ],
937 test "x$enable_audio" = xyes && enable_audio=default
939 if test "x$enable_audio" != "xno"; then
940 for i in `echo $enable_audio | sed 's/,/ /g'`; do
941 eval "au_enable_$i=yes"
945 dnl Turn on default output mode
947 AC_ARG_WITH(default-output,
948 AS_HELP_STRING([--with-default-output=<mode>],
949 [Specify default output mode (optional):
950 (default|alsa|alib|arts|nas|
951 esd|wav|au|aiff|list|vorbis|flac|opus|speex|
952 lame|gogo|portaudio|npipe|jack|ao)]),
953 [ if test "$enable_audio" != no; then
954 DEFAULT_PLAYMODE=$withval
955 eval "au_enable_$DEFAULT_PLAYMODE=yes"
957 AC_MSG_WARN([--with-default-output=$withval: audio is not enabled])
960 dnl compatibility matters.
961 dnl AC_ARG_ENABLE(esd,
962 dnl [ --enable-esd EsounD (Obsoleted. Use --enable-audio=esd)],
963 dnl [ au_enable_esd=$enableval ])
964 dnl AC_ARG_ENABLE(nas,
965 dnl [ --enable-nas NAS (Obsoleted. Use --enable-audio=nas)],
966 dnl [ au_enable_nas=$enableval ])
967 dnl AC_ARG_ENABLE(alsa,
968 dnl [ --enable-alsa ALSA (Obsoleted. Use --enable-audio=alsa)],
969 dnl [ au_enable_alsa=$enableval ])
971 dnl target-specific defaults
972 if test "x$au_enable_default" = xyes; then
976 if test "x$DEFAULT_PLAYMODE" = "x"; then
977 DEFAULT_PLAYMODE="alsa"
986 *-*-bsdi2.1|*-*-bsdi3.?|*-*-bsdi4.?)
1017 au_enable_darwin=yes
1020 AC_MSG_WARN(No --enable-audio=default audio for $target)
1026 # Each audio mode's configurations
1028 AC_MSG_CHECKING(enable_audio=oss)
1029 if test "x$au_enable_oss" = xyes; then
1030 EXTRADEFS="$EXTRADEFS -DAU_OSS"
1031 SYSEXTRAS="$SYSEXTRAS oss_a.c"
1032 if test "x$ac_cv_header_sys_soundcard_h" = xyes; then
1033 AC_MSG_RESULT(yes - <sys/soundcard.h>)
1037 dnl <linux/soundcard.h> or <machine/soundcard.h>
1041 if test "x$ac_cv_header_soundcard_h" = xyes; then
1042 AC_MSG_RESULT(yes - <soundcard.h>)
1044 AC_MSG_WARN(<sys/soundcard.h> is not found)
1049 AC_CHECK_LIB(ossaudio,open)
1051 dnl Why OpenBSD use /dev/audio instead of /dev/dsp for OSS
1054 if test ! -e "/dev/dsp"; then
1055 oss_device=/dev/audio
1064 AC_MSG_CHECKING(enable_audio=sun)
1065 if test "x$au_enable_sun" = xyes; then
1068 if test -f /usr/demo/SOUND/libaudio.a; then
1069 EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/libaudio.a"
1072 AC_MSG_RESULT(Notice: libaudio.a is not found [(ignore)])
1076 if test -f /usr/demo/SOUND/lib/libaudio.a; then
1077 EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/lib/libaudio.a"
1080 AC_MSG_RESULT(Notice: libaudio.a is not found [(ignore)])
1083 *) AC_MSG_RESULT(yes)
1086 EXTRADEFS="$EXTRADEFS -DAU_SUN"
1087 SYSEXTRAS="$SYSEXTRAS sun_a.c"
1093 AC_MSG_CHECKING(enable_audio=hpux)
1094 if test "x$au_enable_hpux" = xyes; then
1096 *-*-hpux*) AC_MSG_RESULT(yes) ;;
1097 *) AC_MSG_WARN(may not work on $target) ;;
1099 EXTRADEFS="$EXTRADEFS -DAU_HPUX_AUDIO"
1100 SYSEXTRAS="$SYSEXTRAS hpux_d_a.c"
1106 AC_MSG_CHECKING(enable_audio=irix)
1107 if test "x$au_enable_irix" = xyes; then
1109 *-sgi-irix5*|*-sgi-irix6.2)
1110 EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_OLDAL"
1114 EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_NEWAL"
1117 *) AC_MSG_WARN(may not work on $target) ;;
1119 SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_al.c"
1120 EXTRALIBS="$EXTRASLIBS -laudio"
1126 AC_MSG_CHECKING(enable_audio=mme)
1127 if test "x$au_enable_mme" = xyes; then
1129 *-dec-*) AC_MSG_RESULT(yes) ;;
1130 *) AC_MSG_WARN(may not work on $target) ;;
1132 EXTRADEFS="$EXTRADEFS -DAU_DEC -DAU_AUDRIV"
1133 SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_mme.c"
1134 CPPFLAGS="$CPPFLAGS -I/usr/opt/MME210/include"
1135 EXTRALIBS="$EXTRALIBS /usr/opt/MME220/lib/libmme.a"
1141 AC_MSG_CHECKING(enable_audio=sb_dsp)
1142 if test "x$au_enable_sb_dsp" = xyes; then
1144 *-*-bsdi2.0) AC_MSG_RESULT(yes) ;;
1145 *) AC_MSG_WARN(may not work on $target) ;;
1147 EXTRADEFS="$EXTRADEFS -DAU_BSDI -DDEFAULT_RATE=22500"
1148 SYSEXTRAS="$SYSEXTRAS bsd20_a.c"
1154 AC_MSG_CHECKING(enable_audio=w32)
1155 if test "x$au_enable_w32" = xyes; then
1164 AC_MSG_WARN(may not work on $target)
1167 SYSEXTRAS="$SYSEXTRAS w32_a.c"
1168 if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes || test "x$WATCOM_C" = xyes || test "x$DMC" = xyes || test "x$POCC" = xyes; then
1169 EXTRALIBS="$EXTRALIBS winmm.lib"
1171 EXTRALIBS="$EXTRALIBS -lwinmm"
1173 EXTRADEFS="$EXTRADEFS -DAU_W32"
1178 dnl Mac OS X / darwin-x86
1179 AC_MSG_CHECKING(enable_audio=darwin)
1180 if test "x$au_enable_darwin" = xyes; then
1181 EXTRADEFS="$EXTRADEFS -DAU_DARWIN"
1182 SYSEXTRAS="$SYSEXTRAS darwin_a.c"
1183 EXTRALIBS="$EXTRALIBS -framework CoreAudio"
1184 dnl just say yes or no :-P
1187 AC_MSG_RESULT(yes);;
1189 AC_MSG_WARN(may not work on $target)
1197 dnl alsa - Advanced Linux Sound Architecture
1198 AC_MSG_CHECKING(enable_audio=alsa)
1199 if test "x$au_enable_alsa" = xyes; then
1200 AC_MSG_RESULT([yes, configuring alsa])
1203 KEEPLDFLAGS=$LDFLAGS
1205 if test "x$alsa_found" = xyes ; then
1206 dnl AC_MSG_RESULT(yes)
1207 EXTRADEFS="$EXTRADEFS -DAU_ALSA"
1208 SYSEXTRAS="$SYSEXTRAS alsa_a.c"
1209 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ALSA_CFLAGS)
1210 LIBS="$LIBS $ALSA_LIBS"
1211 AC_CHECK_FUNCS(snd_seq_port_info_set_timestamping)
1213 AC_MSG_WARN(Couldn't configure alsa.)
1216 LDFLAGS=$KEEPLDFLAGS
1223 AC_MSG_CHECKING(enable_audio=alib)
1224 if test "x$au_enable_alib" = xyes; then
1226 *-*-hpux*) AC_MSG_RESULT(yes) ;;
1227 *) AC_MSG_WARN(may not work on $target) ;;
1229 SYSEXTRAS="$SYSEXTRAS hpux_a.c"
1230 EXTRADEFS="$EXTRADEFS -DAU_HPUX_ALIB"
1231 if test -d /opt/audio/include; then
1232 CPPFLAGS="$CPPFLAGS -I/opt/audio/include"
1234 if test -d /opt/audio/lib; then
1235 EXTRALIBS="$EXTRALIBS -L/opt/audio/lib"
1237 EXTRALIBS="$EXTRALIBS -lAlib"
1243 AC_MSG_CHECKING(enable_audio=nas)
1244 if test "x$au_enable_nas" = xyes; then
1245 if test "x$with_x" != xyes; then
1246 AC_MSG_ERROR(nas: --with-x option must be specified)
1248 EXTRADEFS="$EXTRADEFS -DAU_NAS"
1249 SYSEXTRAS="$SYSEXTRAS nas_a.c"
1251 dnl -laudio conflicts another audio library,
1252 dnl so I specify NAS library with absolete path.
1254 if test "x$with_nas_library" != "x"; then
1255 AC_MSG_RESULT($with_nas_library);
1256 EXTRALIBS="$EXTRALIBS $with_nas_library"
1259 MY_SEARCH_LIBS(AuOpenServer,
1260 [$x_libraries/libaudio.a \
1261 /usr/lib/libaudio.so \
1262 /usr/lib/libaudio.a ],
1263 [ AC_MSG_RESULT(NAS: $timidity_cv_search_AuOpenServer)
1264 EXTRALIBS="$EXTRALIBS $timidity_cv_search_AuOpenServer"],
1265 [AC_MSG_WARN(NAS library is not found.)])
1267 test "x$with_nas_includes" != "x" && CPPFLAGS="$CPPFLAGS -I$with_nas_includes"
1269 if test "x$have_xext" = xyes; then
1272 if test "x$have_xprelibs" = xyes; then
1273 lib_xprelibs_opt='-lSM -lICE'
1280 AC_MSG_CHECKING(enable_audio=arts)
1281 if test "x$au_enable_arts" = xyes; then
1282 AC_MSG_RESULT([yes, configuring aRts])
1283 dnl **** Check for aRts Sound Server ****
1284 AC_PATH_PROG(ARTSCCONFIG, artsc-config)
1285 if test x$ARTSCCONFIG != "x" -a x$ARTSCCONFIG != x'"$ARTSCCONFIG"';
1288 for i in `$ARTSCCONFIG --cflags`
1291 -I*) ARTSC_CFLAGS="$ARTSC_CFLAGS $i";;
1294 ARTSC_LIBS=`$ARTSCCONFIG --libs`
1295 save_CFLAGS="$CFLAGS"
1296 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
1297 AC_TRY_COMPILE([#include <artsc.h>],[arts_stream_t stream;],
1298 [AC_SUBST(ARTSLIBS, $ARTSC_LIBS)
1299 AC_SUBST(ARTSINCL, $ARTSC_CFLAGS)
1300 AC_DEFINE(HAVE_ARTS, 1, [Define if you have ARTS sound server])
1303 CFLAGS="$save_CFLAGS"
1306 if test "$have_arts" = "yes"; then
1307 dnl AC_MSG_RESULT(aRts: Enabled)
1308 EXTRADEFS="$EXTRADEFS -DAU_ARTS"
1309 SYSEXTRAS="$SYSEXTRAS aRts_a.c"
1310 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ARTSC_CFLAGS)
1311 LIBS="$LIBS $ARTSC_LIBS"
1313 AC_MSG_WARN(aRts: Couldn't configure)
1320 AC_MSG_CHECKING(enable_audio=esd)
1321 if test "x$au_enable_esd" = xyes; then
1322 AC_MSG_RESULT([yes, configuring esd])
1325 KEEPLDFLAGS=$LDFLAGS
1329 LDFLAGS=$KEEPLDFLAGS
1330 if test "x$no_esd" = "x"; then
1331 dnl AC_MSG_RESULT(EsounD: Enabled)
1332 EXTRADEFS="$EXTRADEFS -DAU_ESD"
1333 SYSEXTRAS="$SYSEXTRAS esd_a.c"
1334 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ESD_CFLAGS)
1335 LIBS="$LIBS $ESD_LIBS"
1337 AC_MSG_WARN(EsounD: Couldn't configure)
1344 AC_MSG_CHECKING(enable_audio=portaudio)
1345 if test "x$au_enable_portaudio" = xyes; then
1347 if test "x$MSYS" = xyes ; then
1348 SYSEXTRAS="$SYSEXTRAS portaudio_a.c w32_portaudio_dll.c"
1349 dnl EXTRALIBS="$EXTRALIBS -lportaudio"
1350 CPPFLAGS="$CPPFLAGS -I../portaudio/pa_common/"
1351 EXTRADEFS="$EXTRADEFS -DAU_PORTAUDIO -DAU_PORTAUDIO_DLL -DPORTAUDIO_V19"
1353 SYSEXTRAS="$SYSEXTRAS portaudio_a.c"
1354 EXTRALIBS="$EXTRALIBS -lportaudio"
1355 EXTRADEFS="$EXTRADEFS -DAU_PORTAUDIO"
1361 dnl npipe (windows named pipe)
1362 AC_MSG_CHECKING(enable_audio=npipe)
1363 if test "x$au_enable_npipe" = xyes; then
1365 SYSEXTRAS="$SYSEXTRAS npipe_a.c"
1366 EXTRADEFS="$EXTRADEFS -DAU_NPIPE"
1373 AC_MSG_CHECKING(enable_audio=jack)
1374 if test "x$au_enable_jack" = xyes; then
1376 SYSEXTRAS="$SYSEXTRAS jack_a.c"
1377 EXTRALIBS="$EXTRALIBS $(pkg-config --libs jack)"
1378 EXTRADEFS="$EXTRADEFS -DAU_JACK $(pkg-config --cflags jack)"
1384 AC_MSG_CHECKING(enable_audio=ao)
1385 if test "x$au_enable_ao" = xyes; then
1386 AC_MSG_RESULT([yes, configuring ao])
1388 if test "x$no_ao" = "x" ; then
1389 # AC_MSG_RESULT(yes)
1390 EXTRADEFS="$EXTRADEFS -DAU_AO"
1391 SYSEXTRAS="$SYSEXTRAS ao_a.c"
1392 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$AO_CFLAGS)
1393 LIBS="$LIBS $AO_LIBS"
1395 AC_MSG_WARN(Couldn't configure libao.)
1402 AC_MSG_CHECKING(enable_audio=vorbis)
1403 if test "x$au_enable_vorbis" = xyes; then
1404 AC_MSG_RESULT([yes, configuring vorbis])
1405 if test "x$MSYS" = xyes; then
1406 dnl AC_CHECK_HEADER(vorbis/vorbisenc.h,, [
1408 EXTRADEFS="$EXTRADEFS -DAU_VORBIS -DAU_VORBIS_DLL"
1409 SYSEXTRAS="$SYSEXTRAS vorbis_a.c w32g_vorbisenc_dll.c w32g_vorbis_dll.c w32g_ogg_dll.c"
1415 SYSEXTRAS="$SYSEXTRAS vorbis_a.c"
1416 EXTRADEFS="$EXTRADEFS -DAU_VORBIS $OGG_CFLAGS $VORBIS_CFLAGS"
1417 EXTRALIBS="$EXTRALIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
1418 if test "x$MINGWGCC" = xyes ; then
1419 EXTRADEFS="-DAU_VORBIS_DLL $EXTRADEFS"
1420 SYSEXTRAS="$SYSEXTRAS w32g_vorbisenc_dll.c w32g_vorbis_dll.c w32g_ogg_dll.c"
1423 AC_MSG_WARN([Unable to configure vorbis, but ogg is there (???)])
1426 AC_MSG_WARN(Unable to configure vorbis!)
1434 dnl libFLAC - Free Lossless Audio Codec
1435 if test "x$MSYS" = xyes ; then
1436 AC_MSG_CHECKING(enable_audio=flac)
1437 if test "x$au_enable_flac" = xyes; then
1438 AC_MSG_RESULT([yes, configuring flac])
1440 SYSEXTRAS="$SYSEXTRAS flac_a.c w32_libFLAC_dll.c w32_libOggFLAC_dll.c"
1441 EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_FLAC_DLL -DAU_OGGFLAC"
1442 dnl AC_CHECK_HEADER(FLAC/all.h, [
1443 dnl EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_FLAC_DLL"
1445 dnl AC_CHECK_HEADER(OggFLAC/all.h, [
1446 dnl EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC -DAU_OGGFLAC_DLL"
1448 dnl AM_PATH_LIBFLAC([
1449 dnl EXTRADEFS="$EXTRADEFS -DAU_FLAC -DAU_FLAC_DLL"
1450 dnl EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBFLAC_CFLAGS)
1451 dnl LIBS="$LIBS $LIBFLAC_LIBS"
1453 dnl AM_PATH_LIBOGGFLAC([
1454 dnl EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC -DAU_OGGFLAC_DLL"
1455 dnl EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBOGGFLAC_CFLAGS)
1456 dnl LIBS="$LIBS $LIBOGGFLAC_LIBS"
1462 AC_MSG_CHECKING(enable_audio=flac)
1463 if test "x$au_enable_flac" = xyes; then
1464 AC_MSG_RESULT([yes, configuring flac])
1465 SYSEXTRAS="$SYSEXTRAS flac_a.c"
1468 EXTRADEFS="$EXTRADEFS -DAU_FLAC"
1469 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBFLAC_CFLAGS)
1470 LIBS="$LIBS $LIBFLAC_LIBS"
1472 AM_PATH_LIBOGGFLAC([
1474 EXTRADEFS="$EXTRADEFS -DAU_OGGFLAC"
1475 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$LIBOGGFLAC_CFLAGS)
1476 LIBS="$LIBS $LIBOGGFLAC_LIBS"
1484 AC_MSG_CHECKING(enable_audio=opus)
1485 if test "x$au_enable_opus" = xyes; then
1486 AC_MSG_RESULT([yes, configuring opus])
1487 if test "x$MSYS" = xyes ; then
1488 AC_CHECK_HEADER(opus/opus.h,, [
1490 EXTRADEFS="-DAU_OPUS -DAU_OPUS_DLL $EXTRADEFS"
1491 SYSEXTRAS="$SYSEXTRAS w32g_opus_dll.c w32g_ogg_dll.c"
1497 SYSEXTRAS="$SYSEXTRAS opus_a.c"
1498 EXTRADEFS="$EXTRADEFS -DAU_OPUS $OGG_CFLAGS $OPUS_CFLAGS"
1499 EXTRALIBS="$EXTRALIBS $OPUS_LIBS $OGG_LIBS"
1500 if test "x$MINGWGCC" = xyes ; then
1501 EXTRADEFS="-DAU_OPUS_DLL $EXTRADEFS"
1502 SYSEXTRAS="$SYSEXTRAS w32g_opus_dll.c w32g_ogg_dll.c"
1505 AC_MSG_WARN([Unable to configure opus, but ogg is there (???)])
1508 AC_MSG_WARN(Unable to configure opus!)
1517 AC_MSG_CHECKING(enable_audio=speex)
1518 if test "x$au_enable_speex" = xyes; then
1519 AC_MSG_RESULT(yes, configuring speex)
1520 if test "x$MSYS" = xyes ; then
1522 SYSEXTRAS="$SYSEXTRAS speex_a.c"
1523 EXTRALIBS="$EXTRALIBS -lspeex"
1524 EXTRADEFS="$EXTRADEFS -DAU_SPEEX"
1526 AC_CACHE_VAL(timidity_cv_have_speex,
1528 #include <speex/speex.h>
1529 #include <ogg/ogg.h>
1534 [have_speex=yes], [have_speex=no])])
1535 AC_MSG_RESULT($have_speex)
1536 if test "x$have_speex" = xyes; then
1537 SYSEXTRAS="$SYSEXTRAS speex_a.c"
1538 EXTRALIBS="$EXTRALIBS -lspeex -logg"
1539 EXTRADEFS="$EXTRADEFS -DAU_SPEEX"
1546 dnl Win32 Gogo-no-coder
1547 AC_MSG_CHECKING(enable_audio=gogo)
1548 if test "x$au_enable_gogo" = xyes; then
1549 if test "x$MSYS" = xyes; then
1550 AC_MSG_RESULT(yes, configuring gogo)
1552 AC_MSG_WARN(May be gogo is not supported. You need hack the gogo_a.c)
1554 AC_CHECK_HEADER(gogo/gogo.h, [
1557 SYSEXTRAS="$SYSEXTRAS gogo_a.c w32_gogo.c"
1558 EXTRADEFS="$EXTRADEFS -DAU_GOGO -DAU_GOGO_DLL"
1559 dnl EXTRALIBS="$EXTRALIBS -lgogo"
1565 AC_MSG_CHECKING(enable_audio=lame)
1566 if test "x$au_enable_lame" = xyes; then
1567 if test "x$MSYS" = xyes; then
1568 AC_MSG_RESULT([yes, configuring lame])
1571 AC_MSG_WARN(May be lame is not supported. You need hack the lame_a.c)
1573 dnl AC_CHECK_HEADERS(timidity/BladeMP3EncDLL.h timidity/LameEnc.h, [
1577 dnl #if HAVE_BLADEMP3ENCDLL_H
1578 dnl # include "windows.h"
1579 dnl # include "BladeMP3EncDLL.h"
1582 SYSEXTRAS="$SYSEXTRAS lame_a.c"
1583 EXTRADEFS="$EXTRADEFS -DAU_LAME"
1584 dnl EXTRALIBS="$EXTRALIBS"
1589 dnl Pseudo audio device (Undocumented).
1590 if test "x$au_enable_none" = xyes; then
1591 EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV"
1592 SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_none.c"
1595 dnl TIMIDITY_OUTPUT_ID
1597 AC_MSG_CHECKING(default output mode)
1598 if test "x$DEFAULT_PLAYMODE" = "x"; then
1599 DEFAULT_PLAYMODE=`echo $enable_audio | sed 's/,.*//'`
1601 case ".$DEFAULT_PLAYMODE" in
1602 .default) TIMIDITY_OUTPUT_ID=d ;;
1603 .oss) TIMIDITY_OUTPUT_ID=d ;;
1604 .alsa) TIMIDITY_OUTPUT_ID=s ;;
1605 .sun) TIMIDITY_OUTPUT_ID=d ;;
1606 .hpux) TIMIDITY_OUTPUT_ID=d ;;
1607 .irix) TIMIDITY_OUTPUT_ID=d ;;
1608 .mme) TIMIDITY_OUTPUT_ID=d ;;
1609 .sb_dsp) TIMIDITY_OUTPUT_ID=d ;;
1610 .darwin) TIMIDITY_OUTPUT_ID=d ;;
1611 .w32) TIMIDITY_OUTPUT_ID=d ;;
1612 .alib) TIMIDITY_OUTPUT_ID=A ;;
1613 .nas) TIMIDITY_OUTPUT_ID=n ;;
1614 .arts) TIMIDITY_OUTPUT_ID=R ;;
1615 .esd) TIMIDITY_OUTPUT_ID=e ;;
1616 .portaudio) TIMIDITY_OUTPUT_ID=p ;;
1617 .npipe) TIMIDITY_OUTPUT_ID=N ;;
1618 .wav) TIMIDITY_OUTPUT_ID=w ;;
1619 .au) TIMIDITY_OUTPUT_ID=u ;;
1620 .aiff) TIMIDITY_OUTPUT_ID=a ;;
1621 .list) TIMIDITY_OUTPUT_ID=l ;;
1622 .vorbis) TIMIDITY_OUTPUT_ID=v ;;
1623 .flac) TIMIDITY_OUTPUT_ID=F ;;
1624 .opus) TIMIDITY_OUTPUT_ID=U ;;
1625 .speex) TIMIDITY_OUTPUT_ID=S ;;
1626 .gogo) TIMIDITY_OUTPUT_ID=g ;;
1627 .lame) TIMIDITY_OUTPUT_ID=L ;;
1628 .jack) TIMIDITY_OUTPUT_ID=j ;;
1629 .ao) TIMIDITY_OUTPUT_ID=O ;;
1630 *) TIMIDITY_OUTPUT_ID= ;;
1632 AC_MSG_RESULT($DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID)
1639 interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk alsaseq winsyn winsyng portmidisyng npsyn'
1641 AC_ARG_ENABLE(interface,
1642 AS_HELP_STRING([--enable-interface=[interface_list]], [Comma separated interface list]),
1643 [ for i in `echo $enableval | sed 's/,/ /g'`; do
1644 eval "enable_$i=yes"
1647 # Dynamic link configuration
1648 AC_ARG_ENABLE(dynamic,
1649 AS_HELP_STRING([--enable-dynamic], [Enable dynamic link interface (default is no)])
1650 AS_HELP_STRING([--enable-dynamic=dynamic_list] [Comma separated dynamic interface list]),
1651 [ dnl --enable-dynamic=yes to --enable-dynamic=dynamic
1652 if test "x$enable_dynamic" = xyes; then
1653 enable_dynamic=dynamic
1654 elif test "x$enable_dynamic" != "xno"; then
1655 for i in `echo $enableval | sed 's/,/ /g'`; do
1656 eval "enable_$i=dynamic"
1661 for i in $interface_targets; do
1662 eval "join_targets=$join_targets\$enable_$i"
1665 case ".$join_targets" in
1666 .*dynamic*) NEEDDLOPEN=yes;;
1670 dnl check -fpic option for gcc
1671 if test "x$GCC" = xyes; then SHCFLAGS="$SHCFLAGS -fPIC"; fi
1672 case "x$enable_ump" in xyes|xdynamic) EXTRACFLAGS="$EXTRACFLAGS -DXP_UNIX $SHCFLAGS";; esac
1674 dnl check -masm option for gcc
1675 dnl if test "x$GCC" = xyes; then EXTRACFLAGS="$EXTRACFLAGS -masm=intel"; fi
1677 dnl Which type of dynamic loader?
1678 if test "$NEEDDLOPEN" = "yes"; then
1681 WAPI_CHECK_FUNC(LoadLibrary,,[LoadLibrary(0);],have_dl=w32)
1682 test $wapi_cv_func_LoadLibrary = yes && have_dl=w32
1684 if test "$have_dl" = "no"; then
1685 AC_CHECK_FUNC(shl_load,have_dl=hpux)
1687 if test "$have_dl" = "no"; then
1688 dnl darwin has both dyld and libdl: in case user installed dlcompat.
1689 dnl dyld is recommended because libdl is a wrapper for dyld.
1690 AC_CHECK_FUNC(NSLinkModule,have_dl=dyld)
1692 if test "$have_dl" = "no" -a "x$ac_cv_lib_dl_dlopen" = xyes; then
1695 if test "$have_dl" = "no"; then
1696 AC_CHECK_FUNC(dlopen,have_dl=dlopen)
1698 if test "$have_dl" = "no"; then
1699 AC_CHECK_FUNC(dld_init,have_dl=dld)
1701 if test "$have_dl" = "no"; then
1702 AC_CHECK_LIB(dld,dld_init,have_dl=dld;lib_dl_opt=-ldld)
1705 AC_MSG_CHECKING(dynamic link method)
1708 AC_MSG_RESULT(use dl_dlopen.c)
1709 SYSEXTRAS="$SYSEXTRAS dl_dlopen.c"
1710 CHECK_DLSYM_UNDERSCORE(AC_DEFINE(DLSYM_NEEDS_UNDERSCORE,1,Define to 1 if you have to add "_" to every identifiers.))
1713 AC_MSG_RESULT(use dl_dld.c)
1714 SYSEXTRAS="$SYSEXTRAS dl_dld.c"
1717 AC_MSG_RESULT(use dl_hpux.c)
1718 SYSEXTRAS="$SYSEXTRAS dl_hpux.c"
1719 LDFLAGS="$LDFLAGS -Wl,-E $LDFLAGS"
1722 AC_MSG_RESULT(use dl_w32.c)
1723 SYSEXTRAS="$SYSEXTRAS dl_w32.c"
1726 AC_MSG_RESULT(use dl_dyld.c)
1727 SYSEXTRAS="$SYSEXTRAS dl_dyld.c"
1731 AC_MSG_WARN(no method to open a shared object)
1736 if test "$NEEDDLOPEN" = "yes"; then
1737 MY_DEFINE(IA_DYNAMIC)
1738 AC_DEFINE_UNQUOTED(SHARED_LIB_EXT,".$so", shared library extention)
1740 dnl EXTRADEFS="$EXTRADEFS \$(DEF_SHLIB_DIR)"
1741 if test "x$GCC" = xyes; then
1742 if test "x$timidity_cv_ccoption_rdynamic" = xyes; then
1743 timidity_LDFLAGS="-rdynamic"
1745 timidity_LDFLAGS="-Wl,--export-dynamic"
1750 AM_CONDITIONAL(NEEDDLOPEN, test "$NEEDDLOPEN" = "yes")
1754 AS_HELP_STRING([--enable-xdnd], [Enable xdnd support (default is no)]),
1755 [ if test "$enableval" = "yes"; then
1756 AC_DEFINE(XDND,1,Define to 1 if you want xdnd support.)
1761 AM_CONDITIONAL(ENABLE_XDND, test "x$enable_xdnd" = xyes)
1764 dnl Each interface section
1768 AM_CONDITIONAL(ENABLE_NCURSES, false)
1769 CONFIG_INTERFACE(ncurses,NCURSES,n,
1770 AS_HELP_STRING([--enable-ncurses], [Enable ncurses interface (default is no)]),
1771 [ AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h)
1773 dnl #include <ncurses/curses.h> is failure on Plamo Linux 1.3/ncurses 1.9.9e
1774 dnl because <ncurses/curses.h> includes <unctrl.h>:
1775 dnl /usr/include/ncurses/curses.h:34: unctrl.h: No such file or directory
1776 dnl But surely there is unctl.h at /usr/include/ncurses/unctrl.h.
1777 dnl configure must check ncurses header with -I/usr/include/ncurses option.
1779 case "$ac_cv_header_curses_h$ac_cv_header_ncurses_curses_h$ac_cv_header_ncurses_h" in
1781 *) for i in /usr/include /usr/local/include; do
1782 if test -f "$i/ncurses/curses.h" -a -f "$i/ncurses/unctrl.h"; then
1783 AC_MSG_WARN(ncurses test is failure. Please check config.h and common.makefile later)
1784 CPPFLAGS="$CPPFLAGS -I$i/ncurses"
1791 AC_CHECK_LIB(ncurses,initscr,lib_curses_opt=-lncurses,
1792 [ dnl checking pdcurses
1793 AC_CHECK_LIB(curses,PDC_set_ctrl_break,
1794 [ lib_curses_opt=-lcurses
1795 AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses)
1796 lib_user32_opt="$lib_user32_test"
1797 AC_CHECK_LIB(curses, vwprintw,
1798 AC_DEFINE(HAVE_VWPRINTW, 1,
1799 [Define to 1 if you have the `vwprintw' function.]))
1801 [ dnl checking libpdcurses
1802 AC_CHECK_LIB(pdcurses,PDC_set_ctrl_break,
1803 [ lib_curses_opt=-lpdcurses
1804 AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses)
1805 lib_user32_opt="$lib_user32_test"
1806 AC_CHECK_LIB(pdcurses, vwprintw,
1807 AC_DEFINE(HAVE_VWPRINTW, 1,
1808 [Define to 1 if you have the `vwprintw' function.]))
1810 [ dnl OpenBSD use -lcurses instead of -lncurses.
1813 AC_CHECK_LIB(curses,initscr,lib_curses_opt=-lcurses,
1814 [ AC_MSG_WARN(ncurses interface is not enabled)
1815 enable_ncurses=no ])
1818 lib_curses_opt=-lpdcurses
1819 EXTRAINCS="$EXTRAINCS -I\${top_srcdir}/pdcurses"
1820 timidity_LDFLAGS="$timidity_LDFLAGS -L\${top_srcdir}/pdcurses/win32"
1821 AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses)
1822 AC_DEFINE(HAVE_VWPRINTW, 1,
1823 [Define to 1 if you have the `vwprintw' function.])
1824 AC_MSG_RESULT([use internal pdcurses])
1827 if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes || test "x$WATCOM_C" = xyes || test "x$DMC" = xyes || test "x$POCC" = xyes; then
1828 lib_curses_opt=libpdcurses.lib
1829 AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses)
1830 AC_CHECK_LIB(pdcurses, vwprintw,
1831 AC_DEFINE(HAVE_VWPRINTW, 1,
1832 [Define to 1 if you have the `vwprintw' function.]))
1834 AC_MSG_WARN(ncurses interface is not enabled)
1844 [ LIBS="$LIBS $lib_curses_opt"
1847 EXTRALIBS="$EXTRALIBS -lmytinfo"
1850 INTERFACE_SRCS="$INTERFACE_SRCS ncurs_c.c"
1852 [ n_so_libs="$lib_curses_opt"
1855 EXTRALIBS="$EXTRALIBS -lmytinfo"
1860 AM_CONDITIONAL(ENABLE_SLANG, false)
1861 CONFIG_INTERFACE(slang,SLANG,s,
1862 AS_HELP_STRING([--enable-slang], [Enable slang interface (default is no)]),
1863 [ AC_CHECK_LIB(slang,SLang_init_tty,:,
1865 AC_MSG_WARN(slang interface is not enabled)
1867 AC_CHECK_HEADERS(slang/slang.h slang.h)
1871 AC_CHECK_LIB(termcap,initscr,
1872 [ LIBS="$LIBS -lslang -ltermcap"
1873 INTERFACE_SRCS="$INTERFACE_SRCS slang_c.c"
1875 [ AC_MSG_WARN(slang interface is not enabled)
1880 LIBS="$LIBS -lslang"
1881 INTERFACE_SRCS="$INTERFACE_SRCS slang_c.c"
1885 [ s_so_libs="-lslang"
1886 AC_CHECK_LIB(termcap,initscr,s_so_libs="$s_so_libs -ltermcap")
1890 AM_CONDITIONAL(ENABLE_MOTIF, false)
1891 CONFIG_INTERFACE(motif,MOTIF,m,
1892 AS_HELP_STRING([--enable-motif], [Enable motif interface (default is no)]),
1893 [ if test "x$with_x" != xyes; then
1894 AC_MSG_ERROR(motif: --with-x option must be specified)
1896 if test "x$have_xm" != xyes; then
1897 AC_MSG_WARN(Motif library is not found.)
1904 if test "x$have_xprelibs" = xyes; then
1905 lib_xprelibs_opt='-lSM -lICE'
1907 INTERFACE_SRCS="$INTERFACE_SRCS motif_c.c motif_i.c motif_p.c"
1909 [ if test x$have_xprelibs = xyes; then
1910 m_so_libs="-lXext -lSM -lICE"
1912 m_so_libs="$ldflags_x_opt -lXm -lXt $m_so_libs -lX11"
1916 AM_CONDITIONAL(ENABLE_TCLTK, false)
1917 CONFIG_INTERFACE(tcltk,TCLTK,k,
1918 AS_HELP_STRING([--enable-tcltk], [Enable tcltk interface (default is no)]),
1919 [ if test "x$with_x" != xyes; then
1920 AC_MSG_ERROR(tcltk: --with-x option must be specified)
1924 KEEPCPPFLAGS=$CPPFLAGS
1925 KEEPLDFLAGS=$LDFLAGS
1928 CPPFLAGS="$tcl_include_dir $tk_includes $CPPFLAGS"
1929 LDFLAGS="$tcl_libdir $tk_libdir $LDFLAGS"
1930 LIBS="$LIBS $lib_dl_opt"
1934 for l in tcl tck8.6 tcl8.5 tcl8.4 tcl84 tcl8.3 tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76; do
1935 case "x$tcl_lib" in x) AC_CHECK_LIB($l,Tcl_Init,tcl_lib=-l$l);; esac
1937 LIBS="$LIBS $tcl_lib"
1938 for l in tk tk8.6 tk8.5 tk8.4 tcl84 tk8.3 tk8.0jp tk4.2jp tk80jp tk42jp tk8.0 tk4.2 tk80 tk42; do
1939 case "x$tk_lib" in x) AC_CHECK_LIB($l,Tk_Init,tk_lib=-l$l);; esac
1943 if test "x$tcl_lib" = "x" -o "x$tk_lib" = "x"; then
1944 CPPFLAGS=$KEEPCPPFLAGS
1945 LDFLAGS=$KEEPLDFLAGS
1947 AC_MSG_WARN(tcl/tk is not enable)
1949 tcltk_dep='tclIndex'
1952 [ LIBS="$tk_lib $tcl_lib -lX11 $LIBS"
1955 EXTRALIBS="$EXTRALIBS -lipc"
1958 INTERFACE_SRCS="$INTERFACE_SRCS tk_c.c"
1960 [ k_so_libs="$tcl_libdir $tk_libdir $tcl_lib $tk_lib $lib_dl_opt"
1963 k_so_libs="$k_so_libs -lipc"
1966 k_so_libs="$k_so_libs -lX11 -lm"
1968 AM_CONDITIONAL(ENABLE_DYNAMIC_TCLTK, test "x$enable_tcltk" = "xdynamic")
1971 AM_CONDITIONAL(ENABLE_EMACS, false)
1972 CONFIG_INTERFACE(emacs,EMACS,e,
1973 AS_HELP_STRING([--enable-emacs], [Enable emacs interface (default is no)]),
1975 [ ELFILES="$ELFILES timidity.el"
1976 INTERFACE_SRCS="$INTERFACE_SRCS emacs_c.c"
1978 [ AM_CONDITIONAL(ENABLE_EMACS, true)
1979 ELFILES="$ELFILES timidity.el" ])
1982 AM_CONDITIONAL(ENABLE_VT100, false)
1983 CONFIG_INTERFACE(vt100,VT100,T,
1984 AS_HELP_STRING([--enable-vt100], [Enable VT100 interface (default is no)]),
1986 [ INTERFACE_SRCS="$INTERFACE_SRCS vt100_c.c vt100.c" ])
1989 AM_CONDITIONAL(ENABLE_XAW, false)
1990 CONFIG_INTERFACE(xaw,XAW,a,
1991 AS_HELP_STRING([--enable-xaw], [Enable athena interface (default is no)]),
1992 [ if test "x$with_x" != xyes; then
1993 AC_MSG_ERROR(xaw: --with-x option must be specified)
1995 if test "x$have_xaw" = "xno"; then
1996 AC_MSG_WARN(X Athena Widget library is not found.)
1999 [ dnl Add -lXext -lSM -lICE -lXmu -lXt {-lXaw|-lXaw3d}
2000 if test "x$have_xext" = xyes; then
2003 if test "x$have_xprelibs" = xyes; then
2004 lib_xprelibs_opt='-lSM -lICE'
2008 if test "x$enable_xft" = xyes && test "x$have_xaw" != "xno"; then
2009 XFT_CFLAGS="$(pkg-config --cflags xft)";
2010 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$XFT_CFLAGS)
2011 lib_xft_opt="-lXft";
2018 AC_DEFINE(XAW3D,1,Define to 1 if you use libXaw3d.)
2022 AC_DEFINE(XAWPLUS,1,Define to 1 if you use libXawPlus.)
2023 lib_xaw_opt="-lXpm -lXawPlus"
2026 AC_DEFINE(NEXTAW,1,Define to 1 if you use libneXtaw.)
2027 lib_xaw_opt=-lneXtaw
2030 INTERFACE_SRCS="$INTERFACE_SRCS xaw_c.c xaw_i.c x_trace.c $XDND_SRCS"
2032 [ if test "x$have_xext" = xyes; then
2033 a_so_libs="-lXext -lX11"
2039 a_so_libs="$a_so_libs -lcc_dynamic"
2042 if test "x$have_xprelibs" = xyes; then
2043 a_so_libs="-lSM -lICE $a_so_libs"
2047 a_so_libs="-lXaw -lXmu -lXt $a_so_libs"
2050 AC_DEFINE(XAW3D,1,Define to 1 if you use libXaw3d.)
2051 a_so_libs="-lXaw3d -lXmu -lXt $a_so_libs"
2054 AC_DEFINE(XAWPLUS,1,Define to 1 if you use libXawPlus.)
2055 a_so_libs="-lXawPlus -lXpm -lXmu -lXt $a_so_libs"
2058 AC_DEFINE(NEXTAW,1,Define to 1 if you use libneXtaw.)
2059 a_so_libs="-lneXtaw -lXmu -lXt $a_so_libs"
2062 if test "x$enable_xft" = xyes && test "x$have_xaw" != "xno"; then
2063 XFT_CFLAGS="$(pkg-config --cflags xft)";
2064 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$XFT_CFLAGS)
2065 a_so_libs="$a_so_libs -lXft";
2067 a_so_libs="$ldflags_x_opt $a_so_libs"
2069 AM_CONDITIONAL(ENABLE_DYNAMIC_XAW, test "x$enable_xaw" = "xdynamic")
2072 AM_CONDITIONAL(ENABLE_XSKIN, false)
2073 CONFIG_INTERFACE(xskin,XSKIN,i,
2074 AS_HELP_STRING([--enable-xskin], [Enable X skin interface (default is no)]),
2075 [ if test "x$with_x" != xyes; then
2076 AC_MSG_ERROR(xskin: --with-x option must be specified)
2079 [ INTERFACE_SRCS="$INTERFACE_SRCS xskin_c.c xskin_i.c xskin_loadBMP.c xskin_spectrum.c" ],
2080 [ i_so_libs="$ldflags_x_opt -lX11" ])
2083 AM_CONDITIONAL(ENABLE_GTK, false)
2084 CONFIG_INTERFACE(gtk, GTK, g,
2085 AS_HELP_STRING([--enable-gtk], [Enable GTK+ interface (default is no)]),
2086 [ AM_PATH_GTK_2_0(2.0.0,
2087 [AC_DEFINE(HAVE_GTK_2,1,Define to 1 if you have GTK+ 2.x)],
2088 [AM_PATH_GTK(1.1.3,,enable_gtk=no)]) ],
2089 [ LIBS="$LIBS $GTK_LIBS"
2090 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$GTK_CFLAGS)
2091 INTERFACE_SRCS="$INTERFACE_SRCS gtk_c.c gtk_i.c gtk_p.c"
2093 [ if test "x$GCC" = xyes; then
2094 dnl Do not include -rdynamic option in $g_so_libs.
2095 for i in $GTK_LIBS; do
2098 *) g_so_libs="$g_so_libs $i" ;;
2102 g_so_libs="$GTK_LIBS"
2104 EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$GTK_CFLAGS) ])
2106 dnl TiMidity Network MIDI Server
2107 AM_CONDITIONAL(ENABLE_SERVER, false)
2108 CONFIG_INTERFACE(server,SERVER,r,
2109 AS_HELP_STRING([--enable-server], [Enable server interface (default is no)]),
2111 [ INTERFACE_SRCS="$INTERFACE_SRCS server_c.c"
2112 AC_CHECK_HEADERS(sys/soundcard.h)
2115 dnl TiMidity ALSA sequencer server
2116 AM_CONDITIONAL(ENABLE_ALSASEQ, false)
2117 CONFIG_INTERFACE(alsaseq,ALSASEQ,A,
2118 AS_HELP_STRING([--enable-alsaseq], [Enable ALSA sequencer server interface
2120 [ INTERFACE_SRCS="$INTERFACE_SRCS alsaseq_c.c"
2124 [ MY_DEFINE(IA_ALSASEQ)
2127 dnl TiMidity Windows synthesizer server
2128 AM_CONDITIONAL(ENABLE_WINSYN, false)
2129 CONFIG_INTERFACE(winsyn,WINSYN,W,
2130 AS_HELP_STRING([--enable-winsyn], [Enable Windows Synthesizer interface
2133 [ WINSYN="yes"; INTERFACE_SRCS="$INTERFACE_SRCS winsyn_c.c rtsyn_common.c rtsyn_winmm.c"; ])
2135 dnl TiMidity PortMIDI synthesizer server
2136 AM_CONDITIONAL(ENABLE_PORTMIDISYN, false)
2137 CONFIG_INTERFACE(portmidisyn,PORTMIDISYN,P,
2138 AS_HELP_STRING([--enable-portmidisyn], [Enable PortMIDI Synthesizer interface
2141 [ INTERFACE_SRCS="$INTERFACE_SRCS rtsyn_common.c rtsyn_portmidi.c portmidisyn_c.c";
2142 if test "x$MSYS" != xyes ; then
2143 LIBS="$LIBS -lportmidi";
2146 dnl TiMidity NamedPipe synthesizer server
2147 AM_CONDITIONAL(ENABLE_NPSYN, false)
2148 CONFIG_INTERFACE(npsyn,NPSYN,W,
2149 AS_HELP_STRING([--enable-npsyn], [Enable Windows Named Pipe Synthesizer interface
2152 [ NPSYN="yes"; INTERFACE_SRCS="$INTERFACE_SRCS npsyn_c.c rtsyn_common.c rtsyn_npipe.c"; ])
2156 dnl TiMidity Windows GUI synthesizer server
2157 AM_CONDITIONAL(ENABLE_W32G_SYN, false)
2158 CONFIG_INTERFACE(winsyng,W32G_SYN,W,
2159 AS_HELP_STRING([--enable-winsyng], [Enable Windows GUI Synthesizer interface
2164 if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes || test "x$WATCOM_C" = xyes || test "x$DMC" = xyes || test "x$POCC" = xyes; then
2165 INTERFACE_SRCS="$INTERFACE_SRCS w32g_ini.c w32g_pref.c w32g_syn.c w32g_utl.c w32g_soundspec.c winsyn_c.c rtsyn_common.c rtsyn_winmm.c"
2166 lib_w32gui_opt='gdi32.lib comctl32.lib comdlg32.lib ole32.lib shlwapi.lib'
2167 lib_user32_opt='user32.lib'
2168 EXTRADEFS="$EXTRADEFS -D__W32G__ -DTWSYNG32"
2169 if test "x$VCPP" = xyes; then
2170 VCPP_LDFLAGS="$VCPP_LDFLAGS -subsystem:windows "
2172 if test "x$BORLANDC" = xyes; then
2173 BORLANDC_START='C0W32.OBJ'
2174 CFLAGS="$CFLAGS -tW"
2175 lib_w32gui_opt="-aa $lib_w32gui_opt"
2177 if test "x$WATCOM_C" = xyes; then
2178 CFLAGS="$CFLAGS -bw"
2179 WATCOM_LDFLAGS="$WATCOM_LDFLAGS SYS nt_win"
2181 if test "x$DMC" = xyes; then
2183 lib_w32gui_opt="$lib_w32gui_opt -L/exet:nt/su:windows:4.0"
2185 if test "x$POCC" = xyes; then
2186 POCC_LDFLAGS="$POCC_LDFLAGS -subsystem:windows "
2189 lib_w32gui_opt='-lgdi32 -lcomctl32 -lcomdlg32 -lole32 -lshlwapi'
2190 lib_user32_opt='-luser32'
2191 EXTRADEFS="$EXTRADEFS -D__W32G__ -DTWSYNG32"
2192 LDFLAGS="-mwindows $LDFLAGS"
2193 INTERFACE_SRCS="$INTERFACE_SRCS w32g_ini.c w32g_pref.c w32g_syn.c w32g_utl.c w32g_soundspec.c winsyn_c.c rtsyn_common.c rtsyn_winmm.c"
2199 AM_CONDITIONAL(ENABLE_W32GUI, false)
2200 CONFIG_INTERFACE(w32gui, W32GUI, w,
2201 AS_HELP_STRING([--enable-w32gui], [Enable Windows GUI interface (default is no)]),
2205 if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes || test "x$WATCOM_C" = xyes || test "x$DMC" = xyes || test "x$POCC" = xyes; then
2206 INTERFACE_SRCS="$INTERFACE_SRCS w32g_c.c w32g_ini.c w32g_i.c w32g_playlist.c w32g_utl.c w32g_soundspec.c w32g_pref.c w32g_subwin.c w32g_subwin2.c w32g_subwin3.c w32g_ut2.c w32g_dib.c wrdt_w32g.c w32g_mag.c"
2207 lib_w32gui_opt='gdi32.lib comctl32.lib comdlg32.lib ole32.lib shlwapi.lib'
2208 lib_user32_opt='user32.lib'
2209 EXTRADEFS="$EXTRADEFS -D__W32G__ "
2210 if test "x$VCPP" = xyes; then
2211 VCPP_LDFLAGS="$VCPP_LDFLAGS -subsystem:windows "
2213 if test "x$BORLANDC" = xyes; then
2214 BORLANDC_START='C0W32.OBJ'
2215 CFLAGS="$CFLAGS -tW"
2216 lib_w32gui_opt="-aa $lib_w32gui_opt"
2218 if test "x$WATCOM_C" = xyes; then
2219 CFLAGS="$CFLAGS -bw"
2220 WATCOM_LDFLAGS="$WATCOM_LDFLAGS SYS nt_win"
2222 if test "x$DMC" = xyes; then
2223 lib_w32gui_opt="$lib_w32gui_opt -L/SU:window"
2226 if test "x$POCC" = xyes; then
2227 POCC_LDFLAGS="$POCC_LDFLAGS -subsystem:windows "
2230 lib_w32gui_opt='-lgdi32 -lcomctl32 -lcomdlg32 -lole32 -lshlwapi'
2231 lib_user32_opt='-luser32'
2232 EXTRADEFS="$EXTRADEFS -D__W32G__ "
2233 LDFLAGS="-mwindows $LDFLAGS"
2234 INTERFACE_SRCS="$INTERFACE_SRCS w32g_c.c w32g_ini.c w32g_i.c w32g_playlist.c w32g_utl.c w32g_soundspec.c w32g_pref.c w32g_subwin.c w32g_subwin2.c w32g_subwin3.c w32g_ut2.c w32g_dib.c wrdt_w32g.c w32g_mag.c"
2238 dnl UMP configuration
2239 AM_CONDITIONAL(ENABLE_PLUGIN, false)
2240 CONFIG_INTERFACE(ump, PLUGIN, p,
2241 AS_HELP_STRING([--enable-ump], [UMP configuration (default is no)]),
2242 [ if test ! -d ump; then
2243 AC_MSG_ERROR(UMP Package is not exists. Can't configure it.)
2245 AC_CHECK_HEADER(X11/xpm.h,,AC_MSG_ERROR([UMP Package needs xpm.h[,] but could not find it.]))
2246 AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData,:,AC_MSG_ERROR([UMP Package needs libXpm.a[,] but could not find it.]))
2247 if test "x$have_xext" = xyes; then
2250 if test "x$have_xprelibs" = xyes; then
2251 lib_xprelibs_opt='-lSM -lICE'
2257 dnl Window Driver interface
2258 AC_ARG_ENABLE(windrv,
2259 AS_HELP_STRING([--enable-windrv], [Windows Driver interface(requires winsyn) ]),
2260 [ if test "$enableval" = "yes"; then
2261 if test "x$VCPP" != xyes && test "x$MINGWGCC" != xyes && test "x$BORLANDC" != xyes && test "x$WATCOM_C" != xyes && test "x$DMC" != xyes && test "x$POCC" != xyes; then
2262 AC_MSG_ERROR(windrv: Only Support VC++ or Mingw or Borland C or Open Watcom PellesC and Digital Mars)
2263 elif test "x$WINSYN" != xyes; then
2264 AC_MSG_ERROR(windrv: Driver must have winsyn interface)
2266 AC_DEFINE(WINDRV,1,Define to 1 if you cpmpile windos driver.)
2268 if test "x$WATCOM_C" = xyes; then DLLFLAG="-bd" ;fi
2269 if test "x$DMC" = xyes; then DLLFLAG="-WD" ;fi
2270 CFLAGS="$CFLAGS -DANOTHER_MAIN "
2273 CFLAGS="$CFLAGS $DLLFLAG "
2276 dnl this rely on CFLAGS and LIBS
2277 AC_ARG_ENABLE(offix,
2278 AS_HELP_STRING([--enable-offix], [Enable offix support (default is no)]),
2279 [ if test "$enableval" = "yes"; then
2280 KEEPCPPFLAGS=$CPPFLAGS
2282 KEEPLDFLAGS=$LDFLAGS
2283 CPPFLAGS="$CPPFLAGS $offix_include_dir"
2284 LDFLAGS="$LDFLAGS $offix_lib_dir"
2285 LIBS="$LIBS $lib_xmu_opt $lib_xt_opt $lib_xprelibs_opt $lib_xext_opt -lX11"
2286 AC_CHECK_LIB(Dnd,DndInitialize,[
2288 lib_offix_opt="-lDnd"
2289 AC_DEFINE(OFFIX,1,Define to 1 if you need offix support)
2291 [ LDFLAGS=$KEEPLDFLAGS
2292 CPPFLAGS=$KEEPCPPFLAGS
2299 AC_ARG_ENABLE(network,
2300 AS_HELP_STRING([--enable-network], [Enable network support (default is no)]),
2301 [ if test "$enableval" = "yes"; then
2302 AC_DEFINE(SUPPORT_SOCKET,1,Define to 1 if you need network support)
2304 AM_CONDITIONAL(ENABLE_NETWORK, test "x$enable_network" = xyes)
2306 dnl Multi-thread support
2307 AC_ARG_ENABLE(thread,
2308 AS_HELP_STRING([--enable-thread], [Enable thread support (default is no)]),
2309 [ if test "$enableval" = "yes"; then
2310 AC_DEFINE(ENABLE_THREAD,1,Define to 1 if you need thread support)
2312 AM_CONDITIONAL(ENABLE_THREAD, test "x$enable_thread" = xyes)
2314 dnl LargeFile Source support
2315 AC_ARG_ENABLE(largefile,
2316 AS_HELP_STRING([--enable-largefile], [Enable LargeFile Source support (default is no)]),
2317 [ if test "$enableval" = "yes"; then
2318 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
2319 AC_DEFINE(_LARGEFILE_SOURCE, 1, [Define for ftello and fseeko extension.])
2321 AM_CONDITIONAL(ENABLE_LARGEFILE, test "x$enable_largefile" = xyes)
2323 dnl Sound Spectrogram Viewer
2324 AC_ARG_ENABLE(spectrogram,
2325 AS_HELP_STRING([--enable-spectrogram], [Enable Sound Spectrogram Viewer (default is no)]),
2326 [ if test "$enableval" = "yes"; then
2327 if test "x$MSYS" = xyes; then
2328 if test "x$W32G_GUI" = xyes; then
2329 AC_MSG_RESULT(use w32g_soundspec.c)
2330 AC_DEFINE(W32SOUNDSPEC,1,Define to 1 if you need spectrogram viewer.)
2332 AC_MSG_RESULT(use w32_soundspec.c)
2333 AC_DEFINE(W32SOUNDSPEC,1,Define to 1 if you need spectrogram viewer.)
2334 SYSEXTRAS="$SYSEXTRAS w32_soundspec.c"
2335 lib_w32gui_opt='-lgdi32'
2337 elif test "x$with_x" = xyes; then
2340 AC_MSG_ERROR(spectrogram: --with-x option must be specified)
2342 AC_DEFINE(SUPPORT_SOUNDSPEC,1,Define to 1 if you need spectrogram viewer.)
2344 AM_CONDITIONAL(W32SOUNDSPEC, test "x$enable_spectrogram" = xyes -a "x$MSYS" = xyes)
2345 AM_CONDITIONAL(ENABLE_SOUND_SPEC, test "x$enable_spectrogram" = xyes -a "x$with_x" = xyes)
2347 dnl Wave Resample Interpolations
2348 AC_ARG_ENABLE(spline,
2349 AS_HELP_STRING([--enable-spline=[method]],
2350 [Specify spline method. one of no,linear,cubic,lagrange,newton,gauss,sharp,linerper,sine,square (default is gauss)]),
2351 [ case "x$enableval" in
2353 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,1,Define resampler num.)
2354 AC_DEFINE(DEFAULT_RESAMPLATION,resample_linear,Define resampler.)
2355 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,0,Define resampler order.)
2358 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,2,Define resampler num.)
2359 AC_DEFINE(DEFAULT_RESAMPLATION,resample_cspline,Define resampler.)
2360 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,0,Define resampler order.)
2363 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,3,Define resampler num.)
2364 AC_DEFINE(DEFAULT_RESAMPLATION,resample_lagrange,Define resampler.)
2365 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,0,Define resampler order.)
2368 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,4,Define resampler num.)
2369 AC_DEFINE(DEFAULT_RESAMPLATION,resample_newton,Define resampler.)
2370 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,11,Define resampler order.)
2373 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,5,Define resampler num.)
2374 AC_DEFINE(DEFAULT_RESAMPLATION,resample_gauss,Define resampler.)
2375 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,24,Define resampler order.)
2378 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,6,Define resampler num.)
2379 AC_DEFINE(DEFAULT_RESAMPLATION,resample_sharp,Define resampler.)
2380 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,2,Define resampler order.)
2383 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,7,Define resampler num.)
2384 AC_DEFINE(DEFAULT_RESAMPLATION,resample_liner_p,Define resampler.)
2385 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,100,Define resampler order.)
2388 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,8,Define resampler num.)
2389 AC_DEFINE(DEFAULT_RESAMPLATION,resample_sine,Define resampler.)
2390 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,0,Define resampler order.)
2393 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,9,Define resampler num.)
2394 AC_DEFINE(DEFAULT_RESAMPLATION,resample_square,Define resampler.)
2395 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,0,Define resampler order.)
2398 AC_DEFINE(DEFAULT_RESAMPLATION_NUM,0,Define resampler num.)
2399 AC_DEFINE(DEFAULT_RESAMPLATION,resample_none,Define resampler.)
2400 AC_DEFINE(DEFAULT_RESAMPLATION_ORDER,0,Define resampler order.)
2403 AC_MSG_ERROR(Invalid method of --enable-spline)
2407 dnl Wave Resample Filter
2408 AC_ARG_ENABLE(filter,
2409 AS_HELP_STRING([--enable-filter=[method]],
2410 [Specify filter method. one of no,lpf12,lpf24,lpfbw,lpf12x2,lpf24x2,lpf6,lpf18,lpftfo,hpfbw,bpfbw (default is no)]),
2411 [ case "x$enableval" in
2413 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,1,Define resampler filter.)
2416 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,2,Define resampler filter.)
2419 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,3,Define resampler filter.)
2422 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,4,Define resampler filter.)
2425 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,5,Define resampler filter.)
2428 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,6,Define resampler filter.)
2431 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,7,Define resampler filter.)
2434 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,8,Define resampler filter.)
2437 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,9,Define resampler filter.)
2440 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,10,Define resampler filter.)
2443 AC_DEFINE(DEFAULT_RESAMPLATION_FILTER,0,Define resampler filter.)
2446 AC_MSG_ERROR(Invalid method of --enable-filter)
2452 AS_HELP_STRING([--enable-wrd], [Enable WRD interface for X (default is no)]),
2453 [ if test "$enableval" = "yes"; then
2454 if test "x$with_x" = xyes; then
2456 AC_DEFINE(WRDT_X,1,Define to 1 if you need wrd support for X.)
2457 enable_sherry_wrd=yes
2458 AC_CHECK_LIB(z,zlibVersion,:,enable_sherry_wrd=no)
2459 AC_CHECK_HEADER(png.h,,enable_sherry_wrd=no)
2460 AC_CHECK_LIB(png,png_init_io,:,enable_sherry_wrd=no,-lz)
2461 if test "$enable_sherry_wrd" = yes; then
2462 AC_DEFINE(ENABLE_SHERRY,1,Define to 1 if you enable Sherry WRD)
2466 AC_MSG_WARN([Sherry WRD is disabled: png.h, libpng.a, libz.a are required])
2468 if test "x$have_xext" = xyes; then
2472 AC_MSG_ERROR(wrd: --with-x option must be specified)
2476 dnl Internal audio datatype format
2477 if test "${enable_datatype}" = ""; then
2478 AC_DEFINE(DATA_T_DOUBLE,1,[Define `double' audio data type.])
2479 AC_DEFINE(VERSION_DATA_T,"f64",[Define version information prefix.])
2481 AC_ARG_ENABLE(datatype,
2482 AS_HELP_STRING([--enable-datatype=[type]],
2483 [Specify audio data type. one of int32,float,double (default is int32)]),
2484 [ case "x$enableval" in
2486 AC_DEFINE(DATA_T_INT32,1,[Define `int32' audio data type.])
2487 AC_DEFINE(VERSION_DATA_T,"i32",[Define version information prefix.])
2490 AC_DEFINE(DATA_T_FLOAT,1,[Define `float' audio data type.])
2491 AC_DEFINE(VERSION_DATA_T,"f32",[Define version information prefix.])
2494 AC_DEFINE(DATA_T_DOUBLE,1,[Define `double' audio data type.])
2495 AC_DEFINE(VERSION_DATA_T,"f64",[Define version information prefix.])
2498 AC_MSG_ERROR(Invalid type of --enable-datatype)
2504 dnl end of interfaces
2511 AM_CONDITIONAL(ENABLE_WRD, test "x$enable_wrd" = xyes)
2512 AM_CONDITIONAL(W32G_GUI, test "x$W32G_GUI" = xyes)
2513 AM_CONDITIONAL(WINDRV, test "x$WINDRV" = xyes)
2514 AM_CONDITIONAL(MSYS, test "x$MSYS" = xyes)
2515 AM_CONDITIONAL(VCPP, test "x$VCPP" = xyes)
2516 AM_CONDITIONAL(POCC, test "x$POCC" = xyes)
2517 AM_CONDITIONAL(BORLANDC, test "x$BORLANDC" = xyes)
2518 AM_CONDITIONAL(WATCOM_C, test "x$WATCOM_C" = xyes)
2519 AM_CONDITIONAL(DMC, test "x$DMC" = xyes)
2520 AM_CONDITIONAL(MINGWGCC, test "x$MINGWGCC" = xyes)
2522 AM_CONDITIONAL(W32READDIR, test "x$W32READDIR" = xyes)
2524 SET_UNIQ_WORDS(LDFLAGS,$LDFLAGS)
2525 SET_UNIQ_WORDS(SHLDFLAGS,$SHLDFLAGS)
2526 SET_UNIQ_WORDS(CFLAGS,$EXTRACFLAGS $CFLAGS)
2527 SET_UNIQ_WORDS(CPPFLAGS,$CPPFLAGS $EXTRADEFS)
2529 if test "x$oss_device" != "x"; then
2530 AC_DEFINE_UNQUOTED(OSS_DEVICE,"$oss_device", oss device name)
2533 if test "x$TIMIDITY_OUTPUT_ID" != "x"; then
2534 AC_DEFINE_UNQUOTED(TIMIDITY_OUTPUT_ID,"$TIMIDITY_OUTPUT_ID", the output specification)
2537 if test "x$au_enable_nas" = xyes -o \
2538 "x$enable_motif" = xyes -o \
2539 "x$enable_tcltk" = xyes -o \
2540 "x$enable_xaw" = xyes -o \
2541 "x$enable_xskin" = xyes -a "x$with_x" = xyes; then
2542 dnl Order of X-library is: -lXdnd -lXm -lXaw -lXft -lXmu -lXt -lSM -lICE -lXext -lX11
2543 LIBS="$lib_offix_opt $lib_xm_opt $lib_xaw_opt $lib_xft_opt $lib_xmu_opt $lib_xt_opt $lib_xprelibs_opt $lib_xext_opt -lX11 $LIBS"
2545 LIBS="$LIBS $lib_dl_opt $lib_png_opt $lib_zip_opt $lib_user32_opt $lib_w32gui_opt $EXTRALIBS"
2546 SHLD="$SHLD $SHLDFLAGS"
2548 AC_SUBST(BORLANDC_START)
2549 AC_SUBST(BORLANDC_LDFLAGS)
2551 AC_SUBST(timidity_LDFLAGS)
2552 AC_SUBST(WATCOM_LDFLAGS)
2553 AC_SUBST(DMC_LDFLAGS)
2554 AC_SUBST(VCPP_LDFLAGS)
2555 AC_SUBST(POCC_LDFLAGS)
2564 AC_SUBST(dynamic_targets)
2569 AC_SUBST(program_transform_name)
2570 AC_SUBST(INTERFACE_SRCS)
2571 AC_SUBST(pkgdatadir)
2581 doc/ja_JP.eucJP/Makefile
2582 doc/ja_JP.utf8/Makefile
2584 interface/motif_bitmaps/Makefile
2585 interface/bitmaps/Makefile
2586 interface/pixmaps/Makefile