sim: rename common/aclocal.m4 to common/acinclude.m4
[external/binutils.git] / sim / rx / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011
4 dnl Free Software Foundation, Inc.
5 dnl Contributed by Red Hat, Inc.
6 dnl 
7 dnl This file is part of the GNU simulators.
8 dnl 
9 dnl This program is free software; you can redistribute it and/or modify
10 dnl it under the terms of the GNU General Public License as published by
11 dnl the Free Software Foundation; either version 3 of the License, or
12 dnl (at your option) any later version.
13 dnl
14 dnl This program is distributed in the hope that it will be useful,
15 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
16 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 dnl GNU General Public License for more details.
18 dnl
19 dnl You should have received a copy of the GNU General Public License
20 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 dnl
22 AC_PREREQ(2.64)dnl
23 AC_INIT(Makefile.in)
24 sinclude(../common/acinclude.m4)
25
26 SIM_AC_COMMON
27
28 AC_CHECK_HEADERS(getopt.h)
29
30 AC_ARG_ENABLE(cycle-accurate,
31 [  --disable-cycle-accurate ],
32 [case "${enableval}" in
33 yes | no) ;;
34 *)      AC_MSG_ERROR(bad value ${enableval} given for --enable-cycle-accurate option) ;;
35 esac])
36
37 AC_ARG_ENABLE(cycle-stats,
38 [  --disable-cycle-stats ],
39 [case "${enableval}" in
40 yes | no) ;;
41 *)      AC_MSG_ERROR(bad value ${enableval} given for --enable-cycle-stats option) ;;
42 esac])
43
44 echo enable_cycle_accurate is $enable_cycle_accurate
45 echo enable_cycle_stats is $enable_cycle_stats
46
47 if test "x${enable_cycle_accurate}" != xno; then
48 AC_DEFINE([CYCLE_ACCURATE])
49
50   if test "x${enable_cycle_stats}" != xno; then
51   AC_DEFINE([CYCLE_STATS])
52   fi
53 else
54   if test "x${enable_cycle_stats}" != xno; then
55   AC_ERROR([cycle-stats not available without cycle-accurate])
56   fi
57 fi
58
59 SIM_AC_OUTPUT