OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [sim/] [ppc/] [configure.in] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
dnl Process this file with autoconf to produce a configure script.
2
sinclude(../common/aclocal.m4)
3
AC_PREREQ(2.5)dnl
4
AC_INIT(Makefile.in)
5
 
6
AC_PROG_INSTALL
7
AC_PROG_CC
8
 
9
# Put a plausible default for CC_FOR_BUILD in Makefile.
10
if test "x$cross_compiling" = "xno"; then
11
  CC_FOR_BUILD='$(CC)'
12
else
13
  CC_FOR_BUILD=gcc
14
fi
15
 
16
dnl We don't use gettext, but bfd does.  So we do the appropriate checks
17
dnl to see if there are intl libraries we should link against.
18
ALL_LINGUAS=
19
CY_GNU_GETTEXT
20
 
21
 
22
AC_ARG_ENABLE(sim-alignment,
23
[  --enable-sim-alignment=align         Specify strict or nonstrict alignment.],
24
[case "${enableval}" in
25
  yes | strict | STRICT)        sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
26
  no | nonstrict | NONSTRICT)   sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
27
 
28
  *)                            AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";;
29
esac
30
if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
31
  echo "Setting alignment flags = $sim_alignment" 6>&1
32
fi],[sim_alignment=""])dnl
33
 
34
 
35
AC_ARG_ENABLE(sim-assert,
36
[  --enable-sim-assert                  Specify whether to perform random assertions.],
37
[case "${enableval}" in
38
  yes)  sim_assert="-DWITH_ASSERT=1";;
39
  no)   sim_assert="-DWITH_ASSERT=0";;
40
  *)    AC_MSG_ERROR("--enable-sim-assert does not take a value"); sim_assert="";;
41
esac
42
if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then
43
  echo "Setting assert flags = $sim_assert" 6>&1
44
fi],[sim_assert=""])dnl
45
 
46
 
47
AC_ARG_ENABLE(sim-bitsize,
48
[  --enable-sim-bitsize=n               Specify target bitsize (32 or 64).],
49
[case "${enableval}" in
50
  32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
51
  *)     AC_MSG_ERROR("--enable-sim-bitsize was given $enableval.  Expected 32 or 64"); sim_bitsize="";;
52
esac
53
if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
54
  echo "Setting bitsize flags = $sim_bitsize" 6>&1
55
fi],[sim_bitsize=""])dnl
56
 
57
 
58
AC_ARG_ENABLE(sim-bswap,
59
[  --enable-sim-bswap                   Use the BSWAP instruction on Intel 486s and Pentiums.],
60
[case "${enableval}" in
61
  yes)  sim_bswap="-DWITH_BSWAP=1";;
62
  no)   sim_bswap="-DWITH_BSWAP=0";;
63
  *)    AC_MSG_ERROR("--enable-sim-bswap does not take a value"); sim_bswap="";;
64
esac
65
if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
66
  echo "Setting bswap flags = $sim_bswap" 6>&1
67
fi],[sim_bswap=""])dnl
68
 
69
 
70
AC_ARG_ENABLE(sim-cflags,
71
[  --enable-sim-cflags=opts             Extra CFLAGS for use in building simulator],
72
[case "${enableval}" in
73
  yes)  sim_cflags="-O2 -fomit-frame-pointer";;
74
  no)   sim_cflags="";;
75
  *)    sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
76
esac
77
if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
78
  echo "Setting sim cflags = $sim_cflags" 6>&1
79
fi],[sim_cflags=""])dnl
80
 
81
 
82
AC_ARG_ENABLE(sim-config,
83
[  --enable-sim-config=file             Override default config file],
84
[case "${enableval}" in
85
  yes|no)       AC_MSG_ERROR("No value supplied for --enable-sim-config=file");;
86
  *)            if test -f "${srcdir}/${enableval}"; then
87
                  sim_config="${enableval}";
88
                elif test -f "${srcdir}/${enableval}-config.h"; then
89
                  sim_config="${enableval}-config.h"
90
                else
91
                  AC_MSG_ERROR("Config file $enableval was not found");
