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 99

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

powered by: WebSVN 2.1.0

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