#!/usr/bin/awk -f BEGIN { print "/* Generated automatically from cf.data.pre" print " * DO NOT EDIT" print "*/" print "struct { const char *name; const char *enable; int defined;} defines[] = {" define["DELAY_POOLS"]="--enable-delay-pools" define["HTTP_VIOLATIONS"]="--enable-http-violations" define["LINUX_TPROXY"]="--enable-linux-tproxy" define["MULTICAST_MISS_STREAM"]="--enable-multicast-miss" define["SQUID_SNMP"]="--enable-snmp" define["USE_CACHE_DIGESTS"]="--enable-cache-digests" define["USE_DNSSERVERS"]="--disable-internal-dns" define["!USE_DNSSERVERS"]="--enable-internal-dns" define["USE_HTCP"]="--enable-htcp" define["USE_ICMP"]="--enable-icmp" define["USE_IDENT"]="--enable-ident-lookups" define["USE_REFERER_LOG"]="--enable-referer-log" 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["WIP_FWD_LOG"]="--enable-forward-log" } /^IFDEF:/ { if (define[$2] != "") DEFINE=define[$2] else DEFINE="-D" $2 print "{\"" $2 "\", \"" DEFINE "\", " print "#if " $2 print "1" print "#else" print "0" print "#endif" print "}," } END { print "{(void *)0L, 0}};" }