92
                  sim_config=std-config.h
93
                fi;;
94
esac
95
if test x"$silent" != x"yes" && test x"$sim_config" != x""; then
96
  echo "Setting config flags = $sim_config" 6>&1
97
fi],[sim_config="std-config.h"
98
if test x"$silent" != x"yes"; then
99
  echo "Setting config flags = $sim_config" 6>&1
100
fi])dnl
101
 
102
 
103
AC_ARG_ENABLE(sim-decode-mechanism,
104
[  --enable-sim-decode-mechanism=which          Specify the instruction decode mechanism.],
105
[case "${enableval}" in
106
  yes|no)       AC_MSG_ERROR("No value supplied for --enable-sim-decode-mechanism=file");;
107
  array|switch|padded-switch|goto-switch)       sim_decode_mechanism="-T ${enableval}";;
108
  *)            AC_MSG_ERROR("File $enableval is not an opcode rules file");
109
                sim_decode_mechanism="switch";;
110
esac
111
if test x"$silent" != x"yes" && test x"$sim_decode_mechanism" != x""; then
112
  echo "Setting decode mechanism flags = $sim_decode_mechanism" 6>&1
113
fi],[sim_decode_mechanism=""
114
if test x"$silent" != x"yes"; then
115
  echo "Setting decode mechanism flags = $sim_decode_mechanism"
116
fi])dnl
117
 
118
 
119
AC_ARG_ENABLE(sim-default-model,
120
[  --enable-sim-default-model=which     Specify default PowerPC to model.],
121
[case "${enableval}" in
122
  yes|no)       AC_MSG_ERROR("No value supplied for --enable-sim-default-model=model");;
123
  *)            sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";;
124
esac
125
if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
126
  echo "Setting default-model flags = $sim_default_model" 6>&1
127
fi],[sim_default_model=""])dnl
128
 
129
 
130
AC_ARG_ENABLE(sim-duplicate,
131
[  --enable-sim-duplicate               Expand (duplicate) semantic functions.],
132
[case "${enableval}" in
133
  yes)  sim_dup="-E";;
134
  no)   sim_dup="";;
135
  *)    AC_MSG_ERROR("--enable-sim-duplicate does not take a value"); sim_dup="";;
136
esac
137
if test x"$silent" != x"yes" && test x"$sim_dup" != x""; then
138
  echo "Setting duplicate flags = $sim_dup" 6>&1
139
fi],[sim_dup="-E"
140
if test x"$silent" != x"yes"; then
141
  echo "Setting duplicate flags = $sim_dup" 6>&1
142
fi])dnl
143
 
144
 
145
AC_ARG_ENABLE(sim-endian,
146
[  --enable-sim-endian=endian           Specify target byte endian orientation.],
147
[case "${enableval}" in
148
  yes)  case "$target" in
149
          *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
150
          *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
151
          *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
152
        esac;;
153
  no)    sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
154
  b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
155
  l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
156
  *)     AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian"); sim_endian="";;
157
esac
158
if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
159
  echo "Setting endian flags = $sim_endian" 6>&1
160
fi],[sim_endian=""])dnl
161
 
162
 
163
AC_ARG_ENABLE(sim-env,
164
[  --enable-sim-env=env                 Specify target environment (operating, virtual, user).],
165
[case "${enableval}" in
166
  operating | os | oea) sim_env="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
167
  virtual | vea)        sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
168
  user | uea)           sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
169
  no)                   sim_env="-DWITH_ENVIRONMENT=0";;
170
  *)                    AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-env"); sim_env="";;
171
esac
172
if test x"$silent" != x"yes" && test x"$sim_env" != x""; then
173
  echo "Setting env flags = $sim_env" 6>&1
174
fi],[sim_env=""])dnl
175
 
176
 
177
AC_ARG_ENABLE(sim-filter,
178
[  --enable-sim-filter=rule             Specify filter rules.],
179
[case "${enableval}" in
180
  yes)  AC_MSG_ERROR("--enable-sim-filter must be specified with a rule to filter or no"); sim_filter="";;
181
  no)   sim_filter="";;
