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 792

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

powered by: WebSVN 2.1.0

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