dnl or32 test suite - top level
|
dnl or32 test suite - top level
|
dnl
|
dnl
|
dnl Copyright (C) 2001 Marko Mlinar
|
dnl Copyright (C) 2001 Marko Mlinar
|
dnl
|
dnl
|
dnl This file is part of OpenRISC 1000 Architectural Simulator.
|
dnl This file is part of OpenRISC 1000 Architectural Simulator.
|
dnl
|
dnl
|
dnl This program is free software; you can redistribute it and/or modify
|
dnl This program is free software; you can redistribute it and/or modify
|
dnl it under the terms of the GNU General Public License as published by
|
dnl it under the terms of the GNU General Public License as published by
|
dnl the Free Software Foundation; either version 2 of the License, or
|
dnl the Free Software Foundation; either version 2 of the License, or
|
dnl (at your option) any later version.
|
dnl (at your option) any later version.
|
dnl
|
dnl
|
dnl This program is distributed in the hope that it will be useful,
|
dnl This program is distributed in the hope that it will be useful,
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
dnl GNU General Public License for more details.
|
dnl GNU General Public License for more details.
|
dnl
|
dnl
|
dnl You should have received a copy of the GNU General Public License
|
dnl You should have received a copy of the GNU General Public License
|
dnl along with this program; if not, write to the Free Software
|
dnl along with this program; if not, write to the Free Software
|
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
dnl
|
dnl
|
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
dnl disable cache, since it causes troubles when changing hosts
|
dnl disable cache, since it causes troubles when changing hosts
|
dnl define([AC_CACHE_LOAD], )dnl
|
dnl define([AC_CACHE_LOAD], )dnl
|
dnl define([AC_CACHE_SAVE], )dnl
|
dnl define([AC_CACHE_SAVE], )dnl
|
|
|
AC_REVISION([for or1ksim-1.2, version 2.14, from autoconf version] AC_ACVERSION)
|
AC_REVISION([for or1ksim-1.2, version 2.14, from autoconf version] AC_ACVERSION)
|
AC_PREREQ(2.10)
|
AC_PREREQ(2.10)
|
AC_INIT(support/support.h)
|
AC_INIT(support/support.h)
|
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
AM_INIT_AUTOMAKE(or1ksimtest, 1.3)
|
AM_INIT_AUTOMAKE(or1ksimtest, 1.3)
|
|
|
dnl Checks for programs.
|
dnl Checks for programs.
|
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
AC_CHECK_TOOL(CC, $target-gcc, cc)
|
AC_CHECK_TOOL(CC, $target-gcc, cc)
|
AC_CHECK_TOOL(RANLIB, $target-ranlib, ranlib)
|
AC_CHECK_TOOL(RANLIB, $target-ranlib, ranlib)
|
AC_CHECK_TOOL(LD, $target-ld, ld)
|
AC_CHECK_TOOL(LD, $target-ld, ld)
|
AC_CHECK_TOOL(SIM, $target-sim, sim)
|
AC_CHECK_TOOL(SIM, $target-sim, sim)
|
|
AC_CHECK_TOOL(CCAS, $target-gcc, cc)
|
AC_ISC_POSIX
|
AC_ISC_POSIX
|
AC_HEADER_STDC
|
AC_HEADER_STDC
|
|
|
MAKE_SHELL=/bin/sh
|
MAKE_SHELL=/bin/sh
|
AC_SUBST(MAKE_SHELL)
|
AC_SUBST(MAKE_SHELL)
|
|
|
dnl Compiler options.
|
dnl Compiler options.
|
AC_PROG_GCC_TRADITIONAL
|
AC_PROG_GCC_TRADITIONAL
|
dnl set -- $CFLAGS
|
dnl set -- $CFLAGS
|
CFLAGS="-Wall -g"
|
CFLAGS="-Wall -g"
|
|
|
COMPILE_OR1K=unknown
|
COMPILE_OR1K=unknown
|
|
|
AC_SUBST(TESTS_ENV)
|
AC_SUBST(TESTS_ENV)
|
TESTS_ENV=
|
TESTS_ENV=
|
AC_SUBST(OR1K_SRCDIR)
|
AC_SUBST(OR1K_SRCDIR)
|
OR1K_SRCDIR="./${top_srcdir}"
|
OR1K_SRCDIR="./${top_srcdir}"
|
case $target in
|
case $target in
|
or1k*|or32*)
|
or1k*|or32*)
|
CFLAGS="$CFLAGS -nostdlib -mhard-div"
|
CFLAGS="$CFLAGS -nostdlib -mhard-div"
|
COMPILE=or1k
|
COMPILE=or1k
|
TESTS_ENV="$SIM"
|
TESTS_ENV="$SIM"
|
;;
|
;;
|
esac
|
esac
|
dnl echo $TESTS_ENV
|
dnl echo $TESTS_ENV
|
AM_CONDITIONAL(OR1K_EXCEPT, test x$COMPILE = xor1k)
|
AM_CONDITIONAL(OR1K_EXCEPT, test x$COMPILE = xor1k)
|
|
|
|
|
dnl optimizations level
|
dnl optimizations level
|
AC_MSG_CHECKING(whether to enable optimizations)
|
AC_MSG_CHECKING(whether to enable optimizations)
|
AC_ARG_ENABLE(opt,
|
AC_ARG_ENABLE(opt,
|
[ --enable-opt enable optimizations
|
[ --enable-opt enable optimizations
|
--enable-opt=level same as gcc -O switch ], [
|
--enable-opt=level same as gcc -O switch ], [
|
case "$enableval" in
|
case "$enableval" in
|
yes)
|
yes)
|
CFLAGS="$CFLAGS -O"
|
CFLAGS="$CFLAGS -O"
|
;;
|
;;
|
*)
|
*)
|
CFLAGS="$CFLAGS -O$enableval"
|
CFLAGS="$CFLAGS -O$enableval"
|
;;
|
;;
|
esac
|
esac
|
])
|
])
|
AC_MSG_RESULT(${enable_opt-default})
|
AC_MSG_RESULT(${enable_opt-default})
|
|
|
case "$enable_debugging" in
|
case "$enable_debugging" in
|
yes) AC_CHECK_LIB(efence, malloc) ;;
|
yes) AC_CHECK_LIB(efence, malloc) ;;
|
esac
|
esac
|
|
|
AC_SUBST(INCLUDES)
|
AC_SUBST(INCLUDES)
|
INCLUDES="-I\${top_srcdir}/support"
|
INCLUDES="-I\${top_srcdir}/support"
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
AC_C_CONST
|
AC_C_CONST
|
AC_C_INLINE
|
AC_C_INLINE
|
|
|
dnl Create output files.
|
dnl Create output files.
|
AC_OUTPUT([Makefile support/Makefile uos/Makefile])
|
AC_OUTPUT([Makefile support/Makefile uos/Makefile])
|
|
|