182
  *)    sim_filter="-F $enableval";;
183
esac
184
if test x"$silent" != x"yes" && test x"$sim_filter" != x""; then
185
  echo "Setting filter flags = $sim_filter" 6>&1
186
fi],[sim_filter="-F 32,f,o"
187
if test x"$silent" != x"yes"; then
188
  echo "Setting filter flags = $sim_filter" 6>&1
189
fi])dnl
190
 
191
 
192
AC_ARG_ENABLE(sim-float,
193
[  --enable-sim-float                   Specify whether to use host floating point or simulate.],
194
[case "${enableval}" in
195
  yes | hard)   sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
196
  no | soft)    sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
197
  *)            AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";;
198
esac
199
if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
200
  echo "Setting float flags = $sim_float" 6>&1
201
fi],[sim_float=""])dnl
202
 
203
 
204
AC_ARG_ENABLE(sim-hardware,
205
[  --enable-sim-hardware=list           Specify the hardware to be included in the build.],
206
[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide"
207
case "${enableval}" in
208
  yes)  ;;
209
  no)   AC_MSG_ERROR("List of hardware must be specified for --enable-sim-hardware"); hardware="";;
210
  ,*)   hardware="${hardware}${enableval}";;
211
  *,)   hardware="${enableval}${hardware}";;
212
  *)    hardware="${enableval}"'';;
213
esac
214
sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
215
sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
216
if test x"$silent" != x"yes" && test x"$hardware" != x""; then
217
  echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
218
fi],[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide"
219
sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
220
sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
221
if test x"$silent" != x"yes"; then
222
  echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
223
fi])dnl
224
 
225
 
226
AC_ARG_ENABLE(sim-hostbitsize,
227
[  --enable-sim-hostbitsize=32|64       Specify host bitsize (32 or 64).],
228
[case "${enableval}" in
229
  32|64) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";;
230
  *)     AC_MSG_ERROR("--enable-sim-hostbitsize was given $enableval.  Expected 32 or 64"); sim_hostbitsize="";;
231
esac
232
if test x"$silent" != x"yes" && test x"$sim_hostbitsize" != x""; then
233
  echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1
234
fi],[sim_hostbitsize=""])dnl
235
 
236
 
237
AC_ARG_ENABLE(sim-hostendian,
238
[  --enable-sim-hostendian=end          Specify host byte endian orientation.],
239
[case "${enableval}" in
240
  no)    sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
241
  b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
242
  l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
243
  *)     AC_MSG_ERROR("Unknown value $enableval for --enable-sim-hostendian"); sim_hostendian="";;
244
esac
245
if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
246
  echo "Setting hostendian flags = $sim_hostendian" 6>&1
247
fi],[
248
if test "x$cross_compiling" = "xno"; then
249
  AC_C_BIGENDIAN
250
  if test $ac_cv_c_bigendian = yes; then
251
    sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
252
  else
253
    sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
254
  fi
255
else
256
  sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
257
fi])dnl
258
 
259
 
260
AC_ARG_ENABLE(sim-icache,
261
[  --enable-sim-icache=size             Specify instruction-decode cache size and type.],
262
[icache="-R"
263
 case "${enableval}" in
264
  yes)          icache="1024"; sim_icache="-I $icache";;
265
  no)           sim_icache="-R";;
266
  *) icache=1024
267
     sim_icache="-"
268
     for x in `echo "${enableval}" | sed -e "s/,/ /g"`; do
269
       case "$x" in
270
         define)        sim_icache="${sim_icache}R";;
271
         semantic)      sim_icache="${sim_icache}C";;
272
         insn)          sim_icache="${sim_icache}S";;
273
         0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) icache=$x;;
274
         *)             AC_MSG_ERROR("Unknown value $x for --enable-sim-icache"); sim_icache="";;
275
       esac
276
     done
277
     sim_icache="${sim_icache}I $icache";;
278
esac
279
if test x"$silent" != x"yes" && test x"$icache" != x""; then
280
  echo "Setting instruction cache size to $icache ($sim_icache)"
