]> git.ipfire.org Git - thirdparty/squid.git/blame - src/cf_gen_defines
mkrelease: allow two digits for minor release numbers (#1837)
[thirdparty/squid.git] / src / cf_gen_defines
CommitLineData
9603207d 1#!/usr/bin/awk -f
5d28d44b 2
b8ae064d 3## Copyright (C) 1996-2023 The Squid Software Foundation and contributors
5d28d44b
AJ
4##
5## Squid software is distributed under GPLv2+ license and includes
6## contributions from numerous individuals and organizations.
7## Please see the COPYING and CONTRIBUTORS files for details.
8##
9
6b53c392 10BEGIN {
5d28d44b
AJ
11 print "/* Generated automatically from cf.data.pre DO NOT EDIT */"
12 print "/*"
b8ae064d 13 print " * Copyright (C) 1996-2023 The Squid Software Foundation and contributors"
5d28d44b
AJ
14 print " *"
15 print " * Squid software is distributed under GPLv2+ license and includes"
16 print " * contributions from numerous individuals and organizations."
17 print " * Please see the COPYING and CONTRIBUTORS files for details."
18 print " */"
19 print ""
c1f8bbd0 20 print "#include \"autoconf.h\""
f75662c9 21 print "static struct { const char *name; const char *enable; int defined;} defines[] = {"
f2228f3b 22 define["_SQUID_WINDOWS_"]="MS Windows"
97a616ca 23 define["FOLLOW_X_FORWARDED_FOR"]="--enable-follow-x-forwarded-for"
96d64448 24 define["FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER"]="--enable-follow-x-forwarded-for and --enable-linux-netfilter"
f2228f3b
AJ
25 define["FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION"]="--enable-follow-x-forwarded-for and (--enable-icap-client and/or --enable-ecap)"
26 define["FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS"]="--enable-follow-x-forwarded-for and --enable-delay-pools"
560630e6
AJ
27 define["HAVE_AUTH_MODULE_BASIC"]="--enable-auth-basic"
28 define["HAVE_AUTH_MODULE_DIGEST"]="--enable-auth-digest"
4106ed25 29 define["HAVE_LIBCAP&&SO_MARK"]="--with-cap and Packet MARK (Linux)"
c813943d 30 define["HAVE_LIBGNUTLS||USE_OPENSSL"]="--with-gnutls or --with-openssl"
f2228f3b 31 define["HAVE_MSTATS&&HAVE_GNUMALLOC_H"]="GNU Malloc with mstats()"
97a616ca 32 define["ICAP_CLIENT"]="--enable-icap-client"
6b53c392 33 define["SQUID_SNMP"]="--enable-snmp"
97a616ca 34 define["USE_ADAPTATION"]="--enable-ecap or --enable-icap-client"
b6ead21b 35 define["USE_AUTH"]="--enable-auth"
6b53c392 36 define["USE_CACHE_DIGESTS"]="--enable-cache-digests"
f2228f3b 37 define["USE_DELAY_POOLS"]="--enable-delay-pools"
97a616ca
AJ
38 define["USE_ECAP"]="--enable-ecap"
39 define["USE_ERR_LOCALES"]="--enable-auto-locale"
6b53c392 40 define["USE_HTCP"]="--enable-htcp"
f2228f3b 41 define["USE_HTTP_VIOLATIONS"]="--enable-http-violations"
6b53c392 42 define["USE_ICMP"]="--enable-icmp"
5a2409b7 43 define["USE_LOADABLE_MODULES"]="--enable-shared"
f2228f3b
AJ
44 define["USE_OPENSSL"]="--with-openssl"
45 define["USE_QOS_TOS"]="--enable-zph-qos"
97a616ca 46 define["USE_SQUID_ESI"]="--enable-esi"
b6ead21b
AJ
47 define["USE_SQUID_EUI"]="--enable-eui"
48 define["USE_SSL_CRTD"]="--enable-ssl-crtd"
06221e61 49 define["USE_UNLINKD"]="--enable-unlinkd"
6b53c392 50 define["USE_WCCP"]="--enable-wccp"
0b0cfcf2 51 define["USE_WCCPv2"]="--enable-wccpv2"
6b53c392 52}
53/^IFDEF:/ {
de701c63 54 if (define[$2] != "")
b6ead21b
AJ
55 DEFINE=define[$2]
56 else
59254e07 57 DEFINE="-D" $2 " define"
de701c63 58 print "{\"" $2 "\", \"" DEFINE "\", "
6b53c392 59 print "#if " $2
60 print "1"
61 print "#else"
62 print "0"
63 print "#endif"
64 print "},"
65}
66END {
e6ccf245 67 print "{(char const *)0L, (char const *)0L, 0}};"
6b53c392 68}