|
|
1.1 ! root 1: #! /bin/sh ! 2: # ! 3: # If these # comments don't work, trim them. Don't worry about the other ! 4: # shell scripts, Configure will trim # comments from them for you. ! 5: # ! 6: # $Header: Configure,v 4.3.1.6 86/07/24 14:41:18 lwall Exp $ ! 7: # ! 8: # $Log: Configure,v $ ! 9: # Revision 4.3.1.6 86/07/24 14:41:18 lwall ! 10: # Handles missing Relay-Version: from news 2.10.3 headers. ! 11: # ! 12: # Revision 4.3.1.5 85/05/23 11:23:22 lwall ! 13: # filexp flubs sed command. ! 14: # ! 15: # Revision 4.3.1.4 85/05/20 17:13:11 lwall ! 16: # Makes sure -lcurses is really a terminfo library. ! 17: # Puts single instead of double quotes around defs in config.sh. ! 18: # ! 19: # Revision 4.3.1.3 85/05/16 16:48:48 lwall ! 20: # Took space from end of filexp output. ! 21: # ! 22: # Revision 4.3.1.2 85/05/13 15:54:35 lwall ! 23: # Libraries in /usr/local/lib shouldn't use -l switch. ! 24: # ! 25: # Revision 4.3.1.1 85/05/10 11:29:20 lwall ! 26: # Branch for patches. ! 27: # ! 28: # Revision 4.3 85/05/01 11:31:23 lwall ! 29: # Baseline for release with 4.3bsd. ! 30: # ! 31: ! 32: # Yes, you may rip this off to use in other distribution packages. ! 33: ! 34: n='' ! 35: c='' ! 36: libc='' ! 37: eunicefix='' ! 38: eunice='' ! 39: cpp='' ! 40: shsharp='' ! 41: spitshell='' ! 42: startsh='' ! 43: test='' ! 44: expr='' ! 45: sed='' ! 46: echo='' ! 47: cat='' ! 48: rm='' ! 49: mv='' ! 50: cp='' ! 51: tail='' ! 52: tr='' ! 53: mkdir='' ! 54: sort='' ! 55: uniq='' ! 56: inews='' ! 57: grep='' ! 58: egrep='' ! 59: contains='' ! 60: lib='' ! 61: nametype='' ! 62: cc='' ! 63: iandd='' ! 64: termlib='' ! 65: jobslib='' ! 66: ndirlib='' ! 67: libndir='' ! 68: usendir='' ! 69: ndirc='' ! 70: ndiro='' ! 71: pager='' ! 72: mailer='' ! 73: internet='' ! 74: rnbin='' ! 75: filexp='' ! 76: distlist='' ! 77: Log='' ! 78: Header='' ! 79: sitename='' ! 80: orgname='' ! 81: isadmin='' ! 82: newsadmin='' ! 83: rnlib='' ! 84: mansrc='' ! 85: manext='' ! 86: maildir='' ! 87: spool='' ! 88: active='' ! 89: myactive='' ! 90: mininact='' ! 91: pref='' ! 92: defeditor='' ! 93: rootid='' ! 94: mboxchar='' ! 95: locpref='' ! 96: orgpref='' ! 97: citypref='' ! 98: statepref='' ! 99: cntrypref='' ! 100: contpref='' ! 101: strchr='' ! 102: novoid='' ! 103: novfork='' ! 104: portable='' ! 105: passnam='' ! 106: berknam='' ! 107: usgnam='' ! 108: whoami='' ! 109: termio='' ! 110: fcntl='' ! 111: ioctl='' ! 112: normsig='' ! 113: havetlib='' ! 114: getpwent='' ! 115: gethostname='' ! 116: douname='' ! 117: phostname='' ! 118: hostcmd='' ! 119: norelay='' ! 120: CONFIG='' ! 121: ! 122: echo "Beginning of configuration questions for rn kit." ! 123: : Eunice requires " " instead of "", can you believe it ! 124: echo " " ! 125: ! 126: : sanity checks ! 127: PATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc' ! 128: export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$) ! 129: ! 130: if test ! -t 0; then ! 131: echo "Say 'sh Configure', not 'sh <Configure'" ! 132: exit 1 ! 133: fi ! 134: ! 135: : some greps do not return status, grrr. ! 136: echo "grimblepritz" >grimble ! 137: if grep blurfldyick grimble >/dev/null 2>&1 ; then ! 138: contains=contains ! 139: else ! 140: if grep grimblepritz grimble >/dev/null 2>&1 ; then ! 141: contains=grep ! 142: else ! 143: contains=contains ! 144: fi ! 145: fi ! 146: rm grimble ! 147: : the following should work in any shell ! 148: case $contains in ! 149: contains*) ! 150: echo " " ! 151: echo "AGH! Grep doesn't return a status. Attempting remedial action." ! 152: cat >contains <<'EOSS' ! 153: grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp ! 154: EOSS ! 155: chmod 755 contains ! 156: esac ! 157: ! 158: : first determine how to suppress newline on echo command ! 159: echo "Checking echo to see how to suppress newlines..." ! 160: (echo "hi there\c" ; echo " ") >.echotmp ! 161: if $contains c .echotmp >/dev/null 2>&1 ; then ! 162: echo "...using -n." ! 163: n='-n' ! 164: c='' ! 165: else ! 166: echo "...using \\\c." ! 167: n='' ! 168: c='\c' ! 169: fi ! 170: echo $n "Type carriage return to continue. Your cursor should be here-->$c" ! 171: read ans ! 172: rm .echotmp ! 173: ! 174: : now set up to do reads with possible shell escape ! 175: : if this does not work on your machine, 1,$s/. myread/read ans/ ! 176: cat <<EOSC >myread ! 177: ans='!' ! 178: while expr "X\$ans" : "X!" >/dev/null; do ! 179: read ans ! 180: case "\$ans" in ! 181: !) ! 182: sh ! 183: echo " " ! 184: echo $n "Your answer: $c" ! 185: ;; ! 186: !*) ! 187: set \`expr "X\$ans" : "X!\(.*\)\$"\` ! 188: sh -c "\$*" ! 189: echo " " ! 190: echo $n "Your answer: $c" ! 191: ;; ! 192: esac ! 193: done ! 194: EOSC ! 195: ! 196: : general instructions ! 197: cat <<'EOH' ! 198: ! 199: This installation shell script will examine your system and ask you questions ! 200: to determine how rn and its auxiliary files should be installed. If you ! 201: get stuck on a question, you may use a ! shell escape to start a subshell or ! 202: execute a command. Many of the questions will have default answers in ! 203: square brackets--typing carriage return will give you the default. ! 204: ! 205: On some of the questions which ask for file or directory names you are ! 206: allowed to use the ~name construct to specify the login directory belonging ! 207: to "name", even if you don't have a shell which knows about that. Questions ! 208: where this is allowed will be marked "(~name ok)". ! 209: ! 210: Much effort has been expended to ensure that this shell script will run ! 211: on any Unix system. If despite that it blows up on you, your best bet is ! 212: to edit Configure and run it again. (Trying to install rn without having run ! 213: Configure is well nigh impossible.) Also, let me ([email protected]) know ! 214: how I blew it. ! 215: ! 216: This installation script affects things in two ways: 1) it does direct ! 217: variable substitutions on some of the files included in this kit, and ! 218: 2) it builds a config.h file for inclusion in C programs. You may edit ! 219: any of these files as the need arises after running this script. ! 220: ! 221: EOH ! 222: echo $n "[Type carriage return to continue] $c" ! 223: . myread ! 224: ! 225: : get old answers, if there is a config file out there ! 226: if test -f config.sh; then ! 227: echo " " ! 228: echo "(Fetching default answers from your old config.sh file...)" ! 229: . config.sh ! 230: fi ! 231: ! 232: : get list of predefined functions in a handy place ! 233: echo " " ! 234: if test -f /lib/libc.a; then ! 235: echo "Your C library is in /lib/libc.a. You're normal." ! 236: libc=/lib/libc.a ! 237: else ! 238: if test -f /usr/lib/libc.a; then ! 239: echo "Your C library is in /usr/lib/libc.a, of all places." ! 240: libc=/usr/lib/libc.a ! 241: else ! 242: if test -f "$libc"; then ! 243: echo "Your C library is in $libc, like you said before." ! 244: else ! 245: cat <<'EOM' ! 246: ! 247: I can't seem to find your C library. I've looked for /lib/libc.a and ! 248: /usr/lib/libc.a, but neither of those are there. What is the full name ! 249: EOM ! 250: echo $n "of your C library? $c" ! 251: . myread ! 252: libc="$ans" ! 253: fi ! 254: fi ! 255: fi ! 256: echo " " ! 257: echo $n "Extracting names from $libc for later perusal...$c" ! 258: if ar t $libc > libc.list; then ! 259: echo "done" ! 260: else ! 261: echo " " ! 262: echo "The archiver doesn't think $libc is a reasonable library." ! 263: exit 1 ! 264: fi ! 265: ! 266: : make some quick guesses about what we are up against ! 267: echo " " ! 268: echo $n "Hmm... $c" ! 269: if $contains SIGTSTP /usr/include/signal.h >/dev/null 2>&1 ; then ! 270: echo "Looks kind of like a BSD system, but we'll see..." ! 271: echo exit 0 >bsd ! 272: echo exit 1 >usg ! 273: echo exit 1 >v7 ! 274: else ! 275: if $contains fcntl.o libc.list >/dev/null 2>&1 ; then ! 276: echo "Looks kind of like a USG system, but we'll see..." ! 277: echo exit 1 >bsd ! 278: echo exit 0 >usg ! 279: echo exit 1 >v7 ! 280: else ! 281: echo "Looks kind of like a version 7 system, but we'll see..." ! 282: echo exit 1 >bsd ! 283: echo exit 1 >usg ! 284: echo exit 0 >v7 ! 285: fi ! 286: fi ! 287: if $contains vmssystem.o libc.list >/dev/null 2>&1 ; then ! 288: cat <<'EOI' ! 289: There is, however, a strange, musty smell in the air that reminds me of ! 290: something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. ! 291: EOI ! 292: echo "exit 0" >eunice ! 293: eunicefix=unixtovms ! 294: eunice=define ! 295: : it so happens the Eunice I know will not run shell scripts in Unix format ! 296: else ! 297: echo " " ! 298: echo "Congratulations. You aren't running Eunice." ! 299: eunicefix=':' ! 300: eunice=undef ! 301: echo "exit 1" >eunice ! 302: fi ! 303: chmod 755 bsd usg v7 eunice ! 304: $eunicefix bsd usg v7 eunice ! 305: ! 306: : see how we invoke the C preprocessor ! 307: echo " " ! 308: echo "Checking to see how your C preprocessor is invoked..." ! 309: cat <<'EOT' >testcpp.c ! 310: #define ABC abc ! 311: #define XYZ xyz ! 312: ABC+XYZ ! 313: EOT ! 314: echo 'Maybe "cc -E" will work...' ! 315: cc -E testcpp.c >testcpp.out 2>&1 ! 316: if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then ! 317: echo "Yup, it does." ! 318: cpp='cc -E' ! 319: else ! 320: echo 'Nope...maybe "cc -P" will work...' ! 321: cc -P testcpp.c >testcpp.out 2>&1 ! 322: if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then ! 323: echo "Yup, that does." ! 324: cpp='cc -P' ! 325: else ! 326: echo 'Nixed again...maybe "/lib/cpp" will work...' ! 327: /lib/cpp testcpp.c >testcpp.out 2>&1 ! 328: if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then ! 329: echo "Hooray, it works! I was beginning to wonder." ! 330: cpp='/lib/cpp' ! 331: else ! 332: echo 'Hmm...maybe you already told me...' ! 333: case "$cpp" in ! 334: '') ;; ! 335: *) $cpp testcpp.c >testcpp.out 2>&1;; ! 336: esac ! 337: if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then ! 338: echo "Hooray, you did! I was beginning to wonder." ! 339: else ! 340: echo "Nope. I can't find a C preprocessor. Name one: $c" ! 341: . myread ! 342: cpp="$ans" ! 343: $cpp testcpp.c >testcpp.out 2>&1 ! 344: if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then ! 345: echo "OK, that will do." ! 346: else ! 347: echo "Sorry, I can't get that to work. Go find one." ! 348: exit 1 ! 349: fi ! 350: fi ! 351: fi ! 352: fi ! 353: fi ! 354: rm -f testcpp.c testcpp.out ! 355: ! 356: : check for pdp11 ! 357: echo " " ! 358: if usg; then ! 359: : pdp11 is already defined ! 360: else ! 361: cat <<'EOT' >pdp11.c ! 362: #ifdef pdp11 ! 363: exit 0 ! 364: #else ! 365: exit 1 ! 366: #endif ! 367: EOT ! 368: $cpp pdp11.c | grep exit >pdp11 ! 369: chmod 755 pdp11 ! 370: $eunicefix pdp11 ! 371: rm pdp11.c ! 372: fi ! 373: if pdp11; then ! 374: echo "This looks like a pdp11 to me." ! 375: else ! 376: echo "This doesn't look like a pdp11 to me." ! 377: fi ! 378: ! 379: : see if sh knows # comments ! 380: echo " " ! 381: echo "Checking your sh to see if it knows about # comments..." ! 382: if sh -c '#' >/dev/null 2>&1 ; then ! 383: echo "Your sh handles # comments correctly." ! 384: shsharp=true ! 385: spitshell=cat ! 386: echo " " ! 387: echo "Okay, let's see if #! works on this system..." ! 388: echo "#!/bin/echo hi" > try ! 389: $eunicefix try ! 390: chmod 755 try ! 391: try > today ! 392: if test -s today; then ! 393: echo "It does." ! 394: sharpbang='#!' ! 395: else ! 396: echo "#! /bin/echo hi" > try ! 397: $eunicefix try ! 398: chmod 755 try ! 399: try > today ! 400: if test -s today; then ! 401: echo "It does." ! 402: sharpbang='#! ' ! 403: else ! 404: echo "It doesn't." ! 405: sharpbang=': use ' ! 406: fi ! 407: fi ! 408: else ! 409: echo "Your sh doesn't grok # comments--I will strip them later on." ! 410: shsharp=false ! 411: echo "exec grep -v '^#'" >spitshell ! 412: chmod 755 spitshell ! 413: $eunicefix spitshell ! 414: spitshell=`pwd`/spitshell ! 415: echo "I presume that if # doesn't work, #! won't work either!" ! 416: sharpbang=': use ' ! 417: fi ! 418: ! 419: : figure out how to guarantee sh startup ! 420: echo " " ! 421: echo "Checking out how to guarantee sh startup..." ! 422: startsh=$sharpbang'/bin/sh' ! 423: echo "Let's see if '$startsh' works..." ! 424: cat >try <<EOSS ! 425: $startsh ! 426: set abc ! 427: test "$?abc" != 1 ! 428: EOSS ! 429: ! 430: chmod 755 try ! 431: $eunicefix try ! 432: if try; then ! 433: echo "Yup, it does." ! 434: else ! 435: echo "Nope. You may have to fix up the shell scripts to make sure sh runs them." ! 436: fi ! 437: rm -f try today ! 438: ! 439: : find out where common programs are ! 440: echo " " ! 441: echo "Locating common programs..." ! 442: pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib" ! 443: cat <<EOSC >loc ! 444: $startsh ! 445: thing=\$1 ! 446: shift ! 447: dflt=\$1 ! 448: shift ! 449: for dir in \$*; do ! 450: case "\$thing" in ! 451: .) ! 452: if test -d \$dir/\$thing; then ! 453: echo \$dir ! 454: exit 0 ! 455: fi ! 456: ;; ! 457: *) ! 458: if test -f \$dir/\$thing; then ! 459: echo \$dir/\$thing ! 460: exit 0 ! 461: fi ! 462: ;; ! 463: esac ! 464: done ! 465: echo \$dflt ! 466: exit 1 ! 467: EOSC ! 468: chmod 755 loc ! 469: $eunicefix loc ! 470: loclist="expr sed echo cat rm mv cp tail tr mkdir sort uniq grep" ! 471: trylist="test inews egrep more pg Mcc" ! 472: for file in $loclist; do ! 473: xxx=`loc $file $file $pth` ! 474: eval $file=$xxx ! 475: case "$xxx" in ! 476: /*) ! 477: echo $file is in $xxx. ! 478: ;; ! 479: *) ! 480: echo "I don't know where $file is. I hope it's in everyone's PATH." ! 481: ;; ! 482: esac ! 483: done ! 484: echo " " ! 485: echo "Don't worry if any of the following aren't found..." ! 486: for file in $trylist; do ! 487: xxx=`loc $file $file $pth` ! 488: eval $file=$xxx ! 489: case "$xxx" in ! 490: /*) ! 491: echo $file is in $xxx. ! 492: ;; ! 493: *) ! 494: echo "I don't see $file out there, offhand." ! 495: ;; ! 496: esac ! 497: done ! 498: case $egrep in ! 499: egrep) ! 500: echo "Substituting grep for egrep." ! 501: egrep=$grep ! 502: ;; ! 503: esac ! 504: case $test in ! 505: test) ! 506: echo "Hopefully test is built into your sh." ! 507: ;; ! 508: /bin/test) ! 509: echo " " ! 510: echo $n 'Is your "test" built into sh? [n] (OK to guess) '"$c" ! 511: . myread ! 512: case $ans in ! 513: y*) test=test ;; ! 514: esac ! 515: ;; ! 516: *) ! 517: test=test ! 518: ;; ! 519: esac ! 520: case $echo in ! 521: echo) ! 522: echo "Hopefully echo is built into your sh." ! 523: ;; ! 524: /bin/echo) ! 525: echo " " ! 526: echo "Checking compatibility between /bin/echo and builtin echo (if any)..." ! 527: $echo $n "hi there$c" >foo1 ! 528: echo $n "hi there$c" >foo2 ! 529: if cmp foo1 foo2 >/dev/null 2>&1; then ! 530: echo "They are compatible. In fact, they may be identical." ! 531: else ! 532: echo "They are not compatible--the echo builtin will be used." ! 533: echo=echo ! 534: fi ! 535: $rm -f foo1 foo2 ! 536: ;; ! 537: *) ! 538: echo=echo ! 539: ;; ! 540: esac ! 541: ! 542: : decide how portable to be ! 543: case "$portable" in ! 544: define) dflt=y;; ! 545: *) dflt=n;; ! 546: esac ! 547: $cat <<'EOH' ! 548: ! 549: I can set things up so that your shell scripts and binaries are more portable, ! 550: at what may be a noticable cost in performance. In particular, if you ! 551: ask to be portable, the following happens: ! 552: ! 553: 1) shell scripts will rely on the PATH variable rather than using ! 554: the paths derived above. ! 555: 2) ~username interpretations will be done at run time rather than ! 556: by Configure. ! 557: 3) the system name will be determined at run time, if at all possible. ! 558: ! 559: EOH ! 560: $echo $n "Do you expect to run these scripts and binaries on multiple machines? [$dflt] $c" ! 561: . myread ! 562: case $ans in ! 563: '') ans=$dflt;; ! 564: esac ! 565: case $ans in ! 566: y*) portable=define ! 567: for file in $loclist; do ! 568: eval $file=$file ! 569: done ! 570: ;; ! 571: *) portable=undef ;; ! 572: esac ! 573: ! 574: : set up shell script to do ~ expansion ! 575: cat >filexp <<EOSS ! 576: $startsh ! 577: : expand filename ! 578: case \$1 in ! 579: ~/*|~) ! 580: $echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|" ! 581: ;; ! 582: ~*) ! 583: if $test -f /bin/csh; then ! 584: /bin/csh -f -c "glob \$1" ! 585: $echo "" ! 586: else ! 587: name=\`$expr x\$1 : '..\([^/]*\)'\` ! 588: dir=\`$sed </etc/passwd -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}'\` ! 589: if $test ! -d "\$dir"; then ! 590: me=\`basename \$0\` ! 591: $echo "\$me: can't locate home directory for: \$name" >&2 ! 592: exit 1 ! 593: fi ! 594: case \$1 in ! 595: */*) ! 596: $echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\` ! 597: ;; ! 598: *) ! 599: $echo \$dir ! 600: ;; ! 601: esac ! 602: fi ! 603: ;; ! 604: *) ! 605: $echo \$1 ! 606: ;; ! 607: esac ! 608: EOSS ! 609: chmod 755 filexp ! 610: $eunicefix filexp ! 611: ! 612: : now get the site name ! 613: $echo " " ! 614: $echo "Figuring out site name..." ! 615: $echo 'Maybe "hostname" will work...' ! 616: if ans=`sh -c hostname 2>&1` ; then ! 617: sitename=$ans ! 618: hostcmd=hostname ! 619: else ! 620: $echo 'No, maybe "uuname -l" will work...' ! 621: if ans=`sh -c 'uuname -l' 2>&1` ; then ! 622: sitename=$ans ! 623: hostcmd='uuname -l' ! 624: else ! 625: $echo 'Strange. Maybe "uname -n" will work...' ! 626: if ans=`sh -c 'uname -n' 2>&1` ; then ! 627: sitename=$ans ! 628: hostcmd='uname -n' ! 629: else ! 630: $echo 'Oh well, maybe I can mine it out of whoami.h...' ! 631: if ans=`sh -c $contains' sysname /usr/include/whoami.h' 2>&1` ; then ! 632: sitename=`$echo "$ans" | $sed 's/^.*"\(.*\)"/\1/'` ! 633: hostcmd="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' </usr/include/whoami.h" ! 634: else ! 635: case "$sitename" in ! 636: '') echo "Does this machine have an identity crisis or something?" ! 637: hostcmd='' ! 638: ;; ! 639: *) echo "Well, you said $sitename before...";; ! 640: esac ! 641: fi ! 642: fi ! 643: fi ! 644: fi ! 645: : you do not want to know about this ! 646: set $sitename ! 647: sitename=$1 ! 648: ! 649: : translate upper to lower if necessary ! 650: case $sitename in ! 651: *[A-Z]*) ! 652: sitename=`$echo $sitename | tr '[A-Z]' '[a-z]'` ! 653: $echo "(Normalizing case in your site name)" ! 654: ;; ! 655: esac ! 656: ! 657: : verify guess ! 658: if $test "$sitename" ; then ! 659: $echo 'Your site name appears to be "'$sitename'".' ! 660: $echo $n "Is this correct? [y] $c" ! 661: . myread ! 662: case $ans in ! 663: y*|'') ;; ! 664: *) sitename='' ;; ! 665: esac ! 666: fi ! 667: ! 668: : bad guess or no guess ! 669: while $test "X$sitename" = X ; do ! 670: $echo $n "Please type the (one word) name of your site: $c" ! 671: . myread ! 672: sitename="$ans" ! 673: case $hostcmd in ! 674: sed*) ! 675: $echo "(That doesn't agree with your whoami.h file, by the way.)" ! 676: ;; ! 677: *) ! 678: $echo "(That doesn't agree with your $hostcmd command, by the way.)" ! 679: ;; ! 680: esac ! 681: hostcmd='' ! 682: done ! 683: ! 684: : get organizaton name ! 685: longshots='/usr/src/new /usr/src/local /usr/local/src' ! 686: case "$orgname" in ! 687: '') if xxx=`loc news/src/defs.h x $longshots`; then ! 688: dflt=`$sed -n 's/^.*MYORG[ ]*"\(.*\)".*$/\1/p' $xxx` ! 689: else ! 690: dflt='no default' ! 691: fi ! 692: ;; ! 693: *) dflt="$orgname";; ! 694: esac ! 695: $cat << 'EOH' ! 696: ! 697: Please type the name of your organization as you want it to appear on the ! 698: Organization line of outgoing articles. (It's nice if this also specifies ! 699: your location. Your city name is probably sufficient if well known.) ! 700: For example: ! 701: ! 702: University of Southern North Dakota, Hoople ! 703: ! 704: You may also put the name of a file, as long as it begins with a slash. ! 705: For example: ! 706: ! 707: /etc/organization ! 708: ! 709: EOH ! 710: orgname="no default" ! 711: while test "X$orgname" = "Xno default"; do ! 712: $echo $n "Organization: [$dflt] $c" ! 713: . myread ! 714: case "$ans" in ! 715: '') orgname="$dflt";; ! 716: *) orgname="$ans" ;; ! 717: esac ! 718: done ! 719: ! 720: : get news administrator name ! 721: case "$newsadmin" in ! 722: '') ! 723: if $contains "^news:" /etc/passwd >/dev/null 2>&1 ; then ! 724: dflt=news ! 725: else ! 726: if $contains "^usenet:" /etc/passwd >/dev/null 2>&1 ; then ! 727: dflt=news ! 728: else ! 729: if eunice; then ! 730: dflt=system ! 731: else ! 732: dflt=root ! 733: fi ! 734: fi ! 735: fi ! 736: ;; ! 737: *) dflt="$newsadmin" ! 738: ;; ! 739: esac ! 740: cat <<'EOM' ! 741: ! 742: Many systems keep their news in a private directory, or have a non-superuser ! 743: in charge of administering news. (If you don't have such a user, take the ! 744: default answer.) What is the login name (not directory) that is used for news ! 745: EOM ! 746: echo $n "administration? [$dflt] $c" ! 747: . myread ! 748: newsadmin="$ans" ! 749: case $newsadmin in ! 750: '') newsadmin=$dflt ;; ! 751: esac ! 752: case $newsadmin in ! 753: root) isadmin=undef ;; ! 754: *) isadmin=define ;; ! 755: esac ! 756: ! 757: : figure out news library ! 758: case "$lib" in ! 759: '') ! 760: dflt=/usr/lib/news ! 761: ;; ! 762: *) dflt=$lib ;; ! 763: esac ! 764: libexp=$lib ! 765: libexp='blurfl/dyick' ! 766: while $test ! -d "$libexp"; do ! 767: $echo " " ! 768: case "$libexp" in ! 769: blurfl*) ;; ! 770: *) $echo "Directory $libexp not found";; ! 771: esac ! 772: echo $n "Where is your news library (~name okay)? [$dflt] $c" ! 773: . myread ! 774: case "$ans" in ! 775: '') ans="$dflt";; ! 776: esac ! 777: lib="$ans" ! 778: case $lib in ! 779: ~*) ! 780: libexp=`filexp $lib` ! 781: echo "(That is $libexp on this particular system.)" ! 782: case $portable in ! 783: undef) lib=$libexp ;; ! 784: esac ! 785: ;; ! 786: *) ! 787: libexp=$lib ! 788: ;; ! 789: esac ! 790: done ! 791: if $test -f $libexp/inews; then ! 792: echo "Aha! Inews is really in $libexp! Maybe this is 2.10.2..." ! 793: case $inews in ! 794: inews) ! 795: : null ! 796: ;; ! 797: *) ! 798: echo "(Make sure $inews isn't an old version.)" ! 799: ;; ! 800: esac ! 801: inews=$libexp/inews ! 802: fi ! 803: ! 804: : determine where manual pages go ! 805: case "$mansrc" in ! 806: '') ! 807: dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1` ! 808: ;; ! 809: *) dflt="$mansrc" ! 810: ;; ! 811: esac ! 812: mansrc='blurfl/dyick' ! 813: while $test ! -d "$mansrc" ; do ! 814: case $mansrc in ! 815: blurfl*) ;; ! 816: *) $echo "$mansrc does not appear to exist." ;; ! 817: esac ! 818: $echo " " ! 819: $echo $n "Where do the manual pages (source) go? [$dflt] $c" ! 820: . myread ! 821: mansrc=`filexp "$ans"` ! 822: case $mansrc in ! 823: '') mansrc=$dflt ;; ! 824: esac ! 825: done ! 826: case "$mansrc" in ! 827: *l) ! 828: manext=l ! 829: ;; ! 830: *n) ! 831: manext=n ! 832: ;; ! 833: *) ! 834: manext=1 ! 835: ;; ! 836: esac ! 837: ! 838: : determine where mail is spooled ! 839: case "$maildir" in ! 840: '') ! 841: dflt=`loc . /usr/spool/mail /usr/spool/mail /usr/mail` ! 842: ;; ! 843: *) dflt="$maildir" ! 844: ;; ! 845: esac ! 846: maildir='blurfl/dyick' ! 847: while $test ! -d "$maildir" ; do ! 848: case $maildir in ! 849: blurfl*) ;; ! 850: *) $echo "$maildir does not appear to exist." ;; ! 851: esac ! 852: $echo " " ! 853: $echo $n "Where is yet-to-be-read mail spooled? [$dflt] $c" ! 854: . myread ! 855: maildir=`filexp "$ans"` ! 856: case $maildir in ! 857: '') maildir=$dflt ;; ! 858: esac ! 859: done ! 860: ! 861: : find out how to find out full name ! 862: $echo " " ! 863: case "$berkname" in ! 864: define) ! 865: dflt=y;; ! 866: undef) ! 867: dflt=n;; ! 868: *) ! 869: if bsd; then ! 870: dflt=y ! 871: else ! 872: dflt=n ! 873: fi ! 874: ;; ! 875: esac ! 876: $echo "Does your /etc/passwd file keep full names in Berkeley/V7 format (name first" ! 877: $echo $n "thing after ':' in GCOS field)? [$dflt] $c" ! 878: . myread ! 879: case $ans in ! 880: '') ans=$dflt ;; ! 881: esac ! 882: case $ans in ! 883: y*) ! 884: passnam=define ! 885: berknam=define ! 886: usgnam=undef ! 887: nametype=bsd ! 888: ;; ! 889: *) ! 890: $echo " " ! 891: case "$usgname" in ! 892: define) ! 893: dflt=y;; ! 894: undef) ! 895: dflt=n;; ! 896: *) ! 897: if usg; then ! 898: dflt=y ! 899: else ! 900: dflt=n ! 901: fi ! 902: ;; ! 903: esac ! 904: $echo "Does your passwd file keep full names in USG format (name sandwiched" ! 905: $echo $n "between a '-' and a '(')? [$dflt] $c" ! 906: . myread ! 907: case $ans in ! 908: '') ans=$dflt ;; ! 909: esac ! 910: case $ans in ! 911: n*) ! 912: $echo "Full name will be taken from ~/.fullname" ! 913: passnam=undef ! 914: berknam=undef ! 915: usgnam=undef ! 916: nametype=other ! 917: ;; ! 918: *) ! 919: passnam=define ! 920: berknam=undef ! 921: usgnam=define ! 922: nametype=usg ! 923: ;; ! 924: esac ! 925: ;; ! 926: esac ! 927: ! 928: : see if we need a special compiler ! 929: $echo " " ! 930: if usg; then ! 931: case "$cc" in ! 932: '') ! 933: case "$Mcc" in ! 934: /*) dflt='Mcc' ! 935: ;; ! 936: *) ! 937: if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then ! 938: dflt='cc -M' ! 939: else ! 940: dflt='cc' ! 941: fi ! 942: ;; ! 943: esac ! 944: ;; ! 945: *) dflt="$cc";; ! 946: esac ! 947: $cat <<'EOM' ! 948: ! 949: On some systems the default C compiler will not resolve multiple global ! 950: references that happen to have the same name. On some such systems the ! 951: "Mcc" command may be used to force these to be resolved. On other systems ! 952: a "cc -M" command is required. What command will force resolution on ! 953: EOM ! 954: $echo $n "this system? [$dflt] $c" ! 955: . myread ! 956: cc="$ans" ! 957: case "$cc" in ! 958: '') cc="$dflt" ;; ! 959: esac ! 960: else ! 961: $echo "Not a USG system--assuming cc can resolve multiple definitions." ! 962: cc=cc ! 963: fi ! 964: ! 965: : see if we should throw a -i into the Makefile ! 966: $echo " " ! 967: if pdp11; then ! 968: if $contains '\-i' $mansrc/cc.1 >/dev/null 2>&1 ; then ! 969: $echo $n "Your system appears to have separate I and D space. Is this true? [y] $c" ! 970: . myread ! 971: case $ans in ! 972: n*|f*) iandd='' ;; ! 973: *) iandd='-i' ;; ! 974: esac ! 975: else ! 976: $echo "Your system appears to NOT have separate I and D space." ! 977: $echo $n "Is this correct? [y] $c" ! 978: . myread ! 979: case $ans in ! 980: n*|f*) iandd='-i' ;; ! 981: *) iandd='' ;; ! 982: esac ! 983: fi ! 984: else ! 985: $echo "Not a pdp11--assuming no separate I and D." ! 986: fi ! 987: ! 988: : index or strcpy ! 989: $echo " " ! 990: if $contains index.o libc.list >/dev/null 2>&1 ; then ! 991: $echo "Your system appears to use index() and rindex() rather than strchr()" ! 992: $echo $n "and strrchr(). Is this correct? [y] $c" ! 993: . myread ! 994: case $ans in ! 995: n*|f*) strchr='define' ;; ! 996: *) strchr='undef' ;; ! 997: esac ! 998: else ! 999: $echo "Your system appears to use strchr() and strrchr() rather than index()" ! 1000: $echo $n "and rindex(). Is this correct? [y] $c" ! 1001: . myread ! 1002: case $ans in ! 1003: n*|f*) strchr=undef ;; ! 1004: *) strchr=define ;; ! 1005: esac ! 1006: fi ! 1007: ! 1008: : determine how to determine when a file is a mailbox ! 1009: case "$mboxchar" in ! 1010: '') dflt=F;; ! 1011: *) dflt="$mboxchar";; ! 1012: esac ! 1013: $cat <<'EOM' ! 1014: ! 1015: In saving articles, rn wants to differentiate between saving to mailbox ! 1016: format files and normal files. It does this by examining the first character ! 1017: of the file in question. On most systems the first line starts "From...", ! 1018: so the first character is F. On other systems there are magic cookies like ! 1019: control codes between articles, so one of those would be first. On your ! 1020: system, if a file is in mailbox format, what is the first character of ! 1021: EOM ! 1022: echo $n "that file? [$dflt] $c" ! 1023: . myread ! 1024: mboxchar="$ans" ! 1025: case $mboxchar in ! 1026: '') mboxchar="$dflt" ;; ! 1027: esac ! 1028: case $mboxchar in ! 1029: 'F') ;; ! 1030: *) cat <<'EOM' ! 1031: You will need to edit the shell script mbox.saver to properly append an ! 1032: article to a mailbox. The arguments to the script are documented in ! 1033: EOM ! 1034: case $shsharp in ! 1035: false) ! 1036: echo "comments in mbox.saver.std." ! 1037: ;; ! 1038: true) ! 1039: echo "comments in the shell script itself." ! 1040: ;; ! 1041: esac ! 1042: esac ! 1043: ! 1044: : where do we get termlib routines from ! 1045: $echo " " ! 1046: ans=`loc libcurses.a x /usr/lib /usr/local/lib /lib` ! 1047: case "$ans" in ! 1048: /*) ! 1049: ar t $ans >grimble ! 1050: if $contains tputs.o grimble >/dev/null 2>&1; then ! 1051: termlib='-lcurses' ! 1052: havetlib=define ! 1053: $echo "Terminfo library found." ! 1054: else ! 1055: ans=x ! 1056: fi ! 1057: ;; ! 1058: esac ! 1059: case "$ans" in ! 1060: x) ! 1061: ans=`loc libtermlib.a x /usr/lib /usr/local/lib /lib` ! 1062: case "$ans" in ! 1063: /usr/lib*|/lib*) ! 1064: termlib='-ltermlib' ! 1065: havetlib=define ! 1066: $echo "Termlib library found." ! 1067: ;; ! 1068: /*) ! 1069: termlib="$ans" ! 1070: havetlib=define ! 1071: $echo "Termlib library found." ! 1072: ;; ! 1073: *) ! 1074: ans=`loc libtermcap.a x /usr/lib /usr/local/lib /lib` ! 1075: case "$ans" in ! 1076: /usr/lib*|/lib*) ! 1077: termlib='-ltermcap' ! 1078: havetlib=define ! 1079: $echo "Termcap library found." ! 1080: ;; ! 1081: /*) ! 1082: termlib="$ans" ! 1083: havetlib=define ! 1084: $echo "Termcap library found." ! 1085: ;; ! 1086: *) ! 1087: case "$termlib" in ! 1088: '') ! 1089: $echo $n "Your system appears to NOT have termlib-style routines. Is this true? [y] $c" ! 1090: . myread ! 1091: case $ans in ! 1092: n*|f*) havetlib=define ! 1093: $echo "Then where are the termlib-style routines kept (specify either -llibname" ! 1094: $echo $n " or full pathname (~name ok))? $c" ! 1095: . myread ! 1096: termlib=`filexp $ans` ! 1097: ;; ! 1098: *) havetlib=undef ! 1099: termlib='' ! 1100: $echo "You will have to play around with term.c then." ! 1101: ;; ! 1102: esac ! 1103: $echo " " ! 1104: ;; ! 1105: *) $echo "You said termlib was $termlib before." ! 1106: ;; ! 1107: esac ! 1108: ;; ! 1109: esac ! 1110: ;; ! 1111: esac ! 1112: ;; ! 1113: esac ! 1114: ! 1115: : see if there is a whoami file ! 1116: if $test -r /usr/include/whoami.h ; then ! 1117: whoami=define ! 1118: $echo "whoami.h found." ! 1119: else ! 1120: whoami=undef ! 1121: fi ! 1122: ! 1123: : see if this is a termio system ! 1124: if $test -r /usr/include/termio.h ; then ! 1125: termio=define ! 1126: $echo "termio.h found." ! 1127: else ! 1128: if $test -r /usr/include/sgtty.h ; then ! 1129: termio=undef ! 1130: $echo "sgtty.h found." ! 1131: else ! 1132: termio=undef ! 1133: $echo "Neither termio.h nor sgtty.h found--you could have problems." ! 1134: fi ! 1135: fi ! 1136: ! 1137: : see if this is a termio system ! 1138: if $test -r /usr/include/fcntl.h ; then ! 1139: fcntl=define ! 1140: $echo "fcntl.h found." ! 1141: else ! 1142: fcntl=undef ! 1143: $echo "No fcntl.h found, but that's ok." ! 1144: fi ! 1145: ! 1146: : see if ioctl defs are in sgtty/termio or sys/ioctl ! 1147: if $test -r /usr/include/sys/ioctl.h ; then ! 1148: ioctl=define ! 1149: $echo "sys/ioctl.h found." ! 1150: else ! 1151: ioctl=undef ! 1152: $echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h." ! 1153: fi ! 1154: ! 1155: : see if there is a vfork ! 1156: if $contains vfork.o libc.list >/dev/null 2>&1 ; then ! 1157: $echo "vfork() found." ! 1158: novfork='undef' ! 1159: else ! 1160: $echo "No vfork() found--will use fork() instead." ! 1161: novfork='define' ! 1162: fi ! 1163: ! 1164: : see if there is a getpw ! 1165: if $contains getpw.o libc.list >/dev/null 2>&1 ; then ! 1166: $echo "getpw() found." ! 1167: getpwent='undef' ! 1168: else ! 1169: $echo "No getpw() found--will use getpwent() instead." ! 1170: getpwent='define' ! 1171: fi ! 1172: ! 1173: : see how we will look up site name ! 1174: douname=undef ! 1175: gethostname=undef ! 1176: phostname=undef ! 1177: if $contains gethostname.o libc.list >/dev/null 2>&1 ; then ! 1178: $echo "gethostname() found." ! 1179: gethostname=define ! 1180: else ! 1181: if $contains uname.o libc.list >/dev/null 2>&1 ; then ! 1182: $echo "uname() found." ! 1183: douname=define ! 1184: else ! 1185: case $hostcmd in ! 1186: '') ;; ! 1187: *) ! 1188: $cat <<EOT ! 1189: ! 1190: There is no gethostname() or uname() on this system. You have two ! 1191: possibilites at this point: ! 1192: ! 1193: 1) You can have your site name ($sitename) compiled into rn, which lets rn ! 1194: start up faster, but makes your binaries non-portable, or ! 1195: 2) you can have rn use a ! 1196: ! 1197: popen("$hostcmd","r") ! 1198: ! 1199: which will start slower but be more portable. ! 1200: ! 1201: Option 1 will use whoami.h if you have one. If you want option 2 but with ! 1202: a different command, you can edit config.h after this shell script is done. ! 1203: ! 1204: EOT ! 1205: case "$phostname" in ! 1206: define) dflt=n;; ! 1207: undef) dflt=y;; ! 1208: '') ! 1209: case $portable in ! 1210: define) dflt=n ;; ! 1211: *) dflt=y ;; ! 1212: esac ! 1213: ;; ! 1214: esac ! 1215: $echo $n "Do you want your site name compiled in? [$dflt] $c" ! 1216: . myread ! 1217: case $ans in ! 1218: '') ans=$dflt;; ! 1219: esac ! 1220: case $ans in ! 1221: n*) phostname=define ;; ! 1222: *) hostcmd='' phostname=undef;; ! 1223: esac ! 1224: ;; ! 1225: esac ! 1226: case $hostcmd in ! 1227: '') ! 1228: case $whoami in ! 1229: define) ! 1230: $echo 'No hostname function--using whoami.h.' ! 1231: ;; ! 1232: undef) ! 1233: $echo 'No hostname function--hardwiring "'$sitename'".' ! 1234: ;; ! 1235: esac ! 1236: ;; ! 1237: esac ! 1238: fi ! 1239: fi ! 1240: ! 1241: : see if we need -ljobs and if we have sigset, etc. ! 1242: if $test -r /usr/lib/libjobs.a || $test -r /usr/local/lib/libjobs.a ; then ! 1243: $echo "Jobs library found." ! 1244: normsig=undef ! 1245: jobslib='-ljobs' ! 1246: else ! 1247: if bsd; then ! 1248: $echo "No jobs library found. (I suppose this is at least 4.2...)" ! 1249: else ! 1250: $echo "No jobs library found. (That's okay, we all have our faults.)" ! 1251: fi ! 1252: normsig=define ! 1253: jobslib='' ! 1254: fi ! 1255: ! 1256: : see if there are directory access routines out there ! 1257: if $test -r /usr/lib/libndir.a || $test -r /usr/local/lib/libndir.a ; then ! 1258: $echo "Ndir library found." ! 1259: if $test -r /usr/lib/libndir.a; then ! 1260: ndirlib='-lndir' ! 1261: else ! 1262: ndirlib="/usr/local/lib/libndir.a" ! 1263: fi ! 1264: libndir=define ! 1265: usendir=undef ! 1266: ndirc='' ! 1267: ndiro='' ! 1268: else ! 1269: ndirlib='' ! 1270: libndir=undef ! 1271: if $contains readdir.o libc.list >/dev/null 2>&1 ; then ! 1272: $echo "No ndir library found, but you have readdir() so we'll use that." ! 1273: usendir=undef ! 1274: ndirc='' ! 1275: ndiro='' ! 1276: else ! 1277: $echo "No ndir library found and no readdir() found--using ./ndir.c." ! 1278: usendir=define ! 1279: ndirc='ndir.c' ! 1280: ndiro='ndir.o' ! 1281: fi ! 1282: fi ! 1283: ! 1284: : locate spool directory ! 1285: case "$spool" in ! 1286: '') ! 1287: dflt=/usr/spool/news ! 1288: ;; ! 1289: *) dflt="$spool";; ! 1290: esac ! 1291: ans='blurfl/dyick' ! 1292: while $test ! -d $ans; do ! 1293: $echo " " ! 1294: case "$ans" in ! 1295: blurfl*);; ! 1296: *) echo "Directory $ans not found.";; ! 1297: esac ! 1298: $echo $n "Where is news spooled (~name ok)? [$dflt] $c" ! 1299: . myread ! 1300: case "$ans" in ! 1301: '') ans="$dflt";; ! 1302: esac ! 1303: spool="$ans" ! 1304: case $spool in ! 1305: ~*) ! 1306: ans=`filexp $spool` ! 1307: echo "(That is $ans on this particular system.)" ! 1308: case $portable in ! 1309: undef) spool=$ans ;; ! 1310: esac ! 1311: ;; ! 1312: *) ! 1313: ans=$spool ! 1314: ;; ! 1315: esac ! 1316: done ! 1317: ! 1318: : locate active file ! 1319: case "$active" in ! 1320: '') ! 1321: dflt=$lib/active ! 1322: ;; ! 1323: *) dflt="$active";; ! 1324: esac ! 1325: myactive='blurfl/dyick' ! 1326: while $test ! -f "$myactive"; do ! 1327: $echo " " ! 1328: case "$myactive" in ! 1329: blurfl*);; ! 1330: *) "File $myactive not found.";; ! 1331: esac ! 1332: $echo $n "Where is the active file (~name ok)? [$dflt] $c" ! 1333: . myread ! 1334: case "$ans" in ! 1335: '') ans="$dflt";; ! 1336: esac ! 1337: active="$ans" ! 1338: case $active in ! 1339: ~*) ! 1340: myactive=`filexp $active` ! 1341: echo "(That is $myactive on this particular system.)" ! 1342: case $portable in ! 1343: undef) active=$myactive ;; ! 1344: esac ! 1345: ;; ! 1346: *) ! 1347: myactive=$active ! 1348: ;; ! 1349: esac ! 1350: if $test -d $myactive ; then ! 1351: myactive=$myactive/active ! 1352: active=$active/active ! 1353: fi ! 1354: done ! 1355: ! 1356: : check for 2.10.2 and above ! 1357: echo " " ! 1358: if $contains ' [0-9][0-9]* [0-9]' "$myactive" >/dev/null 2>&1; then ! 1359: case "$norelay" in ! 1360: undef) dflt="n";; ! 1361: *) dflt="y";; ! 1362: esac ! 1363: $echo $n "Are you running 2.10.3 or above? [${dflt}] $c" ! 1364: . myread ! 1365: case "$ans" in ! 1366: '') ans=$dflt;; ! 1367: esac ! 1368: case "$ans" in ! 1369: n*) ! 1370: norelay='undef' ! 1371: echo "Looks like you are running at least 2.10.2 news." ! 1372: ;; ! 1373: *) norelay='define' ;; ! 1374: esac ! 1375: mininact=define ! 1376: else ! 1377: echo "It doesn't look like you are running 2.10.2 news yet. Are you planning" ! 1378: echo $n "to install it in the near future? [y] $c" ! 1379: . myread ! 1380: case $ans in ! 1381: n*) mininact=undef ;; ! 1382: *) mininact=define ;; ! 1383: esac ! 1384: norelay='undef' ! 1385: fi ! 1386: ! 1387: ! 1388: : check for void type ! 1389: $echo " " ! 1390: $echo "Checking to see if your C compiler groks the void type..." ! 1391: $cat >try.c <<'EOCP' ! 1392: void main(); ! 1393: EOCP ! 1394: if cc -c try.c >/dev/null 2>&1 ; then ! 1395: novoid='undef' ! 1396: $echo "Yup, it does." ! 1397: else ! 1398: novoid='define' ! 1399: $echo "Nope, it doesn't (boo hiss). I will substitute int." ! 1400: fi ! 1401: $rm try.* ! 1402: ! 1403: : find out which shell people like to use most ! 1404: ans='blurfl/dyick' ! 1405: while $test ! -f "$ans" ; do ! 1406: case $ans in ! 1407: blurfl*) ;; ! 1408: *) $echo "$ans does not appear to exist." ;; ! 1409: esac ! 1410: case "$pref" in ! 1411: '') ! 1412: if $test -f /bin/ksh; then ! 1413: dflt='/bin/ksh' ! 1414: else ! 1415: if $test -f /bin/csh; then ! 1416: dflt='/bin/csh' ! 1417: else ! 1418: dflt='/bin/sh' ! 1419: fi ! 1420: fi ! 1421: ;; ! 1422: *) dflt="$pref";; ! 1423: esac ! 1424: $echo " " ! 1425: $echo "Give the full path name of the shell most people like to use on your" ! 1426: $echo $n "system: [$dflt] $c" ! 1427: . myread ! 1428: case $ans in ! 1429: '') ans=$dflt ;; ! 1430: esac ! 1431: done ! 1432: pref=$ans ! 1433: ! 1434: : locate the preferred pager for this system ! 1435: case "$pager" in ! 1436: '') ! 1437: case $pg in ! 1438: /*) dflt=$pg ! 1439: ;; ! 1440: esac ! 1441: case $more in ! 1442: /*) dflt=$more ! 1443: ;; ! 1444: esac ! 1445: case $dflt in ! 1446: '') dflt=/usr/ucb/more ! 1447: ;; ! 1448: esac ! 1449: ;; ! 1450: *) dflt="$pager";; ! 1451: esac ! 1452: pager='blurfl/dyick' ! 1453: while $test ! -f "$pager" ; do ! 1454: case $pager in ! 1455: blurfl*) ! 1456: $echo " " ! 1457: $echo "(If your kernel does terminal paging then you may answer this with '/bin/cat'.)" ! 1458: ;; ! 1459: /*) $echo "$pager does not appear to exist." ! 1460: $echo " " ! 1461: ;; ! 1462: *) $echo "Please give the full path name." ! 1463: $echo " " ! 1464: ;; ! 1465: esac ! 1466: $echo $n "What pager is used on your system? [$dflt] $c" ! 1467: . myread ! 1468: pager="$ans" ! 1469: case $pager in ! 1470: '') pager="$dflt" ;; ! 1471: esac ! 1472: done ! 1473: ! 1474: : determine default editor ! 1475: case "$defeditor" in ! 1476: '') ! 1477: dflt=/usr/ucb/vi ! 1478: ;; ! 1479: *) dflt="$defeditor" ! 1480: ;; ! 1481: esac ! 1482: defeditor='blurfl/dyick' ! 1483: while $test ! -f "$defeditor" ; do ! 1484: case $defeditor in ! 1485: blurfl*) ;; ! 1486: *) $echo "$defeditor does not appear to exist." ;; ! 1487: esac ! 1488: $echo " " ! 1489: $echo $n "What is the default editor on your system? [$dflt] $c" ! 1490: . myread ! 1491: defeditor="$ans" ! 1492: case $defeditor in ! 1493: '') defeditor=$dflt ;; ! 1494: esac ! 1495: done ! 1496: ! 1497: : determine mailer for Rnmail to use ! 1498: echo " " ! 1499: if $test -f /usr/lib/sendmail; then ! 1500: mailer=/usr/lib/sendmail ! 1501: else ! 1502: if usg && $test -f $libexp/recmail; then ! 1503: mailer=$libexp/recmail ! 1504: else ! 1505: mailer=/bin/mail ! 1506: fi ! 1507: fi ! 1508: echo "Mail sender is $mailer" ! 1509: ! 1510: : check for internet mailer ! 1511: case "$internet" in ! 1512: define) dflt=y;; ! 1513: undef) dflt=n;; ! 1514: *) dflt=n;; ! 1515: esac ! 1516: cat <<EOM ! 1517: ! 1518: Some newer mailers can deliver mail to addresses of the INTERNET persuasion, ! 1519: such as [email protected]. Other older mailers require the complete path to ! 1520: the destination to be specified in the address. Does your mailer understand ! 1521: EOM ! 1522: $echo $n "INTERNET addresses? [$dflt] $c" ! 1523: . myread ! 1524: case "$ans" in ! 1525: '') ans=$dflt;; ! 1526: esac ! 1527: case "$ans" in ! 1528: y*) internet=define;; ! 1529: *) internet=undef;; ! 1530: esac ! 1531: ! 1532: : determine where public executables go ! 1533: case "$rnbin" in ! 1534: '') ! 1535: dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin` ! 1536: ;; ! 1537: *) dflt="$rnbin" ! 1538: ;; ! 1539: esac ! 1540: rnbin='blurfl/dyick' ! 1541: while $test ! -d "$rnbin" ; do ! 1542: case $rnbin in ! 1543: blurfl*) ;; ! 1544: *) $echo "$rnbin does not appear to exist." ;; ! 1545: esac ! 1546: $echo " " ! 1547: $echo $n "Where do you want to put the public executables? [$dflt] $c" ! 1548: . myread ! 1549: rnbin="$ans" ! 1550: rnbin=`filexp $rnbin` ! 1551: case $rnbin in ! 1552: '') rnbin=$dflt ;; ! 1553: esac ! 1554: done ! 1555: ! 1556: : determine where private executables go ! 1557: case "$rnlib" in ! 1558: '') ! 1559: dflt=$lib/rn ! 1560: ;; ! 1561: *) dflt="$rnlib" ! 1562: ;; ! 1563: esac ! 1564: $echo " " ! 1565: $echo "Rn has a number of auxiliary programs that need not be visible to the" ! 1566: $echo "whole world. Where do you want to put these private executables?" ! 1567: $echo $n "[$dflt] (~name ok) $c" ! 1568: . myread ! 1569: rnlib="$ans" ! 1570: case $rnlib in ! 1571: '') rnlib=$dflt ;; ! 1572: esac ! 1573: case $portable in ! 1574: undef) ! 1575: rnlib=`filexp $rnlib` ! 1576: ;; ! 1577: esac ! 1578: : must not allow self reference ! 1579: case $rnlib in ! 1580: /*) ! 1581: filexp=$rnlib/filexp ! 1582: ;; ! 1583: *) ! 1584: filexp=`pwd`/filexp ! 1585: ;; ! 1586: esac ! 1587: ! 1588: : get the local distribution prefixes ! 1589: if $test -f $libexp/sys ; then ! 1590: $sed <$libexp/sys -n -e "s/^$sitename://p" | \ ! 1591: $sed -e "s/:.*//" -e "s/,/ /g" | tr ' ' '\012' | \ ! 1592: $sed -e "/^to./d" -e "/^net$/d" -e "/^fa$/d" -e "/^mod$/d" > .distlist ! 1593: fi ! 1594: ! 1595: $cat <<'EOH' ! 1596: ! 1597: Distribution groups are the things you use on the Distribution line to limit ! 1598: where an article will go to. You are likely to be a member of several ! 1599: distribution groups, such as organization, city, state, province, country, ! 1600: continent, etc. For example, Los Angeles has the distribution prefix "la", ! 1601: New Jersey has the prefix "nj", and Europe has the prefix "eunet". ! 1602: ! 1603: The categories you will be asked are: ! 1604: ! 1605: local organization (Could be just one machine or a cluster or an office) ! 1606: organization att, dec, kgb, ... ! 1607: city la, ny, mosc, ... ! 1608: state/province ca, nj, bc, ... ! 1609: country usa, can, rok, whatever ! 1610: continent na (North America, not "Not Applicable"), asia, etc. ! 1611: ! 1612: (If you don't have a distribution prefix in any of these categories then ! 1613: just hit return.) ! 1614: ! 1615: EOH ! 1616: if $test -f .distlist; then ! 1617: distlist=`tr '\012' ' ' <.distlist` ! 1618: if $test "$distlist" ; then ! 1619: $echo "(These are the distributions in your sys file: $distlist)" ! 1620: $echo " " ! 1621: fi ! 1622: fi ! 1623: case "$locpref" in ! 1624: '') dflt="";; ! 1625: *) dflt="[$locpref] ";; ! 1626: esac ! 1627: $echo $n "What is the distribution prefix for your local organization? $dflt$c" ! 1628: . myread ! 1629: case "$ans" in ! 1630: '') ;; ! 1631: *) locpref="$ans";; ! 1632: esac ! 1633: case $locpref in ! 1634: '') locpref=none ;; ! 1635: esac ! 1636: case "$orgpref" in ! 1637: '') dflt="";; ! 1638: *) dflt="[$orgpref] ";; ! 1639: esac ! 1640: $echo $n "What is the distribution prefix for your organization? $dflt$c" ! 1641: . myread ! 1642: case "$ans" in ! 1643: '') ;; ! 1644: *) orgpref="$ans";; ! 1645: esac ! 1646: case $orgpref in ! 1647: '') orgpref=none ;; ! 1648: esac ! 1649: case "$citypref" in ! 1650: '') dflt="";; ! 1651: *) dflt="[$citypref] ";; ! 1652: esac ! 1653: $echo $n "What is the distribution prefix for your city? $dflt$c" ! 1654: . myread ! 1655: case "$ans" in ! 1656: '') ;; ! 1657: *) citypref="$ans";; ! 1658: esac ! 1659: case $citypref in ! 1660: '') citypref=none ;; ! 1661: esac ! 1662: case "$statepref" in ! 1663: '') dflt="";; ! 1664: *) dflt="[$statepref] ";; ! 1665: esac ! 1666: $echo $n "What is the distribution prefix for your state/province? $dflt$c" ! 1667: . myread ! 1668: case "$ans" in ! 1669: '') ;; ! 1670: *) statepref="$ans";; ! 1671: esac ! 1672: case $statepref in ! 1673: '') statepref=none ;; ! 1674: esac ! 1675: case "$cntrypref" in ! 1676: '') dflt="";; ! 1677: *) dflt="[$cntrypref] ";; ! 1678: esac ! 1679: $echo $n "What is the distribution prefix for your country? $dflt$c" ! 1680: . myread ! 1681: case "$ans" in ! 1682: '') ;; ! 1683: *) cntrypref="$ans";; ! 1684: esac ! 1685: case $cntrypref in ! 1686: '') cntrypref=none ;; ! 1687: esac ! 1688: case "$contpref" in ! 1689: '') dflt="";; ! 1690: *) dflt="[$contpref] ";; ! 1691: esac ! 1692: $echo $n "What is the distribution prefix for your continent? $dflt$c" ! 1693: . myread ! 1694: case "$ans" in ! 1695: '') ;; ! 1696: *) contpref="$ans";; ! 1697: esac ! 1698: case $contpref in ! 1699: '') contpref=none ;; ! 1700: esac ! 1701: ! 1702: $echo " " ! 1703: $echo "If you have any other distribution groups you will need to edit Pnews" ! 1704: $echo "and newsetup to add them." ! 1705: $echo " " ! 1706: ! 1707: : determine root id ! 1708: rootid=`$sed </etc/passwd -e "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e "q" -e "}" -e "d"` ! 1709: case $rootid in ! 1710: '') rootid=0 ;; ! 1711: *) $echo "Root uid = $rootid" ;; ! 1712: esac ! 1713: ! 1714: : weed out incompatibilities ! 1715: case $douname in ! 1716: define) whoami=undef ;; ! 1717: esac ! 1718: ! 1719: : preserve RCS keywords in files with variable substitution, grrr ! 1720: Log='$Log' ! 1721: Header='$Header' ! 1722: ! 1723: : Warnings ! 1724: if v7; then ! 1725: cat <<'EOM' ! 1726: ! 1727: NOTE: the V7 compiler may ignore some #undefs that rn uses. If so, you will ! 1728: get messages about redefining EXT. Some V7 compilers also have difficulties ! 1729: with #defines near buffer boundaries, so beware. You may have to play with ! 1730: the spacing in common.h. ! 1731: EOM ! 1732: fi ! 1733: ! 1734: if pdp11; then ! 1735: cat <<'EOM' ! 1736: ! 1737: NOTE: the PDP-11 does not have enough data space to do subject caching ! 1738: reliably. That feature will be disabled automatically. Subject searching ! 1739: will tend to be slow. ! 1740: EOM ! 1741: fi ! 1742: ! 1743: $echo " " ! 1744: $echo "End of configuration questions." ! 1745: $echo " " ! 1746: ! 1747: : create config.sh file ! 1748: $echo " " ! 1749: $echo "Creating config.sh..." ! 1750: $spitshell <<EOT >config.sh ! 1751: $startsh ! 1752: # config.sh ! 1753: # This file was produced by running the Configure script. ! 1754: ! 1755: n='$n' ! 1756: c='$c' ! 1757: libc='$libc' ! 1758: eunicefix='$eunicefix' ! 1759: eunice='$eunice' ! 1760: cpp='$cpp' ! 1761: shsharp='$shsharp' ! 1762: startsh='$startsh' ! 1763: spitshell='$spitshell' ! 1764: test='$test' ! 1765: expr='$expr' ! 1766: sed='$sed' ! 1767: echo='$echo' ! 1768: cat='$cat' ! 1769: rm='$rm' ! 1770: mv='$mv' ! 1771: cp='$cp' ! 1772: tail='$tail' ! 1773: tr='$tr' ! 1774: mkdir='$mkdir' ! 1775: sort='$sort' ! 1776: uniq='$uniq' ! 1777: inews='$inews' ! 1778: grep='$grep' ! 1779: egrep='$egrep' ! 1780: contains='$contains' ! 1781: lib='$lib' ! 1782: libexp='$libexp' ! 1783: nametype='$nametype' ! 1784: cc='$cc' ! 1785: iandd='$iandd' ! 1786: termlib='$termlib' ! 1787: jobslib='$jobslib' ! 1788: ndirlib='$ndirlib' ! 1789: libndir='$libndir' ! 1790: usendir='$usendir' ! 1791: ndirc='$ndirc' ! 1792: ndiro='$ndiro' ! 1793: pager='$pager' ! 1794: mailer='$mailer' ! 1795: internet='$internet' ! 1796: rnbin='$rnbin' ! 1797: filexp='$filexp' ! 1798: distlist='$distlist' ! 1799: Log='$Log' ! 1800: Header='$Header' ! 1801: sitename='$sitename' ! 1802: orgname='$orgname' ! 1803: isadmin='$isadmin' ! 1804: newsadmin='$newsadmin' ! 1805: rnlib='$rnlib' ! 1806: mansrc='$mansrc' ! 1807: manext='$manext' ! 1808: maildir='$maildir' ! 1809: spool='$spool' ! 1810: active='$active' ! 1811: myactive='$myactive' ! 1812: mininact='$mininact' ! 1813: pref='$pref' ! 1814: defeditor='$defeditor' ! 1815: rootid='$rootid' ! 1816: mboxchar='$mboxchar' ! 1817: locpref='$locpref' ! 1818: orgpref='$orgpref' ! 1819: citypref='$citypref' ! 1820: statepref='$statepref' ! 1821: cntrypref='$cntrypref' ! 1822: contpref='$contpref' ! 1823: strchr='$strchr' ! 1824: novoid='$novoid' ! 1825: novfork='$novfork' ! 1826: portable='$portable' ! 1827: passnam='$passnam' ! 1828: berknam='$berknam' ! 1829: usgnam='$usgnam' ! 1830: whoami='$whoami' ! 1831: termio='$termio' ! 1832: fcntl='$fcntl' ! 1833: ioctl='$ioctl' ! 1834: normsig='$normsig' ! 1835: havetlib='$havetlib' ! 1836: getpwent='$getpwent' ! 1837: gethostname='$gethostname' ! 1838: douname='$douname' ! 1839: phostname='$phostname' ! 1840: hostcmd='$hostcmd' ! 1841: norelay='$norelay' ! 1842: CONFIG=true ! 1843: EOT ! 1844: ! 1845: : create config.h file ! 1846: $echo " " ! 1847: $echo "Creating config.h..." ! 1848: $cat <<EOT >config.h ! 1849: /* config.h ! 1850: * This file was produced by running the Configure script. ! 1851: * Feel free to modify any of this as the need arises. ! 1852: */ ! 1853: ! 1854: /* name of the site. May be overridden by gethostname, uname, etc. */ ! 1855: #define SITENAME "$sitename" ! 1856: ! 1857: /* name of the organization, may be a file name */ ! 1858: #define ORGNAME "$orgname" ! 1859: ! 1860: /* login name of news administrator, if any. */ ! 1861: #$isadmin NEWSADMIN "$newsadmin" ! 1862: ! 1863: /* news library, may use only ~ and %l expansion */ ! 1864: #define LIB "$lib" ! 1865: ! 1866: /* rn private library, may use ~ expansion, %x and %l */ ! 1867: #define RNLIB "$rnlib" ! 1868: ! 1869: /* location of the news spool directory, may use ~ expansion, %x and %l */ ! 1870: #define SPOOL "$spool" ! 1871: ! 1872: /* location of the active file, may use ~ expansion, %x and %l */ ! 1873: #define ACTIVE "$active" ! 1874: ! 1875: /* location of spooled mail */ ! 1876: #define MAILFILE "$maildir/%L" ! 1877: ! 1878: /* default shell--ok to be a slow shell like csh */ ! 1879: #define PREFSHELL "$pref" ! 1880: ! 1881: /* default editor */ ! 1882: #define DEFEDITOR "$defeditor" ! 1883: ! 1884: /* root uid */ ! 1885: #define ROOTID $rootid ! 1886: ! 1887: /* what is the first character of a mailbox? */ ! 1888: #define MBOXCHAR '$mboxchar' ! 1889: ! 1890: /* how to cancel an article */ ! 1891: #define CANCEL "$inews -h <%h" ! 1892: ! 1893: /* distribution groups */ ! 1894: #define LOCDIST "$locpref" ! 1895: #define ORGDIST "$orgpref" ! 1896: #define CITYDIST "$citypref" ! 1897: #define STATEDIST "$statepref" ! 1898: #define CNTRYDIST "$cntrypref" ! 1899: #define CONTDIST "$contpref" ! 1900: ! 1901: #$strchr index strchr /* cultural */ ! 1902: #$strchr rindex strrchr /* differences? */ ! 1903: #$novoid void int /* is void to be avoided? */ ! 1904: #$novfork vfork fork /* is vfork too virtual? */ ! 1905: #$eunice EUNICE /* no linking? */ ! 1906: #$eunice VMS /* not currently used, here just in case */ ! 1907: #$usendir USENDIR /* include ndir.c? */ ! 1908: #$libndir LIBNDIR /* include /usr/include/ndir.h? */ ! 1909: #$mininact MININACT /* include 2.10.2 optimization? */ ! 1910: #$portable PORTABLE /* do we do extra lookups to start up? */ ! 1911: #$passnam PASSNAMES /* do names come from the passwd file? */ ! 1912: /* (undef to take name from ~/.fullname) */ ! 1913: #$berknam BERKNAMES /* if so, are they Berkeley format? */ ! 1914: /* (that is, ":name,stuff:") */ ! 1915: #$usgnam USGNAMES /* or are they USG format? */ ! 1916: /* (that is, ":stuff-name(stuff):") */ ! 1917: #$whoami WHOAMI /* should we include whoami.h? */ ! 1918: #$termio TERMIO /* is this a termio system? */ ! 1919: #$fcntl FCNTL /* should we include fcntl.h? */ ! 1920: #$ioctl IOCTL /* are ioctl args all defined in one place? */ ! 1921: #$normsig NORMSIG /* use signal rather than sigset? */ ! 1922: #$havetlib HAVETERMLIB /* do we have termlib-style routines? */ ! 1923: #$getpwent GETPWENT /* need we include slow getpwent? */ ! 1924: #$internet INTERNET /* does our mailer do INTERNET addressing? */ ! 1925: #$gethostname GETHOSTNAME /* do we have a gethostname function? */ ! 1926: #$douname DOUNAME /* do we have a uname function? */ ! 1927: #$phostname PHOSTNAME "$hostcmd" /* how to get host name with popen */ ! 1928: #$norelay NORELAY /* 2.10.3 doesn't have Relay-Version line */ ! 1929: EOT ! 1930: ! 1931: CONFIG=true ! 1932: ! 1933: $rm -f libc.list .distlist kit*isdone ! 1934: ! 1935: echo " " ! 1936: echo "Doing variable substitutions on various files..." ! 1937: echo " " ! 1938: set `$grep <MANIFEST '\.SH' | awk '{print $1}'` ! 1939: for file in $*; do ! 1940: . $file ! 1941: done ! 1942: ! 1943: echo " " ! 1944: echo 'Now you need to generate make dependencies by running "makedepend".' ! 1945: echo 'You might prefer to run it in background: "makedepend > makedepend.out &"' ! 1946: echo $n "Would you like me to run it for you (it takes quite a while)? [n] $c" ! 1947: . myread ! 1948: case "$ans" in ! 1949: y*) makedepend;; ! 1950: esac ! 1951: : end of Configure
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.