281
fi],[sim_icache="-CSRI 1024"
282
if test x"$silent" != x"yes"; then
283
  echo "Setting instruction cache size to 1024 ($sim_icache)"
284
fi])dnl
285
 
286
 
287
AC_ARG_ENABLE(sim-inline,
288
[  --enable-sim-inline=inlines          Specify which functions should be inlined.],
289
[sim_inline=""
290
case "$enableval" in
291
  no)           sim_inline="-DDEFAULT_INLINE=0";;
292
  0)            sim_inline="-DDEFAULT_INLINE=0";;
293
  yes | 2)      sim_inline="-DDEFAULT_INLINE=ALL_INLINE";;
294
  1)            sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
295
  *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
296
       new_flag=""
297
       case "$x" in
298
         *_INLINE=*)    new_flag="-D$x";;
299
         *=*)           new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
300
         *_INLINE)      new_flag="-D$x=ALL_INLINE";;
301
         *)             new_flag="-D$x""_INLINE=ALL_INLINE";;
302
       esac
303
       if test x"$sim_inline" = x""; then
304
         sim_inline="$new_flag"
305
       else
306
         sim_inline="$sim_inline $new_flag"
307
       fi
308
     done;;
309
esac
310
if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
311
  echo "Setting inline flags = $sim_inline" 6>&1
312
fi],[if test x"$GCC" != ""; then
313
  sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS"
314
  if test x"$silent" != x"yes"; then
315
    echo "Setting inline flags = $sim_inline" 6>&1
316
  fi
317
else
318
  sim_inline=""
319
fi])dnl
320
 
321
 
322
AC_ARG_ENABLE(sim-jump,
323
[  --enable-sim-jump            Jump between semantic code (instead of call/return).],
324
[case "${enableval}" in
325
  yes)  sim_jump="-J";;
326
  no)   sim_jump="";;
327
  *)    AC_MSG_ERROR("--enable-sim-jump does not take a value"); sim_jump="";;
328
esac
329
if test x"$silent" != x"yes" && test x"$sim_jump" != x""; then
330
  echo "Setting jump flag = $sim_jump" 6>&1
331
fi],[sim_jump=""
332
if test x"$silent" != x"yes"; then
333
  echo "Setting jump flag = $sim_jump" 6>&1
334
fi])dnl
335
 
336
 
337
AC_ARG_ENABLE(sim-line-nr,
338
[  --enable-sim-line-nr=opts            Generate extra CPP code that references source rather than generated code],
339
[case "${enableval}" in
340
  yes)  sim_line_nr="";;
341
  no)   sim_line_nr="-L";;
342
  *)    AC_MSG_ERROR("--enable-sim-line-nr does not take a value"); sim_line_nr="";;
343
esac
344
if test x"$silent" != x"yes" && test x"$sim_line_nr" != x""; then
345
  echo "Setting warning flags = $sim_line_nr" 6>&1
346
fi],[sim_line_nr=""])dnl
347
 
348
 
349
AC_ARG_ENABLE(sim-model,
350
[  --enable-sim-model=which             Specify PowerPC to model.],
351
[case "${enableval}" in
352
  yes|no)       AC_MSG_ERROR("No value supplied for --enable-sim-model=model");;
353
  *)            sim_model="-DWITH_MODEL=${enableval}";;
354
esac
355
if test x"$silent" != x"yes" && test x"$sim_model" != x""; then
356
  echo "Setting model flags = $sim_model" 6>&1
357
fi],[sim_model=""])dnl
358
 
359
 
360
AC_ARG_ENABLE(sim-model-issue,
361
[  --enable-sim-model-issue             Specify whether to simulate model specific actions],
362
[case "${enableval}" in
363
  yes)  sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";;
364
  no)   sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";;
365
  *)    AC_MSG_ERROR("--enable-sim-model-issue does not take a value"); sim_model_issue="";;
366
esac
367
if test x"$silent" != x"yes"; then
368
  echo "Setting model-issue flags = $sim_model_issue" 6>&1
369
fi],[sim_model_issue=""])dnl
370
 
371
 
