This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Updated perldelta for some older changes that hadn't been included yet
[perl5.git] / hints / dgux.sh
CommitLineData
8e9464f1
JH
1# This is a hints file for DGUX, which is EMC's Data General's Unix. It
2# was originally developed with version 5.4.3.10 of the OS, and then was
735aabf6
RS
3# later updated running under version 4.11.2 (running on m88k hardware).
4# The gross features should work with versions going back to 2.nil but
5# some tweaking will probably be necessary.
a0d0e21e 6#
d1be9408 7# DGUX is an SVR4 derivative. It ships with gcc as the standard
735aabf6 8# compiler. Since version 3.0 it has shipped with Perl 4.036
c07a80fd 9# installed in /usr/bin, which is kind of neat. Be careful when you
10# install that you don't overwrite the system version, though (by
11# answering yes to the question about installing perl as /usr/bin/perl),
12# as it would suck to try to get support if the vendor learned that you
13# were physically replacing the system binaries.
a0d0e21e 14#
54310121 15# -Roderick Schertler <roderick@argon.org>
a0d0e21e 16
c07a80fd 17# The standard system compiler is gcc, but invoking it as cc changes its
18# behavior. I have to pick one name or the other so I can get the
19# dynamic loading switches right (they vary depending on this). I'm
20# picking gcc because there's no way to get at the optimization options
21# and so on when you call it cc.
8e9464f1
JH
22
23##########################################
24# Modified by Takis Psarogiannakopoulos
dca46f05 25# University of Cambridge
8e9464f1
JH
26# Centre for Mathematical Sciences
27# Department of Pure Mathematics
28# Wilberforce road
29# Cambridge CB3 0WB , UK
95036ac7 30# e-mail <takis@XFree86.Org>
8e9464f1
JH
31# Use GCC-2.95.2/3 rev (DG/UX) for threads
32# This compiler supports the -pthread switch
33# to link correctly DG/UX 's -lthread.
95036ac7 34# March 2002
8e9464f1
JH
35###########################################
36
37cc=gcc
38ccflags="-DDGUX -D_DGUX_SOURCE"
95036ac7
JH
39# Debug build. If using GNU as,ld use the flag -gstabs+
40# ccflags="-g -mstandard -DDGUX -D_DGUX_SOURCE -DDEBUGGING"
8e9464f1 41# Dummy ; always compile with -O2 on GCC 2.95.2/3 rev (DG/UX)
95036ac7 42# even if you debugging the program!
8e9464f1
JH
43optimize="-mno-legend -O2"
44
45archname="ix86-dgux"
46libpth="/usr/lib"
47
48#####################################
95036ac7 49# <takis@XFree86.Org>
8e9464f1
JH
50# Change this if you want.
51# prefix =/usr/local
52#####################################
53
54prefix=/usr/local
8891dd8d
DM
55perlpath="$prefix/bin/perl515"
56startperl="#! $prefix/bin/perl515"
57privlib="$prefix/lib/perl515"
8e9464f1
JH
58man1dir="$prefix/man/man1"
59man3dir="$prefix/man/man3"
60
8891dd8d
DM
61sitearch="$prefix/lib/perl515/$archname"
62sitelib="$prefix/lib/perl515"
8e9464f1
JH
63
64#Do not overwrite by default /usr/bin/perl of DG/UX
65installusrbinperl="$undef"
66
67# Configure may fail to find lstat()
68# function in <sys/stat.h>.
95036ac7 69d_lstat='define'
8e9464f1 70
95036ac7
JH
71# Internal (perl) malloc is causing serious problems and
72# test failures in DG/UX. Most notable Embed.t
73# So for perl-5.7.3 and on do NOT use.
8e9464f1 74# I have no time to investigate more.
95036ac7 75# <takis@XFree86.Org>
8e9464f1
JH
76
77case "$usemymalloc" in
95036ac7 78'') usemymalloc='n' ;;
c07a80fd 79esac
80
8e9464f1
JH
81case "$uselongdouble" in
82'') uselongdouble='y' ;;
83esac
84
8e9464f1
JH
85#usevfork=true
86usevfork=false
c07a80fd 87
88# DG has this thing set up with symlinks which point to different places
89# depending on environment variables (see elink(5)) and the compiler and
90# related tools use them to access different development environments
91# (COFF, ELF, m88k BCS and so on), see sde(5). The upshot, however, is
92# that when a normal program tries to access one of these elinks it sees
93# no such file (like stat()ting a mis-directed symlink). Setting
94# $plibpth to explicitly include the place to which the elinks point
95# allows Configure to find libraries which vary based on the development
96# environment.
735aabf6
RS
97#
98# Starting with version 4.10 (the first time the OS supported Intel
99# hardware) all libraries are accessed with this mechanism.
100#
101# The default $TARGET_BINARY_INTERFACE changed with version 4.10. The
102# system now comes with a link named /usr/sde/default which points to
103# the proper entry, but older versions lacked this and used m88kdgux
104# directly.
105
106: && sde_path=${SDE_PATH:-/usr}/sde # hide from Configure
107while : # dummy loop
108do
109 if [ -n "$TARGET_BINARY_INTERFACE" ]
110 then set X "$TARGET_BINARY_INTERFACE"
111 else set X default dg m88k_dg ix86_dg m88kdgux m88kdguxelf
112 fi
113 shift
114 default_sde=$1
115 for sde
116 do
117 [ -d "$sde_path/$sde" ] && break 2
118 done
68dc0745 119 cat <<END >&2
735aabf6
RS
120
121NOTE: I can't figure out what SDE is used by default on this machine (I
122didn't find a likely directory under $sde_path). This is bad news. If
123this is a R4.10 or newer system I'm not going to be able to find any of
124your libraries, if this system is R3.10 or older I won't be able to find
125the math library. You should re-run Configure with the environment
126variable TARGET_BINARY_INTERFACE set to the proper value for this
127machine, see sde(5) and the notes in hints/dgux.sh.
128
129END
130 sde=$default_sde
131 break
132done
133
134plibpth="$plibpth $sde_path/$sde/usr/lib"
135unset sde_path default_sde sde
c07a80fd 136
8e9464f1 137#####################################
95036ac7 138# <takis@XFree86.Org>
8e9464f1
JH
139#####################################
140
8891dd8d 141libperl="libperl515.so"
8e9464f1 142
c07a80fd 143# Many functions (eg, gethostent(), killpg(), getpriority(), setruid()
144# dbm_*(), and plenty more) are defined in -ldgc. Usually you don't
145# need to know this (it seems that libdgc.so is searched automatically
146# by ld), but Configure needs to check it otherwise it will report all
147# those functions as missing.
8e9464f1
JH
148
149#####################################
95036ac7 150# <takis@XFree86.Org>
8e9464f1
JH
151#####################################
152
153# libswanted="dgc gdbm $libswanted"
154#libswanted="dbm posix $libswanted"
95036ac7
JH
155# Do *NOT* add there the malloc native
156# DG/UX library!
8e9464f1
JH
157libswanted="dbm posix resolv socket nsl dl m"
158
159#####################################
95036ac7 160# <takis@XFree86.Org>
8e9464f1
JH
161#####################################
162
163mydomain='.localhost'
164cf_by=`(whoami) 2>/dev/null`
165cf_email="$cf_by@localhost"
c07a80fd 166
167# Dynamic loading works using the dlopen() functions. Note that dlfcn.h
735aabf6
RS
168# used to be broken, it declared _dl*() rather than dl*(). This was the
169# case up to 3.10, it has been fixed in 4.11. I'm not sure if it was
170# fixed in 4.10. If you have the older header just ignore the warnings
171# (since pointers and integers have the same format on m88k).
8e9464f1
JH
172
173# usedl=true
174usedl=false
175
c07a80fd 176# For cc rather than gcc the flags would be `-K PIC' for compiling and
177# -G for loading. I haven't tested this.
8e9464f1
JH
178
179#####################################
95036ac7 180# <takis@XFree86.Org>
8e9464f1
JH
181# Use -fPIC instead -fpic
182#####################################
183
184cccdlflags=-fPIC
185#We must use gcc
186ld="gcc"
187lddlflags="-shared"
188
189############################################################################
190# DGUX Posix 4A Draft 10 Thread support
95036ac7 191# <takis@XFree86.Org>
8e9464f1
JH
192# use Configure -Dusethreads to enable
193############################################################################
194
195cat > UU/usethreads.cbu <<'EOCBU'
196case "$usethreads" in
197$define|true|[yY]*)
198 ccflags="$ccflags"
95036ac7
JH
199 # DG/UX has this for sure! Main Configure fails to
200 # detect it but it is needed!
201 d_pthread_atfork='define'
8e9464f1
JH
202 shift
203 # DG/UX's sched_yield is in -lrte
95036ac7
JH
204 # Do *NOT* add there the malloc native
205 # DG/UX library!
8e9464f1
JH
206 libswanted="dbm posix resolv socket nsl dl m rte"
207 archname="ix86-dgux-thread"
8891dd8d
DM
208 sitearch="$prefix/lib/perl515/$archname"
209 sitelib="$prefix/lib/perl515"
8e9464f1
JH
210 case "$cc" in
211 *gcc*)
212 #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread
213 #### Otherwise take out the switch -pthread
214 #### And add manually the -D_POSIX4A_DRAFT10_SOURCE flag.
215 ld="gcc"
216 ccflags="$ccflags -D_POSIX4A_DRAFT10_SOURCE"
217 # Debug build : use -DS flag on command line perl
95036ac7 218 # ccflags="$ccflags -g -mstandard -DDEBUGGING -D_POSIX4A_DRAFT10_SOURCE -pthread"
8e9464f1
JH
219 cccdlflags='-fPIC'
220 lddlflags="-shared"
221 #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread
222 #### Otherwise take out the switch -pthread
223 #### And add manually the -lthread library.
224 ldflags="$ldflags -pthread"
225 ;;
226
227 *)
228 echo "Not supported DG/UX cc and threads !"
229 ;;
230 esac
231esac
232EOCBU
233
234# "./Configure -d" can't figure this out easily
235d_suidsafe='define'
236
237###################################################