1 /*************************************************
2 * Exim - an Internet mail transport agent *
3 *************************************************/
5 /* Copyright (c) University of Cambridge 1995 - 2016 */
6 /* See the file NOTICE for conditions of use and distribution. */
9 /*************************************************
10 * Build configuration header for Exim *
11 *************************************************/
13 /* This auxiliary program builds the file config.h by the following
16 First, it determines the size of off_t and time_t variables, and generates
17 macro code to define OFF_T_FMT and TIME_T_FMT as suitable formats, if they are
18 not already defined in the system-specific header file.
20 Then it reads Makefile, looking for certain OS-specific definitions which it
21 uses to define some specific macros. Finally, it reads the defaults file
24 The defaults file contains normal C #define statements for various macros; if
25 the name of a macro is found in the environment, the environment value replaces
26 the default. If the default #define does not contain any value, then that macro
27 is not copied to the created file unless there is some value in the
30 This program is compiled and run as part of the Make process and is not
31 normally called independently. */
38 #include <sys/types.h>
52 static const char *db_opts[] = { "", "USE_DB", "USE_GDBM", "USE_TDB" };
54 static int have_ipv6 = 0;
55 static int have_iconv = 0;
57 static char errno_quota[256];
58 static char ostype[256];
61 /* If any entry is an initial substring of another, the longer one must
64 static have_item have_list[] = {
65 { "HAVE_IPV6", &have_ipv6 },
66 { "HAVE_ICONV", &have_iconv },
70 static save_item save_list[] = {
71 { "ERRNO_QUOTA", errno_quota },
78 /* Subroutine to check a string for precisely one instance of "%s". If not,
82 check_percent_ess(char *value, char *name)
85 char *p = strstr(value, "%s");
86 if (p != NULL) OK = strstr(p+2, "%s") == NULL;
89 printf("\n*** \"%s\" (%s) must contain precisely one occurrence of\n"
90 "*** \"%%s\". Please review your build-time configuration.\n\n/", value,
100 main(int argc, char **argv)
102 off_t test_off_t = 0;
103 time_t test_time_t = 0;
105 #if ! (__STDC_VERSION__ >= 199901L)
106 size_t test_size_t = 0;
107 ssize_t test_ssize_t = 0;
108 unsigned long test_ulong_t = 0L;
109 unsigned int test_uint_t = 0;
111 long test_long_t = 0;
115 int last_initial = 'A';
118 int in_local_makefile = 0;
119 int use_which_db = 0;
120 int use_which_db_in_local_makefile = 0;
121 int support_crypteq = 0;
126 printf("*** Buildconfig: called with incorrect arguments\n");
130 new = fopen("config.h", "wb");
133 printf("*** Buildconfig: failed to open config.h for output\n");
137 printf("Building configuration file config.h\n");
139 fprintf(new, "/*************************************************\n");
140 fprintf(new, "* Configuration header for Exim *\n");
141 fprintf(new, "*************************************************/\n\n");
143 fprintf(new, "/* This file was automatically generated from Makefile and "
144 "config.h.defaults,\n");
145 fprintf(new, "using values specified in the configuration file Local/Makefile.\n");
146 fprintf(new, "Do not edit it. Instead, edit Local/Makefile and "
147 "rerun make. */\n\n");
149 /* First, deal with the printing format for off_t variables. We assume that if
150 the size of off_t is greater than 4, "%lld" will be available as a format for
151 printing long long variables, and there will be support for the long long type.
152 This assumption is known to be OK for the common operating systems. */
154 fprintf(new, "#ifndef OFF_T_FMT\n");
155 if (sizeof(test_off_t) > sizeof(test_long_t))
157 fprintf(new, "# define OFF_T_FMT \"%%lld\"\n");
158 fprintf(new, "# define LONGLONG_T long long int\n");
162 fprintf(new, "# define OFF_T_FMT \"%%ld\"\n");
163 fprintf(new, "# define LONGLONG_T long int\n");
165 fprintf(new, "#endif\n\n");
167 /* Now do the same thing for time_t variables. If the length is greater than
168 4, we want to assume long long support (even if off_t was less than 4). If the
169 length is 4 or less, we can leave LONGLONG_T to whatever was defined above for
172 fprintf(new, "#ifndef TIME_T_FMT\n");
173 if (sizeof(test_time_t) > sizeof(test_long_t))
175 fprintf(new, "# define TIME_T_FMT \"%%lld\"\n");
176 fprintf(new, "# undef LONGLONG_T\n");
177 fprintf(new, "# define LONGLONG_T long long int\n");
180 fprintf(new, "# define TIME_T_FMT \"%%ld\"\n");
181 fprintf(new, "#endif\n\n");
183 fprintf(new, "#ifndef INO_T_FMT\n");
184 if (sizeof(test_ino_t) > sizeof(test_long_t))
185 fprintf(new, "# define INO_T_FMT \"%%llu\"\n");
187 fprintf(new, "# define INO_T_FMT \"%%lu\"\n");
188 fprintf(new, "#endif\n\n");
190 fprintf(new, "#ifndef PID_T_FMT\n");
191 fprintf(new, "# define PID_T_FMT \"%%lu\"\n");
192 fprintf(new, "#endif\n\n");
194 /* And for sizeof() results, size_t, which should with C99 be just %zu, deal
195 with C99 not being ubiquitous yet. Unfortunately. Assume ssize_t is same
196 size as size_t on C99; if someone comes up with a version where it's not, fix
199 #if __STDC_VERSION__ >= 199901L
200 fprintf(new, "#define SIZE_T_FMT \"%%zu\"\n");
201 fprintf(new, "#define SSIZE_T_FMT \"%%zd\"\n");
203 if (sizeof(test_size_t) > sizeof (test_ulong_t))
204 fprintf(new, "#define SIZE_T_FMT \"%%llu\"\n");
205 else if (sizeof(test_size_t) > sizeof (test_uint_t))
206 fprintf(new, "#define SIZE_T_FMT \"%%lu\"\n");
208 fprintf(new, "#define SIZE_T_FMT \"%%u\"\n");
210 if (sizeof(test_ssize_t) > sizeof(test_long_t))
211 fprintf(new, "#define SSIZE_T_FMT \"%%lld\"\n");
212 else if (sizeof(test_ssize_t) > sizeof(test_int_t))
213 fprintf(new, "#define SSIZE_T_FMT \"%%ld\"\n");
215 fprintf(new, "#define SSIZE_T_FMT \"%%d\"\n");
218 /* Now search the makefile for certain settings */
220 base = fopen("Makefile", "rb");
223 printf("*** Buildconfig: failed to open Makefile\n");
228 errno_quota[0] = 0; /* no over-riding value set */
229 ostype[0] = 0; /* just in case */
232 while (fgets(buffer, sizeof(buffer), base) != NULL)
237 char *p = buffer + (int)strlen(buffer);
239 while (p > buffer && isspace((unsigned char)p[-1])) p--;
242 while (isspace((unsigned char)*p)) p++;
244 /* Notice when we hit the user's makefile */
246 if (strcmp(p, "# From Local/Makefile") == 0)
248 in_local_makefile = 1;
252 /* Remember the last DB option setting. If we hit two in the user's
253 Makefile, complain. */
255 for (i = 1; i < sizeof(db_opts)/sizeof(char *); i++)
257 int len = (int)strlen(db_opts[i]);
258 if (strncmp(p, db_opts[i], len) == 0 && (p[len] == ' ' || p[len] == '='))
260 if (in_local_makefile)
262 if (use_which_db_in_local_makefile)
264 printf("*** Only one of USE_DB, USE_GDBM, or USE_TDB should be "
265 "defined in Local/Makefile\n");
268 use_which_db_in_local_makefile = 1;
274 if (i < sizeof(db_opts)/sizeof(char *)) continue;
276 /* Items where we just save a boolean */
278 for (h = have_list; h->name != NULL; h++)
280 int len = (int)strlen(h->name);
281 if (strncmp(p, h->name, len) == 0)
284 while (isspace((unsigned char)*p)) p++;
287 printf("*** Buildconfig: syntax error in Makefile line %d\n", linecount);
290 while (isspace((unsigned char)*p)) p++;
291 if (strcmp(p, "YES") == 0 || strcmp(p, "yes") == 0) *(h->flag) = 1;
292 else *(h->flag) = 0; /* Must reset in case multiple instances */
297 if (h->name != NULL) continue;
299 /* Items where we save the complete string */
301 for (s = save_list; s->name != NULL; s++)
303 int len = (int)strlen(s->name);
304 if (strncmp(p, s->name, len) == 0)
307 while (isspace((unsigned char)*p)) p++;
310 printf("*** Buildconfig: syntax error in Makefile line %d\n", linecount);
313 while (isspace((unsigned char)*p)) p++;
319 fprintf(new, "#define HAVE_IPV6 %s\n",
320 have_ipv6? "TRUE" : "FALSE");
322 fprintf(new, "#define HAVE_ICONV %s\n",
323 have_iconv? "TRUE" : "FALSE");
325 if (errno_quota[0] != 0)
326 fprintf(new, "\n#define ERRNO_QUOTA %s\n", errno_quota);
328 if (strcmp(cc, "gcc") == 0 &&
329 (strstr(ostype, "IRIX") != NULL || strstr(ostype, "AIX") != NULL))
331 fprintf(new, "\n/* This switch includes the code to fix the inet_ntoa() */");
332 fprintf(new, "\n/* bug when using gcc on an IRIX or AIX system. */");
333 fprintf(new, "\n#define USE_INET_NTOA_FIX");
340 /* Now handle the macros listed in the defaults */
342 base = fopen("../src/config.h.defaults", "rb");
345 printf("*** Buildconfig: failed to open ../src/config.h.defaults\n");
350 while (fgets(buffer, sizeof(buffer), base) != NULL)
358 while (*p == ' ' || *p == '\t') p++;
360 if (strncmp(p, "#ifdef ", 7) == 0
361 || strncmp(p, "#ifndef ", 8) == 0
362 || strncmp(p, "#if ", 4) == 0
363 || strncmp(p, "#endif", 6) == 0
370 if (strncmp(p, "#define ", 8) != 0) continue;
373 while (*p == ' ' || *p == '\t') p++;
375 if (*p < last_initial) fprintf(new, "\n");
378 while (*p && (isalnum((unsigned char)*p) || *p == '_')) *q++ = *p++;
381 /* USE_DB, USE_GDBM, and USE_TDB are special cases. We want to have only
382 one of them set. The scan of the Makefile has saved which was the last one
385 for (i = 1; i < sizeof(db_opts)/sizeof(char *); i++)
387 if (strcmp(name, db_opts[i]) == 0)
389 if (use_which_db == i)
390 fprintf(new, "#define %s %.*syes\n", db_opts[i],
391 21 - (int)strlen(db_opts[i]), " ");
393 fprintf(new, "/* %s not set */\n", name);
397 if (i < sizeof(db_opts)/sizeof(char *)) continue;
399 /* EXIM_USER is a special case. We look in the environment for EXIM_USER or
400 EXIM_UID (the latter for backward compatibility with Exim 3). If the value is
401 not numeric, we look up the user, and default the GID if found. Otherwise,
402 EXIM_GROUP or EXIM_GID must be in the environment. */
404 if (strcmp(name, "EXIM_UID") == 0)
410 char *username = NULL;
411 char *groupname = NULL;
413 char *user = getenv("EXIM_USER");
414 char *group = getenv("EXIM_GROUP");
416 if (user == NULL) user = getenv("EXIM_UID");
417 if (group == NULL) group = getenv("EXIM_GID");
421 printf("\n*** EXIM_USER has not been defined in any of the Makefiles in "
422 "the\n \"Local\" directory. Please review your build-time "
423 "configuration.\n\n");
427 while (isspace((unsigned char)(*user))) user++;
430 printf("\n*** EXIM_USER is defined as an empty string in one of the "
431 "files\n in the \"Local\" directory. Please review your build-time"
432 "\n configuration.\n\n");
436 for (s = user; *s != 0; s++)
438 if (iscntrl((unsigned char)(*s)))
440 printf("\n*** EXIM_USER contains the control character 0x%02X in one "
441 "of the files\n in the \"Local\" directory. Please review your "
442 "build-time\n configuration.\n\n", *s);
447 /* Numeric uid given */
449 if (user[strspn(user, "0123456789")] == 0)
451 uid = (uid_t)atoi(user);
454 /* User name given. Normally, we look up the uid right away. However,
455 people building binary distributions sometimes want to retain the name till
456 runtime. This is supported if the name begins "ref:". */
458 else if (strncmp(user, "ref:", 4) == 0)
461 while (isspace(*user)) user++;
469 struct passwd *pw = getpwnam(user);
472 printf("\n*** User \"%s\" (specified in one of the Makefiles) does not "
473 "exist.\n Please review your build-time configuration.\n\n",
483 /* Use explicit group if set. */
487 while (isspace((unsigned char)(*group))) group++;
490 printf("\n*** EXIM_GROUP is defined as an empty string in one of "
491 "the files in the\n \"Local\" directory. ");
494 printf("If you want the Exim group to be taken from the\n "
495 "password data for the Exim user, just remove the EXIM_GROUP "
496 "setting.\n Otherwise, p");
498 else printf("EXIM_USER is defined numerically, so there is no"
499 "\n default for EXIM_GROUP and you must set it explicitly.\n P");
500 printf("lease review your build-time configuration.\n\n");
504 for (s = group; *s != 0; s++)
506 if (iscntrl((unsigned char)(*s)))
508 printf("\n*** EXIM_GROUP contains the control character 0x%02X in one "
509 "of the files\n in the \"Local\" directory. Please review your "
510 "build-time\n configuration.\n\n", *s);
515 /* Group name given. This may be by reference or to be looked up now,
518 if (strncmp(group, "ref:", 4) == 0)
521 while (isspace(*group)) group++;
525 else if (username != NULL)
530 else if (group[strspn(group, "0123456789")] == 0)
532 gid = (gid_t)atoi(group);
537 struct group *gr = getgrnam(group);
540 printf("\n*** Group \"%s\" (specified in one of the Makefiles) does "
541 "not exist.\n Please review your build-time configuration.\n\n",
549 /* Else trouble unless found in passwd file with user */
553 printf("\n*** No group set for Exim. Please review your build-time "
554 "configuration.\n\n");
558 /* security sanity checks
559 if ref: is being used, we can never be sure, but we can take reasonable
560 steps to filter out the most obvious ones. */
562 if ((!uid_not_set && uid == 0) ||
563 ((username != NULL) && (
564 (strcmp(username, "root") == 0) ||
565 (strcmp(username, "toor") == 0) )))
567 printf("\n*** Exim's internal user must not be root.\n\n");
571 /* Output user and group names or uid/gid. When names are set, uid/gid
572 are set to zero but will be replaced at runtime. */
574 if (username != NULL)
575 fprintf(new, "#define EXIM_USERNAME \"%s\"\n", username);
576 if (groupname != NULL)
577 fprintf(new, "#define EXIM_GROUPNAME \"%s\"\n", groupname);
579 fprintf(new, "#define EXIM_UID %d\n", (int)uid);
580 fprintf(new, "#define EXIM_GID %d\n", (int)gid);
584 /* CONFIGURE_OWNER and CONFIGURE_GROUP are special cases. We look in the
585 environment for first. If the value is not numeric, we look up the user or
586 group. A lot of this code is similar to that for EXIM_USER, but it's easier
587 to keep it separate. */
589 if (strcmp(name, "CONFIGURE_OWNER") == 0 ||
590 strcmp(name, "CONFIGURE_GROUP") == 0)
592 int isgroup = name[10] == 'G';
596 const char *username = NULL;
597 const char *user = getenv(name);
599 if (user == NULL) user = "";
600 while (isspace((unsigned char)(*user))) user++;
603 fprintf(new, "/* %s not set */\n", name);
607 for (s = user; *s != 0; s++)
609 if (iscntrl((unsigned char)(*s)))
611 printf("\n*** %s contains the control character 0x%02X in "
612 "one of the files\n in the \"Local\" directory. Please review "
613 "your build-time\n configuration.\n\n", name, *s);
618 /* Numeric uid given */
620 if (user[strspn(user, "0123456789")] == 0)
623 gid = (gid_t)atoi(user);
625 uid = (uid_t)atoi(user);
628 /* Name given. Normally, we look up the uid or gid right away. However,
629 people building binary distributions sometimes want to retain the name till
630 runtime. This is supported if the name begins "ref:". */
632 else if (strncmp(user, "ref:", 4) == 0)
635 while (isspace(*user)) user++;
640 struct group *gr = getgrnam(user);
643 printf("\n*** Group \"%s\" (specified in one of the Makefiles) does not "
644 "exist.\n Please review your build-time configuration.\n\n",
653 struct passwd *pw = getpwnam(user);
656 printf("\n*** User \"%s\" (specified in one of the Makefiles) does not "
657 "exist.\n Please review your build-time configuration.\n\n",
664 /* Output user and group names or uid/gid. When names are set, uid/gid
665 are set to zero but will be replaced at runtime. */
667 if (username != NULL)
670 fprintf(new, "#define CONFIGURE_GROUPNAME \"%s\"\n", username);
672 fprintf(new, "#define CONFIGURE_OWNERNAME \"%s\"\n", username);
676 fprintf(new, "#define CONFIGURE_GROUP %d\n", (int)gid);
678 fprintf(new, "#define CONFIGURE_OWNER %d\n", (int)uid);
682 /* FIXED_NEVER_USERS is another special case. Look up the uid values and
683 create suitable initialization data for a vector. */
685 if (strcmp(name, "FIXED_NEVER_USERS") == 0)
687 char *list = getenv("FIXED_NEVER_USERS");
690 fprintf(new, "#define FIXED_NEVER_USERS 0\n");
698 while (*p != 0) if (*p++ == ':') count++;
700 vector = malloc((count+1) * sizeof(uid_t));
701 vector[0] = (uid_t)count;
703 for (i = 1, j = 0; i <= count; list++, i++)
708 while (*list != 0 && *list != ':') list++;
709 strncpy(name, p, list-p);
716 else if (name[strspn(name, "0123456789")] == 0)
718 vector[j++] = (uid_t)atoi(name);
722 struct passwd *pw = getpwnam(name);
725 printf("\n*** User \"%s\" (specified for FIXED_NEVER_USERS in one of the Makefiles) does not "
726 "exist.\n Please review your build-time configuration.\n\n",
730 vector[j++] = pw->pw_uid;
733 fprintf(new, "#define FIXED_NEVER_USERS %d", j);
734 for (i = 0; i < j; i++) fprintf(new, ", %d", (unsigned int)vector[i]);
740 /* WITH_CONTENT_SCAN is another special case: it must be set if it or
741 EXPERIMENTAL_DCC is set. */
743 if (strcmp(name, "WITH_CONTENT_SCAN") == 0)
745 char *wcs = getenv("WITH_CONTENT_SCAN");
746 char *dcc = getenv("EXPERIMENTAL_DCC");
747 fprintf(new, wcs || dcc
748 ? "#define WITH_CONTENT_SCAN yes\n"
749 : "/* WITH_CONTENT_SCAN not set */\n");
753 /* DISABLE_DKIM is special; must be forced if no SUPPORT_TLS */
754 if (strcmp(name, "DISABLE_DKIM") == 0)
756 char *d_dkim = getenv("DISABLE_DKIM");
757 char *tls = getenv("SUPPORT_TLS");
760 fprintf(new, "#define DISABLE_DKIM yes\n");
762 fprintf(new, "#define DISABLE_DKIM yes /* forced by lack of TLS */\n");
764 fprintf(new, "/* DISABLE_DKIM not set */\n");
768 /* Otherwise, check whether a value exists in the environment. Remember if
769 it is an AUTH setting or SUPPORT_CRYPTEQ. */
771 if ((value = getenv(name)) != NULL)
774 len = 21 - (int)strlen(name);
776 if (strncmp(name, "AUTH_", 5) == 0) have_auth = 1;
777 if (strncmp(name, "SUPPORT_CRYPTEQ", 15) == 0) support_crypteq = 1;
779 /* The text value of LDAP_LIB_TYPE refers to a macro that gets set. */
781 if (strcmp(name, "LDAP_LIB_TYPE") == 0)
783 if (strcmp(value, "NETSCAPE") == 0 ||
784 strcmp(value, "UMICHIGAN") == 0 ||
785 strcmp(value, "OPENLDAP1") == 0 ||
786 strcmp(value, "OPENLDAP2") == 0 ||
787 strcmp(value, "SOLARIS") == 0 ||
788 strcmp(value, "SOLARIS7") == 0) /* Compatibility */
790 fprintf(new, "#define LDAP_LIB_%s\n", value);
794 printf("\n*** LDAP_LIB_TYPE=%s is not a recognized LDAP library type."
795 "\n*** Please review your build-time configuration.\n\n", value);
800 else if (strcmp(name, "RADIUS_LIB_TYPE") == 0)
802 if (strcmp(value, "RADIUSCLIENT") == 0 ||
803 strcmp(value, "RADIUSCLIENTNEW") == 0 ||
804 strcmp(value, "RADLIB") == 0)
806 fprintf(new, "#define RADIUS_LIB_%s\n", value);
810 printf("\n*** RADIUS_LIB_TYPE=%s is not a recognized RADIUS library type."
811 "\n*** Please review your build-time configuration.\n\n", value);
816 /* Other macros get set to the environment value. */
820 fprintf(new, "#define %s ", name);
821 while(len-- > 0) fputc(' ', new);
823 /* LOG_FILE_PATH is now messy because it can be a path containing %s or
824 it can be "syslog" or ":syslog" or "syslog:path" or even "path:syslog". */
826 if (strcmp(name, "LOG_FILE_PATH") == 0)
832 char *sss = strchr(ss, ':');
835 strncpy(buffer, ss, sss-ss);
836 buffer[sss-ss] = 0; /* For empty case */
840 strncpy(buffer, ss, sizeof(buffer));
841 buffer[sizeof(buffer)-1] = 0;
843 pp = buffer + (int)strlen(buffer);
844 while (pp > buffer && isspace((unsigned char)pp[-1])) pp--;
846 if (buffer[0] != 0 && strcmp(buffer, "syslog") != 0)
847 check_percent_ess(buffer, name);
848 if (sss == NULL) break;
850 while (isspace((unsigned char)*ss)) ss++;
852 fprintf(new, "\"%s\"\n", value);
855 /* Timezone values HEADERS_CHARSET, TCP_WRAPPERS_DAEMON_NAME and
856 WHITELIST_D_MACROS get quoted */
858 else if (strcmp(name, "TIMEZONE_DEFAULT") == 0||
859 strcmp(name, "TCP_WRAPPERS_DAEMON_NAME") == 0||
860 strcmp(name, "HEADERS_CHARSET") == 0||
861 strcmp(name, "WHITELIST_D_MACROS") == 0)
862 fprintf(new, "\"%s\"\n", value);
864 /* GnuTLS constants; first is for debugging, others are tuning */
866 /* less than 0 is not-active; 0-9 are normal, API suggests higher
867 taken without problems */
868 else if (strcmp(name, "EXIM_GNUTLS_LIBRARY_LOG_LEVEL") == 0)
872 nv = strtol(value, &end, 10);
873 if (end != value && *end == '\0' && nv >= -1 && nv <= 100)
875 fprintf(new, "%s\n", value);
879 printf("Value of %s should be -1..9\n", name);
884 /* how many bits Exim, as a client, demands must be in D-H */
885 /* 1024 is a historical figure; some sites actually use lower, so we
886 permit the value to be lowered "dangerously" low, but not "insanely"
887 low. Though actually, 1024 is becoming "dangerous". */
888 else if ((strcmp(name, "EXIM_CLIENT_DH_MIN_MIN_BITS") == 0) ||
889 (strcmp(name, "EXIM_CLIENT_DH_DEFAULT_MIN_BITS") == 0) ||
890 (strcmp(name, "EXIM_SERVER_DH_BITS_PRE2_12") == 0))
894 nv = strtol(value, &end, 10);
895 if (end != value && *end == '\0' && nv >= 512 && nv < 500000)
897 fprintf(new, "%s\n", value);
901 printf("Unreasonable value (%s) of \"%s\".\n", value, name);
906 /* For others, quote any paths and don't quote anything else */
910 if (value[0] == '/') fprintf(new, "\"%s\"\n", value);
911 else fprintf(new, "%s\n", value);
916 /* Value not defined in the environment; use the default */
921 while (*p == ' ' || *p == '\t') p++;
922 if (*p != '\n') fputs(buffer, new); else
925 if (strcmp(name, "BIN_DIRECTORY") == 0 ||
926 strcmp(name, "CONFIGURE_FILE") == 0)
928 printf("\n*** %s has not been defined in any of the Makefiles in the\n"
929 " \"Local\" directory. "
930 "Please review your build-time configuration.\n\n", name);
934 if (strcmp(name, "TIMEZONE_DEFAULT") == 0)
936 char *tz = getenv("TZ");
937 fprintf(new, "#define TIMEZONE_DEFAULT ");
938 if (tz == NULL) fprintf(new, "NULL\n"); else
939 fprintf(new, "\"%s\"\n", tz);
942 else fprintf(new, "/* %s not set */\n", name);
949 /* If any AUTH macros were defined, ensure that SUPPORT_CRYPTEQ is also
954 if (!support_crypteq) fprintf(new, "/* Force SUPPORT_CRYPTEQ for AUTH */\n"
955 "#define SUPPORT_CRYPTEQ\n");
960 fprintf(new, "\n/* End of config.h */\n");
965 /* End of buildconfig.c */