]>
Commit | Line | Data |
---|---|---|
19c5af72 | 1 | dnl Process this file with autoconf to produce a configure script. |
5da9ce07 | 2 | sinclude(../common/aclocal.m4) |
a271d1d9 | 3 | AC_PREREQ(2.5)dnl |
8ad57737 JSC |
4 | AC_INIT(Makefile.in) |
5 | ||
e3d12c65 | 6 | SIM_AC_COMMON |
8ad57737 | 7 | |
50a2a691 | 8 | dnl Options available in this module |
64ed8b6a | 9 | SIM_AC_OPTION_INLINE() |
76a6247f | 10 | SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) |
50a2a691 AC |
11 | SIM_AC_OPTION_HOSTENDIAN |
12 | SIM_AC_OPTION_WARNINGS | |
13 | ||
4634263c | 14 | # DEPRECATED |
1a89994e AC |
15 | # |
16 | # Instead of defining a `subtarget' macro, code should be checking | |
17 | # the value of {STATE,CPU}_ARCHITECTURE to identify the architecture | |
18 | # in question. | |
19 | # | |
c476ac55 GRK |
20 | case "${target}" in |
21 | # start-sanitize-tx19 | |
ee562da4 | 22 | mips*tx19*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";; |
c476ac55 | 23 | # end-sanitize-tx19 |
3fa454e9 | 24 | mips*tx39*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";; |
c476ac55 GRK |
25 | *) SIM_SUBTARGET="";; |
26 | esac | |
27 | AC_SUBST(SIM_SUBTARGET) | |
28 | ||
18c64df6 | 29 | |
4634263c | 30 | |
18c64df6 AC |
31 | # |
32 | # Select the byte order of the target | |
33 | # | |
2d44e12a AC |
34 | mips_endian= |
35 | default_endian= | |
18c64df6 AC |
36 | case "${target}" in |
37 | # start-sanitize-tx19 | |
ee562da4 | 38 | mips*tx19*) default_endian=BIG_ENDIAN ;; |
18c64df6 AC |
39 | # end-sanitize-tx19 |
40 | # start-sanitize-r5900 | |
41 | mips64r59*-*-*) mips_endian=LITTLE_ENDIAN ;; | |
42 | # end-sanitize-r5900 | |
fda83b67 | 43 | mips64el*-*-*) mips_endian=LITTLE_ENDIAN ;; |
2d44e12a AC |
44 | mips64*-*-*) default_endian=BIG_ENDIAN ;; |
45 | mips16*-*-*) default_endian=BIG_ENDIAN ;; | |
46 | mips*-*-*) default_endian=BIG_ENDIAN ;; | |
47 | *) default_endian=BIG_ENDIAN ;; | |
18c64df6 | 48 | esac |
2d44e12a | 49 | SIM_AC_OPTION_ENDIAN($mips_endian,$default_endian) |
18c64df6 AC |
50 | |
51 | ||
4634263c | 52 | |
18c64df6 AC |
53 | # |
54 | # Select the bitsize of the target | |
55 | # | |
a48e8c8d | 56 | mips_addr_bitsize= |
18c64df6 AC |
57 | case "${target}" in |
58 | # start-sanitize-tx19 | |
ee562da4 | 59 | mips*tx19*) mips_bitsize=32 ; mips_msb=31 ;; |
18c64df6 AC |
60 | # end-sanitize-tx19 |
61 | # start-sanitize-r5900 | |
a48e8c8d | 62 | mips64r59*-*-*) mips_bitsize=64 ; mips_msb=63 ; mips_addr_bitsize=32;; |
18c64df6 | 63 | # end-sanitize-r5900 |
fda83b67 FCE |
64 | # start-sanitize-sky |
65 | mips64*-sky*-*) mips_bitsize=64 ; mips_msb=63 ; mips_addr_bitsize=32;; | |
66 | # end-sanitize-sky | |
18c64df6 AC |
67 | mips64*-*-*) mips_bitsize=64 ; mips_msb=63 ;; |
68 | mips16*-*-*) mips_bitsize=64 ; mips_msb=63 ;; | |
69 | mips*-*-*) mips_bitsize=32 ; mips_msb=31 ;; | |
70 | *) mips_bitsize=64 ; mips_msb=63 ;; | |
71 | esac | |
a48e8c8d | 72 | SIM_AC_OPTION_BITSIZE($mips_bitsize,$mips_msb,$mips_addr_bitsize) |
18c64df6 AC |
73 | |
74 | ||
4634263c | 75 | |
18c64df6 AC |
76 | # |
77 | # Select the floating hardware support of the target | |
78 | # | |
79 | mips_fpu=HARDWARE_FLOATING_POINT | |
37379a25 | 80 | mips_fpu_bitsize= |
18c64df6 AC |
81 | case "${target}" in |
82 | # start-sanitize-tx19 | |
ee562da4 | 83 | mips*tx19*) mips_fpu=SOFT_FLOATING_POINT ;; |
18c64df6 | 84 | # end-sanitize-tx19 |
3fa454e9 | 85 | mips*tx39*) mips_fpu=HARD_FLOATING_POINT |
37379a25 AC |
86 | mips_fpu_bitsize=32 |
87 | ;; | |
18c64df6 | 88 | # start-sanitize-r5900 |
a48e8c8d | 89 | mips64r59*-*-*) mips_fpu=HARD_FLOATING_POINT ; mips_fpu_bitsize=32 ;; |
18c64df6 | 90 | # end-sanitize-r5900 |
fda83b67 FCE |
91 | # start-sanitize-sky |
92 | mips64*-sky*-*) mips_fpu=HARD_FLOATING_POINT ; mips_fpu_bitsize=32 ;; | |
93 | # end-sanitize-sky | |
18c64df6 AC |
94 | mips64*-*-*) mips_fpu=HARD_FLOATING_POINT ;; |
95 | mips16*-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
55ad270f | 96 | mips*-*-*) mips_fpu=HARD_FLOATING_POINT ; mips_fpu_bitsize=32 ;; |
18c64df6 AC |
97 | *) mips_fpu=HARD_FLOATING_POINT ;; |
98 | esac | |
37379a25 | 99 | SIM_AC_OPTION_FLOAT($mips_fpu,$mips_fpu_bitsize) |
18c64df6 AC |
100 | |
101 | ||
4634263c | 102 | |
01737f42 AC |
103 | # |
104 | # Select the level of SMP support | |
105 | # | |
106 | case "${target}" in | |
107 | # start-sanitize-r5900 | |
108 | mips64r59*-*-*) mips_smp=1 ;; | |
109 | # end-sanitize-r5900 | |
110 | *) mips_smp=0 ;; | |
111 | esac | |
112 | SIM_AC_OPTION_SMP($mips_smp) | |
113 | ||
114 | ||
4634263c | 115 | |
122edc03 | 116 | # |
44b8585a | 117 | # Select the IGEN architecture |
122edc03 | 118 | # |
554eb429 | 119 | sim_gen=IGEN |
c02ed6a8 AC |
120 | sim_igen_machine="-M mipsIV" |
121 | sim_m16_machine="-M mips16" | |
44b8585a AC |
122 | sim_igen_filter="32,64,f" |
123 | sim_m16_filter="16" | |
122edc03 | 124 | case "${target}" in |
90ad43b2 | 125 | # start-sanitize-tx19 |
554eb429 | 126 | mips*tx19*) sim_gen=M16 |
c02ed6a8 AC |
127 | sim_igen_machine="-M tx19" |
128 | sim_m16_machine="-M tx19" | |
44b8585a AC |
129 | sim_igen_filter="32" |
130 | sim_m16_filter="16" | |
131 | ;; | |
90ad43b2 | 132 | # end-sanitize-tx19 |
554eb429 | 133 | mips*tx39*) sim_gen=IGEN |
37379a25 AC |
134 | sim_igen_filter="32,f" |
135 | sim_igen_machine="-M r3900" | |
136 | ;; | |
122edc03 | 137 | # start-sanitize-r5900 |
554eb429 | 138 | mips64r59*-*-*) sim_gen=IGEN |
c02ed6a8 | 139 | sim_igen_machine="-M r5900" |
44b8585a | 140 | ;; |
122edc03 | 141 | # end-sanitize-r5900 |
dd15abd5 | 142 | # start-sanitize-vr4320 |
554eb429 | 143 | mips64vr4320-*-*) sim_gen=IGEN |
dd15abd5 GRK |
144 | sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=vr4320" |
145 | ;; | |
146 | # end-sanitize-vr4320 | |
554eb429 | 147 | mips64vr43*-*-*) sim_gen=IGEN |
dd15abd5 GRK |
148 | sim_igen_machine="-M mipsIV" |
149 | # start-sanitize-vr4320 | |
150 | sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=mipsIV" | |
151 | # end-sanitize-vr4320 | |
152 | ;; | |
3d759c53 | 153 | # start-sanitize-cygnus |
554eb429 | 154 | mips64vr54*-*-*) sim_gen=IGEN |
c02ed6a8 | 155 | sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5400" |
44b8585a | 156 | ;; |
3d759c53 | 157 | # end-sanitize-cygnus |
554eb429 | 158 | mips64vr5*-*-*) sim_gen=IGEN |
c02ed6a8 | 159 | sim_igen_machine="-M vr5000" |
3d759c53 | 160 | # start-sanitize-cygnus |
255cbbf1 | 161 | sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5000" |
f23e93da | 162 | ;; |
57791952 | 163 | # end-sanitize-cygnus |
554eb429 | 164 | mips64vr41*) sim_gen=M16 |
57791952 AC |
165 | sim_igen_machine="-M vr4100,mips16" |
166 | sim_m16_machine="-M vr4100,mips16" | |
167 | sim_igen_filter="32,64,f" | |
168 | sim_m16_filter="16" | |
180d1f0b | 169 | ;; |
554eb429 AC |
170 | mips64*-*-*) sim_igen_filter="32,64,f" |
171 | sim_gen=IGEN | |
4634263c | 172 | ;; |
554eb429 | 173 | mips16*-*-*) sim_gen=M16 |
4634263c AC |
174 | sim_igen_filter="32,64,f" |
175 | sim_m16_filter="16" | |
44b8585a | 176 | ;; |
554eb429 | 177 | mips*lsi*) sim_gen=M16 |
a83d7d87 AC |
178 | sim_igen_machine="-M mipsIII,mips16" |
179 | sim_m16_machine="-M mips16,mipsIII" | |
180 | sim_igen_filter="32,f" | |
181 | sim_m16_filter="16" | |
d1cbd70a | 182 | ;; |
554eb429 | 183 | mips*-*-*) sim_gen=IGEN |
44b8585a | 184 | sim_igen_filter="32,f" |
44b8585a | 185 | ;; |
122edc03 | 186 | esac |
01737f42 AC |
187 | sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine} ${sim_igen_smp}" |
188 | sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine} ${sim_igen_smp}" | |
16bd5d6e AC |
189 | AC_SUBST(sim_igen_flags) |
190 | AC_SUBST(sim_m16_flags) | |
44b8585a AC |
191 | AC_SUBST(sim_gen) |
192 | ||
193 | ||
f872d0d6 | 194 | # |
3fa454e9 FCE |
195 | # Add simulated hardware devices |
196 | # | |
f872d0d6 | 197 | hw_enabled=no |
3fa454e9 | 198 | case "${target}" in |
36e838d1 FCE |
199 | # start-sanitize-tx3904 |
200 | mips*tx39*) | |
201 | hw_enabled=yes | |
202 | hw_extra_devices="tx3904cpu tx3904irc tx3904tmr tx3904sio" | |
203 | mips_extra_objs="dv-sockser.o" | |
204 | SIM_SUBTARGET="$SIM_SUBTARGET -DTARGET_TX3904=1" | |
205 | ;; | |
206 | # end-sanitize-tx3904 | |
207 | # start-sanitize-sky | |
208 | mips64r59*-sky-*) | |
fda83b67 | 209 | mips_extra_objs='$(SIM_SKY_OBJS)' |
36e838d1 FCE |
210 | SIM_SUBTARGET="-DTARGET_SKY -DWITH_DEVICES=1 -DDEVICE_INIT=1" |
211 | ;; | |
fda83b67 FCE |
212 | mips64*-skyb-*) |
213 | mips_extra_objs='$(SIM_SKY_OBJS)' | |
214 | SIM_SUBTARGET="-DTARGET_SKY -DTARGET_SKY_B -DWITH_DEVICES=1 -DDEVICE_INIT=1" | |
215 | ;; | |
36e838d1 FCE |
216 | # end-sanitize-sky |
217 | *) | |
218 | mips_extra_objs="" | |
219 | ;; | |
3fa454e9 | 220 | esac |
f872d0d6 | 221 | SIM_AC_OPTION_HARDWARE($hw_enabled,$hw_devices,$hw_extra_devices) |
36e838d1 | 222 | AC_SUBST(mips_extra_objs) |
3fa454e9 FCE |
223 | |
224 | ||
fda83b67 FCE |
225 | # Choose simulator engine |
226 | case "${target}" in | |
227 | # start-sanitize-sky | |
228 | mips64r59*-sky-*) | |
229 | mips_igen_engine="" | |
230 | ;; | |
231 | mips64*-skyb-*) | |
232 | mips_igen_engine="" | |
233 | ;; | |
234 | # end-sanitize-sky | |
235 | *) mips_igen_engine="engine.o" | |
236 | ;; | |
237 | esac | |
238 | AC_SUBST(mips_igen_engine) | |
239 | ||
240 | ||
9b23b76d FCE |
241 | AC_PATH_X |
242 | mips_extra_libs="" | |
243 | # start-sanitize-sky | |
244 | # Enable GPU2 library | |
245 | AC_ARG_WITH(sim-gpu2, | |
246 | [ --with-sim-gpu2=path Use GPU2 library under given directory], | |
247 | [if test -d "${withval}" | |
248 | then | |
249 | SIM_SUBTARGET="${SIM_SUBTARGET} -DSKY_GPU2 -I${withval}/include" | |
f915cc91 | 250 | mips_extra_libs="-L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext" |
fda83b67 FCE |
251 | WITH_GPU2="yes" ; export WITH_GPU2 |
252 | ||
253 | # complex X/etc. detection; stolen shamelessly from tcl/tk/gdb configury. --angela | |
254 | ||
255 | #-------------------------------------------------------------------- | |
256 | # Locate the X11 header files and the X11 library archive. Try | |
257 | # the ac_path_x macro first, but if it doesn't find the X stuff | |
258 | # (e.g. because there's no xmkmf program) then check through | |
259 | # a list of possible directories. Under some conditions the | |
260 | # autoconf macro will return an include directory that contains | |
261 | # no include files, so double-check its result just to be safe. | |
262 | #-------------------------------------------------------------------- | |
263 | ||
264 | AC_PATH_X | |
265 | not_really_there="" | |
266 | if test "$no_x" = ""; then | |
267 | if test "$x_includes" = ""; then | |
268 | AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes") | |
269 | else | |
270 | if test ! -r $x_includes/X11/Intrinsic.h; then | |
271 | not_really_there="yes" | |
272 | fi | |
273 | fi | |
274 | fi | |
275 | if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then | |
276 | AC_MSG_CHECKING(for X11 header files) | |
277 | XINCLUDES="# no special path needed" | |
278 | AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope") | |
279 | if test "$XINCLUDES" = nope; then | |
280 | dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" | |
281 | for i in $dirs ; do | |
282 | if test -r $i/X11/Intrinsic.h; then | |
283 | AC_MSG_RESULT($i) | |
284 | XINCLUDES=" -I$i" | |
285 | break | |
286 | fi | |
287 | done | |
288 | fi | |
289 | else | |
290 | if test "$x_includes" != ""; then | |
291 | XINCLUDES=-I$x_includes | |
292 | else | |
293 | XINCLUDES="# no special path needed" | |
294 | fi | |
295 | fi | |
296 | if test "$XINCLUDES" = nope; then | |
297 | AC_MSG_RESULT(couldn't find any!) | |
298 | XINCLUDES="# no include files found" | |
299 | fi | |
300 | ||
301 | if test "$no_x" = yes; then | |
302 | AC_MSG_CHECKING(for X11 libraries) | |
303 | XLIBSW=nope | |
304 | dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" | |
305 | for i in $dirs ; do | |
306 | if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then | |
307 | AC_MSG_RESULT($i) | |
308 | XLIBSW="-L$i -lX11" | |
309 | x_libraries="$i" | |
310 | break | |
311 | fi | |
312 | done | |
313 | else | |
314 | if test "$x_libraries" = ""; then | |
315 | XLIBSW=-lX11 | |
316 | else | |
317 | XLIBSW="-L$x_libraries -lX11" | |
318 | fi | |
319 | fi | |
320 | if test "$XLIBSW" = nope ; then | |
321 | AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) | |
322 | fi | |
323 | if test "$XLIBSW" = nope ; then | |
324 | AC_MSG_RESULT(couldn't find any! Using -lX11.) | |
325 | XLIBSW=-lX11 | |
326 | fi | |
327 | ||
328 | #-------------------------------------------------------------------- | |
329 | # Various manipulations on the search path used at runtime to | |
330 | # find shared libraries: | |
331 | # 1. If the X library binaries are in a non-standard directory, | |
332 | # add the X library location into that search path. | |
333 | # 2. On systems such as AIX and Ultrix that use "-L" as the | |
334 | # search path option, colons cannot be used to separate | |
335 | # directories from each other. Change colons to " -L". | |
336 | # 3. Create two sets of search flags, one for use in cc lines | |
337 | # and the other for when the linker is invoked directly. In | |
338 | # the second case, '-Wl,' must be stripped off and commas must | |
339 | # be replaced by spaces. | |
340 | #-------------------------------------------------------------------- | |
341 | ||
342 | # | |
343 | # CYGNUS LOCAL: statically link on Solaris, HPUX & SunOS so that | |
344 | # we don't have problems with people not having libraries | |
345 | # installed or not having LD_LIBRARY_PATH set. | |
346 | # | |
347 | ||
348 | case "$host" in | |
349 | # | |
350 | # gdb linked statically w/ Solaris iff GCC and GNU ld are used, | |
351 | # otherwise dynamic | |
352 | # | |
353 | sparc-sun-solaris2*) | |
354 | sol_xlibsw= | |
355 | if test "x$GCC" = "xyes" ; then | |
356 | # This is probably the simplest way to test for GNU ld. | |
357 | # It only works with relatively recent versions of GNU | |
358 | # ld. | |
359 | gld_text=`$CC -Wl,--version 2>&1 | sed 1q` | |
360 | case "$gld_text" in | |
361 | GNU* | *BFD*) | |
362 | # Why do we link against libX11 twice? Because the | |
363 | # Openwin X11 and Xext libraries are seriously broken. | |
364 | sol_xlibsw="-Wl,-Bstatic $XLIBSW -lXext -lX11 -Wl,-Bdynamic" | |
365 | ;; | |
366 | esac | |
367 | fi | |
368 | if test -z "$sol_xlibsw"; then | |
369 | if test "x$x_libraries" != "x"; then | |
370 | XLIBSW="$XLIBSW -R$x_libraries" | |
371 | fi | |
372 | else | |
373 | XLIBSW=$sol_xlibsw | |
374 | suppress_enable_shared=yes | |
375 | fi | |
376 | ;; | |
377 | # | |
378 | # gdb linked statically w/ SunOS or HPUX | |
379 | # | |
380 | m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*) | |
381 | if test "x$x_libraries" != "x" ; | |
382 | then | |
383 | XLIBSW="$x_libraries/libX11.a" | |
384 | else | |
385 | XLIBSW="/usr/lib/libX11.a" | |
386 | fi | |
387 | suppress_enable_shared=yes | |
388 | ;; | |
389 | # | |
390 | # default is to link dynamically | |
391 | # | |
392 | *) | |
393 | ;; | |
394 | esac | |
395 | # | |
396 | # END CYGNUS LOCAL | |
397 | ||
398 | ||
399 | #-------------------------------------------------------------------- | |
400 | # Check for the existence of various libraries. The order here | |
401 | # is important, so that then end up in the right order in the | |
402 | # command line generated by make. The -lsocket and -lnsl libraries | |
403 | # require a couple of special tricks: | |
404 | # 1. Use "connect" and "accept" to check for -lsocket, and | |
405 | # "gethostbyname" to check for -lnsl. | |
406 | # 2. Use each function name only once: can't redo a check because | |
407 | # autoconf caches the results of the last check and won't redo it. | |
408 | # 3. Use -lnsl and -lsocket only if they supply procedures that | |
409 | # aren't already present in the normal libraries. This is because | |
410 | # IRIX 5.2 has libraries, but they aren't needed and they're | |
411 | # bogus: they goof up name resolution if used. | |
412 | # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. | |
413 | # To get around this problem, check for both libraries together | |
414 | # if -lsocket doesn't work by itself. | |
415 | #-------------------------------------------------------------------- | |
416 | ||
417 | AC_CHECK_LIB(Xbsd, main, [SOCKLIBSW="$SOCKLIBSW -lXbsd"]) | |
418 | ||
419 | # CYGNUS LOCAL: Store any socket library(ies) in the cache, and don't | |
420 | # mess up the cache values of the functions we check for. | |
421 | AC_CACHE_CHECK([for socket libraries], sim_cv_lib_sockets, | |
422 | [sim_cv_lib_sockets= | |
423 | sim_checkBoth=0 | |
424 | unset ac_cv_func_connect | |
425 | AC_CHECK_FUNC(connect, sim_checkSocket=0, sim_checkSocket=1) | |
426 | if test "$sim_checkSocket" = 1; then | |
427 | unset ac_cv_func_connect | |
428 | AC_CHECK_LIB(socket, main, sim_cv_lib_sockets="-lsocket", | |
429 | sim_checkBoth=1) | |
430 | fi | |
431 | if test "$sim_checkBoth" = 1; then | |
432 | sim_oldLibs=$SOCKLIBSW | |
433 | SOCKLIBSW="$SOCKLIBSW -lsocket -lnsl" | |
434 | unset ac_cv_func_accept | |
435 | AC_CHECK_FUNC(accept, | |
436 | [sim_checkNsl=0 | |
437 | sim_cv_lib_sockets="-lsocket -lnsl"]) | |
438 | unset ac_cv_func_accept | |
439 | SOCKLIBSW=$sim_oldLibs | |
440 | fi | |
441 | unset ac_cv_func_gethostbyname | |
442 | sim_oldLibs=$SOCKLIBSW | |
443 | SOCKLIBSW="$SOCKLIBSW $sim_cv_lib_sockets" | |
444 | AC_CHECK_FUNC(gethostbyname, , | |
445 | [AC_CHECK_LIB(nsl, main, | |
446 | [sim_cv_lib_sockets="$sim_cv_lib_sockets -lnsl"])]) | |
447 | unset ac_cv_func_gethostbyname | |
448 | SOCKLIBSW=$sim_oldSOCKLIBSW | |
449 | ]) | |
450 | test -z "$sim_cv_lib_sockets" || SOCKLIBSW="$SOCKLIBSW $sim_cv_lib_sockets" | |
451 | ||
452 | mips_extra_libs="-L${withval}/lib -lgpu2 -lm $XLIBSW $SOCKLIBSW" | |
453 | cat > simConfig.sh << --EOF-- | |
454 | mips_extra_libs="$mips_extra_libs" | |
455 | --EOF-- | |
456 | ||
9b23b76d FCE |
457 | else |
458 | AC_MSG_ERROR("Directory ${withval} does not exist."); | |
459 | fi])dnl | |
fda83b67 FCE |
460 | |
461 | ||
3e5fbf91 JL |
462 | # Enable target accurate FP library |
463 | AC_ARG_WITH(sim-funit, | |
464 | [ --with-sim-funit=path Use target FP library under given directory], | |
465 | [if test -d "${withval}" | |
466 | then | |
467 | SIM_SUBTARGET="${SIM_SUBTARGET} -DSKY_FUNIT -I${withval}/include" | |
468 | mips_extra_libs="${mips_extra_libs} -L${withval}/lib -lfunit" | |
469 | else | |
470 | AC_MSG_ERROR("Directory ${withval} does not exist."); | |
471 | fi])dnl | |
9b23b76d FCE |
472 | # end-sanitize-sky |
473 | AC_SUBST(mips_extra_libs) | |
474 | ||
50a2a691 | 475 | AC_CHECK_HEADERS(string.h strings.h stdlib.h stdlib.h) |
4fa134be | 476 | AC_CHECK_LIB(m, fabs) |
617c07c6 | 477 | AC_CHECK_FUNCS(aint anint sqrt) |
4fa134be | 478 | |
e3d12c65 | 479 | SIM_AC_OUTPUT |