+static gstring *
+lookup_show_supported(gstring * g)
+{
+gstring * b = NULL, * d = NULL;
+
+#if defined(LOOKUP_LSEARCH)
+# if LOOKUP_LSEARCH!=2
+ b = string_cat(b, US" lsearch wildlsearch nwildlsearch iplsearch");
+# else
+ d = string_cat(d, US" lsearch wildlsearch nwildlsearch iplsearch");
+# endif
+#endif
+#if defined(LOOKUP_CDB)
+# if LOOKUP_CDB!=2
+ b = string_cat(b, US" cdb");
+# else
+ d = string_cat(d, US" cdb");
+# endif
+#endif
+#if defined(LOOKUP_DBM)
+# if LOOKUP_DBM!=2
+ b = string_cat(b, US" dbm dbmjz dbmnz");
+# else
+ d = string_cat(d, US" dbm dbmjz dbmnz");
+# endif
+#endif
+#if defined(LOOKUP_DNSDB)
+# if LOOKUP_DNSDB!=2
+ b = string_cat(b, US" dnsdb");
+# else
+ d = string_cat(d, US" dnsdb");
+# endif
+#endif
+#if defined(LOOKUP_DSEARCH)
+# if LOOKUP_DSEARCH!=2
+ b = string_cat(b, US" dsearch");
+# else
+ d = string_cat(d, US" dsearch");
+# endif
+#endif
+#if defined(LOOKUP_IBASE)
+# if LOOKUP_IBASE!=2
+ b = string_cat(b, US" ibase");
+# else
+ d = string_cat(d, US" ibase");
+# endif
+#endif
+#if defined(LOOKUP_JSON)
+# if LOOKUP_JSON!=2
+ b = string_cat(b, US" json");
+# else
+ d = string_cat(d, US" json");
+# endif
+#endif
+#if defined(LOOKUP_LDAP)
+# if LOOKUP_LDAP!=2
+ b = string_cat(b, US" ldap ldapdn ldapm");
+# else
+ d = string_cat(d, US" ldap ldapdn ldapm");
+# endif
+#endif
+#ifdef LOOKUP_LMDB
+ b = string_cat(b, US" lmdb");
+#endif
+#if defined(LOOKUP_MYSQL)
+# if LOOKUP_MYSQL!=2
+ b = string_cat(b, US" mysql");
+# else
+ d = string_cat(d, US" mysql");
+# endif
+#endif
+#if defined(LOOKUP_NIS)
+# if LOOKUP_NIS!=2
+ b = string_cat(b, US" nis nis0");
+# else
+ d = string_cat(d, US" nis nis0");
+# endif
+#endif
+#if defined(LOOKUP_NISPLUS)
+# if LOOKUP_NISPLUS!=2
+ b = string_cat(b, US" nisplus");
+# else
+ d = string_cat(d, US" nisplus");
+# endif
+#endif
+#if defined(LOOKUP_ORACLE)
+# if LOOKUP_ORACLE!=2
+ b = string_cat(b, US" oracle");
+# else
+ d = string_cat(d, US" oracle");
+# endif
+#endif
+#if defined(LOOKUP_PASSWD)
+# if LOOKUP_PASSWD!=2
+ b = string_cat(b, US" passwd");
+# else
+ d = string_cat(d, US" passwd");
+# endif
+#endif
+#if defined(LOOKUP_PGSQL)
+# if LOOKUP_PGSQL!=2
+ b = string_cat(b, US" pgsql");
+# else
+ d = string_cat(d, US" pgsql");
+# endif
+#endif
+#if defined(LOOKUP_REDIS)
+# if LOOKUP_REDIS!=2
+ b = string_cat(b, US" redis");
+# else
+ d = string_cat(d, US" redis");
+# endif
+#endif
+#if defined(LOOKUP_SQLITE)
+# if LOOKUP_SQLITE!=2
+ b = string_cat(b, US" sqlite");
+# else
+ d = string_cat(d, US" sqlite");
+# endif
+#endif
+#if defined(LOOKUP_TESTDB)
+# if LOOKUP_TESTDB!=2
+ b = string_cat(b, US" testdb");
+# else
+ d = string_cat(d, US" testdb");
+# endif
+#endif
+#if defined(LOOKUP_WHOSON)
+# if LOOKUP_WHOSON!=2
+ b = string_cat(b, US" whoson");
+# else
+ d = string_cat(d, US" whoson");
+# endif
+#endif
+
+if (b) g = string_fmt_append(g, "Lookups (built-in):%Y\n", b);
+if (d) g = string_fmt_append(g, "Lookups (dynamic): %Y\n", d);
+return g;
+}
+
+