372
AC_ARG_ENABLE(sim-monitor,
373
[  --enable-sim-monitor=mon             Specify whether to enable monitoring events.],
374
[case "${enableval}" in
375
  yes)          sim_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
376
  no)           sim_monitor="-DWITH_MON=0";;
377
  instruction)  sim_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
378
  memory)       sim_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
379
  *)            AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-mon"); sim_env="";;
380
esac
381
if test x"$silent" != x"yes" && test x"$sim_monitor" != x""; then
382
  echo "Setting monitor flags = $sim_monitor" 6>&1
383
fi],[sim_monitor=""])dnl
384
 
385
 
386
AC_ARG_ENABLE(sim-opcode,
387
[  --enable-sim-opcode=which            Override default opcode lookup.],
388
[case "${enableval}" in
389
  yes|no)       AC_MSG_ERROR("No value supplied for --enable-sim-opcode=file");;
390
  *)            if test -f "${srcdir}/${enableval}"; then
391
                  sim_opcode="${enableval}"
392
                elif test -f "${srcdir}/dc-${enableval}"; then
393
                  sim_opcode="dc-${enableval}"
394
                else
395
                  AC_MSG_ERROR("File $enableval is not an opcode rules file");
396
                  sim_opcode="dc-complex"
397
                fi;;
398
esac
399
if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then
400
  echo "Setting opcode flags = $sim_opcode" 6>&1
401
fi],[sim_opcode="dc-complex"
402
if test x"$silent" != x"yes"; then
403
  echo "Setting opcode flags = $sim_opcode"
404
fi])dnl
405
 
406
 
407
AC_ARG_ENABLE(sim-packages,
408
[  --enable-sim-packages=list           Specify the packages to be included in the build.],
409
[packages=disklabel
410
case "${enableval}" in
411
  yes)  ;;
412
  no)   AC_MSG_ERROR("List of packages must be specified for --enable-sim-packages"); packages="";;
413
  ,*)   packages="${packages}${enableval}";;
414
  *,)   packages="${enableval}${packages}";;
415
  *)    packages="${enableval}"'';;
416
esac
417
sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'`
418
sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'`
419
if test x"$silent" != x"yes" && test x"$packages" != x""; then
420
  echo "Setting packages to $sim_pk_src, $sim_pk_obj"
421
fi],[packages=disklabel
422
sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'`
423
sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'`
424
if test x"$silent" != x"yes"; then
425
  echo "Setting packages to $sim_pk_src, $sim_pk_obj"
426
fi])dnl
427
 
428
 
429
AC_ARG_ENABLE(sim-regparm,
430
[  --enable-sim-regparm=nr-parm         Pass parameters in registers instead of on the stack - x86/GCC specific.],
431
[case "${enableval}" in
432
  0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) sim_regparm="-DWITH_REGPARM=${enableval}";;
433
  no)                            sim_regparm="" ;;
434
  yes)                           sim_regparm="-DWITH_REGPARM=3";;
435
  *)   AC_MSG_ERROR("Unknown value $enableval for --enable-sim-regparm"); sim_regparm="";;
436
esac
437
if test x"$silent" != x"yes" && test x"$sim_regparm" != x""; then
438
  echo "Setting regparm flags = $sim_regparm" 6>&1
439
fi],[sim_regparm=""])dnl
440
 
441
 
442
AC_ARG_ENABLE(sim-reserved-bits,
443
[  --enable-sim-reserved-bits           Specify whether to check reserved bits in instruction.],
444
[case "${enableval}" in
445
  yes)  sim_reserved="-DWITH_RESERVED_BITS=1";;
446
  no)   sim_reserved="-DWITH_RESERVED_BITS=0";;
447
  *)    AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value"); sim_reserved="";;
448
esac
449
if test x"$silent" != x"yes" && test x"$sim_reserved" != x""; then
450
  echo "Setting reserved flags = $sim_reserved" 6>&1
451
fi],[sim_reserved=""])dnl
452
 
453
 
454
AC_ARG_ENABLE(sim-smp,
455
[  --enable-sim-smp=n                   Specify number of processors to configure for.],
456
[case "${enableval}" in
457
  yes)  sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";;
458
  no)   sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";;
