Jumbo FreeBSD update from Anton Berezin <tobez@plab.ku.dk>
[p5sagit/p5-mst-13.2.git] / hints / qnx.sh
CommitLineData
ff68c719 1#----------------------------------------------------------------
2# QNX hints
3#
4f6a2eb2 4# As of perl5.004_04, all tests pass under:
5# QNX 4.23A
6# Watcom 10.6 with Beta/970211.wcc.update.tar.F
7# socket3r.lib Nov21 1996.
ff68c719 8#
9# As with many unix ports, this one depends on a few "standard"
10# unix utilities which are not necessarily standard for QNX.
11#
12# /bin/sh This is used heavily by Configure and then by
13# perl itself. QNX's version is fine, but Configure
14# will choke on the 16-bit version, so if you are
15# running QNX 4.22, link /bin/sh to /bin32/ksh
16# ar This is the standard unix library builder.
17# We use wlib. With Watcom 10.6, when wlib is
18# linked as "ar", it behaves like ar and all is
19# fine. Under 9.5, a cover is required. One is
20# included in ../qnx
21# nm This is used (optionally) by configure to list
22# the contents of libraries. I will generate
23# a cover function on the fly in the UU directory.
24# cpp Configure and perl need a way to invoke a C
25# preprocessor. I have created a simple cover
26# for cc which does the right thing. Without this,
27# Configure will create it's own wrapper which works,
28# but it doesn't handle some of the command line arguments
29# that perl will throw at it.
30# make You really need GNU make to compile this. GNU make
31# ships by default with QNX 4.23, but you can get it
32# from quics for earlier versions.
33#----------------------------------------------------------------
34# Outstanding Issues:
35# lib/posix.t test fails on test 17 because acos(1) != 0.
4f6a2eb2 36# Resolved in 970211 Beta
ff68c719 37# lib/io_udp.t test hangs because of a bug in getsockname().
38# Fixed in latest BETA socket3r.lib
ff68c719 39# There is currently no support for dynamically linked
40# libraries.
ff68c719 41#----------------------------------------------------------------
42# These hints were submitted by:
43# Norton T. Allen
44# Harvard University Atmospheric Research Project
45# allen@huarp.harvard.edu
46#
47# If you have suggestions or changes, please let me know.
48#----------------------------------------------------------------
49
4f6a2eb2 50echo ""
51echo "Some tests may fail. Please read the hints/qnx.sh file."
52echo ""
53
ff68c719 54#----------------------------------------------------------------
7fbf1995 55# At present, all QNX systems are equivalent architectures,
56# so it is reasonable to call archname=x86-qnx rather than
57# making an unnecessary distinction between AT-qnx and PCI-qnx,
58# for example.
59#----------------------------------------------------------------
60archname='x86-qnx'
61
62#----------------------------------------------------------------
ff68c719 63# QNX doesn't come with a csh and the ports of tcsh I've used
64# don't work reliably:
65#----------------------------------------------------------------
66csh=''
67d_csh='undef'
68full_csh=''
69
70#----------------------------------------------------------------
4f6a2eb2 71# setuid scripts are secure under QNX.
72# (Basically, the same race conditions apply, but assuming
73# the scripts are located in a secure directory, the methods
74# for exploiting the race condition are defeated because
75# the loader expands the script name fully before executing
76# the interpreter.)
77#----------------------------------------------------------------
78d_suidsafe='define'
79
80#----------------------------------------------------------------
ff68c719 81# difftime is implemented as a preprocessor macro, so it doesn't show
82# up in the libraries:
83#----------------------------------------------------------------
84d_difftime='define'
85
86#----------------------------------------------------------------
87# strtod is in the math library, but we can't tell Configure
88# about the math library or it will confuse the linker
89#----------------------------------------------------------------
90d_strtod='define'
91
ff68c719 92lib_ext='3r.lib'
93libc='/usr/lib/clib3r.lib'
94
95#----------------------------------------------------------------
96# ccflags:
97# I like to turn the warnings up high, but a few common
98# constructs make a lot of noise, so I turn those warnings off.
99# A few still remain...
100#
101# HIDEMYMALLOC is necessary if using mymalloc since it is very
102# tricky (though not impossible) to totally replace the watcom
103# malloc/free set.
104#
105# unix.h is required as a general rule for unixy applications.
106#----------------------------------------------------------------
107ccflags='-DHIDEMYMALLOC -mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h'
108
109#----------------------------------------------------------------
110# ldflags:
111# If you want debugging information, you must specify -g on the
112# link as well as the compile. If optimize != -g, you should
113# remove this.
114#----------------------------------------------------------------
4f6a2eb2 115ldflags="-g -N1M"
ff68c719 116
117so='none'
118selecttype='fd_set *'
119
120#----------------------------------------------------------------
121# Add -lunix to list of libs. This is needed mainly so the nm
122# search will find funcs in the unix lib. Including unix.h should
123# automatically include the library without -l.
124#----------------------------------------------------------------
125libswanted="$libswanted unix"
126
127if [ -z "`which ar 2>/dev/null`" ]; then
68dc0745 128 cat <<-'EOF' >&4
ff68c719 129 I don't see an 'ar', so I'm guessing you are running
130 Watcom 9.5 or earlier. You may want to install the ar
131 cover found in the qnx subdirectory of this distribution.
132 It might reasonably be placed in /usr/local/bin.
133
134 EOF
135fi
136#----------------------------------------------------------------
137# Here is a nm script which fixes up wlib's output to look
138# something like nm's, at least enough so that Configure can
139# use it.
140#----------------------------------------------------------------
141if [ -z "`which nm 2>/dev/null`" ]; then
142 cat <<-EOF
143 Creating a quick-and-dirty nm cover for Configure to use:
144
145 EOF
99cae59c 146 cat >./UU/nm <<-'EOF'
ff68c719 147 #! /bin/sh
148 #__USAGE
149 #%C <lib> [<lib> ...]
150 # Designed to mimic Unix's nm utility to list
151 # defined symbols in a library
4f6a2eb2 152 unset WLIB
ff68c719 153 for i in $*; do wlib $i; done |
154 awk '
155 /^ / {
156 for (i = 1; i <= NF; i++) {
157 sub("_$", "", $i)
158 print "000000 T " $i
159 }
160 }'
161 EOF
99cae59c 162 chmod +x ./UU/nm
ff68c719 163fi
164
165cppstdin=`which cpp 2>/dev/null`
166if [ -n "$cppstdin" ]; then
68dc0745 167 cat <<-EOF >&4
ff68c719 168 I found a cpp at $cppstdin and will assume it is a good
169 thing to use. If this proves to be false, there is a
170 thin cover for cpp in the qnx subdirectory of this
171 distribution which you could move into your path.
172 EOF
173 cpprun="$cppstdin"
174else
68dc0745 175 cat <<-EOF >&4
ff68c719 176
177 There is a cpp cover in the qnx subdirectory of this
178 distribution which works a little better than the
179 Configure default. You may wish to copy it to
180 /usr/local/bin or some other suitable location.
181 EOF
182fi