#!/usr/bin/awk -f 
BEGIN {
	print "/* Generated automatically from cf.data.pre"
	print " * DO NOT EDIT"
	print "*/"
	print "static struct { const char *name; const char *enable; int defined;} defines[] = {"
	define["DELAY_POOLS"]="--enable-delay-pools"
	define["HTTP_VIOLATIONS"]="--enable-http-violations"
	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["ESI"]="--enable-esi"
}
/^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}};"
}
