-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
1306 lines (1043 loc) · 42.1 KB
/
configure.ac
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
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
# IMYplay - A program for playing iMelody ringtones (IMY files).
# -- configure.ac, part of the build system.
#
# Copyright (C) 2009-2023 Bogdan Drozdowski, bogdro (at) users . sourceforge . net
# License: GNU General Public License, v3+
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
AC_PREREQ([2.71])
AC_INIT([IMYplay],[2.0],[bogdro@users.sourceforge.net],[imyplay],[https://imyplay.sourceforge.io])
AM_INIT_AUTOMAKE([-Wall])
AC_CONFIG_FILES([Makefile src/Makefile doc/imyplay.txi:doc/imyplay.txc \
po/Makefile.in po/Makefile imyplay.spc:imyplay.spi \
src/imyp_cfg.h:src/imyp_cfg.hin doc/Makefile test/Makefile \
setup/Makefile])
AC_CONFIG_SRCDIR([src/imyplay.c])
AC_CONFIG_HEADERS([config.h:config.hin])
# ==================== configure arguments
AC_ARG_ENABLE(allegro,[[ --enable-allegro Enable Allegro output (default).]],
[if (test "x$enableval" = "xno"); then
feat_allegro=no
else
feat_allegro=yes
fi
]
,feat_allegro=yes)
AC_ARG_ENABLE(SDL,[[ --enable-SDL Enable SDLv1 output.]],
[if (test "x$enableval" = "xno"); then
feat_SDL=no
else
feat_SDL=yes
fi
]
,feat_SDL=yes)
AC_ARG_ENABLE(SDL2,[[ --enable-SDL2 Enable SDLv2 output.]],
[if (test "x$enableval" = "xno"); then
feat_SDL2=no
else
feat_SDL2=yes
fi
]
,feat_SDL2=yes)
AC_ARG_ENABLE(ALSA,[[ --enable-ALSA Enable ALSA output.]],
[if (test "x$enableval" = "xno"); then
feat_ALSA=no
else
feat_ALSA=yes
fi
]
,feat_ALSA=yes)
AC_ARG_ENABLE(OSS,[[ --enable-OSS Enable OSS output.]],
[if (test "x$enableval" = "xno"); then
feat_OSS=no
else
feat_OSS=yes
fi
]
,feat_OSS=yes)
AC_ARG_ENABLE(LIBAO,[[ --enable-LIBAO Enable LIBAO output.]],
[if (test "x$enableval" = "xno"); then
feat_LIBAO=no
else
feat_LIBAO=yes
fi
]
,feat_LIBAO=yes)
AC_ARG_ENABLE(PORTAUDIO,[[ --enable-PORTAUDIO Enable PORTAUDIOv19 output.]],
[if (test "x$enableval" = "xno"); then
feat_PORTAUDIO=no
else
feat_PORTAUDIO=yes
fi
]
,feat_PORTAUDIO=yes)
AC_ARG_ENABLE(PULSEAUDIO,[[ --enable-PULSEAUDIO Enable PULSEAUDIO output.]],
[if (test "x$enableval" = "xno"); then
feat_PULSEAUDIO=no
else
feat_PULSEAUDIO=yes
fi
]
,feat_PULSEAUDIO=yes)
AC_ARG_ENABLE(JACK,[[ --enable-JACK Enable JACK output.]],
[if (test "x$enableval" = "xno"); then
feat_JACK=no
else
feat_JACK=yes
fi
]
,feat_JACK=yes)
AC_ARG_ENABLE(MIDI,[[ --enable-MIDI Enable MIDI output.]],
[if (test "x$enableval" = "xno"); then
feat_MIDI=no
else
feat_MIDI=yes
fi
]
,feat_MIDI=yes)
AC_ARG_ENABLE(EXEC,[[ --enable-EXEC Enable executing commands as output.]],
[if (test "x$enableval" = "xno"); then
feat_EXEC=no
else
feat_EXEC=yes
fi
]
,feat_EXEC=yes)
AC_ARG_ENABLE(GSTREAMER,[[ --enable-GSTREAMER Enable GStreamer output.]],
[if (test "x$enableval" = "xno"); then
feat_GST=no
else
feat_GST=yes
fi
]
,feat_GST=yes)
AC_ARG_ENABLE(FILE,[[ --enable-FILE Enable raw file output.]],
[if (test "x$enableval" = "xno"); then
feat_FILE=no
else
feat_FILE=yes
fi
]
,feat_FILE=yes)
AC_ARG_ENABLE(SPKR,[[ --enable-SPKR Enable PC-Speaker output.]],
[if (test "x$enableval" = "xno"); then
feat_SPKR=no
else
feat_SPKR=yes
fi
]
,feat_SPKR=yes)
AC_ARG_ENABLE(FLEXPARSER,[[ --enable-FLEXPARSER Enable flex-based parser.]],
[if (test "x$enableval" = "xno"); then
feat_FLEX=no
else
feat_FLEX=yes
fi
]
,feat_FLEX=yes)
AC_ARG_ENABLE(LIBHIDEIP,[[ --enable-LIBHIDEIP Enable LibHideIP for IMYplay.]],
[if (test "x$enableval" = "xno"); then
feat_LIBHIDEIP=no
else
feat_LIBHIDEIP=yes
fi
]
,feat_LIBHIDEIP=no)
AC_ARG_ENABLE(LIBNETBLOCK,[[ --enable-LIBNETBLOCK Enable LibNetBlock for IMYplay.]],
[if (test "x$enableval" = "xno"); then
feat_LIBNETBLOCK=no
else
feat_LIBNETBLOCK=yes
fi
]
,feat_LIBNETBLOCK=no)
# ==================== Set of available languages (deprecated).
#ALL_LINGUAS="pl"
# ==================== Checks for programs.
AC_LANG(C)
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_RANLIB
AM_CONDITIONAL(ISGCC, [test "x$GCC" = "xyes"])
have_flex=no
# flex should be searched for unconditionally, because it is
# used in 'make dist'
#if ( test "x$feat_FLEX" = "xyes" ); then
# required by AM_PROG_LEX, otherwise called without
# any arguments and that's deprecated:
AC_PROG_LEX([noyywrap])
AM_PROG_LEX
if ( test "x$LEX" = "xflex" ); then
have_flex=yes
fi
#fi
# ==================== Checks for libraries.
# SDLv2 has functions with the same names as those in SDLv1,
# so enable at most one of the libraries at the same time
if ( test "x$feat_SDL2" = "xyes" ); then
libsdl2=yes
AC_CHECK_LIB([SDL2],[SDL_OpenAudio],,[libsdl2=no])
fi
if ( test "x$feat_SDL" = "xyes" && test "x$libsdl2" != "xyes" ); then
libsdl=yes
AC_CHECK_LIB([SDL],[SDL_OpenAudio],,[libsdl=no])
fi
if ( test "x$feat_allegro" = "xyes" ); then
AC_CHECK_LIB([alleg],[allegro_init],[liballeg=yes],[liballeg=no])
alleg_ldflags=`allegro-config --libs 2>/dev/null`
if (test "x$liballeg" == "xyes" || test "x$alleg_ldflags" != "x" ); then
liballeg=yes
AC_MSG_NOTICE([Using "$alleg_ldflags" as Allegro library flags.])
AC_DEFINE([HAVE_LIBALLEG],[1],[Whether you have the Allegro library.])
fi
if ( test "x$alleg_ldflags" != "x" ); then
# do NOT substitute "LIBS" here! Allegro libraries would make all tests fail
# because of missing _mangled_main_address symbol.
#AC_SUBST(AM_LDFLAGS,"$AM_LDFLAGS $LDFLAGS $alleg_ldflags")
AC_SUBST(ALLEGRO_LDFLAGS,"$alleg_ldflags")
else
AC_MSG_NOTICE([Allegro disabled, both the library and allegro-config are missing.])
fi
fi
if ( test "x$feat_ALSA" = "xyes" ); then
libalsa=yes
AC_CHECK_LIB([asound],[snd_pcm_open],,[libalsa=no])
fi
if ( test "x$feat_LIBAO" = "xyes" ); then
libao=yes
AC_CHECK_LIB([ao],[ao_initialize],,[libao=no])
# XIPH_PATH_AO()
fi
if ( test "x$feat_PORTAUDIO" = "xyes" ); then
libportaudio=yes
AC_CHECK_LIB([portaudio],[Pa_Initialize],,[libportaudio=no])
fi
if ( test "x$feat_PULSEAUDIO" = "xyes" ); then
libpulseaudio=yes
AC_CHECK_LIB([pulse],[pa_stream_new],,[libpulseaudio=no])
if ( test "x$libpulseaudio" = "xyes" ); then
libpulseaudio_simple=yes
AC_CHECK_LIB([pulse-simple],[pa_simple_new],,[libpulseaudio_simple=no])
fi
fi
if ( test "x$feat_JACK" = "xyes" ); then
libjack=yes
AC_CHECK_LIB([jack],[jack_client_open],,[libjack=no])
if ( test "x$libjack" = "xyes" ); then
AC_CHECK_LIB([jack],[jack_free],AC_DEFINE([HAVE_JACK_FREE],[1],
[Whether you have the jack_free() function in the JACK library.]))
AC_CHECK_FUNCS([jack_get_version_string])
fi
fi
libmath=yes
AC_CHECK_LIB([m],[sin],,[libmath=no])
if (test "x$libmath" != "xyes" ); then
AC_CHECK_FUNCS([sin])
fi
if ( test "x$feat_EXEC" = "xyes" ); then
have_system=yes
AC_CHECK_FUNCS([system],AC_DEFINE([HAVE_SYSTEM],[1],
[Whether you have the system() function.]),[have_system=no])
fi
if ( test "x$feat_GST" = "xyes" ); then
PKG_PROG_PKG_CONFIG([])
if ( test "x$PKG_CONFIG" != "x" ); then
libgstreamer=no
PKG_CHECK_MODULES([GST], [gstreamer-controller-1.0], [
libgstreamer=yes
AC_DEFINE([HAVE_GST_GST_H],[1],
[Whether you have the gst/gst.h header.])
], [libgstreamer=no]);
if ( test "x$libgstreamer" = "xno" ); then
PKG_CHECK_MODULES([GST], [gstreamer-controller >= 1.0], [
libgstreamer=yes
AC_DEFINE([HAVE_GST_GST_H],[1],
[Whether you have the gst/gst.h header.])
], [libgstreamer=no]);
fi
if ( test "x$libgstreamer" = "xno" ); then
PKG_CHECK_MODULES([GST], [gstreamer-controller-0.10], [
libgstreamer=yes
AC_DEFINE([HAVE_GST_GST_H],[1],
[Whether you have the gst/gst.h header.])
], [libgstreamer=no]);
fi
if ( test "x$libgstreamer" = "xno" ); then
PKG_CHECK_MODULES([GST], [gstreamer-controller >= 0.10], [
libgstreamer=yes
AC_DEFINE([HAVE_GST_GST_H],[1],
[Whether you have the gst/gst.h header.])
], [libgstreamer=no]);
fi
if ( test "x$libgstreamer" = "xno" ); then
PKG_CHECK_MODULES([GST], [gstreamer-0.10], [
libgstreamer=yes
AC_DEFINE([HAVE_GST_GST_H],[1],
[Whether you have the gst/gst.h header.])
], [libgstreamer=no]);
fi
if ( test "x$libgstreamer" = "xno" ); then
PKG_CHECK_MODULES([GST], [gstreamer >= 0.10], [
libgstreamer=yes
AC_DEFINE([HAVE_GST_GST_H],[1],
[Whether you have the gst/gst.h header.])
], [libgstreamer=no]);
fi
if ( test "x$libgstreamer" = "xyes" ); then
CFLAGS="$CFLAGS $GST_CFLAGS"
LDFLAGS="$LDFLAGS $GST_LIBS"
LIBS="$LIBS $GST_LIBS"
fi
fi
fi
if ( test "x$feat_LIBHIDEIP" = "xyes" ); then
libhip=yes
AC_CHECK_LIB(hideip,[libhideip_enable],,[libhip=no])
fi
if ( test "x$feat_LIBNETBLOCK" = "xyes" ); then
libnb=yes
AC_CHECK_LIB(netblock,[libnetblock_enable],,[libnb=no])
fi
# ==================== Checks for header files.
# AC_ HEADER_ STDC
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP
AC_HEADER_SYS_WAIT()
has_sys_wait_h=yes
AC_CHECK_HEADER([sys/wait.h],AC_DEFINE([HAVE_SYS_WAIT_H],[1],
[Whether you have the sys/wait.h header.]),[AC_CHECK_HEADER([wait.h],
AC_DEFINE([HAVE_WAIT_H],[1],
[Whether you have the wait.h header.]),[has_wait_h=no])])
AC_CHECK_HEADER([string.h],AC_DEFINE([HAVE_STRING_H],[1],[Whether you have the string.h header.]),
[AC_MSG_ERROR([[I need string.h to work.]])])
have_unistd_h=yes
AC_CHECK_HEADERS([unistd.h], AC_DEFINE([HAVE_UNISTD_H],[1],
[Whether you have the unistd.h header.]), have_unistd_h=no)
have_errno_h=yes
AC_CHECK_HEADERS([errno.h], AC_DEFINE([HAVE_ERRNO_H],[1],
[Whether you have the errno.h header.]), have_errno_h=no)
have_stdlib_h=yes
AC_CHECK_HEADERS([stdlib.h], AC_DEFINE([HAVE_STDLIB_H],[1],
[Whether you have the stdlib.h header.]), have_stdlib_h=no)
if ( test "x$feat_FLEX" = "xyes" && test "x$have_flex" = "xyes" ); then
have_inttypes_h=yes
AC_CHECK_HEADERS([inttypes.h], AC_DEFINE([HAVE_INTTYPES_H],[1],
[Whether you have the inttypes.h header.]), have_inttypes_h=no)
fi
AC_CHECK_HEADERS([getopt.h malloc.h sys/types.h locale.h math.h signal.h \
libgen.h strings.h])
AX_INCLUDE_STRCASECMP
if ( test "x$feat_EXEC" = "xyes" && test "x$have_system" = "xyes" ); then
have_stdlib_h=yes
AC_CHECK_HEADER([stdlib.h],AC_DEFINE([HAVE_STDLIB_H],[1],
[Whether you have the stdlib.h header.]), have_stdlib_h=no)
fi
if ( test "x$liballeg" = "xyes" || test "x$alleg_ldflags" != "x" ); then
have_all_h=yes
AC_CHECK_HEADER([allegro.h],AC_DEFINE([HAVE_ALLEGRO_H],[1],
[Whether you have the allegro.h header.]), have_all_h=no)
fi
if ( test "x$libsdl2" = "xyes" ); then
have_sdl2_h=yes
AC_CHECK_HEADER([SDL2/SDL.h],AC_DEFINE([HAVE_SDL2_SDL_H],[1],
[Whether you have the SDL2/SDL.h header.]),
have_sdl2_h=no)
fi
# SDLv2 has functions with the same names as those in SDLv1,
# so enable at most one of the libraries at the same time
if ( test "x$libsdl" = "xyes" && test "x$libsdl2" != "xyes" ); then
have_sdl_h=yes
AC_CHECK_HEADER([SDL/SDL.h],AC_DEFINE([HAVE_SDL_SDL_H],[1],
[Whether you have the SDL/SDL.h header.]),
have_sdl_h=no)
fi
if ( test "x$libalsa" = "xyes" ); then
have_asoundlib_h=yes
AC_CHECK_HEADER([alsa/asoundlib.h],AC_DEFINE([HAVE_ALSA_ASOUNDLIB_H],[1],
[Whether you have the alsa/asoundlib.h header.]),
[AC_CHECK_HEADER([asoundlib.h],AC_DEFINE([HAVE_ASOUNDLIB_H],[1],
[Whether you have the asoundlib.h header.]),
have_asoundlib_h=no)])
fi
if ( test "x$libao" = "xyes" ); then
have_ao_h=yes
AC_CHECK_HEADER([ao/ao.h],AC_DEFINE([HAVE_AO_AO_H],[1],
[Whether you have the ao/ao.h header.]),
[AC_CHECK_HEADER([ao.h],AC_DEFINE([HAVE_AO_H],[1],
[Whether you have the ao.h header.]),
have_ao_h=no)])
fi
if ( test "x$libportaudio" = "xyes" ); then
have_portaudio_h=yes
AC_CHECK_HEADER([portaudio/portaudio.h],AC_DEFINE([HAVE_PORTAUDIO_PORTAUDIO_H],[1],
[Whether you have the portaudio/portaudio.h header.]),
[AC_CHECK_HEADER([portaudio.h],
AC_DEFINE([HAVE_PORTAUDIO_H],[1],
[Whether you have the portaudio.h header.]),
have_portaudio_h=no)])
fi
if ( test "x$libjack" = "xyes" ); then
have_jack_h=yes
AC_CHECK_HEADER([jack/jack.h],AC_DEFINE([HAVE_JACK_JACK_H],[1],
[Whether you have the jack/jack.h header.]),
[AC_CHECK_HEADER([jack.h],
AC_DEFINE([HAVE_JACK_H],[1],
[Whether you have the jack.h header.]),
have_jack_h=no)])
fi
#if ( test "x$have_asoundlib_h" = "xyes" || test "x$feat_OSS" = "xyes" \
# || test "x$have_ao_h" = "xyes" || test "x$have_portaudio_h" = "xyes" \
# || test "x$have_jack_h" = "xyes" || test "x$feat_SPKR" = "xyes"); then
have_select=yes
# No need for AC_FUNC_SELECT_ARGTYPES - we use only
# ( 0, NULL, NULL, NULL, &tv ) and the first parameter can be any
# kind of int or a size_t and the last parameter can be const or not.
AC_CHECK_FUNCS([select],AC_DEFINE([HAVE_SELECT],[1],
[Whether you have the select() function.]),[have_select=no])
if ( test "x$have_select" = "xyes" ); then
have_sys_select_h=yes
have_sys_time_h=yes
have_sys_types_h=yes
# AC_ HEADER_ TIME()
# m4_warn([obsolete],
# [Update your code to rely only on HAVE_SYS_TIME_H,
# then remove this warning and the obsolete code below it.
# All current systems provide time.h; it need not be checked for.
# Not all systems provide sys/time.h, but those that do, all allow
# you to include it and time.h simultaneously.])dnl
# AC_CHECK_HEADERS_ONCE([sys/time.h])
# Obsolete code to be removed.
# if test $ac_cv_header_sys_time_h = yes; then
# AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
# and <time.h>. This macro is obsolete.])
# fi
# End of obsolete code.
AC_CHECK_HEADERS([sys/select.h], AC_DEFINE([HAVE_SYS_SELECT_H],[1],
[Whether you have the sys/select.h header.]), have_sys_select_h=no)
AC_CHECK_HEADERS([sys/time.h], AC_DEFINE([HAVE_SYS_TIME_H],[1],
[Whether you have the sys/time.h header.]), have_sys_time_h=no)
AC_CHECK_HEADERS([sys/types.h], AC_DEFINE([HAVE_SYS_TYPES_H],[1],
[Whether you have the sys/types.h header.]), have_sys_types_h=no)
fi
#fi
if ( test "x$feat_SPKR" = "xyes" ); then
have_sys_kd_h=yes
AC_CHECK_HEADERS([sys/kd.h], AC_DEFINE([HAVE_SYS_KD_H],[1],
[Whether you have the sys/kd.h header.]), have_sys_kd_h=no)
have_kiocsound=no
if ( test "x$have_sys_kd_h" = "xyes" ); then
have_kiocsound=yes
AC_CHECK_DECL([KIOCSOUND],[AC_DEFINE([HAVE_DECL_KIOCSOUND], [1], [Whether KIOCSOUND is defined])],
[have_kiocsound=no],
[
#ifdef HAVE_SYS_KD_H
#include <sys/kd.h>
#endif
])
fi
fi
if ( test "x$feat_SPKR" = "xyes" || test "x$feat_OSS" = "xyes" ); then
have_sys_ioctl_h=yes
AC_CHECK_HEADERS([sys/ioctl.h], AC_DEFINE([HAVE_SYS_IOCTL_H],[1],
[Whether you have the sys/ioctl.h header.]), have_sys_ioctl_h=no)
have_fcntl_h=yes
AC_CHECK_HEADERS([fcntl.h], AC_DEFINE([HAVE_FCNTL_H],[1],
[Whether you have the fcntl.h header.]), have_fcntl_h=no)
if ( test "x$have_sys_ioctl_h" = "xyes" \
&& test "x$have_fcntl_h" = "xyes" \
); then
have_ioctl=yes
AC_CHECK_FUNCS([ioctl],AC_DEFINE([HAVE_IOCTL],[1],
[Whether you have the ioctl() function.]),[have_ioctl=no])
have_open=yes
AC_CHECK_FUNCS([open],AC_DEFINE([HAVE_OPEN],[1],
[Whether you have the open() function.]),[have_open=no])
have_close=yes
AC_CHECK_FUNCS([close],AC_DEFINE([HAVE_CLOSE],[1],
[Whether you have the close() function.]),[have_close=no])
fi
fi
if ( test "x$feat_OSS" = "xyes" ); then
have_sys_soundcard_h=yes
AC_CHECK_HEADERS([sys/soundcard.h], AC_DEFINE([HAVE_SYS_SOUNDCARD_H],[1],
[Whether you have the sys/soundcard.h header.]), have_sys_soundcard_h=no)
if ( test "x$have_sys_soundcard_h" = "xyes" \
&& test "x$have_fcntl_h" = "xyes" \
); then
have_write=yes
AC_CHECK_FUNCS([write],AC_DEFINE([HAVE_WRITE],[1],
[Whether you have the write() function.]),[have_write=no])
fi
fi
if ( test "x$libpulseaudio_simple" = "xyes" && test "x$libpulseaudio" = "xyes" ); then
have_pulseaudio_simple_h=yes
AC_CHECK_HEADER([pulse/simple.h],AC_DEFINE([HAVE_PULSE_SIMPLE_H],[1],
[Whether you have the pulse/simple.h header.]),
[AC_CHECK_HEADER([simple.h],
AC_DEFINE([HAVE_SIMPLE_H],[1],
[Whether you have the simple.h header.]),
have_pulseaudio_simple_h=no)])
fi
if ( test "x$feat_LIBHIDEIP" = "xyes" && test "x$libhip" = "xyes" ); then
have_libhideip_h=yes
AC_CHECK_HEADER([libhideip.h],AC_DEFINE([HAVE_LIBHIDEIP_H],[1],
[Whether you have the libhideip.h header.]), have_libhideip_h=no)
fi
if ( test "x$feat_LIBNETBLOCK" = "xyes" && test "x$libnb" = "xyes" ); then
have_libnetblock_h=yes
AC_CHECK_HEADER([libnetblock.h],AC_DEFINE([HAVE_LIBNETBLOCK_H],[1],
[Whether you have the libnetblock.h header.]), have_libnetblock_h=no)
fi
if ( test "x$feat_FILE" = "xyes" ); then
# check for a marker function (that is always present), so we can detect it
have_fwrite=yes
AC_CHECK_FUNCS([fwrite],AC_DEFINE([HAVE_FWRITE],[1],
[Whether you have the fwrite() function.]),[have_fwrite=no])
fi
have_malloc=yes
AC_CHECK_FUNCS([malloc],AC_DEFINE([HAVE_MALLOC],[1],
[Whether you have the malloc() function.]),[have_malloc=no])
have_memset=yes
AC_CHECK_FUNCS([memset],AC_DEFINE([HAVE_MEMSET],[1],
[Whether you have the memset() function.]),[have_memset=no])
have_memcpy=yes
AC_CHECK_FUNCS([memcpy],AC_DEFINE([HAVE_MEMCPY],[1],
[Whether you have the memcpy() function.]),[have_memcpy=no])
if ( test "x$feat_MIDI" == "xyes" || test "x$feat_FLEX" = "xyes" ); then
have_realloc=yes
AC_CHECK_FUNCS([realloc],AC_DEFINE([HAVE_REALLOC],[1],
[Whether you have the realloc() function.]),[have_realloc=no])
fi
if ( test "x$feat_MIDI" == "xyes" ); then
have_qsort=yes
AC_CHECK_FUNCS([qsort],AC_DEFINE([HAVE_QSORT],[1],
[Whether you have the qsort() function.]),[have_qsort=no])
AC_CHECK_HEADERS([stdint.h])
fi
AM_CONDITIONAL(ALLEGRO, [test "x$feat_allegro" = "xyes" && \
(test "x$liballeg" = "xyes" || test "x$alleg_ldflags" != "x") && \
test "x$have_all_h" = "xyes"])
# SDLv2 has functions with the same names as those in SDLv1,
# so enable at most one of the libraries at the same time
AM_CONDITIONAL(SDL2, [test "x$feat_SDL2" = "xyes" && test "x$libsdl2" = "xyes" \
&& test "x$have_sdl2_h" = "xyes"])
AM_CONDITIONAL(SDL, [test "x$feat_SDL" = "xyes" && test "x$libsdl" = "xyes" \
&& test "x$have_sdl_h" = "xyes" && test "x$libsdl2" != "xyes" ])
AM_CONDITIONAL(ALSA, [test "x$feat_ALSA" = "xyes" && test "x$libalsa" = "xyes" \
&& test "x$have_asoundlib_h" = "xyes" \
&& test "x$have_select" = "xyes" && ( test "x$have_sys_select_h" = "xyes" || ( \
test "x$have_sys_time_h" = "xyes" && \
test "x$have_sys_types_h" = "xyes" && \
test "x$have_unistd_h" = "xyes") \
)])
AM_CONDITIONAL(OSS, [test "x$feat_OSS" = "xyes" && test "x$have_ioctl" = "xyes" \
&& test "x$have_sys_soundcard_h" = "xyes" \
&& test "x$have_sys_ioctl_h" = "xyes" && test "x$have_fcntl_h" = "xyes" \
&& test "x$have_unistd_h" = "xyes" && test "x$have_open" = "xyes" \
&& test "x$have_close" = "xyes" && test "x$have_write" = "xyes" \
&& test "x$have_select" = "xyes" && ( test "x$have_sys_select_h" = "xyes" || ( \
test "x$have_sys_time_h" = "xyes" && \
test "x$have_sys_types_h" = "xyes") \
)])
AM_CONDITIONAL(LIBAO, [test "x$feat_LIBAO" = "xyes" && test "x$libao" = "xyes" \
&& test "x$have_ao_h" = "xyes" \
&& test "x$have_select" = "xyes" && ( test "x$have_sys_select_h" = "xyes" || ( \
test "x$have_sys_time_h" = "xyes" && \
test "x$have_sys_types_h" = "xyes" && \
test "x$have_unistd_h" = "xyes") \
)])
AM_CONDITIONAL(PORTAUDIO, [test "x$feat_PORTAUDIO" = "xyes" && test "x$libportaudio" = "xyes" && \
test "x$have_portaudio_h" = "xyes"])
AM_CONDITIONAL(PULSEAUDIO, [test "x$feat_PULSEAUDIO" = "xyes" \
&& test "x$libpulseaudio_simple" = "xyes" && test "x$libpulseaudio" = "xyes" \
&& test "x$have_pulseaudio_simple_h" = "xyes"])
AM_CONDITIONAL(JACK, [test "x$feat_JACK" = "xyes" && test "x$libjack" = "xyes" \
&& test "x$have_jack_h" = "xyes" \
&& test "x$have_select" = "xyes" && ( test "x$have_sys_select_h" = "xyes" || ( \
test "x$have_sys_time_h" = "xyes" && \
test "x$have_sys_types_h" = "xyes" && \
test "x$have_unistd_h" = "xyes") \
)])
AM_CONDITIONAL(MIDI, [test "x$feat_MIDI" = "xyes" && test "x$have_malloc" = "xyes" \
&& test "x$have_realloc" = "xyes" && test "x$have_memset" = "xyes" \
&& test "x$have_memcpy" = "xyes" && test "x$have_qsort" = "xyes"])
AM_CONDITIONAL(EXEC, [test "x$feat_EXEC" = "xyes" && test "x$have_stdlib_h" = "xyes" \
&& test "x$have_system" = "xyes"])
AM_CONDITIONAL(GSTREAMER, [test "x$feat_GST" = "xyes" && test "x$libgstreamer" = "xyes"])
AM_CONDITIONAL(FILE, [test "x$feat_FILE" = "xyes" && test "x$have_fwrite" = "xyes"])
AM_CONDITIONAL(SPKR, [test "x$feat_SPKR" = "xyes" && test "x$have_ioctl" = "xyes" \
&& test "x$have_sys_kd_h" = "xyes" && test "x$have_kiocsound" = "xyes" \
&& test "x$have_sys_ioctl_h" = "xyes" && test "x$have_fcntl_h" = "xyes" \
&& test "x$have_unistd_h" = "xyes" && test "x$have_open" = "xyes" \
&& test "x$have_close" = "xyes" && test "x$have_select" = "xyes" \
&& ( test "x$have_sys_select_h" = "xyes" || ( \
test "x$have_sys_time_h" = "xyes" && \
test "x$have_sys_types_h" = "xyes") \
)])
imyp_flex_enabled=no
if ( test "x$feat_FLEX" = "xyes" && test "x$have_flex" = "xyes" \
&& test "x$have_unistd_h" = "xyes" && test "x$have_errno_h" = "xyes" \
&& test "x$have_stdlib_h" = "xyes" && test "x$have_inttypes_h" = "xyes" \
&& test "x$have_malloc" = "xyes" && test "x$have_realloc" = "xyes"); then
imyp_flex_enabled=yes
fi
AM_CONDITIONAL(FLEX, [test "x$imyp_flex_enabled" = "xyes" ])
# ===================== Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_VOLATILE
AC_TYPE_LONG_LONG_INT
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT32_T
AC_CHECK_TYPES([sig_atomic_t],,,
[
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
])
# Checks for library functions.
# AC_ TYPE_ SIGNAL
# m4_warn([obsolete],
# [your code may safely assume C89 semantics that RETSIGTYPE is void.
# Remove this warning and the AC_CACHE_CHECK when you adjust the code.])dnl
AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([#include <sys/types.h>
#include <signal.h>
],
[return *(signal (0, 0)) (0) == 1;])],
[ac_cv_type_signal=int],
[ac_cv_type_signal=void])])
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
(int or void).])
AC_FUNC_MALLOC
AC_CHECK_FUNCS([setlocale sigaction snprintf basename getopt_long \
strcasecmp strdup getenv])
if ( test "x$imyp_flex_enabled" != "xyes" ); then
AC_FUNC_FSEEKO
AC_CHECK_FUNCS([ftello])
fi
AM_GNU_GETTEXT_VERSION([0.21])
AM_GNU_GETTEXT([external])
# Can be /usr/local/include/libintl.h. Use --with-libintl-prefix=DIR then.
# The macros above set the correct CFLAGS if this option is given.
AC_CHECK_HEADERS([libintl.h])
have_check=no
#ACTION-IF-NOT-FOUND is required, otherwise 'configure' fails
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [have_check=yes], [have_check=no])
#AM_PATH_CHECK([], [have_check=yes])
AM_CONDITIONAL([IMY_TESTS_ENABLED], [test "x$have_check" = "xyes"])
if (test "x$GCC" = "xyes" ); then
AX_C_CHECK_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wextra], [CFLAGS="$CFLAGS -Wextra"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-W], [CFLAGS="$CFLAGS -W"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wfloat-equal], [CFLAGS="$CFLAGS -Wfloat-equal"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wbad-function-cast], [CFLAGS="$CFLAGS -Wbad-function-cast"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wsign-compare], [CFLAGS="$CFLAGS -Wsign-compare"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wunreachable-code], [CFLAGS="$CFLAGS -Wunreachable-code"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wpointer-arith], [CFLAGS="$CFLAGS -Wpointer-arith"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wcast-qual], [CFLAGS="$CFLAGS -Wcast-qual"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wcast-align], [CFLAGS="$CFLAGS -Wcast-align"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wstrict-prototypes], [CFLAGS="$CFLAGS -Wstrict-prototypes"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wformat -Wformat-security], [CFLAGS="$CFLAGS -Wformat -Wformat-security"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wformat -Wformat-nonliteral], [CFLAGS="$CFLAGS -Wformat -Wformat-nonliteral"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wformat -Wformat-overflow=2], [CFLAGS="$CFLAGS -Wformat -Wformat-overflow=2"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wnested-externs], [CFLAGS="$CFLAGS -Wnested-externs"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wshadow], [CFLAGS="$CFLAGS -Wshadow"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wconversion], [CFLAGS="$CFLAGS -Wconversion"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wdeclaration-after-statement], [CFLAGS="$CFLAGS -Wdeclaration-after-statement"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wundef], [CFLAGS="$CFLAGS -Wundef"], [CFLAGS="$CFLAGS"])
#AX_C_CHECK_FLAG([-Wpadded], [CFLAGS="$CFLAGS -Wpadded"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wredundant-decls], [CFLAGS="$CFLAGS -Wredundant-decls"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wfatal-errors], [CFLAGS="$CFLAGS -Wfatal-errors"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-pedantic], [CFLAGS="$CFLAGS -pedantic"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wno-strict-aliasing], [CFLAGS="$CFLAGS -Wno-strict-aliasing"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wmissing-declarations], [CFLAGS="$CFLAGS -Wmissing-declarations"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-O1 -Wuninitialized], [CFLAGS="$CFLAGS -O1 -Wuninitialized"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Winit-self], [CFLAGS="$CFLAGS -Winit-self"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wlogical-op], [CFLAGS="$CFLAGS -Wlogical-op"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-O2], [CFLAGS="$CFLAGS -O2"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-O3], [CFLAGS="$CFLAGS -O3"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Waggregate-return], [CFLAGS="$CFLAGS -Waggregate-return"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wwrite-strings], [CFLAGS="$CFLAGS -Wwrite-strings"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wchkp], [CFLAGS="$CFLAGS -Wchkp"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wduplicated-cond], [CFLAGS="$CFLAGS -Wduplicated-cond"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wrestrict], [CFLAGS="$CFLAGS -Wrestrict"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Woverlength-strings], [CFLAGS="$CFLAGS -Woverlength-strings"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wno-nonnull-compare], [CFLAGS="$CFLAGS -Wno-nonnull-compare"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wstringop-truncation], [CFLAGS="$CFLAGS -Wstringop-truncation"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-Wduplicated-branches], [CFLAGS="$CFLAGS -Wduplicated-branches"], [CFLAGS="$CFLAGS"])
if ( ! [ echo "x$host_os" | grep mingw >/dev/null ] ); then
# no stack checking if cross-compiling, otherwise
# "libssp-0.dll" required at run-time
AX_C_CHECK_FLAG([-fstack-protector-all], [CFLAGS="$CFLAGS -fstack-protector-all"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-fstack-check], [CFLAGS="$CFLAGS -fstack-check"], [CFLAGS="$CFLAGS"])
fi
# disabled, because of too much noise from the generated flex output file:
#AX_C_CHECK_FLAG([-fanalyzer], [CFLAGS="$CFLAGS -fanalyzer"], [CFLAGS="$CFLAGS"])
AX_C_CHECK_FLAG([-g], [CFLAGS="$CFLAGS -g"], [CFLAGS="$CFLAGS"]) # needed for the 'debuginfo' rpm package
# if (test "x$have_ll" = "xyes"); then
#
# AX_C_CHECK_FLAG([-std=gnu99], [CFLAGS="$CFLAGS -std=gnu99"], [CFLAGS="$CFLAGS"])
# AX_C_CHECK_FLAG([-Wno-long-long], [CFLAGS="$CFLAGS -Wno-long-long"], [CFLAGS="$CFLAGS"])
# fi
fi
# this doubles the CFLAGS on compile:
#AC_SUBST(AM_CFLAGS,$CFLAGS)
# =====================
AC_OUTPUT
# ===================== Print summary
echo "***********************************"
if ( test "x$feat_allegro" = "xyes" && (test "x$liballeg" = "xyes" || test "x$alleg_ldflags" != "x") && \
test "x$have_all_h" = "xyes"); then
echo " * Allegro: yes"
else
if (test "x$feat_allegro" != "xyes"); then
echo " * Allegro: no (disabled by command line)"
elif ( test "x$liballeg" != "xyes" && test "x$alleg_ldflags" = "x" ); then
echo " * Allegro: no (library missing or unusable)"
else #if (test "x$have_all_h" != "xyes"); then
echo " * Allegro: no (allegro.h header missing)"
fi
fi
# SDLv2 has functions with the same names as those in SDLv1,
# so enable at most one of the libraries at the same time
if ( test "x$feat_SDL2" = "xyes" && test "x$libsdl2" = "xyes" && test "x$have_sdl2_h" = "xyes"); then
echo " * SDLv2: yes"
else
if (test "x$feat_SDL2" != "xyes"); then
echo " * SDLv2: no (disabled by command line)"
elif ( test "x$libsdl2" != "xyes" ); then
echo " * SDLv2: no (library missing or unusable)"
else #if (test "x$have_sdl2_h" != "xyes"); then
echo " * SDLv2: no (SDL.h header missing)"
fi
fi
AM_CONDITIONAL(SDL2, [test "x$feat_SDL2" = "xyes" && test "x$libsdl2" = "xyes" \
&& test "x$have_sdl2_h" = "xyes"])
if ( test "x$feat_SDL" = "xyes" && test "x$libsdl" = "xyes" \
&& test "x$have_sdl_h" = "xyes" &&
(test "x$feat_SDL2" != "xyes" || test "x$libsdl2" != "xyes" \
|| test "x$have_sdl2_h" != "xyes")); then
echo " * SDLv1: yes"
else
if (test "x$feat_SDL2" = "xyes" && test "x$libsdl2" = "xyes" \
&& test "x$have_sdl2_h" = "xyes"); then
echo " * SDLv1: no (disabled by SDLv2)"
elif (test "x$feat_SDL" != "xyes"); then
echo " * SDLv1: no (disabled by command line)"
elif ( test "x$libsdl" != "xyes" ); then
echo " * SDLv1: no (library missing or unusable)"
else #if (test "x$have_sdl_h" != "xyes"); then
echo " * SDLv1: no (SDL.h header missing)"
fi
fi
if ( test "x$feat_ALSA" = "xyes" && test "x$libalsa" = "xyes" && \
test "x$have_asoundlib_h" = "xyes" \
&& test "x$have_select" = "xyes" && ( test "x$have_sys_select_h" = "xyes" || ( \
test "x$have_sys_time_h" = "xyes" && \
test "x$have_sys_types_h" = "xyes" && \
test "x$have_unistd_h" = "xyes") \
)); then
echo " * ALSA: yes"
else
if (test "x$feat_ALSA" != "xyes"); then
echo " * ALSA: no (disabled by command line)"
elif ( test "x$libalsa" != "xyes" ); then
echo " * ALSA: no (library missing or unusable)"
elif ( test "x$have_select" != "xyes" ); then
echo " * ALSA: no (select() function missing)"
elif ( ! ( test "x$have_sys_select_h" = "xyes" || ( \
test "x$have_sys_time_h" = "xyes" && \
test "x$have_sys_types_h" = "xyes" && \
test "x$have_unistd_h" = "xyes") \
) ); then
echo " * ALSA: no (select() headers missing or unusable)"
else #(test "x$have_asoundlib_h" != "xyes"); then
echo " * ALSA: no (asoundlib.h header missing)"
fi
fi
if ( test "x$feat_OSS" = "xyes" && test "x$have_ioctl" = "xyes" \
&& test "x$have_sys_soundcard_h" = "xyes" \
&& test "x$have_sys_ioctl_h" = "xyes" && test "x$have_fcntl_h" = "xyes" \
&& test "x$have_unistd_h" = "xyes" && test "x$have_open" = "xyes" \
&& test "x$have_close" = "xyes" && test "x$have_write" = "xyes" \
&& test "x$have_select" = "xyes" && ( test "x$have_sys_select_h" = "xyes" || ( \
test "x$have_sys_time_h" = "xyes" && \
test "x$have_sys_types_h" = "xyes") \
) \
); then
echo " * OSS: yes"
else
if (test "x$feat_OSS" != "xyes"); then
echo " * OSS: no (disabled by command line)"
elif (test "x$have_sys_soundcard_h" != "xyes"); then
echo " * OSS: no (sys/soundcard.h header missing)"
elif ( test "x$have_ioctl" != "xyes" ); then
echo " * OSS: no (ioctl() function missing)"
elif ( test "x$have_sys_ioctl_h" != "xyes" ); then
echo " * OSS: no (sys/ioctl.h header missing)"
elif ( test "x$have_fcntl_h" != "xyes" ); then
echo " * OSS: no (fcntl.h header missing)"
elif ( test "x$have_unistd_h" != "xyes" ); then
echo " * OSS: no (unistd.h header missing)"
elif ( test "x$have_open" != "xyes" ); then
echo " * OSS: no (open() function missing)"
elif ( test "x$have_close" != "xyes" ); then
echo " * OSS: no (close() function missing)"
elif ( test "x$have_write" != "xyes" ); then
echo " * OSS: no (write() function missing)"
elif ( test "x$have_select" != "xyes" ); then
echo " * OSS: no (select() function missing)"
elif ( ! ( test "x$have_sys_select_h" = "xyes" || ( \
test "x$have_sys_time_h" = "xyes" && \
test "x$have_sys_types_h" = "xyes" && \
test "x$have_unistd_h" = "xyes") \
) ); then
echo " * OSS: no (select() headers missing or unusable)"
else
echo " * OSS: no (reason unknown)"