- fputs("# Start of initializer\n", stdout);
- fputs("configuration = ", stdout);
+ /*
+ * We need this in order to know whether `interface' and `monitor'
+ * are valid options or not.
+ */
+#if defined(linux)
+ fputs("os_type = 'linux'\n", stdout);
+#elif defined(__FreeBSD__)
+ fputs("os_type = 'freebsd'\n", stdout);
+#else
+ fputs("os_type = 'generic'\n", stdout);
+#endif
+
+ /*
+ * This should be approximately in sync with the -V option dumping
+ * in fetchmail.c.
+ */
+ features = "feature_options = ("
+#ifdef POP2_ENABLE
+ "'pop2',"
+#endif /* POP2_ENABLE */
+#ifdef POP3_ENABLE
+ "'pop3',"
+#endif /* POP3_ENABLE */
+#ifdef IMAP_ENABLE
+ "'imap',"
+#endif /* IMAP_ENABLE */
+#ifdef GSSAPI
+ "'gssapi',"
+#endif /* GSSAPI */
+#if defined(KERBEROS_V4)
+ "'kerberos',"
+#endif /* defined(IMAP4) */
+#ifdef RPA_ENABLE
+ "'rpa',"
+#endif /* RPA_ENABLE */
+#ifdef SDPS_ENABLE
+ "'sdps',"
+#endif /* SDPS_ENABLE */
+#ifdef ETRN_ENABLE
+ "'etrn',"
+#endif /* ETRN_ENABLE */
+#ifdef ODMR_ENABLE
+ "'odmr',"
+#endif /* ODMR_ENABLE */
+#ifdef SSL_ENABLE
+ "'ssl',"
+#endif /* SSL_ENABLE */
+#ifdef OPIE_ENABLE
+ "'opie',"
+#endif /* OPIE_ENABLE */
+#ifdef HAVE_SOCKS
+ "'socks',"
+#endif /* HAVE_SOCKS */
+ ")\n";
+ fputs(features, stdout);
+
+ fputs("# Start of configuration initializer\n", stdout);
+ fputs("fetchmailrc = ", stdout);