be defensive about setting {host,group,pass}cat (from Andy Dougherty)
[p5sagit/p5-mst-13.2.git] / hints / dgux.sh
CommitLineData
735aabf6 1# $Id: dgux.sh,v 1.8 1996-11-29 18:16:43-05 roderick Exp $
c07a80fd 2
3# This is a hints file for DGUX, which is Data General's Unix. It was
735aabf6 4# originally developed with version 5.4.3.10 of the OS, and then was
5# later updated running under version 4.11.2 (running on m88k hardware).
6# The gross features should work with versions going back to 2.nil but
7# some tweaking will probably be necessary.
a0d0e21e 8#
c07a80fd 9# DGUX is a SVR4 derivative. It ships with gcc as the standard
735aabf6 10# compiler. Since version 3.0 it has shipped with Perl 4.036
c07a80fd 11# installed in /usr/bin, which is kind of neat. Be careful when you
12# install that you don't overwrite the system version, though (by
13# answering yes to the question about installing perl as /usr/bin/perl),
14# as it would suck to try to get support if the vendor learned that you
15# were physically replacing the system binaries.
a0d0e21e 16#
54310121 17# -Roderick Schertler <roderick@argon.org>
a0d0e21e 18
c07a80fd 19# Here are the things from some old DGUX hints files which are different
20# from what's in here now. I don't know the exact reasons that most of
21# these settings were in the hints files, presumably they can be chalked
22# up to old Configure inadequacies and changes in the OS headers and the
23# like. These settings might make a good place to start looking if you
24# have problems.
a0d0e21e 25#
c07a80fd 26# This was specified the the 4.036 hints file. That hints file didn't
27# say what version of the OS it was developed using.
a0d0e21e 28#
c07a80fd 29# cppstdin='/lib/cpp'
30#
31# The 4.036 and 5.001 hints files both contained these. The 5.001 hints
735aabf6 32# file said it was developed with version 2.01 of DGUX.
c07a80fd 33#
34# gidtype='gid_t'
35# groupstype='gid_t'
36# uidtype='uid_t'
37# d_index='define'
38# cc='gcc'
39#
40# These were peculiar to the 5.001 hints file.
41#
42# ccflags='-D_POSIX_SOURCE -D_DGUX_SOURCE'
a0d0e21e 43#
c07a80fd 44# # an ugly hack, since the Configure test for "gcc -P -" hangs.
45# # can't just use 'cppstdin', since our DG has a broken cppstdin :-(
46# cppstdin=`cd ..; pwd`/cppstdin
47# cpprun=`cd ..; pwd`/cppstdin
a0d0e21e 48#
c07a80fd 49# One last note: The 5.001 hints file said "you don't want to use
50# /usr/ucb/cc" in the place at which it set cc to gcc. That in
735aabf6 51# particular baffles me, as I used to have 2.01 loaded and my memory
c07a80fd 52# is telling me that even then /usr/ucb was a symlink to /usr/bin.
53
54
55# The standard system compiler is gcc, but invoking it as cc changes its
56# behavior. I have to pick one name or the other so I can get the
57# dynamic loading switches right (they vary depending on this). I'm
58# picking gcc because there's no way to get at the optimization options
59# and so on when you call it cc.
60case $cc in
61 '')
62 cc=gcc
63 case $optimize in
64 '') optimize=-O2;;
65 esac
66 ;;
67esac
68
69usevfork=true
70
71# DG has this thing set up with symlinks which point to different places
72# depending on environment variables (see elink(5)) and the compiler and
73# related tools use them to access different development environments
74# (COFF, ELF, m88k BCS and so on), see sde(5). The upshot, however, is
75# that when a normal program tries to access one of these elinks it sees
76# no such file (like stat()ting a mis-directed symlink). Setting
77# $plibpth to explicitly include the place to which the elinks point
78# allows Configure to find libraries which vary based on the development
79# environment.
735aabf6 80#
81# Starting with version 4.10 (the first time the OS supported Intel
82# hardware) all libraries are accessed with this mechanism.
83#
84# The default $TARGET_BINARY_INTERFACE changed with version 4.10. The
85# system now comes with a link named /usr/sde/default which points to
86# the proper entry, but older versions lacked this and used m88kdgux
87# directly.
88
89: && sde_path=${SDE_PATH:-/usr}/sde # hide from Configure
90while : # dummy loop
91do
92 if [ -n "$TARGET_BINARY_INTERFACE" ]
93 then set X "$TARGET_BINARY_INTERFACE"
94 else set X default dg m88k_dg ix86_dg m88kdgux m88kdguxelf
95 fi
96 shift
97 default_sde=$1
98 for sde
99 do
100 [ -d "$sde_path/$sde" ] && break 2
101 done
68dc0745 102 cat <<END >&2
735aabf6 103
104NOTE: I can't figure out what SDE is used by default on this machine (I
105didn't find a likely directory under $sde_path). This is bad news. If
106this is a R4.10 or newer system I'm not going to be able to find any of
107your libraries, if this system is R3.10 or older I won't be able to find
108the math library. You should re-run Configure with the environment
109variable TARGET_BINARY_INTERFACE set to the proper value for this
110machine, see sde(5) and the notes in hints/dgux.sh.
111
112END
113 sde=$default_sde
114 break
115done
116
117plibpth="$plibpth $sde_path/$sde/usr/lib"
118unset sde_path default_sde sde
c07a80fd 119
120# Many functions (eg, gethostent(), killpg(), getpriority(), setruid()
121# dbm_*(), and plenty more) are defined in -ldgc. Usually you don't
122# need to know this (it seems that libdgc.so is searched automatically
123# by ld), but Configure needs to check it otherwise it will report all
124# those functions as missing.
125libswanted="dgc $libswanted"
126
127# Dynamic loading works using the dlopen() functions. Note that dlfcn.h
735aabf6 128# used to be broken, it declared _dl*() rather than dl*(). This was the
129# case up to 3.10, it has been fixed in 4.11. I'm not sure if it was
130# fixed in 4.10. If you have the older header just ignore the warnings
131# (since pointers and integers have the same format on m88k).
c07a80fd 132usedl=true
133# For cc rather than gcc the flags would be `-K PIC' for compiling and
134# -G for loading. I haven't tested this.
135cccdlflags=-fpic
136lddlflags=-shared