-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in.in
699 lines (630 loc) · 18.7 KB
/
configure.in.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
dnl Template file for GNU Autoconf
dnl Process this file with autoconf to produce a configure script.
dnl (C)Copyright 1998 by Hiroshi Takekawa <t80679@hongo.ecc.u-tokyo.ac.jp>
dnl modified for automake by Isaku Yamahata <yamahata@kusm.kyoto-u.ac.jp>
dnl modified for automake by Masanao Izumo <mo@goice.co.jp> (1998.11)
EXTRACFLAGS=
EXTRATCFLAGS=
EXTRADEFS=
EXTRALIBS=
EXTRATDEFS=
EXTRATLIBS=
TCLFILES=
WISH=${WISH:-wish}
tcltk_dep=
dnl Which X libraries?
dnl KEEPLIBS=$LIBS
dnl LIBS="-lX11"
dnl AC_CHECK_LIB(Xext,XShapeCombineMask,have_xext=yes; LIBS="-lXext $LIBS",
dnl have_xext=no)
dnl AC_CHECK_LIB(ICE,IceConnectionNumber)
dnl AC_CHECK_LIB(SM,SmcOpenConnection,have_xprelibs=yes; LIBS="-lSM $LIBS",
dnl have_xprelibs=no)
dnl AC_CHECK_LIB(Xt,XtVaAppInitialize,have_xt=yes; LIBS="-lXt $LIBS",have_xt=no)
dnl AC_CHECK_LIB(Xmu,XmuInternAtom,LIBS="-lXmu $LIBS")
dnl AC_CHECK_FUNCS(XmuRegisterExternalAgent)
dnl AC_CHECK_LIB(Xaw3d,XawInitializeWidgetSet,have_xaw=3d,
dnl [ AC_CHECK_LIB(Xaw,XawInitializeWidgetSet,have_xaw=yes,have_xaw=no) ])
dnl AC_CHECK_LIB(Xm,XmCreateForm,have_xm=yes,have_xm=no)
dnl AC_CHECK_FUNCS(XShmCreatePixmap)
dnl LIBS=$KEEPLIBS
dnl tcltk path
AC_ARG_WITH(tcl-includes,
[ --with-tcl-includes=DIR Tcl include file path ],
[ if test ! -d $withval; then
AC_MSG_WARN($withval is not found.)
fi
tcl_include_dir="-I$withval"
])
AC_ARG_WITH(tcl-libs,
[ --with-tcl-libs=DIR Tcl library file path ],
[ if test ! -d $withval; then
AC_MSG_WARN($withval is not found.)
fi
tcl_libdir="-L$withval" ])
AC_ARG_WITH(tk-includes,
[ --with-tk-includes=DIR Tk include file path ],
[ if test ! -d $withval; then
AC_MSG_WARN($withval is not found.)
fi
tk_includes="-I$withval" ])
AC_ARG_WITH(tk-libs,
[ --with-tk-libs=DIR Tk library file path ],
[ if test ! -d $withval; then
AC_MSG_WARN($withval is not found.)
fi
tk_libdir="-L$withval" ])
dnl AC_CHECK_HEADER(string.h,, [ EXTRADEFS="$EXTRADEFS -DNO_STRING_H " ])
dnl AC_CHECK_HEADERS(ncurses/curses.h ncurses.h slang/slang.h slang.h)
dnl AC_CHECK_LIB(ncurses,initscr, [ EXTRALIBS="$EXTRALIBS -lncurses " EXTRADEFS="$EXTRADEFS -DIA_NCURSES "])
dnl AC_CHECK_LIB(slang,SLang_init_tty, [ EXTRALIBS="$EXTRALIBS -lslang " EXTRADEFS="$EXTRADEFS -DIA_SLANG "])
dnl
dnl Audio section
dnl
dnl default(d): auto selection
dnl oss(d): OSS /dev/dsp
dnl alsa(d): ALSA pcm device
dnl sun(d): SunOS /dev/audio
dnl hpux(d): HPUX /dev/audio
dnl irix(d): IRIX audio
dnl mme(d): OSF/1 MME
dnl sb_dsp(d): BSD/OS 2.0 /dev/sb_dsp
dnl removed (gl) dnl w32(d): Windows MMS
dnl alsa(s): ALSA pcm device
dnl alib(A): HPUX network audio (Alib)
dnl nas(n): Network Audio System
dnl esd(e): EsounD
audio_targets='default oss alsa sun hpux irix mme sb_dsp alib nas esd'
AC_ARG_WITH(nas-library,
[ --with-nas-library=library NAS absolute library path (Don't use -laudio)])
AC_ARG_WITH(nas-includes,
[ --with-nas-includes=DIR NAS include files are in dir])
AC_ARG_ENABLE(audio,
[ --enable-audio[=mode_list] Enable audio (Specify comma separated mode list):
default: Automatically select audio device.
oss: OSS /dev/dsp
sun: SunOS /dev/audio
hpux: HPUX /dev/audio
irix: IRIX audio library
mme: OSF/1 MME
sb_dsp: BSD/OS 2.0 /dev/sb_dsp
alsa: ALSA pcm device
alib: HPUX network audio (Alib)
nas: NAS - Network Audio System
esd: EsounD],
[ enable_audio=$enableval
have_audio_opt=yes ],
[ enable_audio=yes
have_audio_opt=no ])
dnl yes -> default
test "x$enable_audio" = xyes && enable_audio=default
if test "x$enable_audio" != xno; then
for i in `echo $enable_audio | sed 's/,/ /g'`; do
eval "au_enable_$i=yes"
done
fi
dnl Turn on default output mode
DEFAULT_PLAYMODE=
AC_ARG_WITH(default-output,
[ --with-default-output=<mode> Specify default output mode for KMidi (optional):
default|alsa|alib|nas|esd|wav|au|aiff|list],
[ if test "$enable_audio" != no; then
DEFAULT_PLAYMODE=$withval
eval "au_enable_$DEFAULT_PLAYMODE=yes"
else
AC_MSG_WARN(--with-default-output=$withval: audio is not enabled)
fi])
if test "x$au_enable_default" = xyes; then
case "$target" in
*-*-linux*|*-*-freebsd*|*-*-netbsd|*-*-bsdi2.1|*-*-bsdi3.?|*-*-bsdi4.?)
au_enable_oss=yes
;;
*-*-bsdi2.0)
au_enable_sb_dsp=yes
;;
*-*-hpux*)
au_enable_hpux=yes
;;
*-dec-*)
au_enable_mme=yes
;;
*irix*)
au_enable_irix=yes
;;
*-*-sunos4*)
au_enable_sun=yes
;;
*-*-solaris*)
au_enable_sun=yes
;;
*-*-openbsd*)
au_enable_sun=yes
;;
*)
AC_MSG_WARN(No --enable-audio=default audio for $target)
;;
esac
fi
dnl
dnl oss
dnl
AC_MSG_CHECKING(enable_audio=oss)
if test "x$au_enable_oss" = xyes; then
EXTRADEFS="$EXTRADEFS -DAU_OSS"
if test "x$ac_cv_header_sys_soundcard_h" = xyes; then
AC_MSG_RESULT(yes - <sys/soundcard.h>)
else
case "$target" in
*linux*|*freebsd*|*bsdi*|*netbsd*)
dnl <linux/soundcard.h> or <machine/soundcard.h>
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_WARN(<sys/soundcard.h> is not found)
;;
esac
fi
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(enable_audio=sun)
if test "x$au_enable_sun" = xyes; then
case "$target" in
*-*-sunos4*)
if test -f /usr/demo/SOUND/libaudio.a; then
CPPFLAGS="$CPPFLAGS -I/usr/demo/SOUND/multimedia"
EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/libaudio.a"
EXTRATLIBS="$EXTRATLIBS /usr/demo/SOUND/libaudio.a"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(Notice: libaudio.a is not found [(ignore)])
fi
;;
*-*-solaris*)
if test -f /usr/demo/SOUND/lib/libaudio.a; then
CPPFLAGS="$CPPFLAGS -I/usr/demo/SOUND/include"
EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/lib/libaudio.a"
EXTRATLIBS="$EXTRATLIBS /usr/demo/SOUND/lib/libaudio.a"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(Notice: libaudio.a is not found [(ignore)])
fi
;;
*) AC_MSG_RESULT(yes)
;;
esac
EXTRADEFS="$EXTRADEFS -DAU_SUN"
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(enable_audio=hpux)
if test "x$au_enable_hpux" = xyes; then
case "$target" in
*-*-hpux*) AC_MSG_RESULT(yes) ;;
*) AC_MSG_WARN(may not work on $target) ;;
esac
EXTRADEFS="$EXTRADEFS -DAU_HPUX_AUDIO"
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(enable_audio=irix)
if test "x$au_enable_irix" = xyes; then
case "$target" in
*-sgi-irix5*|*-sgi-irix6.2)
EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_OLDAL"
AC_MSG_RESULT(yes)
;;
*-sgi-irix6*)
EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_NEWAL"
AC_MSG_RESULT(yes)
;;
*) AC_MSG_WARN(may not work on $target) ;;
esac
EXTRALIBS="$EXTRALIBS -laudio"
EXTRATLIBS="$EXTRATLIBS -laudio"
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(enable_audio=mme)
if test "x$au_enable_mme" = xyes; then
case "$target" in
*-dec-*) AC_MSG_RESULT(yes) ;;
*) AC_MSG_WARN(may not work on $target) ;;
esac
EXTRADEFS="$EXTRADEFS -DAU_DEC -DAU_AUDRIV"
CPPFLAGS="$CPPFLAGS -I/usr/include/mme -I/usr/opt/MME210/include"
EXTRALIBS="$EXTRALIBS -L/usr/opt/MME220/lib -lmme"
EXTRATLIBS="$EXTRATLIBS -L/usr/opt/MME220/lib -lmme"
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(enable_audio=sb_dsp)
if test "x$au_enable_sb_dsp" = xyes; then
case "$target" in
*-*-bsdi2.0) AC_MSG_RESULT(yes) ;;
*) AC_MSG_WARN(may not work on $target) ;;
esac
EXTRADEFS="$EXTRADEFS -DAU_BSDI -DDEFAULT_RATE=22500"
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(enable_audio=alsa)
if test "x$au_enable_alsa" = xyes; then
AC_MSG_RESULT()
KEEPCFLAGS=$CFLAGS
KEEPLIBS=$LIBS
KEEPLDFLAGS=$LDFLAGS
AM_PATH_ALSA_LOCAL()
if test have_alsa = no; then
AC_MSG_WARN(ALSA: Couldn't configure)
CFLAGS=$KEEPCFLAGS
LIBS=$KEEPLIBS
LDFLAGS=$KEEPLDFLAGS
else
AC_MSG_RESULT(ALSA: Enabled)
EXTRADEFS="$EXTRADEFS -DAU_ALSA"
EXTRALIBS="$EXTRALIBS $ALSA_LIBS"
EXTRATLIBS="$EXTRATLIBS $ALSA_LIBS"
EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ALSA_CFLAGS)
LIBS="$LIBS $ALSA_LIBS"
fi
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(enable_audio=alib)
if test "x$au_enable_alib" = xyes; then
case "$target" in
*-*-hpux*) AC_MSG_RESULT(yes) ;;
*) AC_MSG_WARN(may not work on $target) ;;
esac
EXTRADEFS="$EXTRADEFS -DAU_HPUX_ALIB"
if test -d /opt/audio/include; then
CPPFLAGS="$CPPFLAGS -I/opt/audio/include"
fi
if test -d /opt/audio/lib; then
EXTRALIBS="$EXTRALIBS -L/opt/audio/lib"
EXTRATLIBS="$EXTRATLIBS -L/opt/audio/lib"
fi
EXTRALIBS="$EXTRALIBS -lAlib"
EXTRATLIBS="$EXTRATLIBS -lAlib"
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(enable_audio=nas)
if test "x$au_enable_nas" = xyes; then
dnl -laudio conflicts another audio library,
dnl so I specify NAS library with absolete path.
if test "x$with_nas_library" != x; then
AC_MSG_RESULT($with_nas_library);
EXTRALIBS="$EXTRALIBS $with_nas_library -lX11"
EXTRATLIBS="$EXTRATLIBS $with_nas_library -lX11"
else
AC_MSG_RESULT()
LDFLAGS_safe="$LDFLAGS"
LIBS_safe="$LIBS"
LDFLAGS="$LDFLAGS $(all_libraries)"
LIBS="$LIBS -lX11"
MY_SEARCH_LIBS(AuOpenServer,
[/usr/openwin/lib/libaudio.a \
/usr/X11R6/lib/libaudio.a \
/usr/lib/libaudio.so \
/usr/lib/libaudio.a ],
[ AC_MSG_RESULT(NAS: $timidity_cv_search_AuOpenServer)
EXTRADEFS="$EXTRADEFS -DAU_NAS"
EXTRALIBS="$EXTRALIBS $timidity_cv_search_AuOpenServer"
EXTRATLIBS="$EXTRALIBS $timidity_cv_search_AuOpenServer"],
[AC_MSG_WARN(NAS library is not found.)])
LIBS="$LIBS_safe"
LDFLAGS="$LDFLAGS_safe"
fi
test "x$with_nas_includes" != x && CPPFLAGS="$CPPFLAGS -I$with_nas_includes"
dnl lib_xt_opt=-lXt
dnl if test "x$have_xext" = xyes; then
dnl lib_xext_opt=-lXext
dnl fi
dnl if test "x$have_xprelibs" = xyes; then
dnl lib_xprelibs_opt='-lSM -lICE'
dnl fi
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(enable_audio=esd)
if test "x$au_enable_esd" = xyes; then
AC_MSG_RESULT()
KEEPCFLAGS=$CFLAGS
KEEPLIBS=$LIBS
KEEPLDFLAGS=$LDFLAGS
AM_PATH_ESD()
CFLAGS=$KEEPCFLAGS
LIBS=$KEEPLIBS
LDFLAGS=$KEEPLDFLAGS
if test "x$no_esd" = x; then
AC_MSG_RESULT(EsounD: Enabled)
EXTRADEFS="$EXTRADEFS -DAU_ESD"
EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$ESD_CFLAGS)
LIBS="$LIBS $ESD_LIBS"
else
AC_MSG_WARN(EsounD: Couldn't configure)
fi
else
AC_MSG_RESULT(no)
fi
dnl
dnl TIMIDITY_OUTPUT_ID
dnl
dnl AC_MSG_CHECKING(default output mode)
dnl if test "x$DEFAULT_PLAYMODE" = x; then
dnl DEFAULT_PLAYMODE=`echo $enable_audio | sed 's/,.*//'`
dnl fi
dnl case ".$DEFAULT_PLAYMODE" in
dnl .default) TIMIDITY_OUTPUT_ID=d ;;
dnl .oss) TIMIDITY_OUTPUT_ID=d ;;
dnl .alsa) TIMIDITY_OUTPUT_ID=s ;;
dnl .sun) TIMIDITY_OUTPUT_ID=d ;;
dnl .hpux) TIMIDITY_OUTPUT_ID=d ;;
dnl .irix) TIMIDITY_OUTPUT_ID=d ;;
dnl .mme) TIMIDITY_OUTPUT_ID=d ;;
dnl .sb_dsp) TIMIDITY_OUTPUT_ID=d ;;
dnl .w32) TIMIDITY_OUTPUT_ID=d ;;
dnl .alib) TIMIDITY_OUTPUT_ID=A ;;
dnl .nas) TIMIDITY_OUTPUT_ID=n ;;
dnl .esd) TIMIDITY_OUTPUT_ID=e ;;
dnl .wav) TIMIDITY_OUTPUT_ID=w ;;
dnl .au) TIMIDITY_OUTPUT_ID=u ;;
dnl .aiff) TIMIDITY_OUTPUT_ID=a ;;
dnl .list) TIMIDITY_OUTPUT_ID=l ;;
dnl *) TIMIDITY_OUTPUT_ID= ;;
dnl esac
dnl AC_MSG_RESULT($DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID)
dnl
dnl Interface section
dnl
interface_targets='ncurses slang motif tcltk xaw gtk'
dnl enable_ncurses=yes
dnl enable_slang=yes
dnl enable_motif=yes
dnl enable_tcltk=yes
dnl enable_xaw=yes
dnl enable_gtk=yes
enable_ncurses=no
enable_slang=no
enable_motif=no
enable_tcltk=no
enable_xaw=yes
enable_gtk=no
AC_ARG_ENABLE(interface,
[ --enable-interface=[interface_list] Comma separated KMidi/timidity interface list ],
[
enable_ncurses=no
enable_slang=no
enable_motif=no
enable_tcltk=no
enable_xaw=no
enable_gtk=no
for i in `echo $enableval | sed 's/,/ /g'`; do
eval "enable_$i=yes"
done ])
dnl
dnl Each interface section
dnl
dnl ncurses
AC_MSG_CHECKING(enable_ncurses)
AM_CONDITIONAL(ENABLE_NCURSES, false)
if test "x$enable_ncurses" = xyes; then
CONFIG_INTERFACE(ncurses,NCURSES,n,
[ --enable-ncurses Enable ncurses interface (default is no)],
[ AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h)
dnl #include <ncurses/curses.h> is failure on Plamo Linux 1.3/ncurses 1.9.9e
dnl because <ncurses/curses.h> includes <unctrl.h>:
dnl /usr/include/ncurses/curses.h:34: unctrl.h: No such file or directory
dnl But surely there is unctl.h at /usr/include/ncurses/unctrl.h.
dnl configure must check ncurses header with -I/usr/include/ncurses option.
case "$ac_cv_header_curses_h$ac_cv_header_ncurses_curses_h$ac_cv_header_ncurses_h" in
*yes*);;
*) for i in /usr/include /usr/local/include; do
if test -f "$i/ncurses/curses.h" -a -f "$i/ncurses/unctrl.h"; then
AC_MSG_WARN(ncurses test is failure. Please check config.h and common.makefile later)
CPPFLAGS="$CPPFLAGS -I$i/ncurses"
break
fi
done
;;
esac
AC_CHECK_LIB(ncurses,initscr,lib_curses_opt=-lncurses,
[ dnl checking pdcurses
AC_CHECK_LIB(curses,PDC_set_ctrl_break,
[ lib_curses_opt=-lcurses
CPPFLAGS="$CPPFLAGS -DUSE_PDCURSES=1"
lib_user32_opt="$lib_user32_test"
],
[ AC_MSG_WARN(ncurses interface is not enabled)
enable_ncurses=no
],
$lib_user32_test)
])
dnl LIBS="$LIBS $lib_curses_opt"
EXTRALIBS="$EXTRALIBS $lib_curses_opt"
EXTRATLIBS="$EXTRATLIBS $lib_curses_opt"
EXTRADEFS="$EXTRADEFS -DIA_NCURSES"
case "$target" in
*-*-freebsd*)
EXTRALIBS="$EXTRALIBS -lmytinfo"
;;
esac
AC_MSG_RESULT(yes)
])
else
AC_MSG_RESULT(no)
fi
dnl slang
AC_MSG_CHECKING(enable_slang)
AM_CONDITIONAL(ENABLE_SLANG, false)
if test "x$enable_slang" = xyes; then
CONFIG_INTERFACE(slang,SLANG,s,
[ --enable-slang Enable slang interface (default is no)],
[ AC_CHECK_LIB(slang,SLang_init_tty,:,
[ enable_slang=no
AC_MSG_WARN(slang interface is not enabled) ])
AC_CHECK_HEADERS(slang/slang.h slang.h)
if ! test "x$enable_slang" = xno; then
dnl LIBS="$LIBS -lslang"
EXTRALIBS="$EXTRALIBS -lslang"
EXTRATLIBS="$EXTRATLIBS -lslang"
EXTRADEFS="$EXTRADEFS -DIA_SLANG"
AC_MSG_RESULT(yes)
fi
])
else
AC_MSG_RESULT(no)
fi
dnl Motif
AC_MSG_CHECKING(enable_motif)
AM_CONDITIONAL(ENABLE_MOTIF, false)
if test "x$enable_motif" = xyes; then
CONFIG_INTERFACE(motif,MOTIF,m,
[ --enable-motif Enable motif interface for TiMidity (default is no)],
[ AC_FIND_MOTIF
if test "x$with_motif" = xyes; then
EXTRATDEFS="$EXTRATDEFS -DIA_MOTIF $MOTIF_CFLAGS"
dnl EXTRATLIBS="$EXTRATLIBS -L/usr/X11R6/lib -lXm -lXt -lX11"
EXTRATLIBS="$EXTRATLIBS $MOTIF_LIBS"
else
enable_motif=no
fi
])
if test "x$enable_motif" = xyes; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
else
AC_MSG_RESULT(no)
fi
dnl Tcl/Tk
AC_MSG_CHECKING(enable_tcltk)
AM_CONDITIONAL(ENABLE_TCLTK, false)
if test "x$enable_tcltk" = xyes; then
CONFIG_INTERFACE(tcltk,TCLTK,k,
[ --enable-tcltk Enable tcltk interface for TiMidity (default is no)],
[
KEEPCPPFLAGS=$CPPFLAGS
KEEPLDFLAGS=$LDFLAGS
KEEPLIBS=$LIBS
SC_PATH_TCLXCONFIG
CPPFLAGS="$tcl_include_dir $tk_includes $CPPFLAGS"
LDFLAGS="$tcl_libdir $tk_libdir $LDFLAGS"
dnl LIBS="$LIBS $lib_dl_opt"
dnl EXTRATLIBS="$EXTRATLIBS $lib_dl_opt"
tcl_lib=
tk_lib=
for l in tcl tcl8.3 tcl8.2 tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76; do
case "x$tcl_lib" in x) AC_CHECK_LIB($l,Tcl_Init,tcl_lib=-l$l);; esac
done
LIBS="$LIBS $tcl_lib"
for l in tk tk8.3 tk8.2 tk8.0jp tk4.2jp tk80jp tk42jp tk8.0 tk4.2 tk80 tk42; do
case "x$tk_lib" in x) AC_CHECK_LIB($l,Tk_Init,tk_lib=-l$l);; esac
done
LIBS=$KEEPLIBS
if test "x$tcl_lib" = x -o "x$tk_lib" = x; then
CPPFLAGS=$KEEPCPPFLAGS
LDFLAGS=$KEEPLDFLAGS
enable_tcltk=no
AC_MSG_WARN(tcl/tk libs were not found)
else
tcltk_dep='tclIndex'
EXTRATLIBS="$EXTRATLIBS $tcl_lib $tk_lib"
TCLFILES="tkpanel.tcl browser.tcl misc.tcl"
case "$target" in
*-*-bsdi*)
EXTRATLIBS="$EXTRATLIBS -lipc"
;;
esac
EXTRATDEFS="$EXTRATDEFS -DTCLTK"
fi
])
if test "x$enable_tcltk" = xyes; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
else
AC_MSG_RESULT(no)
fi
dnl X Athena Widget
AC_MSG_CHECKING(enable_xaw)
AM_CONDITIONAL(ENABLE_XAW, false)
if test "x$enable_xaw" = xyes; then
CONFIG_INTERFACE(xaw,XAW,a,
[ --enable-xaw Enable athena interface for TiMidity (default is yes)],
[
dnl if test "x$have_xaw" != "xyes" -a "x$have_xaw" != "x3d"; then
dnl AC_MSG_WARN(X Athena 3D Widget library is not found.)
dnl enable_xaw=no
dnl fi
dnl Add -lXext -lSM -lICE -lXmu -lXt {-lXaw|-lXaw3d}
dnl if test "x$have_xext" = xyes; then
dnl lib_xext_opt=-lXext
dnl fi
dnl if test "x$have_xprelibs" = xyes; then
dnl lib_xprelibs_opt='-lSM -lICE'
dnl fi
dnl lib_xmu_opt=-lXmu
dnl lib_xt_opt=-lXt
dnl if test "x$have_xaw" = x3d; then
dnl EXTRADEFS="$EXTRADEFS -DXAW3D"
dnl lib_xaw_opt=-lXaw3d
dnl else
dnl lib_xaw_opt=-lXaw
dnl fi
EXTRATDEFS="$EXTRATDEFS -DIA_XAW"
EXTRATLIBS="$EXTRATLIBS $all_libraries -lXaw -lXt -lX11"
dnl if test "x$have_xext" = xyes; then
dnl a_so_libs="-lXext -lX11"
dnl else
dnl a_so_libs="-lX11"
dnl fi
dnl if test "x$have_xprelibs" = xyes; then
dnl a_so_libs="-lSM -lICE $a_so_libs"
dnl fi
dnl if test "x$have_xaw" = xyes; then
dnl a_so_libs="-lXaw -lXmu -lXt $a_so_libs"
dnl elif test "x$have_xaw" = x3d; then
dnl EXTRADEFS="$EXTRADEFS -DXAW3D"
dnl a_so_libs="-lXaw3d -lXmu -lXt $a_so_libs"
dnl fi
dnl a_so_libs="$ldflags_x_opt $a_so_libs"
])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
dnl GTK+
AC_MSG_CHECKING(enable_gtk)
AM_CONDITIONAL(ENABLE_GTK, false)
if test "x$enable_gtk" = xyes; then
CONFIG_INTERFACE(gtk, GTK, g,
[ --enable-gtk Enable GTK+ interface for TiMidity (default is no)],
[
AM_PATH_GLIB(1.1.3,
[ AM_PATH_GTK(1.1.3,
[
EXTRATLIBS="$EXTRATLIBS $GTK_LIBS $GLIB_LIBS "
dnl EXTRACT_CPPFLAGS(EXTRATCFLAGS,CFLAGS,$GLIB_CFLAGS)
dnl EXTRACT_CPPFLAGS(EXTRATCFLAGS,CFLAGS,$GTK_CFLAGS)
EXTRATCFLAGS="$EXTRATCFLAGS $GTK_CFLAGS $GLIB_CFLAGS "
EXTRATDEFS="$EXTRATDEFS -DIA_GTK" ],
enable_gtk=no) ],
enable_gtk=no)
])
if test "x$enable_gtk" = xyes; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
else
AC_MSG_RESULT(no)
fi
KMIDI_OPTIMIZE
EXTRATDEFS="$EXTRADEFS $EXTRATDEFS"
EXTRATCFLAGS="$CPPFLAGS $EXTRATCFLAGS"
AC_SUBST_KMIDI