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
|
$NetBSD: patch-configure,v 1.9 2015/01/20 14:12:25 jaapb Exp $
Several configure changes to work on and detect NetBSD (and some other OSes)
--- configure.orig 2014-10-03 19:25:46.000000000 +0000
+++ configure
@@ -318,11 +318,11 @@ TOOLCHAIN="cc"
case "$bytecc,$target" in
cc,*-*-nextstep*)
# GNU C extensions disabled, but __GNUC__ still defined!
- bytecccompopts="-fno-defer-pop $gcc_warnings -U__GNUC__ -posix"
+ bytecccompopts="$gcc_warnings -U__GNUC__ -posix"
bytecclinkopts="-posix";;
*,*-*-rhapsody*)
# Almost the same as NeXTStep
- bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
+ bytecccompopts="$gcc_warnings -DSHRINKED_GNUC"
mathlib="";;
*,*-*-darwin*)
bytecccompopts="$gcc_warnings"
@@ -334,15 +334,15 @@ case "$bytecc,$target" in
echo "# define ARCH_CODE32" >> m.h
echo "#endif" >> m.h;;
*,*-*-haiku*)
- bytecccompopts="-fno-defer-pop $gcc_warnings"
+ bytecccompopts="$gcc_warnings"
# No -lm library
mathlib="";;
*,*-*-beos*)
- bytecccompopts="-fno-defer-pop $gcc_warnings"
+ bytecccompopts="$gcc_warnings"
# No -lm library
mathlib="";;
*gcc,alpha*-*-osf*)
- bytecccompopts="-fno-defer-pop $gcc_warnings"
+ bytecccompopts="$gcc_warnings"
if cc="$bytecc" sh ./hasgot -mieee; then
bytecccompopts="-mieee $bytecccompopts";
fi
@@ -370,11 +370,11 @@ case "$bytecc,$target" in
bytecccompopts="-DUMK";;
*gcc*,powerpc-*-aix*)
# Avoid name-space pollution by requiring Unix98-conformant includes
- bytecccompopts="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";;
+ bytecccompopts="$gcc_warnings -D_XOPEN_SOURCE=500";;
*,powerpc-*-aix*)
bytecccompopts="-D_XOPEN_SOURCE=500";;
*gcc*,*-*-cygwin*)
- bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32"
+ bytecccompopts="$gcc_warnings -U_WIN32"
dllccompopts="-U_WIN32 -DCAML_DLL"
if test $with_sharedlibs = yes; then
flexlink="flexlink -chain cygwin -merge-manifest -stack 16777216"
@@ -395,7 +395,7 @@ case "$bytecc,$target" in
exe=".exe"
ostype="Cygwin";;
*gcc*,*-*-mingw*)
- bytecccompopts="-fno-defer-pop $gcc_warnings"
+ bytecccompopts="$gcc_warnings"
dllccompopt="-DCAML_DLL"
if test $with_sharedlibs = yes; then
case "$target" in
@@ -419,14 +419,14 @@ case "$bytecc,$target" in
SO="dll"
;;
*gcc*,x86_64-*-linux*)
- bytecccompopts="-fno-defer-pop $gcc_warnings"
+ bytecccompopts="$gcc_warnings"
# Tell gcc that we can use 32-bit code addresses for threaded code
# unless we are compiled for a shared library (-fPIC option)
echo "#ifndef __PIC__" >> m.h
echo "# define ARCH_CODE32" >> m.h
echo "#endif" >> m.h;;
*gcc*)
- bytecccompopts="-fno-defer-pop $gcc_warnings";;
+ bytecccompopts="$gcc_warnings";;
esac
# Configure compiler to use in further tests
@@ -659,7 +659,7 @@ if test $with_sharedlibs = "yes"; then
mksharedlib="$flexlink"
mkmaindll="$flexlink -maindll"
shared_libraries_supported=true;;
- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
+ *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-dragonfly|*-*-gnu*|*-*-haiku*)
sharedcccompopts="-fPIC"
mksharedlib="$bytecc -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
@@ -756,7 +756,7 @@ if test $with_sharedlibs = "yes"; then
x86_64-*-linux*) natdynlink=true;;
i[3456]86-*-darwin[89].*) natdynlink=true;;
i[3456]86-*-darwin*)
- if test $arch64 == true; then
+ if test $arch64 = true; then
natdynlink=true
fi;;
x86_64-*-darwin*) natdynlink=true;;
@@ -770,6 +770,8 @@ if test $with_sharedlibs = "yes"; then
x86_64-*-openbsd*) natdynlink=true;;
i[3456]86-*-netbsd*) natdynlink=true;;
x86_64-*-netbsd*) natdynlink=true;;
+ i[3456]86-*-dragonfly*) natdynlink=true;;
+ x86_64-*-dragonfly*) natdynlink=true;;
i386-*-gnu0.3) natdynlink=true;;
i[3456]86-*-haiku*) natdynlink=true;;
arm*-*-linux*) natdynlink=true;;
@@ -798,6 +800,7 @@ case "$target" in
sparc*-*-gnu*) arch=sparc; system=gnu;;
i[3456]86-*-linux*) arch=i386; system=linux_`sh ./runtest elf.c`;;
i[3456]86-*-*bsd*) arch=i386; system=bsd_`sh ./runtest elf.c`;;
+ i[3456]86-*-dragonfly*) arch=i386; system=bsd_`sh ./runtest elf.c`;;
i[3456]86-*-nextstep*) arch=i386; system=nextstep;;
i[3456]86-*-solaris*) if $arch64; then
arch=amd64; system=solaris
@@ -807,6 +810,7 @@ case "$target" in
i[3456]86-*-haiku*) arch=i386; system=beos;;
i[3456]86-*-beos*) arch=i386; system=beos;;
i[3456]86-*-cygwin*) arch=i386; system=cygwin;;
+ i[3456]86-*-interix3*) arch=i386; system=interix3;;
i[3456]86-*-darwin*) if $arch64; then
arch=amd64; system=macosx
else
@@ -820,6 +824,7 @@ case "$target" in
powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
powerpc-*-darwin*) arch=power; system=rhapsody
if $arch64;then model=ppc64;else model=ppc;fi;;
+ arm*-*-netbsd) arch=arm; system=netbsd;;
armv6*-*-linux-gnueabihf) arch=arm; model=armv6; system=linux_eabihf;;
arm*-*-linux-gnueabihf) arch=arm; system=linux_eabihf;;
armv7*-*-linux-gnueabi) arch=arm; model=armv7; system=linux_eabi;;
@@ -835,6 +840,7 @@ case "$target" in
x86_64-*-gnu*) arch=amd64; system=gnu;;
x86_64-*-freebsd*) arch=amd64; system=freebsd;;
x86_64-*-netbsd*) arch=amd64; system=netbsd;;
+ x86_64-*-dragonfly*) arch=amd64; system=dragonfly;;
x86_64-*-openbsd*) arch=amd64; system=openbsd;;
x86_64-*-darwin*) arch=amd64; system=macosx;;
x86_64-*-mingw*) arch=amd64; system=mingw;;
@@ -874,7 +880,7 @@ case "$arch,$nativecc,$system,$target" i
if $arch64; then partialld="ld -r -arch ppc64"; fi;;
*,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";;
amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";;
- amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";;
+ amd64,gcc*,solaris,*) partialld="ld -r -64";;
*,gcc*,*,*) nativecccompopts="$gcc_warnings";;
esac
@@ -891,7 +897,7 @@ case "$arch,$system" in
amd64,solaris) as="${TOOLPREF}as --64"
aspp="${TOOLPREF}gcc -m64 -c";;
i386,solaris) as="${TOOLPREF}as"
- aspp="/usr/ccs/bin/${TOOLPREF}as -P";;
+ aspp="gcc -traditional -c";;
power,elf) as="${TOOLPREF}as -u -m ppc"
aspp="${TOOLPREF}gcc -c";;
power,rhapsody) as="${TOOLPREF}as -arch $model"
@@ -930,6 +936,7 @@ case "$arch,$system" in
arm,linux*) profiling='prof';;
power,elf) profiling='prof';;
power,bsd*) profiling='prof';;
+ *,*,dragonfly) profiling='prof';;
*) profiling='noprof';;
esac
@@ -1434,6 +1441,8 @@ fi
x11_include="not found"
x11_link="not found"
+if test "$disable_x11" != "yes"; then
+
if test -z "$x11_include_dir" -a -z "$x11_lib_dir"; then
if pkg-config --exists x11 2>/dev/null; then
x11_include=`pkg-config --cflags x11`
@@ -1480,6 +1489,7 @@ if test "$x11_include" = "not found"; th
/usr/XFree86/include/X11 \
\
/usr/include \
+ /usr/pkg/include \
/usr/local/include \
/usr/unsupported/include \
/usr/athena/include \
@@ -1537,6 +1547,7 @@ if test "$x11_include" = "not found"; th
\
/usr/lib64 \
/usr/lib \
+ /usr/pkg/lib \
/usr/local/lib \
/usr/unsupported/lib \
/usr/athena/lib \
@@ -1558,18 +1569,16 @@ if test "$x11_include" = "not found"; th
if test $dir = /usr/lib; then
x11_link="-lX11"
else
- x11_libs="-L$dir"
- case "$target" in
- *-kfreebsd*-gnu) x11_link="-L$dir -lX11";;
- *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
- *) x11_link="-L$dir -lX11";;
- esac
+ x11_libs="-L$dir ${COMPILER_RPATH_FLAG}$dir"
+ x11_link="-L$dir ${COMPILER_RPATH_FLAG}$dir -lX11"
fi
break
fi
done
fi
+fi # end of disable_x11 test
+
if test "x11_include" != "not found"; then
if test "$x11_include" = "-I/usr/include"; then
x11_include=""
|