459
  *)    sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";;
460
esac
461
if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then
462
  echo "Setting smp flags = $sim_smp" 6>&1
463
fi],[sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5"
464
if test x"$silent" != x"yes"; then
465
  echo "Setting smp flags = $sim_smp" 6>&1
466
fi])dnl
467
 
468
 
469
AC_ARG_ENABLE(sim-stdcall,
470
[  --enable-sim-stdcall=type            Use an alternative function call/return mechanism - x86/GCC specific.],
471
[case "${enableval}" in
472
  no)           sim_stdcall="" ;;
473
  std*)         sim_stdcall="-DWITH_STDCALL=1";;
474
  yes)          sim_stdcall="-DWITH_STDCALL=1";;
475
  *)   AC_MSG_ERROR("Unknown value $enableval for --enable-sim-stdcall"); sim_stdcall="";;
476
esac
477
if test x"$silent" != x"yes" && test x"$sim_stdcall" != x""; then
478
  echo "Setting function call flags = $sim_stdcall" 6>&1
479
fi],[sim_stdcall=""])dnl
480
 
481
 
482
AC_ARG_ENABLE(sim-stdio,
483
[  --enable-sim-stdio                   Specify whether to use stdio for console input/output.],
484
[case "${enableval}" in
485
  yes)  sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
486
  no)   sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
487
  *)    AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-stdio"); sim_stdio="";;
488
esac
489
if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
490
  echo "Setting stdio flags = $sim_stdio" 6>&1
491
fi],[sim_stdio=""])dnl
492
 
493
 
494
AC_ARG_ENABLE(sim-switch,
495
[  --enable-sim-switch                  Use a switch instead of a table for instruction call.],
496
[case "${enableval}" in
497
  yes)  sim_switch="-s";;
498
  no)   sim_switch="";;
499
  *)    AC_MSG_ERROR("--enable-sim-switch does not take a value"); sim_switch="";;
500
esac
501
if test x"$silent" != x"yes" && test x"$sim_switch" != x""; then
502
  echo "Setting switch flags = $sim_switch" 6>&1
503
fi],[sim_switch="";
504
if test x"$silent" != x"yes"; then
505
  echo "Setting switch flags = $sim_switch" 6>&1
506
fi])dnl
507
 
508
 
509
AC_ARG_ENABLE(sim-timebase,
510
[  --enable-sim-timebase                        Specify whether the PPC timebase is supported.],
511
[case "${enableval}" in
512
  yes)  sim_timebase="-DWITH_TIME_BASE=1";;
513
  no)   sim_timebase="-DWITH_TIME_BASE=0";;
514
  *)    AC_MSG_ERROR("--enable-sim-timebase does not take a value"); sim_timebase="";;
515
esac
516
if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then
517
  echo "Setting timebase flags = $sim_timebase" 6>&1
518
fi],[sim_timebase=""])dnl
519
 
520
 
521
AC_ARG_ENABLE(sim-trace,
522
[  --enable-sim-trace                   Specify whether tracing is supported.],
523
[case "${enableval}" in
524
  yes)  sim_trace="-DWITH_TRACE=1";;
525
  no)   sim_trace="-DWITH_TRACE=0";;
526
  *)    AC_MSG_ERROR("--enable-sim-trace does not take a value"); sim_trace="";;
527
esac
528
if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
529
  echo "Setting trace flags = $sim_trace" 6>&1
530
fi],[sim_trace=""])dnl
531
 
532
 
533
AC_ARG_ENABLE(sim-warnings,
534
[  --enable-sim-warnings=opts           Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o],
535
[case "${enableval}" in
536
  yes)  sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations ";;
537
  no)   sim_warnings="-w";;
538
  *)    sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
539
esac
540
if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then
541
  echo "Setting warning flags = $sim_warnings" 6>&1
542
fi],[sim_warnings=""])dnl
543
 
544
 
545
AC_ARG_ENABLE(sim-xor-endian,
546
[  --enable-sim-xor-endian=n            Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).],
547
[case "${enableval}" in
548
  yes)  sim_xor_endian="-DWITH_XOR_ENDIAN=8";;
