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

Subversion Repositories openrisc_me

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

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
 
27 486 jeremybenn
AC_INIT([or1ksim-testsuite], [2011-01-27], [openrisc@opencores.org])
28 90 jeremybenn
AC_CONFIG_MACRO_DIR([m4])
29
 
30
AC_PROG_LIBTOOL
31
AM_INIT_AUTOMAKE
32
AC_CONFIG_HEADERS([config.h])
33
 
34
# make sure we are using a recent autoconf version
35
AC_PREREQ(2.59)
36
 
37 385 jeremybenn
# This is not nice, but it gets round the problem of the target not being
38
# specified. We don't need to warn again - the main configure did that for us.
39
case "$target_cpu" in
40
or32*)
41
        ;;
42
 
43
dlx*)
44
        ;;
45
 
46
*)      target_alias=or32-elf;
47
        ;;
48
esac
49
 
50 90 jeremybenn
# check for --enable-all-tests argument, in which case we attempt to build all
51
# tests, even those that do not compile properly.
52
AC_ARG_ENABLE(
53
    [all-tests],
54
    AC_HELP_STRING([--enable-all-tests],
55
                   [enable all tests, including those which do not compile]),
56
    [all_tests=true] [all_tests=false])
57
AM_CONDITIONAL([BUILD_ALL_TESTS], [test x$all_tests = xtrue])
58
 
59
# Sort out the tools. Using the target tool chain here, not native. Note that
60
# AC_CHECK_PROGS will not override an already set variable, so we must
61
# explicitly unset them first.
62
unset CC
63
unset RANLIB
64
unset LD
65
unset SIM
66
AC_CHECK_PROGS(CC, [$target_alias-gcc])
67
AC_CHECK_PROGS(RANLIB, [$target_alias-ranlib])
68
AC_CHECK_PROGS(LD, [$target_alias-ld])
69
AC_CHECK_PROGS(SIM, [$target_alias-sim])
70
AC_SUBST(CC)
71
AC_SUBST(RANLIB)
72
AC_SUBST(LD)
73
AC_SUBST(SIM)
74
 
75
AC_HEADER_STDC
76
 
77
# We need assembler, installer and per target C flags
78
 
79
AM_PROG_AS
80
AM_PROG_CC_C_O
81
AC_PROG_INSTALL
82
 
83
# Specify our baseline CFLAGS
84 458 julius
CPPFLAGS="-I\${top_srcdir}/support -I\${top_srcdir}/except"
85 90 jeremybenn
CFLAGS="-Wall -Werror -g -nostdlib -mhard-div -mhard-mul"
86
 
87
# Flag to specify whether we want optimization when checking
88
AC_MSG_CHECKING(whether to enable optimizations when checking)
89 458 julius
AC_ARG_ENABLE(check-opt,
90 90 jeremybenn
    [  --enable-check-opt      enable optimizations
91
  --enable-check-opt=level     same as gcc -O switch  ], [
92
    case "$enableval" in
93
        yes)
94
            CFLAGS="$CFLAGS -O"
95
            ;;
96
        *)
97
            CFLAGS="$CFLAGS -O$enableval"
98
            ;;
99
    esac
100
])
101
AC_MSG_RESULT(${enable_check_opt-default})
102
 
103
AC_SUBST(CPPFLAGS)
104
AC_SUBST(CFLAGS)
105
 
106
# This is GNU compliant source and uses GNU libraries
107
AC_DEFINE(_GNU_SOURCE, 1, "The source code uses the GNU libraries)
108
 
109
# Check for functions doesn't work, since we can't execute code. Define some
110
# we know are definitely there in OR1K GCC. This is all to allow reused
111
# headers from the main code body (for the memory controller tests
112
# principally) to work.
113
AC_DEFINE([HAVE_STRNDUP], [], [Is strndup () available])
114
AC_DEFINE([HAVE_ISBLANK], [], [Is isblank () available])
115
 
116
# Check for headers
117
AC_CHECK_HEADERS(sys/types.h inttypes.h)
118
 
119
# check for types and sizes
120
AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t],,, [#include ])
121
AC_CHECK_TYPES([int8_t, int16_t, int32_t],,, [#include ])
122
 
123
# Checking sizeof doesn't really work, since it needs to run compiled code. So
124
# we do it by hand.
125
AC_DEFINE([SIZEOF_CHAR],  [1], [Result of sizeof (char)])
126
AC_DEFINE([SIZEOF_SHORT], [2], [Result of sizeof (short)])
127
AC_DEFINE([SIZEOF_INT],   [4], [Result of sizeof (int)])
128
AC_DEFINE([SIZEOF_LONG],  [4], [Result of sizeof (long)])
129
 
130
AC_CONFIG_FILES([Makefile               \
131
                 acv-gpio/Makefile      \
132
                 acv-uart/Makefile      \
133
                 basic/Makefile         \
134
                 cache/Makefile         \
135
                 cbasic/Makefile        \
136
                 cfg/Makefile           \
137
                 dhry/Makefile          \
138
                 dmatest/Makefile       \
139
                 eth/Makefile           \
140
                 except/Makefile        \
141
                 except-test/Makefile   \
142
                 exit/Makefile          \
143
                 ext/Makefile           \
144
                 fbtest/Makefile        \
145 104 jeremybenn
                 fp/Makefile            \
146 233 julius
                 testfloat/Makefile     \
147 90 jeremybenn
                 functest/Makefile      \
148
                 flag/Makefile          \
149
                 int-test/Makefile      \
150 93 jeremybenn
                 int-logger/Makefile    \
151 90 jeremybenn
                 inst-set-test/Makefile \
152
                 kbdtest/Makefile       \
153
                 local-global/Makefile  \
154
                 loop/Makefile          \
155
                 mc-async/Makefile      \
156
                 mc-dram/Makefile       \
157
                 mc-ssram/Makefile      \
158
                 mc-sync/Makefile       \
159
                 mc-common/Makefile     \
160
                 mem-test/Makefile      \
161
                 mmu/Makefile           \
162
                 mul/Makefile           \
163
                 mycompress/Makefile    \
164
                 support/Makefile       \
165
                 tick/Makefile          \
166 93 jeremybenn
                 uos/Makefile           \
167
                 upcalls/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.