1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
|
$NetBSD: patch-aa,v 1.12 2005/12/03 00:54:11 joerg Exp $
--- Configure.orig 2004-11-25 15:58:25.000000000 +0000
+++ Configure
@@ -187,35 +187,7 @@ if test -z "$OS2_SHELL"; then dir_sep=':
pth="\
/bin\
/usr/bin\
- /usr/locateal/bin\
- /usr/ucb\
- /usr/locateal\
- /usr/lbin\
- /usr/5bin\
- /etc\
- /usr/etc\
- /usr/gnu/bin\
- /usr/new\
- /usr/new/bin\
- /usr/nbin\
- /sys5.3/bin\
- /sys5.3/usr/bin\
- /bsd4.3/bin\
- /bsd4.3/usr/ucb\
- /bsd4.3/usr/bin\
- /usr/bsd\
- /bsd43/bin\
- /opt/ansic/bin\
- /usr/ccs/bin\
- /usr/lib\
- /usr/ucblib\
- /lib\
- /usr/ccs/lib\
- /sbin\
- /usr/sbin\
- /usr/libexec\
- /usr/openwin/bin\
- /usr/local/bin\
+ $LOCALBASE/bin\
"
# /usr/openwin/bin added for xmkmf
@@ -246,7 +218,7 @@ fi
# We might need the following :
#
echo Looking for some tools first ...
-list='ld zcat gzip ranlib perl emacs'
+list='ld zcat ranlib emacs'
pathspace=`echo $PATH | sed -e "s/$dir_sep/ /g" | sed -e 's,\\\\,/,g'`
for file in $list; do
@@ -259,6 +231,7 @@ for file in $list; do
esac
done
if test -z "$zcat" -a -n "$gzip"; then zcat="$gzip -dc"; fi
+perl="${PERL5}";
####################### CONFIGURE - ARCHITECTURE ############################
#
@@ -290,7 +263,7 @@ if test "$fastread" != yes; then
==========================================================================
I know of the following Operating Systems
EOM
- rep='os2 freebsd cygwin linux hpux aix osf1 solaris sunos nextstep concentrix irix';
+ rep='os2 freebsd netbsd cygwin linux hpux aix osf1 solaris sunos nextstep concentrix irix dragonfly';
. ./display
echo $n ..."Any of these apply ? $c"
dflt=$osname; . ./myread
@@ -302,20 +275,26 @@ fi
# The asm file used (if any)
#
case "$arch" in
- sparc) asmarch=sparcv8_micro; pretty=Sparc ;;
+ sparc) asmarch=sparcv8_micro; pretty=SPARC ;;
sparcv7) asmarch=$arch; pretty=SparcV7 ;;
sparcv8_micro) asmarch=$arch; pretty=MicroSparc ;;
sparcv8_super) asmarch=$arch; pretty=SuperSparc ;;
sparcv9) asmarch=sparcv8_micro; pretty=UltraSparc ;;
+ sparc64) asmarch=none; pretty=UltraSPARC ;;
m68k) asmarch=$arch; pretty="MC680x0, x>=2" ;;
i?86) asmarch=ix86 ; pretty=$arch ;;
- hppa) asmarch=none ; pretty=HP
+ hppa) asmarch=none ; pretty=HPPA
case "$osname-`uname -r`" in
hpux-?.09.*) asmarch=none ;;
hpux-?.10.*) asmarch=$arch ;;
esac ;;
alpha) asmarch=$arch; pretty=Alpha ;;
- mips) asmarch=none; pretty=Mips ;;
+ arm) asmarch=$arch; pretty=ARM ;;
+ mips) asmarch=none; pretty=MIPS ;;
+ powerpc) asmarch=none; pretty=PowerPC ;;
+ sh3) asmarch=none; pretty=SH-3 ;;
+ sh5) asmarch=none; pretty=SH-5 ;;
+ vax) asmarch=none; pretty=VAX ;;
fx2800) asmarch=none; pretty="Alliant FX/2800" ;;
none) asmarch=none; pretty="unknown" ;;
*) asmarch=none; pretty=$arch
@@ -326,9 +305,12 @@ esac
# Modifications for pretty name and asm file
#
case "$osname" in
- nextstep|cygwin*|linux|freebsd|os2|gnu)
+ nextstep|cygwin*|linux|freebsd|os2|gnu|dragonfly)
pretty="$pretty running $osname";
if test "$arch" = m68k; then asmarch=none; fi ;;
+ netbsd)
+ pretty="$pretty running NetBSD";
+ if test "$arch" = m68k; then asmarch=none; fi ;;
esac
if test "$kernel" = no; then
@@ -351,7 +333,7 @@ EOM
fi
fi
case "$asmarch" in
- none) prettyk="C portable";;
+ none) prettyk="portable C";;
sparcv7) prettyk=SparcV7;;
sparcv8_super) prettyk=SuperSparc;;
sparcv8_micro) prettyk=MicroSparc;;
@@ -375,7 +357,7 @@ echo "Building for architecture: $pretty
case "$osname-$arch" in
os2-*) ln_s=cp; make_sh=sh; exe_suff=.exe; extraflag="-Zexe" ;;
cygwin*) ln_s="ln -s"; make_sh="/bin/sh"; exe_suff=.exe; extraflag="" ;;
- *) ln_s="ln -s"; make_sh="/bin/sh"; exe_suff=; extraflag="" ;;
+ *) ln_s="ln -sf"; make_sh="/bin/sh"; exe_suff=; extraflag="" ;;
esac
####################### CONFIGURE - LIBRARIES ###############################
@@ -418,20 +400,8 @@ if test "$optimization" != profiling; th
fi;;
os2) libpth=`echo $LIBRARY_PATH | sed 's/;/ /g' | sed 's,\\\\,/,g'`;;
*) libpth="\
- /usr/local/lib\
- /lib\
/usr/lib\
- /opt/lib\
- /opt/local/lib\
- /opt/gnu/lib\
- /lib/pa1.1\
- /usr/lib/large\
- /lib/large\
- /usr/lib/small\
- /lib/small\
- /usr/ccs/lib\
- /usc/ucblib\
- /usr/shlib\
+ $LOCALBASE/lib\
.\
";;
esac
@@ -518,17 +488,9 @@ if test "$optimization" != profiling; th
# Readline -- TermCap
lib=$rl_fullname; sym=tgetent; . ./locatesymbol
if test -n "$try"; then # tgetent needed
- lib=ncurses; . ./locatelib
- if test -n "$try"; then # ncurses found. Does it contain tgetent ?
- lib=$try; . ./locatesymbol
- fi
- if test -n "$try"; then
- rl_ncurses=$ncurses
- else
lib=termcap; . ./locatelib
rl_termcap=$termcap
fi
- fi
# Readline -- Allocation
lib=$rl_fullname; sym=alloca; . ./locatesymbol
if test -n "$try"; then # alloca needed
@@ -546,24 +508,15 @@ if test "$optimization" != profiling; th
$cygtop/H-${arch}-cygwin32/${arch}-cygwin32/include\
";;
*) incpth="\
- /usr/local/include/readline\
- /usr/include/readline\
- /opt/include/readline\
- /opt/local/include/readline\
- /opt/gnu/include/readline\
- /usr/unsupported/include/readline\
- /usr/local/include\
- /usr/include\
- /opt/include\
- /opt/local/include\
- /opt/gnu/include\
+ $LOCALBASE/include\
";;
esac
pth="$readline_add $incpth"
- x=`./locate 'readline.h' '' $pth`
+ x=`./locate 'readline/readline.h' '' $pth`
CPPF_defined=
case $x in
?:/*|/*) rl_include=`echo $x | sed 's,/readline.h,,'`
+ echo $x $rl_include
if (grep CPPFunction $x > /dev/null 2>&1); then CPPF_defined=yes; fi
if (grep rl_message $x > /dev/null 2>&1); then rl_message=yes; fi
if (grep rl_completion_matches $x > /dev/null 2>&1); then
@@ -601,7 +554,7 @@ if test "$optimization" != profiling; th
# in case headers are not installed correctly
RLINCLUDE="-I$rl_include -DREADLINE_LIBRARY"
fi
- RLLIBS="-L$readline -lreadline"
+ RLLIBS="-Wl,-R$readline -L$readline -lreadline"
if test -n "$rl_ncurses"; then
echo ..."Library ncurses needed by readline"
RLLIBS="$RLLIBS -lncurses"
@@ -662,33 +615,7 @@ EOT
# X11 -- Headers
if test ! -f $Xincroot/X11/Xos.h; then
x11pth="\
- /usr/openwin/share/lib\
- /usr/openwin/lib\
- /usr/X11R6/lib\
- /usr/X11R5/lib\
- /usr/X11R4/lib\
- /usr/lib/X11R6\
- /usr/lib/X11R5\
- /usr/lib/X11R4\
- /usr/local/X11R6/lib\
- /usr/local/X11R5/lib\
- /usr/local/X11R4/lib\
- /usr/local/lib/X11R6\
- /usr/local/lib/X11R5\
- /usr/local/lib/X11R4\
- /usr/X11/lib\
- /usr/lib/X11\
- /usr/local/X11/lib\
- /usr/local/lib/X11\
- /usr/X386/lib\
- /usr/x386/lib\
- /usr/XFree86/lib/X11\
- /usr/lib\
- /usr/local/lib\
- /usr/unsupported/lib\
- /usr/athena/lib\
- /usr/local/x11r5/lib\
- /usr/lpp/Xamples/lib\
+ $X11BASE/lib\
";
pth=`echo $x11pth | s,/lib,/include,g`
x=`./locate X11/Xos.h '' $pth`
@@ -867,7 +794,7 @@ else
OPTFLAGS=-O; cflags=-Aa; DLCFLAGS=+z;;
# best tuning option, even for PPC604:
aix-*) OPTFLAGS=-O2; cflags='-qlanglvl=ansi -qtune=601';;
- cygwin*|linux-i?86|freebsd-i?86)
+ cygwin*|linux-i?86|freebsd-i?86|dragonfly-i?86)
OPTFLAGS=-O2; cflags=-m486;;
osf1-*) OPTFLAGS='-O4 -migrate -ifo -Olimit 9999';;
sunos-*) OPTFLAGS=-fast; PRFFLAGS='-pg -Bstatic';;
@@ -877,7 +804,7 @@ else
esac
PRFFLAGS="$PRFFLAGS $OPTFLAGS"
fi
-cflags="$cflags $DLCFLAGS"
+cflags="$CFLAGS $cflags $DLCFLAGS"
case "$osname" in
nextstep) cflags="-traditional-cpp $cflags";;
@@ -962,6 +889,7 @@ case "$osname-$arch" in
linux-*|cygwin*|gnu-*)
LD=$CC; LDFLAGS="$cflags -Xlinker -export-dynamic"
runpathprefix='-Xlinker -rpath -Xlinker ';;
+ netbsd*) LD=$CC; LDFLAGS="$LDFLAGS -Wl,-E";;
osf1-alpha)
LD=$ld; LIBS="$LIBS -lots -lc"; runpathprefix='-rpath '
LDFLAGS='-std0 -call_shared /usr/lib/cmplrs/cc/crt0.o'
@@ -1006,7 +934,7 @@ if test "$optimization" = profiling; the
# aix-*) DLSUFFIX=a ;; dynamic linking does not work!
sunos-*) sodest=$VersionMajor$VersionMinor.$patch
soname=$sodest;;
- gnu-*|*-alpha|solaris-*|linux-*|freebsd-*)
+ gnu-*|*-alpha|solaris-*|linux-*|freebsd-*|dragonfly-*)
case $libpari_base in
pari) sodest=$version.$patch;; # released versions
*) sodest=$patch.0.0;; # unstable versions
@@ -1042,6 +970,7 @@ if test -n "$DLLD"; then
aix-*) DLLDFLAGS="-r" ;;
hpux-*) DLLDFLAGS="-b -E" ;;
freebsd-*) DLLDFLAGS="-Bshareable -x" ;;
+ dragonfly-*) DLLDFLAGS="-Bshareable -x" ;;
gnu-*|linux-*) DLLDFLAGS="-shared -soname \$(LIBPARI_SONAME)" ;;
irix-*) DLLDFLAGS="-shared -elf -no_unresolved -all" ;;
*-alpha) DLLDFLAGS="-shared"; EXTRADLLDFLAGS='${LIBS}'
@@ -1054,7 +983,7 @@ if test -n "$DLLD"; then
esac
fi
case "$osname" in
- freebsd|linux|sunos|solaris) DLLDFLAGS="$DLLDFLAGS -lc -lm";;
+ dragonfly|freebsd|linux|sunos|solaris) DLLDFLAGS="$DLLDFLAGS -lc -lm";;
esac
if test "$fastread" != yes; then
@@ -1207,8 +1136,8 @@ if test -z "$share_prefix"; then
dfltman=$prefix/man/man1
dfltall=$prefix/lib/pari
else
- dfltman=$share_prefix/man/man1
- dfltall=$share_prefix/doc/pari
+ dfltman=$prefix/man/man1
+ dfltall=$share_prefix/pari
fi
echo $n ..."\"gp\" executable ? $c"
@@ -1289,6 +1218,7 @@ fi
case "$osname" in
*cygwin*) LDDYN="-L$libdir -lpari_dll" ; runpath="$libdir" ;
DYNLIBS=-lpari_dll ; DYNFLAGS=-Dlibpari_USE_DLL ;;
+ netbsd) LDDYN="-Wl,-R$libdir -L$libdir -l$libpari_base" ; runpath="$libdir" ;;
*) LDDYN="-L$libdir -l$libpari_base" ; runpath="$libdir" ;;
esac
|