#!/usr/bin/awk -f BEGIN { print "/* Generated automatically from cf.data.pre" print " * DO NOT EDIT" print "*/" print "#include \"autoconf.h\"" print "static struct { const char *name; const char *enable; int defined;} defines[] = {" define["DELAY_POOLS"]="--enable-delay-pools" define["FOLLOW_X_FORWARDED_FOR"]="--enable-follow-x-forwarded-for" define["FOLLOW_X_FORWARDED_FOR&&DELAY_POOLS"]="--enable-follow-x-forwarded-for and --enable-delay-pools" define["FOLLOW_X_FORWARDED_FOR&&ICAP_CLIENT"]="--enable-follow-x-forwarded-for and --enable-icap-client" define["HTTP_VIOLATIONS"]="--enable-http-violations" define["ICAP_CLIENT"]="--enable-icap-client" define["SQUID_SNMP"]="--enable-snmp" define["USE_ADAPTATION"]="--enable-ecap or --enable-icap-client" define["USE_CACHE_DIGESTS"]="--enable-cache-digests" define["USE_DNSSERVERS"]="--disable-internal-dns" define["!USE_DNSSERVERS"]="--enable-internal-dns" define["USE_ECAP"]="--enable-ecap" define["USE_ERR_LOCALES"]="--enable-auto-locale" define["USE_HTCP"]="--enable-htcp" define["USE_ICMP"]="--enable-icmp" define["USE_IDENT"]="--enable-ident-lookups" define["USE_LOADABLE_MODULES"]="--enable-loadable-modules" define["USE_REFERER_LOG"]="--enable-referer-log" define["USE_SQUID_ESI"]="--enable-esi" define["USE_SSL"]="--enable-ssl" define["USE_UNLINKD"]="--enable-unlinkd" define["USE_USERAGENT_LOG"]="--enable-useragent-log" define["USE_WCCP"]="--enable-wccp" define["USE_WCCPv2"]="--enable-wccpv2" define["USE_ZPH_QOS"]="--enable-zph-qos" } /^IFDEF:/ { if (define[$2] != "") DEFINE=define[$2] " option" else DEFINE="-D" $2 " define" print "{\"" $2 "\", \"" DEFINE "\", " print "#if " $2 print "1" print "#else" print "0" print "#endif" print "}," } END { print "{(char const *)0L, (char const *)0L, 0}};" }