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
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
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.
6 #
7 # DGUX is an SVR4 derivative.  It ships with gcc as the standard
8 # compiler.  Since version 3.0 it has shipped with Perl 4.036
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.
14 #
15 # -Roderick Schertler <roderick@argon.org>
16
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.
22
23 ##########################################
24 # Modified by Takis Psarogiannakopoulos
25 # University of Cambridge
26 # Centre for Mathematical Sciences
27 # Department of Pure Mathematics
28 # Wilberforce road
29 # Cambridge CB3 0WB , UK
30 # e-mail <takis@XFree86.Org>
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.
34 # March 2002
35 ###########################################
36
37 cc=gcc
38 ccflags="-DDGUX -D_DGUX_SOURCE"
39 # Debug build. If using GNU as,ld use the flag -gstabs+
40 # ccflags="-g -mstandard -DDGUX -D_DGUX_SOURCE -DDEBUGGING"
41 # Dummy ; always compile with -O2 on GCC 2.95.2/3 rev (DG/UX)
42 # even if you debugging the program!
43 optimize="-mno-legend -O2"
44
45 archname="ix86-dgux"
46 libpth="/usr/lib"
47
48 #####################################
49 # <takis@XFree86.Org>
50 # Change this if you want.
51 # prefix =/usr/local
52 #####################################
53
54 prefix=/usr/local
55 perlpath="$prefix/bin/perl515"
56 startperl="#! $prefix/bin/perl515"
57 privlib="$prefix/lib/perl515"
58 man1dir="$prefix/man/man1"
59 man3dir="$prefix/man/man3"
60
61 sitearch="$prefix/lib/perl515/$archname"
62 sitelib="$prefix/lib/perl515"
63
64 #Do not overwrite by default /usr/bin/perl of DG/UX
65 installusrbinperl="$undef"
66
67 # Configure may fail to find lstat()
68 # function in <sys/stat.h>.
69 d_lstat='define'
70
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. 
74 # I have no time to investigate more.
75 # <takis@XFree86.Org>
76
77 case "$usemymalloc" in
78 '') usemymalloc='n' ;;
79 esac
80
81 case "$uselongdouble" in
82 '') uselongdouble='y' ;;
83 esac
84
85 #usevfork=true
86 usevfork=false
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.
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
107 while : # dummy loop
108 do
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
119     cat <<END >&2
120
121 NOTE:  I can't figure out what SDE is used by default on this machine (I
122 didn't find a likely directory under $sde_path).  This is bad news.  If
123 this is a R4.10 or newer system I'm not going to be able to find any of
124 your libraries, if this system is R3.10 or older I won't be able to find
125 the math library.  You should re-run Configure with the environment
126 variable TARGET_BINARY_INTERFACE set to the proper value for this
127 machine, see sde(5) and the notes in hints/dgux.sh.
128
129 END
130     sde=$default_sde
131     break
132 done
133
134 plibpth="$plibpth $sde_path/$sde/usr/lib"
135 unset sde_path default_sde sde
136
137 #####################################
138 # <takis@XFree86.Org>
139 #####################################
140
141 libperl="libperl515.so"
142
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.
148
149 #####################################
150 # <takis@XFree86.Org>
151 #####################################
152
153 # libswanted="dgc gdbm $libswanted"
154 #libswanted="dbm posix $libswanted"
155 # Do *NOT* add there the malloc native 
156 # DG/UX library!
157 libswanted="dbm posix resolv socket nsl dl m"
158
159 #####################################
160 # <takis@XFree86.Org>
161 #####################################
162
163 mydomain='.localhost'
164 cf_by=`(whoami) 2>/dev/null`
165 cf_email="$cf_by@localhost"
166
167 # Dynamic loading works using the dlopen() functions.  Note that dlfcn.h
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).
172
173 # usedl=true
174 usedl=false
175
176 # For cc rather than gcc the flags would be `-K PIC' for compiling and
177 # -G for loading.  I haven't tested this.
178
179 #####################################
180 # <takis@XFree86.Org>
181 # Use -fPIC instead -fpic 
182 #####################################
183
184 cccdlflags=-fPIC
185 #We must use gcc
186 ld="gcc"
187 lddlflags="-shared"
188
189 ############################################################################
190 # DGUX Posix 4A Draft 10 Thread support
191 # <takis@XFree86.Org>
192 # use Configure -Dusethreads to enable
193 ############################################################################
194
195 cat > UU/usethreads.cbu <<'EOCBU'
196 case "$usethreads" in
197 $define|true|[yY]*)
198         ccflags="$ccflags"
199         # DG/UX has this for sure! Main Configure fails to
200         # detect it but it is needed!
201         d_pthread_atfork='define'
202         shift
203         # DG/UX's sched_yield is in -lrte
204         # Do *NOT* add there the malloc native 
205         # DG/UX library!
206         libswanted="dbm posix resolv socket nsl dl m rte"
207         archname="ix86-dgux-thread"
208         sitearch="$prefix/lib/perl515/$archname"
209         sitelib="$prefix/lib/perl515"
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
218            # ccflags="$ccflags -g -mstandard -DDEBUGGING -D_POSIX4A_DRAFT10_SOURCE -pthread"
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
231 esac
232 EOCBU
233
234 # "./Configure -d" can't figure this out easily
235 d_suidsafe='define'
236
237 ###################################################