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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [testsuite/] [test-code-or1k/] [configure.ac] - Blame information for rev 588

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

Line No. Rev Author Line
1 90 jeremybenn
# configure.ac -- OR1K test code specific autoconf configuration file
2
#
3 460 jeremybenn
# Copyright (C) 2010, 2011 Embecosm Limited
4 90 jeremybenn
#
5
# Contributor Jeremy Bennett 
6
#
7
# This file is part of OpenRISC 1000 Architectural Simulator.
8
#
9
# This program is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by the Free
11
# Software Foundation; either version 3 of the License, or (at your option)
12
# any later version.
13
#
14
# This program is distributed in the hope that it will be useful, but WITHOUT
15
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
17
# more details.
18
#
19
# You should have received a copy of the GNU General Public License along
20
# with this program.  If not, see .
21
 
22
 
23
# Configure script for the OpenRISC 1000 simulator test suite OR1K code
24
# directory. This uses a different tool chain, so has its own configuration
25
# script. Process this file with autoconf to produce a configure script.
26 532 jeremybenn
AC_INIT([or1ksim-testsuite], [2011-04-28], [openrisc@opencores.org])
27 90 jeremybenn
AC_CONFIG_MACRO_DIR([m4])
28
 
29
AC_PROG_LIBTOOL
30
AM_INIT_AUTOMAKE
31
AC_CONFIG_HEADERS([config.h])
32
 
33
# make sure we are using a recent autoconf version
34
AC_PREREQ(2.59)
35
 
36 385 jeremybenn
# This is not nice, but it gets round the problem of the target not being
37
# specified. We don't need to warn again - the main configure did that for us.
38
case "$target_cpu" in
39
or32*)
40
        ;;
41
 
42
dlx*)
43
        ;;
44
 
45
*)      target_alias=or32-elf;
46
        ;;
47
esac
48
 
49 90 jeremybenn
# check for --enable-all-tests argument, in which case we attempt to build all
50
# tests, even those that do not compile properly.
51
AC_ARG_ENABLE(
52
    [all-tests],
53
    AC_HELP_STRING([--enable-all-tests],
54
                   [enable all tests, including those which do not compile]),
55
    [all_tests=true] [all_tests=false])
56
AM_CONDITIONAL([BUILD_ALL_TESTS], [test x$all_tests = xtrue])
57
 
58
# Sort out the tools. Using the target tool chain here, not native. Note that
59
# AC_CHECK_PROGS will not override an already set variable, so we must
60
# explicitly unset them first.
61
unset CC
62
unset RANLIB
63
unset LD
64
unset SIM
65
AC_CHECK_PROGS(CC, [$target_alias-gcc])
66
AC_CHECK_PROGS(RANLIB, [$target_alias-ranlib])
67
AC_CHECK_PROGS(LD, [$target_alias-ld])
68
AC_CHECK_PROGS(SIM, [$target_alias-sim])
69
AC_SUBST(CC)
70
AC_SUBST(RANLIB)
71
AC_SUBST(LD)
72
AC_SUBST(SIM)
73
 
74
AC_HEADER_STDC
75
 
76
# We need assembler, installer and per target C flags
77
 
78
AM_PROG_AS
79
AM_PROG_CC_C_O
80
AC_PROG_INSTALL
81
 
82
# Specify our baseline CFLAGS
83 458 julius
CPPFLAGS="-I\${top_srcdir}/support -I\${top_srcdir}/except"
84 90 jeremybenn
CFLAGS="-Wall -Werror -g -nostdlib -mhard-div -mhard-mul"
85
 
86
# Flag to specify whether we want optimization when checking
87
AC_MSG_CHECKING(whether to enable optimizations when checking)
88 458 julius
AC_ARG_ENABLE(check-opt,
89 90 jeremybenn
    [  --enable-check-opt      enable optimizations
90
  --enable-check-opt=level     same as gcc -O switch  ], [
91
    case "$enableval" in
92
        yes)
93
            CFLAGS="$CFLAGS -O"
94
            ;;
95
        *)
96
            CFLAGS="$CFLAGS -O$enableval"
97
            ;;
98
    esac
99
])
100
AC_MSG_RESULT(${enable_check_opt-default})
101
 
102
AC_SUBST(CPPFLAGS)
103
AC_SUBST(CFLAGS)
104
 
105
# This is GNU compliant source and uses GNU libraries
106
AC_DEFINE(_GNU_SOURCE, 1, "The source code uses the GNU libraries)
107
 
108
# Check for functions doesn't work, since we can't execute code. Define some
109
# we know are definitely there in OR1K GCC. This is all to allow reused
110
# headers from the main code body (for the memory controller tests
111
# principally) to work.
112
AC_DEFINE([HAVE_STRNDUP], [], [Is strndup () available])
113
AC_DEFINE([HAVE_ISBLANK], [], [Is isblank () available])
114
 
115
# Check for headers
116
AC_CHECK_HEADERS(sys/types.h inttypes.h)
117
 
118
# check for types and sizes
119
AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t],,, [#include ])
120
AC_CHECK_TYPES([int8_t, int16_t, int32_t],,, [#include ])
121
 
122
# Checking sizeof doesn't really work, since it needs to run compiled code. So
123
# we do it by hand.
124
AC_DEFINE([SIZEOF_CHAR],  [1], [Result of sizeof (char)])
125
AC_DEFINE([SIZEOF_SHORT], [2], [Result of sizeof (short)])
126
AC_DEFINE([SIZEOF_INT],   [4], [Result of sizeof (int)])
127
AC_DEFINE([SIZEOF_LONG],  [4], [Result of sizeof (long)])
128
 
129
AC_CONFIG_FILES([Makefile               \
130
                 acv-gpio/Makefile      \
131
                 acv-uart/Makefile      \
132
                 basic/Makefile         \
133
                 cache/Makefile         \
134
                 cbasic/Makefile        \
135
                 cfg/Makefile           \
136
                 dhry/Makefile          \
137
                 dmatest/Makefile       \
138
                 eth/Makefile           \
139
                 except/Makefile        \
140
                 except-test/Makefile   \
141
                 exit/Makefile          \
142
                 ext/Makefile           \
143
                 fbtest/Makefile        \
144 104 jeremybenn
                 fp/Makefile            \
145 233 julius
                 testfloat/Makefile     \
146 90 jeremybenn
                 functest/Makefile      \
147
                 flag/Makefile          \
148
                 int-test/Makefile      \
149 93 jeremybenn
                 int-logger/Makefile    \
150 90 jeremybenn
                 inst-set-test/Makefile \
151
                 kbdtest/Makefile       \
152
                 local-global/Makefile  \
153
                 loop/Makefile          \
154
                 mc-async/Makefile      \
155
                 mc-dram/Makefile       \
156
                 mc-ssram/Makefile      \
157
                 mc-sync/Makefile       \
158
                 mc-common/Makefile     \
159
                 mem-test/Makefile      \
160
                 mmu/Makefile           \
161
                 mul/Makefile           \
162
                 mycompress/Makefile    \
163
                 support/Makefile       \
164
                 tick/Makefile          \
165 93 jeremybenn
                 uos/Makefile           \
166 556 julius
                 upcalls/Makefile       \
167
                 pcu/Makefile])
168 90 jeremybenn
 
169
AC_OUTPUT

powered by: WebSVN 2.1.0

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