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