-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
2520 lines (2357 loc) · 78.9 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
# This file is part of libmicrohttpd.
# (C) 2006-2021 Christian Grothoff (and other contributing authors)
#
# libmicrohttpd 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 3, or (at your
# option) any later version.
#
# libmicrohttpd 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 libmicrohttpd; see the file COPYING. If not, write to the
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
#
# Process this file with autoconf to produce a configure script.
#
#
AC_PREREQ([2.64])
LT_PREREQ([2.4.0])
AC_INIT([GNU Libmicrohttpd],[0.9.73],[libmicrohttpd@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([silent-rules] [subdir-objects])
AC_CONFIG_HEADERS([MHD_config.h])
AC_CONFIG_MACRO_DIR([m4])
LIB_VERSION_CURRENT=70
LIB_VERSION_REVISION=0
LIB_VERSION_AGE=58
AC_SUBST(LIB_VERSION_CURRENT)
AC_SUBST(LIB_VERSION_REVISION)
AC_SUBST(LIB_VERSION_AGE)
AC_MSG_CHECKING([[whether z/OS special settings are required]])
AS_IF([test `uname -s` = "OS/390"],
[
# configure binaries for z/OS
AS_IF([test -z "$CC"],
[CC=`pwd`"/contrib/xcc"
chmod +x $CC || true])
AS_IF([test -z "$CPP"],
CPP="c89 -E")
AS_IF([test -z "$CXXCPP"],
CXXCPP="c++ -E -+")
AC_MSG_RESULT([[yes]])
# _CCC_CCMODE=1
# _C89_CCMODE=1
],
AC_MSG_RESULT([[no]])
)
# Checks for programs.
AC_PROG_AWK
AC_PROG_GREP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_CANONICAL_HOST
m4_version_prereq([2.70],
[
# Find C compiler and compiler options to support
# the latest C standard (C11). Fallback to C99 and C89
# if later C versions are not supported.
AC_PROG_CC
],
[
# Find C compiler and compiler options to support
# the latest C standard (C99). Fallback to C89
# if later C versions are not supported.
AC_PROG_CC_STDC
]
)
MHD_SYS_EXT
LT_INIT([win32-dll])
LT_LANG([Windows Resource])
# Checks for gettext.
m4_ifdef([AM_GNU_GETTEXT], [
AS_VAR_SET_IF([enable_nls], [], [[enable_nls=no]])
AM_GNU_GETTEXT([external],[need-ngettext])
AC_CONFIG_FILES([po/Makefile.in])
have_po=yes
], [
have_po=no
])
m4_ifdef([AM_GNU_GETTEXT_VERSION], [
#do not indent here
AM_GNU_GETTEXT_VERSION([0.20.2])
])
AM_CONDITIONAL([HAVE_PO], [ test "$have_po" = yes ])
# Adam shostack suggests the following for Windows:
# -D_FORTIFY_SOURCE=2 -fstack-protector-all
AC_ARG_ENABLE([gcc-hardening],
[AS_HELP_STRING([--enable-gcc-hardening], [enable compiler security checks])],
[AS_IF([test x$enableval = xyes],[
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all"
CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
CFLAGS="$CFLAGS --param ssp-buffer-size=1"
LDFLAGS="$LDFLAGS -pie"
])])
# Linker hardening options
# Currently these options are ELF specific - you can't use this with MacOSX
AC_ARG_ENABLE([linker-hardening],
[AS_HELP_STRING([--enable-linker-hardening], [enable linker security fixups])],
[AS_IF([test x$enableval = xyes],
[LDFLAGS="$LDFLAGS -z relro -z now"])])
AC_ARG_ENABLE([sanitizer],
[AS_HELP_STRING([--enable-sanitizer], [enable Address Sanitizer and Undefined Behavior Sanitizer])],
[AS_IF([test x$enableval = xyes],[
CFLAGS="$CFLAGS -fsanitize=address,undefined -fno-omit-frame-pointer"
])])
# Workaround for libgcrypt
AS_IF([[test "x$lt_sysroot" != "x" && test "x$SYSROOT" = "x"]], [[SYSROOT="$lt_sysroot"]])
PACKAGE_VERSION_MAJOR='m4_car(m4_unquote(m4_split(AC_PACKAGE_VERSION, [\.])))'
PACKAGE_VERSION_MINOR='m4_argn(2, m4_unquote(m4_split(AC_PACKAGE_VERSION, [\.])))'
PACKAGE_VERSION_SUBMINOR='m4_argn(3, m4_unquote(m4_split(AC_PACKAGE_VERSION, [\.])))'
AS_VAR_ARITH([MHD_W32_DLL_SUFF],[[$LIB_VERSION_CURRENT - $LIB_VERSION_AGE]])
AC_SUBST([PACKAGE_VERSION_MAJOR])
AC_SUBST([PACKAGE_VERSION_MINOR])
AC_SUBST([PACKAGE_VERSION_SUBMINOR])
AC_SUBST([MHD_W32_DLL_SUFF])
AC_CONFIG_FILES([src/microhttpd/microhttpd_dll_res.rc])
MHD_LIB_CPPFLAGS=""
MHD_LIB_CFLAGS=""
MHD_LIB_LDFLAGS=""
MHD_LIBDEPS=""
# for pkg-config
MHD_REQ_PRIVATE=''
MHD_LIBDEPS_PKGCFG=''
AH_TEMPLATE([[HAVE_STDBOOL_H]], [Define to 1 if you have the <stdbool.h> header file and <stdbool.h> defines 'bool' type.])
AH_TEMPLATE([[HAVE_REAL_BOOL]], [Define to 1 if you have the real boolean type.])
AH_TEMPLATE([[bool]], [Define to type name which will be used as boolean type.])
AC_CHECK_HEADER([stdbool.h],
[
AC_CHECK_TYPE([bool],
[
AC_DEFINE([[HAVE_STDBOOL_H]], [[1]])
AC_DEFINE([[HAVE_REAL_BOOL]], [[1]])
],
[
AC_MSG_WARN([[Header <stdbool.h> is present, but "bool" type cannot be detected. Check compiler flags.]])
AC_DEFINE([[bool]], [[int]])
], [
#include <stdbool.h>
]
)
],
[
AC_CHECK_TYPE([bool],
[AC_DEFINE([[HAVE_REAL_BOOL]], [[1]])],
[
AC_CHECK_TYPE([_Bool],
[
AC_DEFINE([[HAVE_REAL_BOOL]], [[1]])
AC_DEFINE([[bool]], [[_Bool]])
],
[
AC_DEFINE([[bool]], [[int]])
], []
)
], []
)
],
[AC_INCLUDES_DEFAULT]
)
AC_CACHE_CHECK([[whether "true" is defined or builtin]], [[mhd_cv_macro_true_defined]],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
]], [[
#if defined(true)
/* dummy */
#else
(void)true;
#endif
]])
], [[mhd_cv_macro_true_defined='yes']], [[mhd_cv_macro_true_defined='no']])
])
AS_VAR_IF([[mhd_cv_macro_true_defined]], [["yes"]], [[:]],
[AC_DEFINE([[true]],[[(!0)]], [Define to value interpreted by compiler as boolean "true", if "true" is not defined by system headers.])])
AC_CACHE_CHECK([[whether "false" is defined or builtin]], [[mhd_cv_macro_false_defined]],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
]], [[
#if !defined(false)
(void)false;
#else
/* dummy */
#endif
]])
], [[mhd_cv_macro_false_defined='yes']], [[mhd_cv_macro_false_defined='no']])
])
AS_VAR_IF([[mhd_cv_macro_false_defined]], [["yes"]], [[:]],
[AC_DEFINE([[false]],[[0]], [Define to value interpreted by compiler as boolean "false", if "false" is not defined by system headers.])])
AC_CACHE_CHECK([[whether "true" and "false" could be used]], [[mhd_cv_macro_true_false_valid]],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
]], [[
int var1[true ? 1 : -1] = { 1 };
int var2[false ? -1 : 1] = { 2 };
int var3[!true ? -1 : 1] = { 3 };
int var4[!false ? 1 : -1] = { 4 };
if (var1[0] == var2[0] || var3[0] == var4[0])
return 1;
]])
], [[mhd_cv_macro_true_false_valid='yes']], [[mhd_cv_macro_true_false_valid='no']])
])
AS_VAR_IF([[mhd_cv_macro_true_false_valid]], [["yes"]], [[:]],
[AC_MSG_ERROR([[Value of "true" or value of "false" is not valid. Check config.log for details.]])])
AX_CHECK_COMPILE_FLAG([[-Werror=attributes]],
[
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror=attributes"
AC_MSG_CHECKING([[whether -Werror=attributes actually works]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[__attribute__((non_existing_attrb_dummy)) int SimpleFunc(void) {return 3;}]], [[int r = SimpleFunc(); if (r) return r;]])],
[
AC_MSG_RESULT([[no]])
errattr_CFLAGS=""
], [
AC_MSG_RESULT([[yes]])
errattr_CFLAGS="-Werror=attributes"
])
CFLAGS="$save_CFLAGS"
],
[[errattr_CFLAGS=""]], [], [])
AC_MSG_CHECKING([[for function inline keywords supported by $CC]])
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $errattr_CFLAGS"
inln_prfx="none"
# Prefer always inline functions
for inln_prfx_chk in InlineWithAttr __forceinline inline __inline__ __inline _inline _Inline; do
# Try to link to avoid "symbol undefined" problems at build time
AS_IF([[test "x$inln_prfx_chk" = "xInlineWithAttr"]],
[
AS_IF([[test "x$errattr_CFLAGS" = "x"]],
[[ # Skip test with attribute as negative result can't be detected
inln_prfx_chk="__forceinline" # use next value
]],[[inln_prfx_chk="inline __attribute__((always_inline))"]])
])
AC_LINK_IFELSE(
[
AC_LANG_PROGRAM(
[[
#ifdef __cplusplus
#error This test is only for C.
choke me
#endif
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
static $inln_prfx_chk bool cmpfn(int x, int y)
{ return x > y; }
static $inln_prfx_chk int sumfn(int x, int y)
{ return x + y; }
]],[[
int a = 1, b = 100, c;
if (cmpfn(a, b))
c = sumfn(a, b);
else
c = 0 - sumfn(a, b);
]])
],
[[ inln_prfx="$inln_prfx_chk" ]])
test "x$inln_prfx" != "xnone" && break
done
AS_IF([[test "x$inln_prfx" != "xnone"]],
[
AC_DEFINE([INLINE_FUNC],[1],[Define to 1 if your C compiler supports inline functions.])
AC_DEFINE_UNQUOTED([_MHD_static_inline],[static $inln_prfx],[Define to prefix which will be used with MHD static inline functions.])
], [
AC_DEFINE([_MHD_static_inline],[static],[Define to prefix which will be used with MHD static inline functions.])
])
AC_MSG_RESULT([[$inln_prfx]])
CFLAGS="$save_CFLAGS"
AC_CHECK_HEADERS([stdalign.h], [], [], [AC_INCLUDES_DEFAULT])
AC_CACHE_CHECK([[for C11 'alignof()' support]], [[mhd_cv_c_alignof]],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
#ifdef HAVE_STDALIGN_H
#include <stdalign.h>
#endif
]], [[
#if (defined (__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 9 && ! defined(__clang__)) || \
(defined (__clang__) && __clang_major__ < 8)
/* GCC before 4.9 and clang before 8.0 have incorrect implementation of 'alignof()'
which returns preferred alignment instead of minimal required alignment */
#error Compiler has incorrect implementation of alignof()
choke me now
#endif
int var1[(alignof(int) >= 2) ? 1 : -1];
int var2[alignof(unsigned int) - 1];
int var3[(alignof(char) > 0) ? 1 : -1];
int var4[(alignof(long) >= 4) ? 1 : -1];
/* Mute compiler warnings */
var1[0] = var2[0] = var3[0] = 0;
var4[0] = 1;
if (var1[0] + var2[0] + var3[0] == var4[0])
return 1;
]])
], [
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
#ifdef HAVE_STDALIGN_H
#include <stdalign.h>
#endif
]], [[
/* Should fail if 'alignof()' works */
int var1[alignof(nonexisting_type) - 1];
/* Mute compiler warnings */
var1[0] = 1;
if (var1[0] + 1 == 1)
return 1;
]])
], [[mhd_cv_c_alignof='no']], [[mhd_cv_c_alignof='yes']])
], [[mhd_cv_c_alignof='no']])
])
AS_VAR_IF([mhd_cv_c_alignof], ["yes"],
[AC_DEFINE([[HAVE_C_ALIGNOF]], [1], [Define to 1 if your compiler supports 'alignof()'])])
# Check system type
shutdown_trig_select='no'
AC_MSG_CHECKING([[for target host OS]])
AS_CASE(["$host_os"],
[*darwin* | *rhapsody* | *macosx*],
[AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
CFLAGS="-no-cpp-precomp -fno-common $CFLAGS"
mhd_host_os='Darwin'
AC_MSG_RESULT([[$mhd_host_os]])],
[freebsd*],
[AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
mhd_host_os='FreeBSD'
AC_MSG_RESULT([[$mhd_host_os]])],
[openbsd*],
[AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
mhd_host_os='OpenBSD'
AC_MSG_RESULT([[$mhd_host_os]])],
[netbsd*],
[AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
mhd_host_os='NetBSD'
AC_MSG_RESULT([[$mhd_host_os]])],
[*solaris*],
[AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno does not work])
mhd_host_os='Solaris'
AC_MSG_RESULT([[$mhd_host_os]])
AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(socket, socket)],
[*arm-linux*],
[AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
mhd_host_os='ARM Linux'
AC_MSG_RESULT([[$mhd_host_os]])
CFLAGS="-fPIC -pipe $CFLAGS"],
[*linux*],
[AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
mhd_host_os='Linux'
AC_MSG_RESULT([[$mhd_host_os]])],
[*cygwin*],
[AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
mhd_host_os='Windows (Cygwin)'
AC_MSG_RESULT([[$mhd_host_os]])
os_is_windows=yes],
[*mingw*],
[AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
mhd_host_os='Windows (MinGW)'
AC_MSG_RESULT([[$mhd_host_os]])
LIBS="$LIBS -lws2_32"
AC_CHECK_HEADERS([winsock2.h ws2tcpip.h], [], [AC_MSG_ERROR([[Winsock2 headers are required for W32]])], [AC_INCLUDES_DEFAULT])
AC_CACHE_CHECK([for MS lib utility], [ac_cv_use_ms_lib_tool],
[mslibcheck=`lib 2>&1`
AS_IF([echo "$mslibcheck" | $GREP -e '^Microsoft (R) Library Manager' - >/dev/null],
[ac_cv_use_ms_lib_tool=yes],
[ac_cv_use_ms_lib_tool=no])
])
AS_IF([test "x$ac_cv_use_ms_lib_tool" = "xyes"],
[AC_SUBST([MS_LIB_TOOL], [[lib]])])
AC_SUBST([lt_cv_objdir])
os_is_windows=yes
os_is_native_w32=yes
],
[*openedition*],
[AC_DEFINE_UNQUOTED(OS390,1,[This is a OS/390 system])
mhd_host_os='OS/390'
AC_MSG_RESULT([[$mhd_host_os]])],
[gnu*],
[AC_DEFINE([[GNU_HURD]], [[1]], [Define to `1' if host machine runs on GNU Hurd.])
mhd_host_os='GNU Hurd'
AC_MSG_RESULT([[$mhd_host_os]])
],
[
mhd_host_os='unrecognised OS'
AC_MSG_RESULT([[$mhd_host_os]])
AC_MSG_WARN([Unrecognised OS $host_os])
AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
])
AM_CONDITIONAL([CYGWIN_TARGET], [[test "x$os_is_windows" = "xyes" && \
test "x${os_is_native_w32}" != "xyes"]])
AS_VAR_IF([os_is_windows], ["yes"],
[
AC_MSG_CHECKING([[whether target W32 version is specified by precomiler defines]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
/* Note: check logic is reversed for easy log reading */
#ifdef WINVER
#error WINVER is defined
choke me now;
#endif
#ifdef _WIN32_WINNT
#error _WIN32_WINNT is defined
choke me now;
#endif
#ifdef NTDDI
#error NTDDI is defined
choke me now;
#endif
]],[[(void)0]])
], [[mhd_w32_ver_preselect=no]], [[mhd_w32_ver_preselect=yes]]
)
AC_MSG_RESULT([[${mhd_w32_ver_preselect}]])
AC_CHECK_HEADERS([windows.h sdkddkver.h], [], [], [AC_INCLUDES_DEFAULT])
AS_VAR_IF([mhd_w32_ver_preselect],["yes"],
[
AC_MSG_CHECKING([[for specified target W32 version]])
AS_UNSET([[mhd_w32_ver]])
AS_UNSET([[mhd_w32_ver_msg]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if _WIN32_WINNT+0 < 0x0501
/* Check before headers inclusion */
#error _WIN32_WINNT is less than 0x0501
choke me now;
#endif
#ifdef HAVE_SDKDDKVER_H
#include <sdkddkver.h>
#endif
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
#if _WIN32_WINNT+0 < 0x0501
#error _WIN32_WINNT is less than 0x0501
choke me now;
#endif
]],[[(void)0]])
], [], [
AC_MSG_RESULT([[pre-WinXP]])
AC_MSG_ERROR([[libmicrohttpd cannot be compiled for Windows version before Windows XP]])
]
)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SDKDDKVER_H
#include <sdkddkver.h>
#endif
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
#if _WIN32_WINNT+0 == 0x0501
#error _WIN32_WINNT is 0x0501
choke me now;
#endif
#if _WIN32_WINNT+0 == 0x0502
#error _WIN32_WINNT is 0x0502
choke me now;
#endif
]],[[(void)0]])
], [], [
mhd_w32_ver="WinXP"
mhd_w32_ver_msg="WinXP (selected by precompiler flags)"
]
)
AS_VAR_SET_IF([mhd_w32_ver], [],
[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SDKDDKVER_H
#include <sdkddkver.h>
#endif
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
#if _WIN32_WINNT+0 < 0x0600
#error _WIN32_WINNT is less than 0x0600 but greater than 0x0502
choke me now;
#endif
]],[[(void)0]])
], [], [
AC_MSG_ERROR([[_WIN32_WINNT value is wrong (less than 0x0600 but greater than 0x0502)]])
]
)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SDKDDKVER_H
#include <sdkddkver.h>
#endif
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
#if _WIN32_WINNT+0 == 0x0600
#error _WIN32_WINNT is 0x0600
choke me now;
#endif
]],[[(void)0]])
], [], [
mhd_w32_ver="Vista"
mhd_w32_ver_msg="Vista (selected by precompiler flags)"
]
)
]
)
AS_VAR_SET_IF([mhd_w32_ver], [],
[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SDKDDKVER_H
#include <sdkddkver.h>
#endif
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
#if _WIN32_WINNT+0 > 0x0600
#error _WIN32_WINNT is greater than 0x0600
choke me now;
#endif
]],[[(void)0]])
], [
mhd_w32_ver="unknown"
mhd_w32_ver_msg="unknown (cannot be detected)"
], [
mhd_w32_ver="newer than Vista"
mhd_w32_ver_msg="newer than Vista (selected by precompiler flags)"
]
)
]
)
AC_MSG_RESULT([[${mhd_w32_ver}]])
], [
mhd_w32_ver="Vista"
mhd_w32_ver_msg="Vista (default, override by CPPFLAGS=-D_WIN32_WINNT=0xNNNN)"
CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600"
AC_MSG_CHECKING([[whether headers accept _WIN32_WINNT=0x0600]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SDKDDKVER_H
#include <sdkddkver.h>
#endif
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
#include <stdio.h>
]],[[(void)0]])
], [
AC_MSG_RESULT([[yes]])
], [
AC_MSG_RESULT([[no]])
AC_MSG_ERROR([Headers do not accept _WIN32_WINNT=0x0600. Consider override target W32 version by CPPFLAGS=-D_WIN32_WINNT=0xNNNN])
]
)
]
)
]
)
AC_ARG_WITH([threads],
[AS_HELP_STRING([--with-threads=LIB],[choose threading library (posix, w32, auto, none) [auto]])],
[], [with_threads='auto'])
AS_CASE([[$with_threads]],
[[win32]], [[with_threads='w32']],
[[pthreads]], [[with_threads='posix']],
[[posix]], [[:]],
[[w32]], [[:]],
[[none]], [[with_threads='none']],
[[no]], [[with_threads='none']],
[[auto]], [[:]],
[AC_MSG_ERROR([[incorrect parameter "$with_threads" specified for --with-threads]])]
)
# Check for posix threads support, regardless of configure parameters as
# testsuite uses only posix threads.
AX_PTHREAD(
[
mhd_have_posix_threads='yes'
AC_DEFINE([[HAVE_PTHREAD_H]],[[1]],[Define to 1 if you have the <pthread.h> header file.])
AC_CACHE_CHECK([[whether pthread_sigmask(3) is available]],
[[mhd_cv_func_pthread_sigmask]], [dnl
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
[[
sigset_t nset, oset;
sigemptyset (&nset);
sigaddset (&nset, SIGPIPE);
if (0 != pthread_sigmask(SIG_BLOCK, &nset, &oset)) return 1;
]])],
[[mhd_cv_func_pthread_sigmask="yes"]],[[mhd_cv_func_pthread_sigmask="no"]])
LIBS="${save_LIBS}"
CFLAGS="${save_CFLAGS}"
])
AS_VAR_IF([mhd_cv_func_pthread_sigmask],["yes"],
[AC_DEFINE([[HAVE_PTHREAD_SIGMASK]],[[1]],[Define to 1 if you have the pthread_sigmask(3) function.])])
],[[mhd_have_posix_threads='no']])
AM_CONDITIONAL([HAVE_POSIX_THREADS],[test "x$mhd_have_posix_threads" = "xyes"])
mhd_have_w32_threads='no'
AS_IF([[test "x$with_threads" = "xauto"]],
[
AS_IF([[test "x$os_is_windows" = "xyes"]],
[
AC_MSG_CHECKING([[for W32 threads]])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <windows.h>
]], [ HANDLE h = CreateThread(NULL, 0, NULL, NULL, 0, NULL);])]
, [[mhd_have_w32_threads='yes']], [[mhd_have_w32_threads='no']]
)
AC_MSG_RESULT([[$mhd_have_w32_threads]])
])
]
)
AC_MSG_CHECKING([[for threading lib to use with libmicrohttpd ($with_threads)]])
AS_IF([test "x$with_threads" = "xposix"],
[ # forced posix threads
AS_IF([test "x$mhd_have_posix_threads" = "xyes"], [USE_THREADS='posix'],
[ AS_IF([[test "x$os_is_windows" = "xyes"]] ,
[ AC_MSG_ERROR([[Posix threads are not available. Try to configure --with-threads=auto]])],
[ AC_MSG_ERROR([[No threading lib is available. Consider installing pthreads]])] )
])
])
AS_IF([test "x$with_threads" = "xw32"],
[ # forced w32 threads
AS_IF([[test "x$mhd_have_w32_threads" = "xyes"]],
[[ USE_THREADS='w32' ]],
[ AC_MSG_ERROR([[W32 threads are not available. Try to configure --with-threads=auto]])])
])
AS_IF([test "x$with_threads" = "xauto"],
[# automatic threads lib selection
AS_IF([[test "x$os_is_native_w32" = "xyes" && test "x$mhd_have_w32_threads" = "xyes"]] ,
[[ USE_THREADS='w32' ]] ,
[[ test "x$mhd_have_posix_threads" = "xyes" ]], [[ USE_THREADS='posix' ]],
[[ test "x$mhd_have_w32_threads" = "xyes" ]], [[ USE_THREADS='w32' ]],
[ AC_MSG_ERROR([[No threading lib is available. Consider installing pthreads]]) ]
)])
AS_IF([test "x$with_threads" = "xnone"],
[USE_THREADS='none'])
AS_IF([test "x$USE_THREADS" = "xposix"],
[CC="$PTHREAD_CC"
AC_DEFINE([MHD_USE_POSIX_THREADS],[1],[define to use pthreads])
MHD_LIB_CFLAGS="$MHD_LIB_CFLAGS $PTHREAD_CFLAGS"
MHD_LIBDEPS="$PTHREAD_LIBS $MHD_LIBDEPS"
MHD_LIBDEPS_PKGCFG="$PTHREAD_LIBS $MHD_LIBDEPS_PKGCFG"],
[AS_IF([test "x$USE_THREADS" = "xw32"],
[AC_DEFINE([MHD_USE_W32_THREADS],[1],[define to use W32 threads])])])
AM_CONDITIONAL([USE_POSIX_THREADS], [test "x$USE_THREADS" = "xposix"])
AM_CONDITIONAL([USE_W32_THREADS], [test "x$USE_THREADS" = "xw32"])
AM_CONDITIONAL([DISABLE_THREADS], [test "x$USE_THREADS" = "xnone"])
AC_MSG_RESULT([$USE_THREADS])
AC_ARG_ENABLE([[thread-names]],
[AS_HELP_STRING([--disable-thread-names],[do not set names on MHD generated threads [auto]])],
[], [enable_thread_names='auto'])
AS_IF([test "x$enable_thread_names" != "xno" && test "x$USE_THREADS" = "xposix"],[
# Check for thread name function
HAVE_THREAD_NAME_FUNC="no"
SAVE_LIBS="$LIBS"
SAVE_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_CHECK_HEADERS([pthread_np.h],[],[],
[
AC_INCLUDES_DEFAULT
[
#include <pthread.h>
]
])
# Try to find how to set thread name by thread attributes.
# If pthread_attr_setname_np(3) is not declared, it's not possible to detect
# form of pthread_attr_setname_np(3) due to C "feature" "implicit declaration".
AC_CHECK_DECL([[pthread_attr_setname_np]],[],[],[[
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
]])
AS_IF([[test "x$ac_cv_have_decl_pthread_attr_setname_np" = "xyes"]],
[AC_MSG_CHECKING([[for pthread_attr_setname_np(3) in NetBSD or OSF1 form]])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
]], [[
pthread_attr_t thr_attr;
pthread_attr_init(&thr_attr);
pthread_attr_setname_np(&thr_attr, "name", 0);
pthread_attr_destroy(&thr_attr);
]])],
[AC_DEFINE([[HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD]], [[1]], [Define if you have NetBSD form (or OSF1 form) of pthread_attr_setname_np(3) function.])
HAVE_THREAD_NAME_FUNC="yes"
AC_MSG_RESULT([[yes]])],
[AC_MSG_RESULT([[no]])]
)
])
AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes" && test "x$ac_cv_have_decl_pthread_attr_setname_np" = "xyes"]],
[AC_MSG_CHECKING([[for pthread_attr_setname_np(3) in IBM i form]])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
]], [[
pthread_attr_t thr_attr;
pthread_attr_init(&thr_attr);
pthread_attr_setname_np(&thr_attr, "name");
pthread_attr_destroy(&thr_attr);
]])],
[AC_DEFINE([[HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI]], [[1]], [Define if you have IBM i form of pthread_attr_setname_np(3) function.])
HAVE_THREAD_NAME_FUNC="yes"
AC_MSG_RESULT([[yes]])],
[AC_MSG_RESULT([[no]])]
)
])
# Try to find how to set thread name for started thread - less convenient
# than setting name by attributes.
# If pthread_setname_np(3) is not declared, it's not possible to detect
# form of pthread_setname_np(3) due to C "feature" "implicit declaration".
AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes"]],
[AC_CHECK_DECL([[pthread_setname_np]],[],[],[[
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
]])
])
AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes" && test "x$ac_cv_have_decl_pthread_setname_np" = "xyes"]],
[AC_MSG_CHECKING([[for pthread_setname_np(3) in NetBSD or OSF1 form]])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
]], [[int res = pthread_setname_np(pthread_self(), "name", 0);]])],
[AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_NETBSD]], [[1]], [Define if you have NetBSD form (or OSF1 form) of pthread_setname_np(3) function.])
HAVE_THREAD_NAME_FUNC="yes"
AC_MSG_RESULT([[yes]])],
[AC_MSG_RESULT([[no]])]
)
])
AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes" && test "x$ac_cv_have_decl_pthread_setname_np" = "xyes"]],
[AC_MSG_CHECKING([[for pthread_setname_np(3) in GNU/Linux form]])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
]], [[int res = pthread_setname_np(pthread_self(), "name");]])],
[AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_GNU]], [[1]], [Define if you have GNU/Linux form of pthread_setname_np(3) function.])
HAVE_THREAD_NAME_FUNC="yes"
AC_MSG_RESULT([[yes]])],
[AC_MSG_RESULT([[no]])]
)
])
AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes" && test "x$ac_cv_have_decl_pthread_setname_np" = "xyes"]],
[AC_MSG_CHECKING([[for pthread_setname_np(3) in Darwin form]])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
]], [[int res = pthread_setname_np("name");]])],
[AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_DARWIN]], [[1]], [Define if you have Darwin form of pthread_setname_np(3) function.])
HAVE_THREAD_NAME_FUNC="yes"
AC_MSG_RESULT([[yes]])],
[AC_MSG_RESULT([[no]])]
)
])
AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes"]],
[
AC_CHECK_DECL([[pthread_set_name_np]],
[
AC_MSG_CHECKING([[for pthread_set_name_np(3) in FreeBSD form]])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
]], [[pthread_set_name_np(pthread_self(), "name");]])],
[AC_DEFINE([[HAVE_PTHREAD_SET_NAME_NP_FREEBSD]], [[1]], [Define if you have FreeBSD form of pthread_set_name_np(3) function.])
HAVE_THREAD_NAME_FUNC="yes"
AC_MSG_RESULT([[yes]])],
[AC_MSG_RESULT([[no]])]
)
],[],[[
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
]]
)
])
LIBS="$SAVE_LIBS"
CFLAGS="$SAVE_CFLAGS"
])
AS_IF([[test "x$enable_thread_names" != "xno"]],
[
AC_MSG_CHECKING([[whether to enable thread names]])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [[
#ifdef MHD_NO_THREAD_NAMES
#error Thread names are disabled.
choke me
#endif
/* Keep in sync with mhd_threads.h */
#if defined(MHD_USE_POSIX_THREADS) && (defined(HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD) || defined(HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI) || \
defined(HAVE_PTHREAD_SETNAME_NP_GNU) || defined(HAVE_PTHREAD_SET_NAME_NP_FREEBSD) || defined(HAVE_PTHREAD_SETNAME_NP_DARWIN) || \
defined(HAVE_PTHREAD_SETNAME_NP_NETBSD) )
int a = 1;
#elif defined(MHD_USE_W32_THREADS) && defined(_MSC_FULL_VER)
int b = 2;
#else
#error No thread name function is available.
choke me
#endif
]])
], [
enable_thread_names='yes'
], [
AS_IF([[test "x$enable_thread_names" = "xyes"]],
[
AC_MSG_RESULT([[no]])
AC_MSG_ERROR([[thread names was explicitly requested, but thread name function is not available]])
])
enable_thread_names='no'
])
AC_MSG_RESULT([[$enable_thread_names]])
])
AS_IF([[test "x$enable_thread_names" = "xno"]],
[AC_DEFINE([[MHD_NO_THREAD_NAMES]], [[1]], [Define to 1 to disable setting name on generated threads])])
AM_CONDITIONAL(HAVE_W32, [test "x$os_is_native_w32" = "xyes"])
w32_shared_lib_exp=no
if test "x$enable_shared" = "xyes" && test "x$os_is_native_w32" = "xyes"; then
if test "x$ac_cv_use_ms_lib_tool" = "xyes" || test -n "$DLLTOOL"; then
w32_shared_lib_exp=yes
else
AC_MSG_WARN([[GNU dlltool or MS lib.exe is required for creating shared library export on W32]])
AC_MSG_WARN([[Export library libmicrohttpd.lib will not be created]])
fi
fi
AM_CONDITIONAL(W32_SHARED_LIB_EXP, [test "x$w32_shared_lib_exp" = "xyes"])
AM_CONDITIONAL(USE_MS_LIB_TOOL, [test "x$ac_cv_use_ms_lib_tool" = "xyes"])
MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER([AC_DEFINE([HAVE_LISTEN_SHUTDOWN],[1],[can use shutdown on listen sockets])])
AM_CONDITIONAL([HAVE_LISTEN_SHUTDOWN], [test "x$mhd_cv_host_shtdwn_trgr_select" = "xyes"])
# SENDMSG. Should we check for SCM_RIGHTS instead?
# https://lists.x.org/archives/xorg-devel/2013-November/038687.html
AC_SEARCH_LIBS([sendmsg], [socket], [AC_DEFINE([HAVE_SENDMSG],[1],[Define if your platform supports sendmsg])])
AC_CHECK_FUNCS([writev])
# set GCC options
# use '-fno-strict-aliasing', but only if the compiler
# and linker can take it
AX_CHECK_LINK_FLAG([-fno-strict-aliasing],
[AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing])])
AC_C_BIGENDIAN
AC_C_VARARRAYS
AC_CACHE_CHECK([[whether __func__ magic-macro is available]],
[[mhd_cv_macro___func___avail]], [dnl
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>]],[[const char *funcname = __func__ ; if (NULL == funcname) return 1;]])],
[[mhd_cv_macro___func___avail="yes"]],[[mhd_cv_macro___func___avail="no"]])
])
AS_VAR_IF([mhd_cv_macro___func___avail], ["yes"],
[AC_DEFINE([HAVE___FUNC__], [1], [Define to 1 if your compiler supports __func__ magic-macro.])],
[
AC_CACHE_CHECK([[whether __FUNCTION__ magic-macro is available]],
[[mhd_cv_macro___function___avail]], [dnl
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>]],[[const char *funcname = __FUNCTION__ ; if (NULL == funcname) return 1;]])],
[[mhd_cv_macro___function___avail="yes"]],[[mhd_cv_macro___function___avail="no"]])
])
AC_DEFINE([HAVE___FUNCTION__], [1], [Define to 1 if your compiler supports __FUNCTION__ magic-macro.])
]
)
AC_CACHE_CHECK([[whether __builtin_bswap32() is available]],
[[mhd_cv_func___builtin_bswap32_avail]], [dnl
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include<stdint.h>]], [[uint32_t a = 1; uint32_t b = __builtin_bswap32(a); a = b;]])],
[[mhd_cv_func___builtin_bswap32_avail="yes"]],[[mhd_cv_func___builtin_bswap32_avail="no"]])
])
AS_IF([[test "x$mhd_cv_func___builtin_bswap32_avail" = "xyes"]],
[AC_DEFINE([[MHD_HAVE___BUILTIN_BSWAP32]], [[1]], [Define to 1 if you have __builtin_bswap32() builtin function])])
AC_CACHE_CHECK([[whether __builtin_bswap64() is available]],
[[mhd_cv_func___builtin_bswap64_avail]], [dnl
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include<stdint.h>]], [[uint64_t a = 1; uint32_t b = __builtin_bswap64(a); a = b;]])],
[[mhd_cv_func___builtin_bswap64_avail="yes"]], [[mhd_cv_func___builtin_bswap64_avail="no"]])
])
AS_IF([[test "x$mhd_cv_func___builtin_bswap64_avail" = "xyes"]],
[AC_DEFINE([[MHD_HAVE___BUILTIN_BSWAP64]], [[1]], [Define to 1 if you have __builtin_bswap64() builtin function])])
AC_CHECK_PROG([HAVE_CURL_BINARY],[curl],[yes],[no])
AM_CONDITIONAL([HAVE_CURL_BINARY],[test "x$HAVE_CURL_BINARY" = "xyes"])
AC_CHECK_PROG([HAVE_MAKEINFO_BINARY],[makeinfo],[yes],[no])
AM_CONDITIONAL([HAVE_MAKEINFO_BINARY],[test "x$HAVE_MAKEINFO_BINARY" = "xyes"])
AM_CONDITIONAL(W32_STATIC_LIB, [test "x$os_is_native_w32" = "xyes" && test "x$enable_static" = "xyes"])
AC_ARG_ENABLE([[doc]],
[AS_HELP_STRING([[--disable-doc]], [do not build any documentation])], ,
[enable_doc=yes])
test "x$enable_doc" = "xno" || enable_doc=yes
AM_CONDITIONAL([BUILD_DOC], [test "x$enable_doc" = "xyes"])
AC_ARG_ENABLE([[examples]],
[AS_HELP_STRING([[--disable-examples]], [do not build any examples])], ,
[enable_examples=yes])
test "x$enable_examples" = "xno" || enable_examples=yes
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" = "xyes"])
AC_ARG_ENABLE([[heavy-tests]],
[AS_HELP_STRING([[--enable-heavy-tests]], [use heavy tests in test-suite. WARNING:]
[a dedicated host with minimal number of background processes and no network]
[activity is recommended to enable.])], [],
[enable_heavy_tests=no])
AS_VAR_IF([enable_heavy_tests], ["yes"], [], [enable_heavy_tests=no])
AM_CONDITIONAL([HEAVY_TESTS],[test "x$enable_heavy_tests" = "xyes"])
AC_ARG_ENABLE([[poll]],
[AS_HELP_STRING([[--enable-poll[=ARG]]], [enable poll support (yes, no, auto) [auto]])],
[enable_poll=${enableval}],
[enable_poll='auto']
)