]> git.ipfire.org Git - thirdparty/squid.git/blob - src/cf_gen_defines
SourceFormat Enforcement
[thirdparty/squid.git] / src / cf_gen_defines
1 #!/usr/bin/awk -f
2
3 ## Copyright (C) 1996-2017 The Squid Software Foundation and contributors
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
10 BEGIN {
11 print "/* Generated automatically from cf.data.pre DO NOT EDIT */"
12 print "/*"
13 print " * Copyright (C) 1996-2017 The Squid Software Foundation and contributors"
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 ""
20 print "#include \"autoconf.h\""
21 print "static struct { const char *name; const char *enable; int defined;} defines[] = {"
22 define["_SQUID_WINDOWS_"]="MS Windows"
23 define["FOLLOW_X_FORWARDED_FOR"]="--enable-follow-x-forwarded-for"
24 define["FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER"]="--enable-follow-x-forwarded-for and --enable-linux-netfilter"
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"
27 define["HAVE_MSTATS&&HAVE_GNUMALLOC_H"]="GNU Malloc with mstats()"
28 define["ICAP_CLIENT"]="--enable-icap-client"
29 define["SO_MARK&&USE_LIBCAP"]="Packet MARK (Linux)"
30 define["SQUID_SNMP"]="--enable-snmp"
31 define["USE_ADAPTATION"]="--enable-ecap or --enable-icap-client"
32 define["USE_AUTH"]="--enable-auth"
33 define["USE_CACHE_DIGESTS"]="--enable-cache-digests"
34 define["USE_DELAY_POOLS"]="--enable-delay-pools"
35 define["USE_ECAP"]="--enable-ecap"
36 define["USE_ERR_LOCALES"]="--enable-auto-locale"
37 define["USE_GNUTLS||USE_OPENSSL"]="--with-gnutls or --with-openssl"
38 define["USE_HTCP"]="--enable-htcp"
39 define["USE_HTTP_VIOLATIONS"]="--enable-http-violations"
40 define["USE_ICMP"]="--enable-icmp"
41 define["USE_IDENT"]="--enable-ident-lookups"
42 define["USE_LOADABLE_MODULES"]="--enable-loadable-modules"
43 define["USE_OPENSSL"]="--with-openssl"
44 define["USE_QOS_TOS"]="--enable-zph-qos"
45 define["USE_SQUID_ESI"]="--enable-esi"
46 define["USE_SQUID_EUI"]="--enable-eui"
47 define["USE_SSL_CRTD"]="--enable-ssl-crtd"
48 define["USE_UNLINKD"]="--enable-unlinkd"
49 define["USE_WCCP"]="--enable-wccp"
50 define["USE_WCCPv2"]="--enable-wccpv2"
51 }
52 /^IFDEF:/ {
53 if (define[$2] != "")
54 DEFINE=define[$2]
55 else
56 DEFINE="-D" $2 " define"
57 print "{\"" $2 "\", \"" DEFINE "\", "
58 print "#if " $2
59 print "1"
60 print "#else"
61 print "0"
62 print "#endif"
63 print "},"
64 }
65 END {
66 print "{(char const *)0L, (char const *)0L, 0}};"
67 }