9 date 96.02.08.19.07.47; author jromine; state Exp;
14 date 96.02.08.18.36.25; author jromine; state Exp;
19 date 93.11.30.22.01.04; author jromine; state Exp;
24 date 93.08.25.18.07.10; author jromine; state Exp;
29 date 93.08.20.19.47.46; author jromine; state Exp;
34 date 93.08.19.23.51.43; author jromine; state Exp;
39 date 93.06.03.17.59.55; author jromine; state Exp;
44 date 93.06.03.17.43.20; author jromine; state Exp;
49 date 93.02.26.19.01.17; author jromine; state Exp;
54 date 92.12.16.21.01.07; author jromine; state Exp;
59 date 92.12.02.19.08.03; author jromine; state Exp;
64 date 92.11.13.00.55.38; author jromine; state Exp;
69 date 92.11.12.22.48.51; author jromine; state Exp;
74 date 92.11.11.22.58.07; author jromine; state Exp;
79 date 92.11.11.21.26.23; author jromine; state Exp;
84 date 92.11.10.22.40.56; author jromine; state Exp;
89 date 92.11.09.17.37.20; author jromine; state Exp;
94 date 92.11.06.00.46.48; author jromine; state Exp;
99 date 92.11.05.19.25.27; author jromine; state Exp;
104 date 92.11.05.17.20.49; author jromine; state Exp;
109 date 92.11.04.03.00.54; author jromine; state Exp;
114 date 92.10.31.07.56.48; author jromine; state Exp;
119 date 92.10.27.20.22.26; author jromine; state Exp;
124 date 92.10.27.18.10.15; author jromine; state Exp;
129 date 92.10.26.22.32.44; author jromine; state Exp;
134 date 92.10.21.02.06.58; author jromine; state Exp;
139 date 92.10.20.23.49.51; author jromine; state Exp;
144 date 92.10.20.20.40.19; author jromine; state Exp;
149 date 92.10.19.21.59.33; author jromine; state Exp;
154 date 92.10.19.19.57.22; author jromine; state Exp;
159 date 92.10.19.16.46.32; author jromine; state Exp;
164 date 92.05.12.21.45.45; author jromine; state Exp;
169 date 92.03.03.17.09.57; author jromine; state Exp;
174 date 92.03.03.17.07.48; author jromine; state Exp;
179 date 92.02.09.23.30.11; author jromine; state Exp;
184 date 92.02.08.00.02.59; author jromine; state Exp;
189 date 92.02.07.19.12.39; author jromine; state Exp;
194 date 92.02.05.22.10.00; author jromine; state Exp;
199 date 92.02.05.21.52.46; author jromine; state Exp;
204 date 92.02.05.21.10.45; author jromine; state Exp;
209 date 92.01.31.22.47.36; author jromine; state Exp;
214 date 92.01.31.21.07.51; author jromine; state Exp;
219 date 92.01.27.17.34.29; author jromine; state Exp;
224 date 91.01.25.14.48.44; author mh; state Exp;
229 date 90.12.18.14.13.31; author mh; state Exp;
234 date 90.12.18.13.38.31; author mh; state Exp;
239 date 90.12.18.13.36.49; author mh; state Exp;
244 date 90.11.05.16.24.55; author mh; state Exp;
249 date 90.11.05.16.05.46; author mh; state Exp;
254 date 90.11.05.15.56.27; author mh; state Exp;
259 date 90.04.08.10.57.33; author sources; state Exp;
264 date 90.04.06.09.54.00; author sources; state Exp;
269 date 90.04.05.22.20.02; author sources; state Exp;
274 date 90.04.05.15.29.12; author sources; state Exp;
279 date 90.04.05.14.43.07; author sources; state Exp;
284 date 90.04.02.14.49.52; author sources; state Exp;
289 date 90.04.02.14.11.33; author sources; state Exp;
294 date 90.03.21.11.01.12; author sources; state Exp;
299 date 90.03.20.20.53.14; author sources; state Exp;
304 date 90.03.19.15.49.44; author sources; state Exp;
309 date 90.03.19.10.23.21; author sources; state Exp;
314 date 90.03.15.21.25.01; author sources; state Exp;
319 date 90.03.12.14.28.10; author sources; state Exp;
324 date 90.03.09.14.27.20; author sources; state Exp;
329 date 90.03.09.14.26.10; author sources; state Exp;
334 date 90.02.16.11.07.25; author sources; state Exp;
339 date 90.02.16.10.57.17; author sources; state Exp;
344 date 90.02.15.15.55.37; author sources; state Exp;
349 date 90.02.15.13.58.03; author sources; state Exp;
354 date 90.02.15.13.56.08; author sources; state Exp;
359 date 90.02.08.15.47.58; author sources; state Exp;
364 date 90.02.06.12.50.08; author sources; state Exp;
369 date 90.02.01.13.13.31; author sources; state Exp;
374 date 89.11.17.15.56.51; author sources; state Exp;
379 date 89.06.02.11.02.18; author sources; state Exp;
384 date 88.06.29.13.57.02; author sources; state Exp;
390 @Initial revision with no mods.
400 @/* mhconfig.c - configure MH */
401 /* cc [-DSYS5] mhconfig.c -o mhconfig */
403 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.72 1996/02/08 18:36:25 jromine Exp jromine $";
413 #define rindex strrchr
416 static void insopt(), mkopts();
418 extern char *strcpy(), *malloc(), *index(), *rindex();
420 extern char *sprintf(); /* rely on stdio.h to declare this */
423 #define BANNER "This is %s, for generic UNIX (MH.6 configuration program)\n\n"
426 #define SED "config.sed"
427 #define SEDOC "doc/config.sed"
428 #define MAKE "../%s/Makefile"
430 #define WARNING "This file is automatically generated. Do not edit!"
431 #define MHRELEASE "6.8.4" /* for version: "Maj.min.pat" */
432 #define MHCENTERFOOT "MH.6.8" /* for nroff page footers */
433 #define MHLEFTFOOT "[mh.6]" /* [mh.6] MH.6.6 page# */
434 #define MHSLIBVER "3.2" /* SunOS4 shared library version */
438 #define NULLCP ((char *) 0)
440 #define SVAL(s) (s ? s : "")
450 static int filesP = 1;
452 static int makeP = 1;
454 static char *myname = "mhconfig";
455 static char *config = NULL;
456 static char *myopts = NULL;
458 static char *binpath = "/usr/local";
459 static char *bbhome = "/usr/spool/bboards";
460 static char *bboards = "off";
461 static char *bbdelivery = "off";
462 static char *ccoptions = NULL;
463 static char *chownpath = "/etc/chown";
464 static char *compiler = "/bin/cc";
465 static char *copy = "cp";
466 static char *curses = "-lcurses -ltermlib";
467 static char *debug = "off";
468 static char *editor = "prompter";
469 static char *etcpath = "/usr/local/lib/mh";
470 static char *ldoptions = NULL;
471 static char *ldoptlibs = NULL;
472 static char *lex = "lex -nt";
473 static char *ln = "ln";
474 static char *mailgroup = "off";
475 static char *mailpath = "/usr/spool/mail";
476 static char *maildir = NULL;
477 static char *mailfile = NULL;
478 static char *mancat = "man";
479 static char *mandir = "/usr/man";
480 static char *manuals = "standard";
481 static char *mf = "off";
482 static char *mts = "sendmail";
483 static char *poppath = "/usr/etc";
484 static char *removeit = "mv -f";
485 static char *regtest = "off";
486 static char *oldload = "off";
487 static char *options = NULL;
488 static char *pop = "off";
489 static char *ranlib = "on";
490 static char *sharedlib = "off";
491 static char *signl = "int";
492 static char *slibdir = "/usr/local/lib";
493 static char *slflags = "-pic";
494 static char *sprntf = NULL;
503 static int mtsnum = unknown;
505 static struct mtsopt {
514 "mmdf", "MMDFMTS MMDFI", mmdf, NOFLAGS,
515 "mmdf/smtp", "SENDMTS SMTP", mmdf, DOSMTP,
516 "mmdf2", "MMDFMTS MMDFII", mmdf2, NOFLAGS,
517 "mmdf2/smtp", "SENDMTS MMDFII SMTP", mmdf2, DOSMTP,
518 "mh", "MHMTS", mh, NOFLAGS,
519 "sendmail", "SENDMTS", sendmail, NOMF,
520 "sendmail/smtp", "SENDMTS SMTP", sendmail, NOMF,
521 "zmailer", "ZMAILER SENDMTS", sendmail, NOMF,
522 "zmailer/smtp", "ZMAILER SENDMTS SMTP", sendmail, NOMF,
523 NULL, NULL, unknown, NOFLAGS
526 /* other options which cause sed BEGIN/END configuration changes */
532 "APOP", 0, /* authenticated pop */
533 "BSD43", 0, /* sgid ttys */
534 "BSD44", 0, /* manual headings */
535 "KPOP", 0, /* KERBEROS pop */
537 "MIME", 0, /* multi-media extensions */
538 "MPOP", 0, /* mobile pop */
539 "MSGID", 0, /* slocal dup surpression */
540 "NORUSERPASS", 0, /* no ruserpass(3) */
541 "TMA", 0, /* trusted mail */
560 "bin", &binpath, BD_NIL,
561 "bbhome", &bbhome, BD_NIL,
562 "bboards", &bboards, BD_NIL,
563 "bbdelivery", &bbdelivery, BD_NIL,
564 "ccoptions", &ccoptions, BD_ADD,
565 "chown", &chownpath, BD_NIL,
566 "cc", &compiler, BD_NIL,
568 "curses", &curses, BD_NIL,
569 "debug", &debug, BD_NIL,
570 "editor", &editor, BD_NIL,
571 "etc", &etcpath, BD_NIL,
572 "ldoptions", &ldoptions, BD_ADD,
573 "ldoptlibs", &ldoptlibs, BD_ADD,
576 "mail", &mailpath, BD_NIL,
577 "mailgroup", &mailgroup, BD_NIL,
578 "mandir", &mandir, BD_NIL,
579 "manuals", &manuals, BD_NIL,
582 "oldload", &oldload, BD_NIL,
583 "options", &options, BD_ADD,
585 "popdir", &poppath, BD_NIL,
586 "ranlib", &ranlib, BD_NIL,
587 "remove", &removeit, BD_NIL,
588 "regtest", ®test, BD_NIL,
589 "sharedlib", &sharedlib, BD_NIL,
590 "signal", &signl, BD_NIL,
591 "slflags", &slflags, BD_NIL,
592 "slibdir", &slibdir, BD_NIL,
593 "sprintf", &sprntf, BD_NIL,
600 "../support/bboards/bboards.daily",
601 "../support/bboards/bboards.weekly",
602 "../support/bboards/crontab",
603 "../support/bboards/MakeBBoards",
604 "../config/config.c",
605 "../zotnet/mts/mts.c",
606 "../zotnet/mts/mtstailor",
607 "../support/general/MailAliases",
608 "../mts/sendmail/bboardsMH.m4",
609 "../mts/sendmail/popMH.m4",
617 "makefiles/MH-Makefile", ".",
618 "makefiles/config","config",
619 "makefiles/dist","dist",
620 "makefiles/doc","doc",
621 "makefiles/mtsM","mts",
622 "makefiles/mts/mh","mts/mh",
623 "makefiles/mts/mmdf","mts/mmdf",
624 "makefiles/mts/sendmail","mts/sendmail",
625 "makefiles/papers","papers",
626 "makefiles/sbr","sbr",
627 "makefiles/supportM","support",
628 "makefiles/support/bboards","support/bboards",
629 "makefiles/support/general","support/general",
630 "makefiles/support/pop","support/pop",
631 "makefiles/uip","uip",
632 "makefiles/zotnetM","zotnet",
633 "makefiles/zotnet/bboards","zotnet/bboards",
634 "makefiles/zotnet/mf","zotnet/mf",
635 "makefiles/zotnet/mts","zotnet/mts",
636 "makefiles/zotnet/tws","zotnet/tws",
641 static do_sed(), do_sedfile(), do_files(), do_doc(), do_make();
642 static shell(), arginit(), add_option(), trim();
644 static char *stradd (), *strdup (), *tail ();
652 main (argc, argv, envp)
669 printf ("Don't forget to edit \"config/mtstailor\"\n");
672 printf ("Don't forget to run \"make clean\" in the top directory before compiling\n");
682 do_sedfile (SEDOC, smtp);
685 static do_alldoc (fp)
688 fprintf (fp, "%s\n%s\n%s\n%s\n", /* turn @@BEGIN: XX into #ifdef XX */
689 "s!^@@BEGIN: \\(.*\\)$!.br\\", /* for MH wizard manual set */
694 fprintf (fp, "%s\n%s\n%s\n%s\n",
695 "s!^@@END: \\(.*\\)$!.br\\",
697 "#endif /* \\1\\ */",
704 static do_sedfile (sed, flag)
712 if ((fp = fopen (sed, "w")) == NULL)
713 adios (sed, "unable to write");
714 printf ("generating %s\n", sed);
717 printf ("...using special all-doc format.\n");
718 printf ("Be sure to reconfigure before compiling.\n");
719 do_alldoc(fp); /* hack up doc/config.sed */
722 fprintf (fp, "s%%@@(MHCONFIGFILE)%%%s%%g\n", SVAL(config));
723 fprintf (fp, "s%%@@(MHWARNING)%%%s%%g\n", WARNING);
724 fprintf (fp, "s%%@@(MHRELEASE)%%%s%%g\n", MHRELEASE);
725 fprintf (fp, "s%%@@(MHCENTERFOOT)%%%s%%g\n", MHCENTERFOOT);
726 fprintf (fp, "s%%@@(MHLEFTFOOT)%%%s%%g\n", MHLEFTFOOT);
727 fprintf (fp, "s%%@@(MHBINPATH)%%%s%%g\n", SVAL (binpath));
728 fprintf (fp, "s%%@@(MHETCPATH)%%%s%%g\n", SVAL (etcpath));
729 fprintf (fp, "s%%@@(MHPOPDPATH)%%%s%%g\n", SVAL (poppath));
730 fprintf (fp, "s%%@@(MHCHOWNPATH)%%%s%%g\n", SVAL (chownpath));
731 fprintf (fp, "s%%@@(MHDROPATH)%%%s%%g\n", SVAL (maildir));
732 fprintf (fp, "s%%@@(MHDROPFIL)%%%s%%g\n", SVAL (mailfile));
734 fprintf (fp, "s%%@@(MHDROPLOC)%%%s/$USER%%g\n", SVAL (maildir));
736 fprintf (fp, "s%%@@(MHDROPLOC)%%$HOME/%s%%g\n", SVAL (mailfile));
737 fprintf (fp, "s%%@@(MHDROPHAK)%%%s%%g\n",/* HACK */
738 maildir ? maildir : "/usr/spool/mail");
740 fprintf (fp, "s%%@@(MHMANDIR)%%%s%%g\n", mandir);
741 fprintf (fp, "s%%@@(MHCATMAN)%%%s%%g\n",
742 strcmp(mancat, "cat") == 0 ? "| nroff -man" : "");
743 if (strcmp (manuals, "standard") == 0 || strcmp (manuals, "gen") == 0)
744 for (i = 1; i <= 8; i++) {
745 fprintf (fp, "s%%@@(MHMANDIR%d)%%%s%d%%g\n", i, mancat, i);
746 fprintf (fp, "s%%@@(MHMANEXT%d)%%%d%%g\n", i, i);
749 for (i = 1; i <= 8; i++) {
750 fprintf (fp, "s%%@@(MHMANDIR%d)%%%s%c%%g\n", i, mancat,
751 strcmp (manuals, "new") == 0 ? 'n'
752 : strcmp (manuals, "old") == 0 ? 'o'
753 : strcmp (manuals, "bsd44") == 0 ? i + '0'
755 fprintf (fp, "s%%@@(MHMANEXT%d)%%%c%%g\n", i,
756 strcmp (manuals, "new") == 0 ? 'n'
757 : strcmp (manuals, "old") == 0 ? 'o'
758 : strcmp (manuals, "bsd44") == 0 ? '0'
764 if (strcmp (regtest, "on") == 0)
765 fprintf (fp, "s%%@@(MHHOSTVER)%%%s%%g\n", "-n");
767 fprintf (fp, "s%%@@(MHHOSTVER)%%%s%%g\n", "");
769 if (strcmp (manuals, "gen") == 0 || strcmp (manuals, "none") == 0)
770 fprintf (fp, "s%%@@(MHMANGEN)%%%s%%g\n", "#"); /* comment char */
772 fprintf (fp, "s%%@@(MHMANGEN)%%%s%%g\n", "");
774 fprintf (fp, "s%%@@(MHEDITOR)%%%s%%g\n", SVAL (editor));
775 fprintf (fp, "s%%@@(MHCONFIG)%%%s%%g\n", SVAL (myopts));
776 fprintf (fp, "s%%@@(MHCOMPILER)%%%s%%g\n", SVAL (compiler));
777 fprintf (fp, "s%%@@(CP)%%%s%%g\n", SVAL (copy));
778 fprintf (fp, "s%%@@(LN)%%%s%%g\n", SVAL (ln));
779 fprintf (fp, "s%%@@(LEX)%%%s%%g\n", SVAL (lex));
781 fprintf (fp, "s%%@@(MHOPTIONS)%%%s %s%%g\n",
782 SVAL (options), SVAL (ccoptions));
784 fprintf (fp, "s%%@@(MHOPTIONS)%%%s %s%%g\n",
785 SVAL (options), "-O");
786 fprintf (fp, "s%%@@(LDOPTIONS)%%%s%%g\n", SVAL (ldoptions));
787 fprintf (fp, "s%%@@(LDOPTLIB)%%%s%%g\n", SVAL (ldoptlibs));
788 fprintf (fp, "s%%@@(LDCURSES)%%%s%%g\n", SVAL (curses));
790 if (strcmp (bboards, "off") == 0)
791 fprintf (fp, "/^@@BEGIN: BBOARDS$/,/^@@END: BBOARDS$/d\n");
793 fprintf (fp, "/^@@BEGIN: BBOARDS$/d\n/^@@END: BBOARDS$/d\n");
794 fprintf (fp, "s%%@@(BBHOME)%%%s%%g\n", SVAL (bbhome));
795 if (strcmp (bbdelivery, "off") == 0)
796 fprintf (fp, "/^@@BEGIN: BBSERVER$/,/^@@END: BBSERVER$/d\n");
798 fprintf (fp, "/^@@BEGIN: BBSERVER$/d\n/^@@END: BBSERVER$/d\n");
800 if (strcmp (debug, "on") == 0) {
801 fprintf (fp, "/^@@BEGIN: DEBUG$/d\n/^@@END: DEBUG$/d\n");
802 fprintf (fp, "/^@@BEGIN: OPTIM$/,/^@@END: OPTIM$/d\n");
805 fprintf (fp, "/^@@BEGIN: DEBUG$/,/^@@END: DEBUG$/d\n");
806 fprintf (fp, "/^@@BEGIN: OPTIM$/d\n/^@@END: OPTIM$/d\n");
809 if (strcmp (mailgroup, "off")) { /* for SYS5 sgid-inc */
810 fprintf (fp, "/^@@BEGIN: MAILGROUP$/d\n/^@@END: MAILGROUP$/d\n");
811 fprintf (fp, "s%%@@(MAILGROUP)%%%s%%g\n", SVAL (mailgroup));
814 fprintf (fp, "/^@@BEGIN: MAILGROUP$/,/^@@END: MAILGROUP$/d\n");
816 if (strcmp (oldload, "on") == 0)
817 fprintf (fp, "/^@@BEGIN: OLDLOAD$/d\n/^@@END: OLDLOAD$/d\n");
819 fprintf (fp, "/^@@BEGIN: OLDLOAD$/,/^@@END: OLDLOAD$/d\n");
820 if (strcmp (oldload, "off") == 0)
821 fprintf (fp, "/^@@BEGIN: NEWLOAD$/d\n/^@@END: NEWLOAD$/d\n");
823 fprintf (fp, "/^@@BEGIN: NEWLOAD$/,/^@@END: NEWLOAD$/d\n");
827 if (strcmp (ranlib, "on") == 0) {
828 fprintf (fp, "/^@@BEGIN: RANLIB$/d\n/^@@END: RANLIB$/d\n");
829 fprintf (fp, "/^@@BEGIN: LORDER$/,/^@@END: LORDER$/d\n");
832 fprintf (fp, "/^@@BEGIN: LORDER$/d\n/^@@END: LORDER$/d\n");
833 fprintf (fp, "/^@@BEGIN: RANLIB$/,/^@@END: RANLIB$/d\n");
836 if (strcmp (sharedlib, "off")) { /* if not off */
837 fprintf (fp, "/^@@BEGIN: SHAREDLIB$/d\n/^@@END: SHAREDLIB$/d\n");
838 fprintf (fp, "/^@@BEGIN: STDLIB$/,/^@@END: STDLIB$/d\n");
839 fprintf (fp, "s%%@@(SLIBDIR)%%%s%%g\n", slibdir);
840 fprintf (fp, "s%%@@(SLIBVER)%%%s%%g\n", MHSLIBVER);
841 fprintf (fp, "s%%@@(SLFLAGS)%%%s%%g\n", SVAL(slflags));
842 if (strcmp (sharedlib, "secure") == 0)
843 fprintf (fp, "s%%@@(SLDFLAG)%%-L%s%%g\n",slibdir);
845 fprintf (fp, "s%%@@(SLDFLAG)%%%%g\n");
848 fprintf (fp, "/^@@BEGIN: STDLIB$/d\n/^@@END: STDLIB$/d\n");
849 fprintf (fp, "/^@@BEGIN: SHAREDLIB$/,/^@@END: SHAREDLIB$/d\n");
851 if (strcmp (sharedlib, "sun4") == 0 || strcmp (sharedlib, "on") == 0)
852 fprintf (fp, "/^@@BEGIN: SUN4SHLIB$/d\n/^@@END: SUN4SHLIB$/d\n");
854 fprintf (fp, "/^@@BEGIN: SUN4SHLIB$/,/^@@END: SUN4SHLIB$/d\n");
855 if (strcmp (sharedlib, "sys5") == 0)
856 fprintf (fp, "/^@@BEGIN: SYS5SHLIB$/d\n/^@@END: SYS5SHLIB$/d\n");
858 fprintf (fp, "/^@@BEGIN: SYS5SHLIB$/,/^@@END: SYS5SHLIB$/d\n");
862 if (flag || ((mtsnum == mmdf || mtsnum == mmdf2) && !smtp)) {
863 fprintf (fp, "/^@@BEGIN: MMDFMTS$/d\n/^@@END: MMDFMTS$/d\n");
865 fprintf (fp, "/^@@BEGIN: MMDFIMTS$/d\n/^@@END: MMDFIMTS$/d\n");
867 fprintf (fp, "/^@@BEGIN: MMDFIMTS$/,/^@@END: MMDFIMTS$/d\n");
869 fprintf (fp, "/^@@BEGIN: MMDFIIMTS$/d\n/^@@END: MMDFIIMTS$/d\n");
871 fprintf (fp, "/^@@BEGIN: MMDFIIMTS$/,/^@@END: MMDFIIMTS$/d\n");
874 fprintf (fp, "/^@@BEGIN: MMDFMTS$/,/^@@END: MMDFMTS$/d\n");
875 fprintf (fp, "/^@@BEGIN: MMDFIMTS$/,/^@@END: MMDFIMTS$/d\n");
876 fprintf (fp, "/^@@BEGIN: MMDFIIMTS$/,/^@@END: MMDFIIMTS$/d\n");
880 fprintf (fp, "/^@@BEGIN: MHMTS$/d\n/^@@END: MHMTS$/d\n");
882 fprintf (fp, "/^@@BEGIN: MHMTS$/,/^@@END: MHMTS$/d\n");
884 if (!flag && (mtsnum == sendmail || smtp))
885 fprintf (fp, "/^@@BEGIN: SENDMTS$/d\n/^@@END: SENDMTS$/d\n");
887 fprintf (fp, "/^@@BEGIN: SENDMTS$/,/^@@END: SENDMTS$/d\n");
893 fprintf (fp, "/^@@BEGIN: SENDMTSHACK$/d\n/^@@END: SENDMTSHACK$/d\n");
897 fprintf (fp, "/^@@BEGIN: SENDMTSHACK$/,/^@@END: SENDMTSHACK$/d\n");
903 /* special hack for support/pop/popser.c */
904 fprintf (fp, "s%%@@(POPUUMBOX)%%%s%%g\n",
905 mtsnum == sendmail ? "-DPOPUUMBOX" : "");
908 fprintf (fp, "/^@@BEGIN: SMTP$/d\n/^@@END: SMTP$/d\n");
910 fprintf (fp, "/^@@BEGIN: SMTP$/,/^@@END: SMTP$/d\n");
912 if (strcmp (pop, "on") == 0)
913 fprintf (fp, "/^@@BEGIN: POP$/d\n/^@@END: POP$/d\n");
915 fprintf (fp, "/^@@BEGIN: POP$/,/^@@END: POP$/d\n");
917 if (strcmp (bboards, "pop") == 0)
918 fprintf (fp, "/^@@BEGIN: BPOP$/d\n/^@@END: BPOP$/d\n");
920 fprintf (fp, "/^@@BEGIN: BPOP$/,/^@@END: BPOP$/d\n");
922 if (strcmp (bboards, "nntp") == 0)
923 fprintf (fp, "/^@@BEGIN: NNTP$/d\n/^@@END: NNTP$/d\n");
925 fprintf (fp, "/^@@BEGIN: NNTP$/,/^@@END: NNTP$/d\n");
927 if (strcmp (mf, "on") == 0)
928 fprintf (fp, "/^@@BEGIN: MF$/d\n/^@@END: MF$/d\n");
930 fprintf (fp, "/^@@BEGIN: MF$/,/^@@END: MF$/d\n");
932 fprintf (fp, "s%%@@(MHREMOVE)%%%s%%g\n", SVAL (removeit));
934 for (op = copts; op->c_name; op++) {
935 fprintf (fp, op->c_value ? "/^@@BEGIN: %s$/d\n/^@@END: %s$/d\n" :
936 "/^@@BEGIN: %s$/,/^@@END: %s$/d\n",
937 op->c_name, op->c_name);
948 for (pp = files; *pp; pp++)
949 shell ("rm -f %s; sed -f %s < config/%s > %s",
950 *pp, SED, tail (*pp), *pp);
963 for (pp = makefiles; pp -> infile; pp++) {
964 (void) sprintf (buffer, MAKE, pp -> outfile);
965 shell ("rm -f %s; sed -f %s < %s > %s",
966 buffer, SED, pp -> infile, buffer);
974 static shell (fmt, a, b, c, d)
983 (void) sprintf (buffer, fmt, a, b, c, d);
984 printf ("%s\n", buffer);
985 (void) fflush (stdout);
988 adios (NULLCP, "failed");
1004 myname = tail (*vec);
1005 printf (BANNER, myname);
1006 (void) fflush (stdout);
1008 for (vec++; *vec; vec++) {
1009 if (strcmp (*vec, "-D") == 0) {
1010 sedP = 1; filesP = makeP = 0; docP = 2;
1013 if (strcmp (*vec, "-s") == 0) {
1017 if (strcmp (*vec, "-f") == 0) {
1021 if (strcmp (*vec, "-d") == 0) {
1025 if (strcmp (*vec, "-m") == 0) {
1029 if (strcmp (*vec, "-help") == 0) {
1030 printf ("usage: %s [opt] file\n", myname);
1031 printf ("%s\n%s\n%s\n%s\n",
1032 " -s\tno sed files", " -f\tno config files",
1033 " -d\tno doc files", " -m\tno makefiles");
1038 if ((config = *vec) == NULL || vec[1] != NULL) /* no arg or too many */
1039 adios (NULLCP, "usage: %s file", myname);
1043 if ((fp = fopen (config, "r")) == NULL)
1044 adios (config, "unable to read");
1046 while (fgets (buffer, sizeof buffer, fp)) {
1047 if (ap = index (buffer, '\n'))
1050 ap = &buffer[strlen (buffer) - 1];
1051 while (ap >= buffer)
1056 for (cp = buffer; isspace (*cp); cp++)
1058 if (*cp == '\0' || *cp == '#')
1060 for (ap = cp; *ap; ap++)
1061 if (isspace (*ap) || *ap == ':') {
1063 while (isspace (*ap))
1067 for (bp = binds; bp -> keyword; bp++)
1068 if (strcmp (bp -> keyword, cp) == 0)
1070 if (bp -> keyword == NULL)
1071 adios (NULLCP, "unknown option %s in %s", cp, config);
1073 if (*(bp -> value) == NULL || !(bp -> flags & BD_ADD))
1074 *(bp -> value) = strdup (ap);
1076 *(bp -> value) = stradd (ap, stradd (" ", *(bp -> value)));
1083 if (binpath == NULL)
1084 adios (NULLCP, "bin must be specified in %s", config);
1087 if (strcmp (bboards, "on") && strcmp (bboards, "off") &&
1088 strcmp (bboards, "pop") && strcmp (bboards, "nntp"))
1089 adios (NULLCP, "bboards should be %s not %s",
1090 "either \"on\", \"off\", \"pop\" or \"nntp\"", bboards);
1091 if (strcmp (bboards, "off") == 0 && strcmp (bbdelivery, "off"))
1093 "you cannot have \"bbdelivery\" \"%s\" with \"bboards\" \"%s\"",
1094 bbdelivery, bboards);
1096 adios (NULLCP, "bbhome must be specified in %s", config);
1099 if (strcmp (debug, "on") && strcmp (debug, "off"))
1100 adios (NULLCP, "debug should be either \"on\" or \"off\", not %s",
1103 if (etcpath == NULL)
1104 adios (NULLCP, "etc must be specified in %s", config);
1107 if (strcmp (mailgroup, "off")) /* if not "off" */
1108 add_option ("MAILGROUP");
1109 if (mailpath == NULL)
1110 adios (NULLCP, "mail must be specified in %s", config);
1112 if (*mailpath == '/')
1115 mailfile = mailpath;
1117 if (cp = index (manuals, '/')) { /* "standard/cat" */
1120 if (strcmp (mancat, "cat"))
1121 adios (NULLCP,"invalid manuals setting: %s/%s",manuals, mancat);
1123 if (strcmp (manuals, "standard")
1124 && strcmp (manuals, "bsd44")
1125 && strcmp (manuals, "local")
1126 && strcmp (manuals, "new")
1127 && strcmp (manuals, "old")
1128 && strcmp (manuals, "gen")
1129 && strcmp (manuals, "none"))
1130 adios (NULLCP,"invalid manuals setting: %s",manuals);
1133 adios (NULLCP, "mts must be specified in %s", config);
1134 for (i = 0; mtsopts[i].mtskey; i++)
1135 if (strcmp (mts, mtsopts[i].mtskey) == 0)
1137 if ((mtsnum = mtsopts[i].code) == unknown)
1138 adios (NULLCP, "invalid mts setting: %s", mts);
1139 add_option (mtsopts[i].optval);
1140 smtp = mtsopts[i].mtsflags & DOSMTP;
1141 if (mtsopts[i].mtsflags & NOMF)
1142 mf = "off"; /* hack... */
1144 if (strcmp (pop, "on") && strcmp (pop, "off"))
1145 adios (NULLCP, "pop should be either \"on\" or \"off\", not %s", pop);
1146 if (strcmp (pop, "on") == 0)
1149 if (strcmp (bboards, "pop") == 0) {
1150 add_option ("BPOP");
1151 if (strcmp (pop, "on"))
1152 adios (NULLCP, "bboards \"pop\" requires pop \"on\"");
1154 else if (strcmp (bboards, "nntp") == 0) {
1155 add_option ("BPOP");/* used by msh.c & bbc.c, but see also pshsbr.c */
1156 add_option ("NNTP");
1159 "bboards \"nntp\" is incompatible with \"options MPOP\"");
1162 if (strcmp (mf, "on") && strcmp (mf, "off"))
1163 adios (NULLCP, "mf should be either \"on\" or \"off\", not %s", mf);
1164 if (strcmp (mf, "on") == 0)
1167 if (sprntf && strcmp (sprntf, "char *")) {/* this defaults to "char *" */
1168 if (strcmp (sprntf, "int"))
1170 "sprintf should be either \"int\" or \"char *\", not %s",
1172 add_option ("SPRINTFTYPE=int");
1175 if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")
1176 && strcmp (sharedlib, "sun4") && strcmp (sharedlib, "sys5")
1177 && strcmp (sharedlib, "secure"))
1179 "sharedlib should be either \"sun4\", \"sys5\", or \"off\", not %s",
1182 (void) sprintf(buffer, "TYPESIG=%s", signl);
1183 add_option (buffer);
1185 /* loop over options string and add -D ccoptions */
1189 for (ap = cp; *ap; ap++)
1193 for (ap = cp; dp = index (ap, ' '); ap = dp) {
1196 (void) sprintf (buffer, "%s-D%s", options ? " " : "", ap);
1198 options = stradd (ap, options);
1199 while (isspace (*dp))
1204 (void) sprintf (buffer, "%s-D%s", options ? " " : "", ap);
1206 options = stradd (ap, options);
1211 if (strcmp (bboards, "nntp") == 0 && mpop)
1213 "bboards \"nntp\" is incompatible with \"options MPOP\"");
1218 static add_option (s)
1221 options = options ? stradd (s, stradd (" ", options)) : strdup (s);
1226 myopts = strdup ("char *options[] = {");
1237 static int nameoutput = 0;
1238 static int linepos = 0;
1239 static int outputlinelen = 72;
1241 for (op = copts; op->c_name; op++)
1242 if (!strncmp (op->c_name,s,strlen(op->c_name))) {
1247 if (strcmp (s, "MPOP") == 0)
1249 if (smtp && strcmp (s, "BERK") == 0) {
1250 fprintf (stderr, "\"options BERK\" overriding smtp suffix...\n");
1254 printf ("%s: ", bp = "options");
1255 linepos += (nameoutput = strlen (bp) + 2);
1258 if (linepos != nameoutput)
1259 if (len + linepos + 3 > outputlinelen)
1260 printf ("\n%*s", linepos = nameoutput, "");
1262 printf (" "), linepos++;
1265 (void) fflush (stdout);
1271 *bp++ = QUOTE, *bp++ = QUOTE;
1274 (void) strcpy (bp, "\", ");
1281 (void) fflush (stdout);
1283 myopts = stradd ("NULL};", myopts);
1293 if (s == NULL || (p = rindex (s, '/')) == NULL)
1300 static char *tail (s)
1305 if (p = rindex (s, '/'))
1307 return ((p == NULL || *p == '\0') ? s : p);
1312 static char *stradd (s1, s2)
1318 if (s1 == NULL || *s1 == '\0')
1322 if ((p = malloc ((unsigned) (strlen (s1) + strlen (s2) + 2))) == NULL)
1323 adios (NULLCP, "insufficient memory");
1325 (void) sprintf (p, "%s%s", s2, s1);
1332 static char *strdup (s)
1337 if ((p = malloc ((unsigned) (strlen (s) + 1))) == NULL)
1338 adios (NULLCP, "insufficient memory");
1340 (void) strcpy (p, s);
1347 /* these used to be for SYS5 machines, but now this is compiled
1348 * with -DSYS5 which redefines the SYS5 str[r]chr names to [r]index.
1350 static char *index (s, c)
1364 static char *rindex (s, c)
1384 adios (what, fmt, a, b, c)
1391 (void) fflush (stdout);
1393 fprintf (stderr, "%s: ", myname);
1394 fprintf (stderr, fmt, a, b, c);
1396 (void) fputc (' ', stderr);
1400 (void) fputc ('\n', stderr);
1405 /* quick and dirty ordering of options for readability */
1412 static struct opt *optp = (struct opt *)NULL;
1416 char *s; /* string for sorting */
1420 *lp = (struct opt *)NULL;
1422 if ((np = (struct opt *) malloc ((unsigned) sizeof (struct opt))) ==
1424 adios (NULL, "unable to malloc opt");
1425 np -> s = strdup(s);
1426 np -> n = (struct opt *)NULL;
1428 for (p = optp; p; lp = p, p = p -> n) {
1429 if (strcmp (p->s, s) > 0)
1445 for (p = optp; p; p = p -> n)
1446 myopts = stradd (p->s, myopts);
1458 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.71 1993/11/30 22:01:04 jromine Exp jromine $";
1461 #define MHRELEASE "6.8.3" /* for version: "Maj.min.pat" */
1467 @update for MH 6.8.3
1472 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.70 1993/08/25 18:07:10 jromine Exp jromine $";
1484 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.69 1993/08/20 19:47:46 jromine Exp jromine $";
1487 #define MHRELEASE "6.8.2" /* for version: "Maj.min.pat" */
1498 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.68 1993/08/19 23:51:43 jromine Exp jromine $";
1501 #define MHRELEASE "6.8.1" /* for version: "Maj.min.pat" */
1512 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.67 1993/06/03 17:59:55 jromine Exp $";
1515 #define MHRELEASE "6.8" /* for version: "Maj.min.pat" */
1526 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.66 1993/06/03 17:43:20 jromine Exp jromine $";
1535 @allow manuals to be installed "pre-nroff'd" (manuals: standard/cat)
1540 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.63 1992/12/02 19:08:03 jromine Exp $";
1543 if (mancat = index (manuals, '/')) { /* "standard/cat" */
1550 @add NORUSERPASS for 386BSD
1555 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.64 1992/12/16 21:01:07 jromine Exp jromine $";
1560 fprintf (fp, "s%%@@(MHMANDIR%d)%%man%d%%g\n", i, i);
1563 fprintf (fp, "s%%@@(MHMANDIR%d)%%man%c%%g\n", i,
1570 @typo -- fix "manuals: none"
1575 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.63 1992/12/02 19:08:03 jromine Exp jromine $";
1582 @changes for release 6.8
1587 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.62 1992/11/13 00:55:38 jromine Exp jromine $";
1590 if (strcmp (manuals, "gen") == 0 || strcmp (manuals, "gen") == 0)
1601 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.61 1992/11/12 22:48:51 jromine Exp jromine $";
1604 #define MHRELEASE "6.7" /* for version: "Maj.min.pat" */
1605 #define MHCENTERFOOT "MH.6.7.5beta" /* for nroff page footers */
1616 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.60 1992/11/11 22:58:07 jromine Exp jromine $";
1624 add slflags for "-pic" or "-K pic"
1629 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.59 1992/11/11 21:26:23 jromine Exp $";
1632 "slflags", &slflags, BD_NIL,
1643 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.58 1992/11/10 22:40:56 jromine Exp jromine $";
1648 fprintf (fp, "s%%@@(SLIBDIR)%%%s%%g\n",slibdir);
1652 add_options (buffer);
1658 @add "signal"--defines TYPESIG
1663 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.57 1992/11/09 17:37:20 jromine Exp jromine $";
1666 printf ("Don't forget to run \"make clean\" before compiling\n");
1672 @typo "link" -> "ln"
1677 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.56 1992/11/06 00:46:48 jromine Exp jromine $";
1686 @allow "directive: value"
1691 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.55 1992/11/05 19:25:27 jromine Exp jromine $";
1694 "link", &ln, BD_NIL,
1705 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.54 1992/11/05 17:20:49 jromine Exp jromine $";
1708 if (isspace (*ap)) {
1719 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.53 1992/11/04 03:00:54 jromine Exp jromine $";
1733 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.52 1992/10/31 07:56:48 jromine Exp jromine $";
1736 "poppath", &poppath, BD_NIL,
1742 @fix in m_getfld -> libver 3.1
1747 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.51 1992/10/27 20:22:26 jromine Exp jromine $";
1750 #define MHSLIBVER "3.1" /* SunOS4 shared library version */
1761 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.50 1992/10/27 18:10:15 jromine Exp jromine $";
1764 #define MHSLIBVER "3.0" /* SunOS4 shared library version */
1770 @force incompatibility between NNTP & MPOP
1775 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.49 1992/10/26 22:32:44 jromine Exp jromine $";
1782 @make it clearer what are bad args
1787 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.48 1992/10/21 02:06:58 jromine Exp jromine $";
1802 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.47 1992/10/20 23:49:51 jromine Exp jromine $";
1805 if ((config = *vec++) == NULL || *vec != NULL)
1816 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.46 1992/10/20 20:40:19 jromine Exp jromine $";
1819 #define MHCENTERFOOT "MH.6.7.3" /* for nroff page footers */
1830 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.45 1992/10/19 21:59:33 jromine Exp jromine $";
1844 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.44 1992/10/19 19:57:22 jromine Exp jromine $";
1847 #define MHSLIBVER "2.0" /* SunOS4 shared library version */
1853 @add struct copts for "special" options
1858 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.43 1992/10/19 16:46:32 jromine Exp jromine $";
1861 #define MHCENTERFOOT "MH.6.7.2" /* for nroff page footers */
1872 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.42 1992/05/12 21:45:45 jromine Exp jromine $";
1874 static int bsd43 = 0;
1879 static char *mailgroup = NULL;
1881 static char *kpop = "off";
1882 static char *hesiod = "off";
1884 static char *tma = "off";
1887 "kpop", &kpop, BD_NIL,
1888 "hesiod", &hesiod, BD_NIL,
1890 "tma", &tma, BD_NIL,
1894 if (mailgroup && strcmp (mailgroup, "off")) { /* for SYS5 sgid-inc */
1896 if (strcmp (tma, "on") == 0)
1897 fprintf (fp, "/^@@BEGIN: TMA$/d\n/^@@END: TMA$/d\n");
1899 fprintf (fp, "/^@@BEGIN: TMA$/,/^@@END: TMA$/d\n");
1902 if (bsd43) /* for sgid(tty)-rcvtty */
1903 fprintf (fp, "/^@@BEGIN: BSD43$/d\n/^@@END: BSD43$/d\n");
1905 fprintf (fp, "/^@@BEGIN: BSD43$/,/^@@END: BSD43$/d\n");
1908 fprintf (fp, "/^@@BEGIN: UCI$/d\n/^@@END: UCI$/d\n");
1910 fprintf (fp, "/^@@BEGIN: UCI$/,/^@@END: UCI$/d\n");
1913 if (strcmp (kpop, "on") == 0)
1914 fprintf (fp, "/^@@BEGIN: KPOP$/d\n/^@@END: KPOP$/d\n");
1916 fprintf (fp, "/^@@BEGIN: KPOP$/,/^@@END: KPOP$/d\n");
1918 if (strcmp (hesiod, "on") == 0)
1919 fprintf (fp, "/^@@BEGIN: HESIOD$/d\n/^@@END: HESIOD$/d\n");
1921 fprintf (fp, "/^@@BEGIN: HESIOD$/,/^@@END: HESIOD$/d\n");
1926 if (mailgroup && strcmp (mailgroup, "off")) /* if not "off" */
1929 if (strcmp (tma, "on") && strcmp (tma, "off"))
1930 adios (NULLCP, "tma should be either \"on\" or \"off\", not %s", tma);
1931 if (strcmp (tma, "on") == 0)
1936 if (strcmp (s, "UCI") == 0) uci = 1;
1937 if (strcmp (s, "BSD43") == 0) bsd43 = 1;
1948 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.41 1992/03/03 17:09:57 jromine Exp jromine $";
1968 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.40 1992/03/03 17:07:48 jromine Exp jromine $";
1984 @nroff page footer -> MH.6.7.2
1989 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.39 1992/02/09 23:30:11 jromine Exp jromine $";
1992 if (strcmp (mailgroup, "off")) /* if not "off" */
1998 @fix for "manuals none" from Jos Vos <jos@@bull.nl>
2003 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.38 1992/02/08 00:02:59 jromine Exp $";
2006 #define MHCENTERFOOT "MH.6.7" /* for nroff page footers */
2012 @add MAILGROUP auto-option
2017 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.37 1992/02/07 19:12:39 jromine Exp $";
2020 if (strcmp (manuals, "gen") == 0)
2026 @add SYS5 shared libs
2031 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.36 1992/02/05 22:10:00 jromine Exp jromine $";
2038 @add zmailer support
2043 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.35 1992/02/05 21:52:46 jromine Exp jromine $";
2046 if (strcmp (sharedlib, "on") == 0 || strcmp (sharedlib, "secure") == 0) {
2051 "sharedlib should be either \"on\", \"off\", or \"secure\", not %s",
2057 @add "regtest: on/off" to not include hostname and date
2063 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.34 1992/02/05 21:10:45 jromine Exp jromine $";
2075 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.33 1992/01/31 22:47:36 jromine Exp jromine $";
2089 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.32 1992/01/31 21:07:51 jromine Exp jromine $";
2092 #define MHSLIBVER "1.1" /* SunOS4 shared library version */
2103 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.31 1992/01/27 17:34:29 jromine Exp jromine $";
2112 @shared libs changes
2117 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.30 1991/01/25 14:48:44 mh Exp jromine $";
2129 if (*cp == NULL || *cp == '#')
2142 return ((p == NULL || *p == NULL) ? s : p);
2145 if (s1 == NULL || *s1 == NULL)
2157 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.29 90/12/18 14:13:31 mh Exp Locker: mh $";
2176 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.28 90/12/18 13:38:31 mh Exp Locker: mh $";
2183 myopts = stradd (buffer, myopts);
2198 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.27 90/12/18 13:36:49 mh Exp Locker: mh $";
2201 if (strcmp (sharedlib, "secure") == 0)
2214 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.26 90/11/05 16:24:55 mh Exp Locker: mh $";
2217 if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off"))
2218 adios (NULLCP, "sharedlib should be either \"on\" or \"off\", not %s",
2230 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.25 90/11/05 16:05:46 mh Exp Locker: mh $";
2233 if (strcmp (sharedlib, "on") == 0) {
2245 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.24 90/11/05 15:56:27 mh Exp Locker: mh $";
2247 case sendmail: /* special hack for support/pop/popser.c */
2248 fprintf (fp, "s%%@@(POPUUMBOX)%%%s%%g\n", "-DPOPUUMBOX");
2256 @special hack for popser.c -- yuk!
2262 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.23 90/04/08 10:57:33 sources Exp Locker: mh $";
2265 fprintf (fp, "s%%@@(UUCPMBOX)%%%s%%g\n", "-DUUCPMBOX");
2271 @*** empty log message ***
2276 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.22 90/04/06 09:54:00 sources Exp Locker: sources $";
2290 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.21 90/04/05 22:20:02 sources Exp Locker: sources $";
2307 static char ident[] = "@@(#)$Id: mhconfig.c,v 2.20 90/04/05 15:29:12 sources Exp Locker: sources $";
2310 #define MHRELEASE "6.6" /* for version: "Maj.min.pat" */
2311 #define MHCENTERFOOT "MH.6.6" /* for nroff page footers */
2322 static char ident[] = "@@(#)$Id:$";
2325 #define MHCENTERFOOT "MH.6.6" /* for man page footers */
2337 static char ident[] = "$Id:";
2343 @remove spurious warnding
2352 @add sprintf config option
2353 remove include of strings.h, try to declare things ourselves
2363 @"bbdeliver: {on,off}"
2368 #include "../h/strings.h"
2378 @add footers for man pages
2390 @add special '-D' option for making developer
2399 fprintf (fp, "%s\n%s\n%s\n%s\n",
2400 "s!^@@BEGIN: \\(.*\\)$!.br\\",
2403 printf ("using special all-doc format.\n");
2413 @merge "nntpbboards" and "popbboards" into "bboards: nntp/pop"
2418 do_sedfile (SED, 0);
2427 @reminder to edit config/mtstailor
2431 static char *nntpbboards = "off";
2433 static char *popbboards = "off";
2435 "nntpbboards", &nntpbboards, BD_NIL,
2437 "popbboards", &popbboards, BD_NIL,
2440 if (strcmp (bboards, "on") == 0)
2443 fprintf (fp, "/^@@BEGIN: BBOARDS$/,/^@@END: BBOARDS$/d\n");
2446 if (strcmp (popbboards, "on") == 0)
2449 if (strcmp (nntpbboards, "on") == 0)
2452 if (strcmp (bboards, "on") && strcmp (bboards, "off"))
2453 adios (NULLCP, "bboards should be either \"on\" or \"off\", not %s",
2457 if (strcmp (popbboards, "on") && strcmp (popbboards, "off"))
2458 adios (NULLCP, "popbboards should be either \"on\" or \"off\", not %s",
2460 if (strcmp (popbboards, "on") == 0) {
2463 if (strcmp (bboards, "on") || strcmp (pop, "on"))
2465 "popbboards \"on\" requires both bboards and pop \"on\"");
2469 if (strcmp (nntpbboards, "on") && strcmp (nntpbboards, "off"))
2470 adios (NULLCP, "nntpbboards should be either \"on\" or \"off\", not %s",
2472 if (strcmp (nntpbboards, "on") == 0) {
2474 if (strcmp (bboards, "on"))
2475 adios (NULLCP, "nntpbboards \"on\" requires bboards \"on\"");
2477 if (strcmp (popbboards, "on") == 0 && strcmp (nntpbboards, "on") == 0)
2478 adios (NULLCP, "you can't have both nntpbboards and popbboards \"on\"");
2484 @BSD43 for rcvtty (sgid-tty)
2490 printf ("Don't forget to run \"make clean\" before proceeding\n");
2496 @fix "remove" for new K&R defn
2502 fprintf (fp, "s%%@@(MHOPTIONS)%%%s%%g\n", SVAL (options));
2510 @add master Makefile
2515 static char *remove = "mv -f";
2518 "remove", &remove, BD_NIL,
2521 fprintf (fp, "s%%@@(MHREMOVE)%%%s%%g\n", SVAL (remove));
2536 @minor fix, and usage message improvement
2542 adios (NULLCP, "usage: %s [-s -f -d -m] file", myname);
2553 for (vec++;; vec++) {
2556 adios (NULLCP, "usage: %s file", myname);
2567 static char *lex = "lex -nt"
2578 if (mailgroup) { /* for SYS5 sgid-inc */
2584 @add "lex" (lex -nt) option
2606 @try to run "mhdoc" in current directory (for those without
2611 #define MFIL(f) "makefiles/f", "f"
2612 #define MMFIL(f,g) "makefiles/f", "g"
2623 MFIL (mts/sendmail),
2626 MMFIL (supportM,support),
2627 MFIL (support/bboards),
2628 MFIL (support/general),
2631 MMFIL (zotnetM,zotnet),
2632 MFIL (zotnet/bboards),
2638 char *stradd (), *strdup (), *tail ();
2648 @changes for SUN40 shared libraries and NNTP under bbc
2659 @*** empty log message ***
2668 adios (NULLCP, "sharedlib should be either \"on\" or \"off\", not %s"