1 | # hints/dcosx.sh
|
---|
2 | # Last modified: Thu Jan 16 11:38:12 EST 1996
|
---|
3 | # Stephen Zander <stephen.zander@interlock.mckesson.com>
|
---|
4 | # hints for DC/OSx (Pyramid) & SINIX (Seimens: dc/osx rebadged)
|
---|
5 | # Based on the hints/solaris_2.sh file
|
---|
6 |
|
---|
7 | # See man vfork.
|
---|
8 | usevfork=false
|
---|
9 |
|
---|
10 | d_suidsafe=define
|
---|
11 |
|
---|
12 | # Avoid all libraries in /usr/ucblib.
|
---|
13 | set `echo $glibpth | sed -e 's@/usr/ucblib@@'`
|
---|
14 | glibpth="$*"
|
---|
15 |
|
---|
16 | # Remove bad libraries.
|
---|
17 | # -lucb contains incompatible routines.
|
---|
18 | set `echo " $libswanted " | sed -e 's@ ucb @ @'`
|
---|
19 | libswanted="$*"
|
---|
20 |
|
---|
21 | # Here's another draft of the perl5/solaris/gcc sanity-checker.
|
---|
22 |
|
---|
23 | case $PATH in
|
---|
24 | */usr/ucb*:/usr/bin:*|*/usr/ucb*:/usr/bin) cat <<END >&2
|
---|
25 |
|
---|
26 | NOTE: /usr/ucb/cc does not function properly.
|
---|
27 | Remove /usr/ucb from your PATH.
|
---|
28 |
|
---|
29 | END
|
---|
30 | ;;
|
---|
31 | esac
|
---|
32 |
|
---|
33 |
|
---|
34 | # Check that /dev/fd is mounted. If it is not mounted, let the
|
---|
35 | # user know that suid scripts may not work.
|
---|
36 | /usr/bin/df /dev/fd 2>&1 > /dev/null
|
---|
37 | case $? in
|
---|
38 | 0) ;;
|
---|
39 | *)
|
---|
40 | cat <<END >&4
|
---|
41 |
|
---|
42 | NOTE: Your system does not have /dev/fd mounted. If you want to
|
---|
43 | be able to use set-uid scripts you must ask your system administrator
|
---|
44 | to mount /dev/fd.
|
---|
45 |
|
---|
46 | END
|
---|
47 | ;;
|
---|
48 | esac
|
---|
49 |
|
---|
50 |
|
---|
51 | # See if libucb can be found in /usr/lib. If it is, warn the user
|
---|
52 | # that this may cause problems while building Perl extensions.
|
---|
53 | /usr/bin/ls /usr/lib/libucb* >/dev/null 2>&1
|
---|
54 | case $? in
|
---|
55 | 0)
|
---|
56 | cat <<END >&4
|
---|
57 |
|
---|
58 | NOTE: libucb has been found in /usr/lib. libucb should reside in
|
---|
59 | /usr/ucblib. You may have trouble while building Perl extensions.
|
---|
60 |
|
---|
61 | END
|
---|
62 | ;;
|
---|
63 | esac
|
---|
64 |
|
---|
65 |
|
---|
66 | # See if make(1) is GNU make(1).
|
---|
67 | # If it is, make sure the setgid bit is not set.
|
---|
68 | make -v > make.vers 2>&1
|
---|
69 | if grep GNU make.vers > /dev/null 2>&1; then
|
---|
70 | tmp=`/usr/bin/ksh -c "whence make"`
|
---|
71 | case "`/usr/bin/ls -l $tmp`" in
|
---|
72 | ??????s*)
|
---|
73 | cat <<END >&2
|
---|
74 |
|
---|
75 | NOTE: Your PATH points to GNU make, and your GNU make has the set-group-id
|
---|
76 | bit set. You must either rearrange your PATH to put /usr/ccs/bin before the
|
---|
77 | GNU utilities or you must ask your system administrator to disable the
|
---|
78 | set-group-id bit on GNU make.
|
---|
79 |
|
---|
80 | END
|
---|
81 | ;;
|
---|
82 | esac
|
---|
83 | fi
|
---|
84 | rm -f make.vers
|
---|
85 |
|
---|
86 | # If the C compiler is gcc:
|
---|
87 | # - check the fixed-includes
|
---|
88 | # - check as(1) and ld(1), they should not be GNU
|
---|
89 | # If the C compiler is not gcc:
|
---|
90 | # - check as(1) and ld(1), they should not be GNU
|
---|
91 | # - increase the optimizing level to prevent object size warnings
|
---|
92 | #
|
---|
93 | # Watch out in case they have not set $cc.
|
---|
94 | case "`${cc:-cc} -v 2>&1`" in
|
---|
95 | *gcc*)
|
---|
96 | #
|
---|
97 | # Using gcc.
|
---|
98 | #
|
---|
99 | #echo Using gcc
|
---|
100 |
|
---|
101 | # Get gcc to share its secrets.
|
---|
102 | echo 'main() { return 0; }' > try.c
|
---|
103 | verbose=`${cc:-cc} -v -o try try.c 2>&1`
|
---|
104 | rm -f try try.c
|
---|
105 | tmp=`echo "$verbose" | grep '^Reading' |
|
---|
106 | awk '{print $NF}' | sed 's/specs$/include/'`
|
---|
107 |
|
---|
108 | # Determine if the fixed-includes look like they'll work.
|
---|
109 | # Doesn't work anymore for gcc-2.7.2.
|
---|
110 |
|
---|
111 | # See if as(1) is GNU as(1). GNU as(1) won't work for this job.
|
---|
112 | case $verbose in
|
---|
113 | */usr/ccs/bin/as*) ;;
|
---|
114 | *)
|
---|
115 | cat <<END >&2
|
---|
116 |
|
---|
117 | NOTE: You are using GNU as(1). GNU as(1) will not build Perl.
|
---|
118 | You must arrange to use /usr/ccs/bin/as, perhaps by setting
|
---|
119 | GCC_EXEC_PREFIX or by including -B/usr/ccs/bin in your cc command.
|
---|
120 |
|
---|
121 | END
|
---|
122 | ;;
|
---|
123 | esac
|
---|
124 |
|
---|
125 | # See if ld(1) is GNU ld(1). GNU ld(1) won't work for this job.
|
---|
126 | case $verbose in
|
---|
127 | */usr/ccs/bin/ld*) ;;
|
---|
128 | *)
|
---|
129 | cat <<END >&2
|
---|
130 |
|
---|
131 | NOTE: You are using GNU ld(1). GNU ld(1) will not build Perl.
|
---|
132 | You must arrange to use /usr/ccs/bin/ld, perhaps by setting
|
---|
133 | GCC_EXEC_PREFIX or by including -B/usr/ccs/bin in your cc command.
|
---|
134 |
|
---|
135 | END
|
---|
136 | ;;
|
---|
137 | esac
|
---|
138 |
|
---|
139 | ;; #using gcc
|
---|
140 | *)
|
---|
141 | optimize='-O -K Olimit:3064'
|
---|
142 | #
|
---|
143 | # Not using gcc.
|
---|
144 | #
|
---|
145 | #echo Not using gcc
|
---|
146 |
|
---|
147 | # See if as(1) is GNU as(1). GNU as(1) won't work for this job.
|
---|
148 | case `as --version < /dev/null 2>&1` in
|
---|
149 | *GNU*)
|
---|
150 | cat <<END >&2
|
---|
151 |
|
---|
152 | NOTE: You are using GNU as(1). GNU as(1) will not build Perl.
|
---|
153 | You must arrange to use /usr/ccs/bin, perhaps by adding it to the
|
---|
154 | beginning of your PATH.
|
---|
155 |
|
---|
156 | END
|
---|
157 | ;;
|
---|
158 | esac
|
---|
159 |
|
---|
160 | # See if ld(1) is GNU ld(1). GNU ld(1) won't work for this job.
|
---|
161 | case `ld --version < /dev/null 2>&1` in
|
---|
162 | *GNU*)
|
---|
163 | cat <<END >&2
|
---|
164 |
|
---|
165 | NOTE: You are using GNU ld(1). GNU ld(1) will not build Perl.
|
---|
166 | You must arrange to use /usr/ccs/bin, perhaps by adding it to the
|
---|
167 | beginning of your PATH
|
---|
168 |
|
---|
169 | END
|
---|
170 | ;;
|
---|
171 | esac
|
---|
172 |
|
---|
173 | ;; #not using gcc
|
---|
174 | esac
|
---|
175 |
|
---|
176 | # as --version or ld --version might dump core.
|
---|
177 | rm -f core
|
---|
178 |
|
---|
179 | # DC/OSx hides certain functions in a libc that looks dynamic but isn't
|
---|
180 | # because of this we reinclude -lc when building dynamic extenstions
|
---|
181 | libc='/usr/ccs/lib/libc.so'
|
---|
182 | lddlflags='-G -lc'
|
---|
183 |
|
---|
184 | # DC/OSx gets overenthusiastic with symbol removal when building dynamically
|
---|
185 | ccdlflags='-Blargedynsym'
|
---|
186 |
|
---|
187 | # System malloc is safer when using third part libs
|
---|
188 | usemymalloc='n'
|
---|