549
  no)   sim_xor_endian="-DWITH_XOR_ENDIAN=0";;
550
  *)    sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";;
551
esac
552
if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then
553
  echo "Setting xor-endian flag = $sim_xor_endian" 6>&1
554
fi],[sim_xor_endian=""])dnl
555
 
556
 
557
AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
558
AC_CANONICAL_SYSTEM
559
AC_ARG_PROGRAM
560
 
561
. ${srcdir}/../../bfd/configure.host
562
 
563
AC_CONFIG_HEADER(config.h:config.in)
564
 
565
AC_STRUCT_ST_BLKSIZE
566
AC_STRUCT_ST_BLOCKS
567
AC_STRUCT_ST_RDEV
568
AC_STRUCT_TIMEZONE
569
 
570
AC_TYPE_GETGROUPS
571
AC_TYPE_MODE_T
572
AC_TYPE_OFF_T
573
AC_TYPE_PID_T
574
AC_TYPE_SIGNAL
575
AC_TYPE_SIZE_T
576
AC_TYPE_UID_T
577
 
578
AC_CHECK_FUNCS(access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink)
579
 
580
AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h)
581
AC_HEADER_DIRENT
582
 
583
dnl Figure out what type of termio/termios support there is
584
sim_termio=""
585
AC_MSG_CHECKING(for struct termios)
586
AC_CACHE_VAL(ac_cv_termios_struct,
587
[AC_TRY_COMPILE([#include 
588
#include ],
589
[static struct termios x;
590
 x.c_iflag = 0;
591
 x.c_oflag = 0;
592
 x.c_cflag = 0;
593
 x.c_lflag = 0;
594
 x.c_cc[NCCS] = 0;],
595
ac_cv_termios_struct=yes, ac_cv_termios_struct=no)])
596
AC_MSG_RESULT($ac_cv_termios_struct)
597
if test $ac_cv_termios_struct = yes; then
598
  sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE"
599
fi
600
 
601
if test "$ac_cv_termios_struct" = "yes"; then
602
  AC_MSG_CHECKING(for c_line field in struct termios)
603
  AC_CACHE_VAL(ac_cv_termios_cline,
604
  [AC_TRY_COMPILE([#include 
605
#include ],
606
[static struct termios x; x.c_line = 0;],
607
  ac_cv_termios_cline=yes, ac_cv_termios_cline=no)])
608
 
609
  AC_MSG_RESULT($ac_cv_termios_cline)
610
  if test $ac_cv_termios_cline = yes; then
611
    sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE"
612
  fi
613
else
614
  ac_cv_termios_cline=no
615
fi
616
 
617
if test "$ac_cv_termios_struct" != "yes"; then
618
  AC_MSG_CHECKING(for struct termio)
619
  AC_CACHE_VAL(ac_cv_termio_struct,
620
  [AC_TRY_COMPILE([#include 
621
#include ],
622
[static struct termio x;
623
 x.c_iflag = 0;
624
 x.c_oflag = 0;
625
 x.c_cflag = 0;
626
 x.c_lflag = 0;
627
 x.c_cc[NCC] = 0;],
628
ac_cv_termio_struct=yes, ac_cv_termio_struct=no)])
629
  AC_MSG_RESULT($ac_cv_termio_struct)
630
  if test $ac_cv_termio_struct = yes; then
631
    sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE"
632
  fi
633
else
634
  ac_cv_termio_struct=no
635
fi
636
 
637
if test "$ac_cv_termio_struct" = "yes"; then
638
  AC_MSG_CHECKING(for c_line field in struct termio)
639
  AC_CACHE_VAL(ac_cv_termio_cline,
640
  [AC_TRY_COMPILE([#include 
641
#include ],
642
[static struct termio x; x.c_line = 0;],
643
  ac_cv_termio_cline=yes, ac_cv_termio_cline=no)])
644
 
645
  AC_MSG_RESULT($ac_cv_termio_cline)
646
  if test $ac_cv_termio_cline = yes; then
647
    sim_termio="$sim_termio -DHAVE_TERMIO_CLINE"
648
  fi
649
else
650
  ac_cv_termio_cline=no
651
fi
652
 
653
dnl Figure out if /dev/zero exists or not
654
sim_devzero=""
655
AC_MSG_CHECKING(for /dev/zero)
656
AC_CACHE_VAL(ac_cv_devzero,
657
[AC_TRY_RUN([#include 
658
main () {
659
  char buf[2048];
660
  int i;
661
  int fd = open ("/dev/zero", O_RDONLY);
662
  if (fd < 0)
663
    return 1;
664
  for (i = 0; i < sizeof (buf); i++)
665
    buf[i] = 1;
666
  if (read (fd, buf, sizeof (buf)) != sizeof (buf))
667
    return 1;
668
  for (i = 0; i < sizeof (buf); i++)
669
    if (buf[i])
670
      return 1;
671
  return 0;
672
}],[ac_cv_devzero=yes],[ac_cv_devzero=no],[ac_cv_devzero=no])])
673
AC_MSG_RESULT($ac_cv_devzero)
674
if test $ac_cv_devzero = yes; then
675
  sim_devzero="-DHAVE_DEVZERO"
676
else
677
  sim_devzero=""
678
fi
679
 
680
dnl Figure out if we are in the new Cygnus tree with a common directory or not
681
AC_MSG_CHECKING(for common simulator directory)
682
if test -f "${srcdir}/../common/callback.c"; then
683
  AC_MSG_RESULT(yes)
684
  sim_callback="callback.o targ-map.o"
685
  sim_targ_vals="targ-vals.h targ-map.c targ-vals.def"
686
else
687
  AC_MSG_RESULT(no)
688
  sim_callback=""
689
  sim_targ_vals=""
690
fi
691
 
692
dnl Check for exe extension
693
AC_EXEEXT
694
 
695
AC_SUBST(CC_FOR_BUILD)
696
AC_SUBST(CFLAGS)
697
AC_SUBST(HDEFINES)
698
AR=${AR-ar}
699
AC_SUBST(AR)
700
AC_PROG_RANLIB
701
AC_SUBST(sim_cflags)
702
AC_SUBST(sim_warnings)
703
AC_SUBST(sim_line_nr)
704
AC_SUBST(sim_config)
705
AC_SUBST(sim_opcode)
706
AC_SUBST(sim_switch)
707
AC_SUBST(sim_dup)
708
AC_SUBST(sim_decode_mechanism)
709
AC_SUBST(sim_jump)
710
AC_SUBST(sim_filter)
711
AC_SUBST(sim_icache)
712
AC_SUBST(sim_hw_src)
713
AC_SUBST(sim_hw_obj)
714
AC_SUBST(sim_pk_src)
715
AC_SUBST(sim_pk_obj)
716
AC_SUBST(sim_inline)
717
AC_SUBST(sim_bswap)
718
AC_SUBST(sim_endian)
719
AC_SUBST(sim_regparm)
720
AC_SUBST(sim_stdcall)
721
AC_SUBST(sim_xor_endian)
722
AC_SUBST(sim_hostendian)
723
AC_SUBST(sim_smp)
724
AC_SUBST(sim_igen_smp)
725
AC_SUBST(sim_bitsize)
726
AC_SUBST(sim_hostbitsize)
727
AC_SUBST(sim_env)
728
AC_SUBST(sim_timebase)
729
AC_SUBST(sim_alignment)
730
AC_SUBST(sim_float)
731
AC_SUBST(sim_trace)
732
AC_SUBST(sim_assert)
733
AC_SUBST(sim_reserved)
734
AC_SUBST(sim_monitor)
735
AC_SUBST(sim_model)
736
AC_SUBST(sim_default_model)
737
AC_SUBST(sim_model_issue)
738
AC_SUBST(sim_stdio)
739
AC_SUBST(sim_termio)
740
AC_SUBST(sim_devzero)
741
AC_SUBST(sim_callback)
742
AC_SUBST(sim_targ_vals)
743
 
744
AC_OUTPUT(Makefile,
745
[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.