-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.in
3403 lines (3209 loc) · 90.3 KB
/
configure.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
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
dnl
dnl Configuration input file for Squid
dnl
dnl $Id: configure.in,v 1.430.2.25 2010/03/14 21:40:46 hno Exp $
dnl
dnl
dnl
AC_INIT(Squid Web Proxy, 2.7.STABLE9, http://bugs.squid-cache.org/, squid)
AC_PREREQ(2.52)
AM_CONFIG_HEADER(include/autoconf.h)
AC_CONFIG_AUX_DIR(cfgaux)
AM_INIT_AUTOMAKE
AC_REVISION($Revision: 1.430.2.25 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
PRESET_CFLAGS="$CFLAGS"
PRESET_LDFLAGS="$LDFLAGS"
dnl Set default LDFLAGS
if test -z "$LDFLAGS"; then
LDFLAGS="-g"
fi
dnl Check for GNU cc
AC_PROG_CC
AM_PROG_CC_C_O
AC_CANONICAL_HOST
CRYPTLIB=''
REGEXLIB='' # -lregex
LIBREGEX='' # libregex.a
dnl Check for pkg-config
AC_PATH_PROG(PKGCONFIG, pkg-config, false)
dnl find out the exe extension for this platform. If it's not empty, use it for CGI's as well.
AC_EXEEXT
AC_OBJEXT
if test -z "$EXEEXT"; then
CGIEXT=".cgi"
else
# automake automatically adds .exe when installing binaries
CGIEXT=""
fi
AC_SUBST(CGIEXT)
dnl this should be expanded to a list of platform sensible support requirements.
dnl (adding an option like --enable-cygwin-support doesn't make sense :]) - R Collins 2001
case "$host_os" in
mingw|mingw32|cygwin|cygwin32)
AM_CONDITIONAL(ENABLE_WIN32SPECIFIC, true)
;;
*)
AM_CONDITIONAL(ENABLE_WIN32SPECIFIC, false)
;;
esac
case "$host_os" in
mingw|mingw32)
AM_CONDITIONAL(ENABLE_MINGW32SPECIFIC, true)
AC_PATH_PROG(WIN32_PSAPI, psapi.dll, none)
CFLAGS="$CFLAGS -mthreads"
if test "$ac_cv_path_WIN32_PSAPI" = "none"; then
echo "PSAPI.DLL is recommended to run Squid on Windows Platform"
echo "Please see PSAPI.DLL section on doc/release-notes/release-2.6.html."
else
AC_DEFINE(HAVE_WIN32_PSAPI,1,[Define if you have PSAPI.DLL on Windows systems])
LIBS="$LIBS -lpsapi"
fi
;;
*)
AM_CONDITIONAL(ENABLE_MINGW32SPECIFIC, false)
;;
esac
if test -z "$CACHE_HTTP_PORT"; then
CACHE_HTTP_PORT="3128"
fi
if test -z "$CACHE_ICP_PORT"; then
CACHE_ICP_PORT="3130"
fi
dnl Substitutions
AC_DEFINE_UNQUOTED(CACHE_HTTP_PORT, $CACHE_HTTP_PORT, [What default TCP port to use for HTTP listening?])
AC_SUBST(CACHE_HTTP_PORT)
AC_DEFINE_UNQUOTED(CACHE_ICP_PORT, $CACHE_ICP_PORT, [What default UDP port to use for ICP listening?])
AC_SUBST(CACHE_ICP_PORT)
AC_DEFINE_UNQUOTED(CONFIG_HOST_TYPE, "$host", [Host type from configure])
AC_DEFINE_UNQUOTED(SQUID_CONFIGURE_OPTIONS, "$ac_configure_args", [configure command line used to configure Squid])
dnl Gerben Wierda <[email protected]>
case "$host" in
mab-next-nextstep3)
CC="$CC -arch m68k -arch i486 -arch hppa -arch sparc"
;;
esac
dnl Set Default CFLAGS
if test -z "$PRESET_CFLAGS"; then
if test "$GCC" = "yes"; then
case "$host" in
*-sun-sunos*)
# sunos has too many warnings for this to be useful
# motorola too
;;
*m88k*-openbsd*)
;;
*m88k*)
# Motorola cc/ld does not like -02 but is ok on -O
CFLAGS=`echo $CFLAGS | sed -e 's/-O[0-9]/-O/'`
;;
*)
CFLAGS="-Wall $CFLAGS"
;;
esac
else
case "$host" in
*mips-sgi-irix6.*)
# suggested by Rafael Seidl <[email protected]>
CFLAGS="-O3 -OPT:Olimit=0:space=OFF \
-woff 1009,1014,1110,1116,1185,1188,1204,1230,1233 \
-Wl,-woff,85,-woff,84,-woff,134 \
-nostdinc -I/usr/include -D_BSD_SIGNALS $CFLAGS"
;;
alpha-dec-osf4.*)
# Mogul says DEC compilers take both -g and -O2
CFLAGS=`echo $CFLAGS | sed -e 's/-g/-g3/'`
CFLAGS="-O2 $CFLAGS"
;;
*)
;;
esac
fi
fi
dnl Set LDFLAGS
if test -z "$PRESET_LDFLAGS"; then
if test "$GCC" = "yes"; then
case "$host" in
*mips-sgi-irix6.*)
# Silence Linker warnings 84, 85 and 134
LDFLAGS="-Wl,-woff,85 -Wl,-woff,84 -Wl,-woff,134 $LDFLAGS"
;;
*)
# nothing
;;
esac
else
case "$host" in
*)
# nothing
;;
esac
fi
fi
dnl Enable optional modules
AC_ARG_ENABLE(dlmalloc,
[ --enable-dlmalloc[=LIB] Compile & use the malloc package by Doug Lea],
[
case "$enableval" in
'yes')
use_dlmalloc="yes"
LIBDLMALLOC="libdlmalloc.a"
LIB_MALLOC="-L../lib -ldlmalloc"
echo "dlmalloc enabled"
;;
'no')
use_dlmalloc="no"
echo "dlmalloc disabled"
;;
*) use_dlmalloc="yes"
LIB_MALLOC="$enableval"
echo "dlmalloc enabled with $LIB_MALLOC"
esac
])
if test "${use_dlmalloc-unset}" = unset; then
case "$host" in
i386-*-solaris2.*)
echo "Enabling dlmalloc for $host"
use_dlmalloc="yes"
LIBDLMALLOC="libdlmalloc.a"
LIB_MALLOC="-L../lib -ldlmalloc"
;;
*-sgi-irix*)
echo "Enabling dlmalloc for $host"
use_dlmalloc="yes"
LIBDLMALLOC="libdlmalloc.a"
LIB_MALLOC="-L../lib -ldlmalloc"
;;
esac
fi
if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then
# Ok. dlmalloc was enabled before, but state may be changed.
# we have to test these again
unset ac_cv_func_mallinfo
unset ac_cv_func_mallocblksize
unset ac_cv_func_free
unset ac_cv_func_realloc
unset ac_cv_func_memalign
unset ac_cv_func_valloc
unset ac_cv_func_pvalloc
unset ac_cv_func_calloc
unset ac_cv_func_cfree
unset ac_cv_func_malloc_trim
unset ac_cv_func_malloc_usable_size
unset ac_cv_func_malloc_stats
unset ac_cv_func_mallinfo
unset ac_cv_func_mallopt
unset ac_cv_lib_gnumalloc
unset ac_cv_header_gnumalloc_h
unset ac_cv_lib_malloc
unset ac_cv_enabled_dlmalloc
fi
if test "$use_dlmalloc" = yes; then
ac_cv_func_mallinfo="yes"
ac_cv_func_mallocblksize="no"
ac_cv_func_free="yes"
ac_cv_func_realloc="yes"
ac_cv_func_memalign="yes"
ac_cv_func_valloc="yes"
ac_cv_func_pvalloc="yes"
ac_cv_func_calloc="yes"
ac_cv_func_cfree="yes"
ac_cv_func_malloc_trim="yes"
ac_cv_func_malloc_usable_size="yes"
ac_cv_func_malloc_stats="yes"
ac_cv_func_mallopt="yes"
ac_cv_lib_gnumalloc="no"
ac_cv_header_gnumalloc_h="no"
ac_cv_lib_malloc="no"
ac_cv_enabled_dlmalloc="yes"
fi
AC_SUBST(LIBDLMALLOC)
AC_SUBST(LIB_MALLOC)
AC_ARG_ENABLE(gnuregex,
[ --enable-gnuregex Compile GNUregex. Unless you have reason to use this
option, you should not enable it. This library file
is usually only required on Windows and very old
Unix boxes which do not have their own regex library
built in.],
[USE_GNUREGEX=$enableval])
dnl This is a developer only option.. developers know how to set defines
dnl
dnl AC_ARG_ENABLE(xmalloc-debug,
dnl [ --enable-xmalloc-debug Do some simple malloc debugging],
dnl [ if test "$enableval" = "yes" ; then
dnl echo "Malloc debugging enabled"
dnl AC_DEFINE(XMALLOC_DEBUG, 1, [Define to do simple malloc debugging])
dnl fi
dnl ])
dnl This is a developer only option.. developers know how to set defines
dnl
dnl AC_ARG_ENABLE(xmalloc-debug-trace,
dnl [ --enable-xmalloc-debug-trace
dnl Detailed trace of memory allocations],
dnl [ if test "$enableval" = "yes" ; then
dnl echo "Malloc debug trace enabled"
dnl AC_DEFINE(XMALLOC_TRACE, 1, [Define to have a detailed trace of memory allocations])
dnl AC_DEFINE(XMALLOC_DEBUG, 1, [Define to do simple malloc debugging])
dnl fi
dnl ])
AC_ARG_WITH(valgrind-debug,
[ --with-valgrind-debug Include debug instrumentation for use with valgrind],
[ case $withval in
yes)
valgrind=1
;;
no)
valgrind=
;;
*)
CPPFLAGS="$CPPFLAGS -I${enableval}/include"
valgrind=1
;;
esac
if test $valgrind; then
AC_DEFINE(WITH_VALGRIND, 1, [Valgrind memory debugger support])
echo "Valgrind debug support enabled"
fi
])
AC_ARG_ENABLE(mempool-debug,
[ --enable-mempool-debug Include MemPool debug verifications])
if test "$enable_mempool_debug" = yes; then
AC_DEFINE(DEBUG_MEMPOOL, 1, [MemPool debug verifications])
echo "Mempool debug checks enabled"
fi
AC_ARG_ENABLE(xmalloc-statistics,
[ --enable-xmalloc-statistics
Show malloc statistics in status page],
[ if test "$enableval" = "yes" ; then
echo "Malloc statistics enabled"
AC_DEFINE(XMALLOC_STATISTICS, 1, [Define to have malloc statistics])
fi
])
USE_CARP=1
AC_ARG_ENABLE(carp,
[ --disable-carp Disable CARP support],
[ if test "$enableval" = "no" ; then
echo "CARP disabled"
USE_CARP=0
fi
])
if test $USE_CARP = 1; then
AC_DEFINE(USE_CARP, 1, [Cache Array Routing Protocol])
fi
AC_ARG_ENABLE(async-io,
[ --enable-async-io[=N_THREADS]
Shorthand for
--with-aufs-threads=N_THREADS
--with-pthreads
--enable-storeio=ufs,aufs],
[ case $enableval in
yes)
with_pthreads="yes"
STORE_MODULES="ufs aufs"
;;
no)
;;
*)
aufs_io_threads=$enableval
with_pthreads="yes"
STORE_MODULES="ufs aufs"
;;
esac
])
AC_ARG_WITH(aufs-threads,
[ --with-aufs-threads=N_THREADS
Tune the number of worker threads for the aufs object
store.],
[ case $withval in
[[0-9]]*)
aufs_io_threads=$withval
;;
*)
echo "ERROR: Invalid --with-aufs-threads argument"
exit 1
;;
esac
])
if test "$aufs_io_threads"; then
echo "With $aufs_io_threads aufs threads"
AC_DEFINE_UNQUOTED(AUFS_IO_THREADS, $aufs_io_threads, [Defines how many threads aufs uses for I/O])
fi
AC_ARG_WITH(pthreads,
[ --with-pthreads Use POSIX Threads])
if test "$with_pthreads" = "yes"; then
echo "With pthreads"
fi
AC_ARG_WITH(aio,
[ --with-aio Use POSIX AIO])
if test "$with_aio" = "yes"; then
echo "With aio"
fi
AC_ARG_WITH(dl,
[ --with-dl Use dynamic linking])
if test "$with_dl" = "yes"; then
echo "With dl"
fi
AC_ARG_ENABLE(storeio,
[ --enable-storeio="list of modules"
Build support for the list of store I/O modules.
The default is only to build the "ufs" module.
See src/fs for a list of available modules, or
Programmers Guide section <not yet written>
for details on how to build your custom store module],
[ case $enableval in
yes)
for module in $srcdir/src/fs/*; do
name="`basename $module`"
case $name in
CVS) # Ignore
;;
*)
if test -d $module; then
STORE_MODULES="$STORE_MODULES $name"
fi
;;
esac
done
;;
no)
;;
*) STORE_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
;;
esac
],
[ if test -z "$STORE_MODULES"; then
STORE_MODULES="ufs"
fi
])
echo "Store modules built: $STORE_MODULES"
NEED_DISKD=0
USE_AIOPS_WIN32=0
NEED_COSSDUMP=0
STORE_OBJS="fs/lib`echo $STORE_MODULES|sed -e 's% %.a fs/lib%g'`.a"
AC_SUBST(STORE_OBJS)
STORE_LIBS="`echo $STORE_OBJS|sed -e 's%fs/%%g'`"
AC_SUBST(STORE_LIBS)
dnl some store implementations need additional stuff built like diskd_daemon
STORE_MODULE_SUBDIRS=
for fs in $STORE_MODULES none; do
case "$fs" in
diskd)
NEED_DISKD=1
;;
aufs)
if test -z "$with_pthreads"; then
case "$host_os" in
mingw|mingw32)
USE_AIOPS_WIN32=1
echo "aufs store used, Windows threads support automatically enabled"
;;
*)
echo "aufs store used, pthreads support automatically enabled"
with_pthreads=yes
;;
esac
fi
;;
coss)
NEED_COSSDUMP=1
if test -z "$with_aio"; then
echo "coss store used, aio support automatically enabled"
with_aio=yes
fi
;;
esac
done
AC_SUBST(STORE_MODULES)
AM_CONDITIONAL([NEED_DISKD], [test "$NEED_DISKD" = 1])
AM_CONDITIONAL([USE_AIOPS_WIN32], [test "$USE_AIOPS_WIN32" = 1])
AM_CONDITIONAL([NEED_COSSDUMP], [test "$NEED_COSSDUMP" = 1])
dnl --enable-heap-replacement compatibility option
AC_ARG_ENABLE(heap-replacement,
[ --enable-heap-replacement
Backwards compatibility option. Please use the
new --enable-removal-policies directive instead.],
[ if test "$enableval" = "yes" ; then
echo "--enable-heap-replacement is obsolete. please use the new"
echo "--enable-removal-policies directive instead"
sleep 5
REPL_POLICIES="heap"
fi
])
AC_ARG_ENABLE(removal-policies,
[ --enable-removal-policies="list of policies"
Build support for the list of removal policies.
The default is only to build the "lru" module.
See src/repl for a list of available modules, or
Programmers Guide section 9.9 for details on how
to build your custom policy],
[ case $enableval in
yes)
for module in $srcdir/src/repl/*; do
name="`basename $module`"
case $name in
CVS) # Ignore
;;
*)
if test -d $module; then
REPL_POLICIES="$REPL_POLICIES $name"
fi
;;
esac
done
;;
no)
;;
*) REPL_POLICIES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`"
;;
esac
],
[ if test -z "$REPL_POLICIES"; then
REPL_POLICIES="lru"
fi
])
echo "Removal policies built: $REPL_POLICIES"
AC_SUBST(REPL_POLICIES)
REPL_OBJS="repl/lib`echo $REPL_POLICIES|sed -e 's% %.a repl/lib%g'`.a"
AC_SUBST(REPL_OBJS)
REPL_LIBS="`echo $REPL_OBJS|sed -e 's%repl/%%g'`"
AC_SUBST(REPL_LIBS)
AM_CONDITIONAL(ENABLE_PINGER, false)
AC_ARG_ENABLE(icmp,
[ --enable-icmp Enable ICMP pinging],
[ if test "$enableval" = "yes" ; then
echo "ICMP enabled"
AC_DEFINE(USE_ICMP, 1, [If you want to use Squid's ICMP features (highly recommended!) then
define this. When USE_ICMP is defined, Squid will send ICMP pings
to origin server sites. This information is used in numerous ways:
- Sent in ICP replies so neighbor caches know how close
you are to the source.
- For finding the closest instance of a URN.
- With the 'test_reachability' option. Squid will return
ICP_OP_MISS_NOFETCH for sites which it cannot ping.])
AM_CONDITIONAL(ENABLE_PINGER, true)
fi
])
AM_CONDITIONAL(USE_DELAY_POOLS, false)
AC_ARG_ENABLE(delay-pools,
[ --enable-delay-pools Enable delay pools to limit bandwidth usage],
[ if test "$enableval" = "yes" ; then
echo "Delay pools enabled"
AC_DEFINE(DELAY_POOLS, 1, [Traffic management via "delay pools".])
AM_CONDITIONAL(USE_DELAY_POOLS, true)
fi
])
dnl This is a developer only option. Developers know how to set defines
dnl
dnl AC_ARG_ENABLE(mem-gen-trace,
dnl [ --enable-mem-gen-trace Do trace of memory stuff],
dnl [ if test "$enableval" = "yes" ; then
dnl echo "Memory trace (to file) enabled"
dnl AC_DEFINE(MEM_GEN_TRACE, 1, [Define for log file trace of mem alloc/free])
dnl fi
dnl ])
AC_ARG_ENABLE(useragent-log,
[ --enable-useragent-log Enable logging of User-Agent header],
[ if test "$enableval" = "yes" ; then
echo "User-Agent logging enabled"
AC_DEFINE(USE_USERAGENT_LOG, 1, [If you want to log User-Agent request header values, define this.
By default, they are written to useragent.log in the Squid log directory.])
fi
])
AC_ARG_ENABLE(referer-log,
[ --enable-referer-log Enable logging of Referer header],
[ if test "$enableval" = "yes" ; then
echo "Referer logging enabled"
AC_DEFINE(USE_REFERER_LOG, 1, [If you want to log Referer request header values, define this.
By default, they are written to referer.log in the Squid log directory.])
fi
])
USE_WCCP=1
AC_ARG_ENABLE(wccp,
[ --disable-wccp Disable Web Cache Coordination V1 Protocol],
[ if test "$enableval" = "no" ; then
echo "Web Cache Coordination V1 Protocol disabled"
USE_WCCP=0
fi
])
if test $USE_WCCP = 1; then
AC_DEFINE(USE_WCCP, 1, [Define to enable WCCP])
fi
USE_WCCPv2=1
AC_ARG_ENABLE(wccpv2,
[ --disable-wccpv2 Disable Web Cache Coordination V2 Protocol],
[ if test "$enableval" = "no" ; then
echo "Web Cache Coordination V2 Protocol disabled"
USE_WCCPv2=0
fi
])
if test $USE_WCCPv2 = 1; then
AC_DEFINE(USE_WCCPv2, 1, [Define to enable WCCP V2])
fi
AC_ARG_ENABLE(kill-parent-hack,
[ --enable-kill-parent-hack
Kill parent on shutdown],
[ if test "$enableval" = "yes" ; then
echo "Kill parent on shutdown"
AC_DEFINE(KILL_PARENT_OPT, 1, [A dangerous feature which causes Squid to kill its parent process
(presumably the RunCache script) upon receipt of SIGTERM or SIGINT. Use with caution.])
fi
])
AC_ARG_ENABLE(forward-log,
[ --enable-forward-log Enable experimental forward_log directive],
[ if test "$enableval" = "yes" ; then
echo "forward_log enabled"
AC_DEFINE(WIP_FWD_LOG, 1, [Define to enable experimental forward_log directive])
fi
])
AC_ARG_ENABLE(multicast-miss,
[ --enable-multicast-miss Enable experimental multicast notification of cachemisses],
[ if test "$enableval" = "yes" ; then
echo "multicast of cache miss URLs enabled"
AC_DEFINE(MULTICAST_MISS_STREAM, 1, [Define to enable experimental multicast of cache miss URLs])
fi
])
AM_CONDITIONAL(USE_SNMP, false)
AC_ARG_ENABLE(snmp,
[ --enable-snmp Enable SNMP monitoring],
[ if test "$enableval" = "yes" ; then
echo "SNMP monitoring enabled"
AC_DEFINE(SQUID_SNMP, 1, [Define to enable SNMP monitoring of Squid])
SNMPLIB='../snmplib/libsnmp.a'
AM_CONDITIONAL(USE_SNMP, true)
SNMP_MAKEFILE=./snmplib/Makefile
makesnmplib=snmplib
fi
])
AC_SUBST(SNMPLIB)
AC_SUBST(makesnmplib)
AC_ARG_ENABLE(cachemgr-hostname,
[ --enable-cachemgr-hostname[=hostname]
Make cachemgr.cgi default to this host],
[ case $enableval in
yes)
AC_DEFINE(CACHEMGR_HOSTNAME, [getfullhostname()], [If you are upset that the cachemgr.cgi form comes up with the hostname
field blank, then define this to getfullhostname()])
echo "Cachemgr default hostname == host where cachemgr runs"
;;
no)
: # Nothing to do..
;;
*)
AC_DEFINE_UNQUOTED(CACHEMGR_HOSTNAME, "${enableval}", [If you are upset that the cachemgr.cgi form comes up with the hostname
field blank, then define this to getfullhostname()])
echo "Cachemgr default hostname set to ${enableval}"
;;
esac
])
AC_ARG_ENABLE(arp-acl,
[ --enable-arp-acl Enable use of ARP ACL lists (ether address)],
[ if test "$enableval" = "yes" ; then
echo "ARP ACL lists enabled (ether address)"
case "$host" in
*-linux-*)
;;
*-solaris*)
;;
*-freebsd*)
;;
*-netbsd*)
;;
*-openbsd*)
;;
*-cygwin*)
LIBS="$LIBS -liphlpapi"
;;
*-mingw*)
LIBS="$LIBS -liphlpapi"
;;
*)
echo "WARNING: ARP ACL support probably won't work on $host."
sleep 10
;;
esac
AC_DEFINE(USE_ARP_ACL, 1, [Define this to include code which lets you specify access control
elements based on ethernet hardware addresses. This code uses
functions found in 4.4 BSD derviations (e.g. FreeBSD, ?).])
fi
])
AM_CONDITIONAL(ENABLE_HTCP, false)
AC_ARG_ENABLE(htcp,
[ --enable-htcp Enable HTCP protocol],
[ if test "$enableval" = "yes" ; then
echo "HTCP enabled"
AC_DEFINE(USE_HTCP, 1, [Define this to include code for the Hypertext Cache Protocol (HTCP)])
AM_CONDITIONAL(ENABLE_HTCP, true)
fi
])
dnl SSL is not enabled by default.
AM_CONDITIONAL(ENABLE_SSL, false)
SSLLIB=''
SSLFLAGS=''
dnl Default is to use OpenSSL when available
AC_ARG_ENABLE(ssl,
[ --enable-ssl Enable ssl gatewaying support using OpenSSL],
[ if test "$enableval" != "no"; then
echo "SSL gatewaying using OpenSSL enabled"
AC_DEFINE(USE_SSL, 1, [Define this to include code for SSL encryption.])
AM_CONDITIONAL(ENABLE_SSL, true)
case "$host_os" in
mingw|mingw32)
SSLLIB='-lssleay32 -leay32 -lgdi32'
;;
*)
SSLLIB='-lssl -lcrypto'
;;
esac
USE_OPENSSL=1
fi
])
USE_SQUID_MD5=0
AC_ARG_WITH(system-md5,
[ --without-system-md5 Disable the use of any system provided MD5
Implementation forcing fallback on the internal
implementation shipped with Squid],
[
case "$enableval" in
no)
AC_DEFINE(USE_SQUID_MD5, 1, [Define this to force use of the internal MD5 implementation])
;;
esac
])
dnl User may specify OpenSSL is needed from a non-standard location
AC_ARG_WITH(openssl,
[ --with-openssl[=prefix]
Compile with the OpenSSL libraries. The path to
the OpenSSL development libraries and headers
installation can be specified if outside of the
system standard directories],
[
case "$with_openssl" in
yes)
USE_OPENSSL=1
;;
no)
USE_OPENSSL=
;;
*)
PKG_CONFIG_PATH="$with_openssl/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH
SSLLIB="-L$with_openssl/lib -lssl -lcrypto"
SSLFLAGS="-I$with_openssl/include"
USE_OPENSSL=1
esac
])
if test -n "$USE_OPENSSL"; then
echo "Using OpenSSL MD5 implementation"
AC_DEFINE(USE_OPENSSL, 1, [Define this to make use of the OpenSSL libraries for
MD5 calculation rather than Squid's own MD5 implementation
or if building with SSL encryption (USE_SSL)])
if test -z "$SSLLIB"; then
SSLLIB="-lcrypto" # for MD5 routines
fi
if $PKGCONFIG --exists openssl; then
SSLLIB="`$PKGCONFIG --libs openssl`"
SSLFLAGS="`$PKGCONFIG --cflags openssl`"
fi
CPPFLAGS="${SSLFLAGS} $CPPFLAGS"
fi
AC_SUBST(SSLLIB)
AC_ARG_ENABLE(forw-via-db,
[ --enable-forw-via-db Enable Forw/Via database],
[ if test "$enableval" = "yes" ; then
echo "FORW-VIA enabled"
AC_DEFINE(FORW_VIA_DB, 1, [Enable Forw/Via database])
fi
])
AC_ARG_ENABLE(cache-digests,
[ --enable-cache-digests Use Cache Digests
see http://www.squid-cache.org/FAQ/FAQ-16.html],
[ if test "$enableval" = "yes" ; then
echo "USE_CACHE_DIGESTS enabled"
AC_DEFINE(USE_CACHE_DIGESTS, 1, [Use Cache Digests for locating objects in neighbor caches. This
code is still semi-experimental.])
fi
])
dnl Select Default Error language
AC_ARG_ENABLE(default-err-language,
[ --enable-default-err-language=lang
Select default language for Error pages (see
errors directory) ],
[
if test -d $srcdir/errors/$enableval; then
ERR_DEFAULT_LANGUAGE=$enableval
else
echo "ERROR! Unknown language $enableval, see errors/ directory"
exit 1
fi
],[ERR_DEFAULT_LANGUAGE="English"])
AC_SUBST(ERR_DEFAULT_LANGUAGE)
dnl Select languages to be installed
AC_ARG_ENABLE(err-languages,
[ --enable-err-languages=\"lang1 lang2..\"
Select languages to be installed. (All will be
installed by default) ],
[
for l in $enableval; do
if test -d $srcdir/errors/$l; then :; else
echo "ERROR! Unknown language $$l, see errors/"
exit 1
fi
done
ERR_LANGUAGES=$enableval
],[
ERR_LANGUAGES=
for l in $srcdir/errors/*; do
if test -f $l/ERR_ACCESS_DENIED; then
ERR_LANGUAGES="$ERR_LANGUAGES `basename $l`"
fi
done
])
AC_SUBST(ERR_LANGUAGES)
dnl Size of COSS memory buffer
AC_ARG_WITH(coss-membuf-size,
[ --with-coss-membuf-size COSS membuf size (default 1048576 bytes) ],
[ if test "$with_coss_membuf_size"; then
echo "Setting COSS membuf size to $with_coss_membuf_size bytes"
AC_DEFINE_UNQUOTED(COSS_MEMBUF_SZ, $with_coss_membuf_size, [Define if you want to set the COSS membuf size])
fi
])
dnl COSS I/O method
AC_ARG_ENABLE(coss-aio-ops,
[ --enable-coss-aio-ops Enable COSS I/O with Posix AIO (default is aufs I/O) ])
if test "$enable_coss_aio_ops" = "yes"; then
echo "Using Posix AIO method for COSS disk I/O"
AC_DEFINE(USE_AUFSOPS, 0, [ Define this if you would like to use the aufs I/O method for
disk I/O instead of the POSIX AIO method.])
else
AC_DEFINE(USE_AUFSOPS, 1, [ Define this if you would like to use the aufs I/O method for
disk I/O instead of the POSIX AIO method.])
fi
dnl Enable select()
AC_ARG_ENABLE(select,
[ --enable-select Force the use of select support.
Normally configure automatically selects a better
alternative if available.
--disable-select Disable select support, causing configure to fail
if a better alternative is not available],
[
case "$enableval" in
yes)
echo "Forcing select() to be enabled"
SELECT_TYPE="select"
ac_cv_func_select='yes'
;;
no)
echo "Forcing select() to be disabled"
ac_cv_func_select='no'
;;
esac
])
dnl Enable select()
AC_ARG_ENABLE(select-simple,
[ --enable-select-simple Force the use of select support (POSIX).
Useful if your system only supports the bare minium
POSIX select requirements without fds_bits.],
[
case "$enableval" in
yes)
echo "Forcing select() to be enabled in simple POSIX mode"
SELECT_TYPE="select_simple"
ac_cv_func_select='yes'
;;
no)
echo "Forcing select() to be disabled"
ac_cv_func_select='no'
;;
esac
])
dnl Enable poll()
AC_ARG_ENABLE(poll,
[ --enable-poll Force the use of poll even if automatic checks
indicate poll may be broken on your plaform.
--disable-poll Disable the use of poll.],
[
case "$enableval" in
yes)
echo "Forcing poll() to be enabled"
SELECT_TYPE="poll"
ac_cv_func_poll='yes'
;;
no)
echo "Forcing poll() to be disabled"
ac_cv_func_poll='no'
;;
esac
])
dnl Enable epoll()
AC_ARG_ENABLE(epoll,
[ --enable-epoll Force the use of epoll even if automatic checks
indicate epoll may not be supported.
--disable-epoll Disable the use of epoll.],
[
case "$enableval" in
yes)
echo "Forcing epoll() to be enabled"
SELECT_TYPE="epoll"
force_epoll='yes'
;;
no)
echo "Forcing epoll() to be disabled"
ac_cv_func_epoll_ctl='no'
;;
esac
])
dnl Enable kqueue
AC_ARG_ENABLE(kqueue,
[ --enable-kqueue Force the use of kqueue even if automatic checks
indicate kqueue may not be supported.
--disable-kqueue Disable kqueue support. ],
[
case "$enableval" in
yes)
echo "Forcing kqueue to be enabled"
SELECT_TYPE="kqueue"
ac_cv_func_kqueue='yes'
;;
no)
echo "Forcing kqueue to be disabled"
ac_cv_func_kqueue='no'
;;
esac
])
dnl Enable devpoll
AC_ARG_ENABLE(devpoll,
[ --enable-devpoll Use Solaris /dev/poll instead of poll],
[
case "$enableval" in
yes)
echo "Forcing devpoll to be enabled"
SELECT_TYPE="devpoll"
;;
no)
echo "Forcing devpoll to be disabled"
;;
esac
])
dnl Disable HTTP violations
HTTP_VIOLATIONS=1
AC_ARG_ENABLE(http-violations,
[ --disable-http-violations
This allows you to remove code which is known to
violate the HTTP protocol specification.],
[ if test "$enableval" = "no" ; then
echo "Disabling HTTP Violations"
HTTP_VIOLATIONS=0
fi
])
if test $HTTP_VIOLATIONS = 1; then
AC_DEFINE(HTTP_VIOLATIONS, 1, [By default (for now anyway) Squid includes options which allows the cache administrator to violate the HTTP protocol specification in terms of cache behaviour. Setting this to '0' will disable such code.])
fi
dnl Enable IP-Filter Transparent Proxy
AC_ARG_ENABLE(ipf-transparent,
[ --enable-ipf-transparent
Enable Transparent Proxy support for systems
using IP-Filter network address redirection.],
[ if test "$enableval" = "yes" ; then
echo "IP-Filter Transparent Proxy enabled"
AC_DEFINE(IPF_TRANSPARENT, 1, [Enable support for Transparent Proxy on systems using IP-Filter
address redirection. This provides "masquerading" support for non
Linux system.])
IPF_TRANSPARENT="yes"
dnl On Solaris Ipfilter includes expect that SOLARIS2 is defined with the
dnl Solaris minor version (8, 9, 10, ...)
case "$host" in
*-solaris*)
solrev=`uname -r | sh -c 'IFS=. read j n x; echo $n'`
CFLAGS="-DSOLARIS2=$solrev $CFLAGS"
;;
*)
;;
esac
fi
])
dnl Enable PF Transparent Proxy