dnl
|
dnl
|
dnl Configure script for the OpenRISC 1000 simulator
|
dnl Configure script for the OpenRISC 1000 simulator
|
dnl
|
dnl
|
dnl report bugs to jrydberg@phx.pp.se
|
dnl report bugs to jrydberg@phx.pp.se
|
dnl
|
dnl
|
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
AC_INIT(cpu/or1k/execute.c)
|
AC_INIT(cpu/or1k/execute.c)
|
|
AC_CANONICAL_SYSTEM
|
AM_INIT_AUTOMAKE(or1ksim, 1.1)
|
AM_INIT_AUTOMAKE(or1ksim, 1.1)
|
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
|
|
AC_REVISION([for or1ksim-1.1, version 2.14, from autoconf version] AC_ACVERSION)
|
AC_REVISION([for or1ksim-1.1, version 2.14, from autoconf version] AC_ACVERSION)
|
SIMVERSION=1.1
|
SIMVERSION=1.1
|
|
|
dnl make sure we are using a recent autoconf version
|
dnl make sure we are using a recent autoconf version
|
AC_PREREQ(2.10)
|
AC_PREREQ(2.10)
|
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
|
|
# We want these before the checks, so the checks can modify their values.
|
# We want these before the checks, so the checks can modify their values.
|
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
|
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
|
|
|
AC_PROG_CC
|
AC_PROG_CC
|
AC_MINIX
|
AC_MINIX
|
|
|
AC_SET_MAKE
|
AC_SET_MAKE
|
|
|
# If we're using gcc and the user hasn't specified CFLAGS, add -O2 to CFLAGS.
|
# If we're using gcc and the user hasn't specified CFLAGS, add -O2 to CFLAGS.
|
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
|
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
|
|
|
AC_PROG_GCC_TRADITIONAL
|
AC_PROG_GCC_TRADITIONAL
|
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
AC_CHECK_PROG(AR, ar, ar)
|
AC_CHECK_PROG(AR, ar, ar)
|
dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
|
dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
|
dnl This allows people to set it when running configure or make
|
dnl This allows people to set it when running configure or make
|
test -n "$ARFLAGS" || ARFLAGS="cr"
|
test -n "$ARFLAGS" || ARFLAGS="cr"
|
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
|
|
MAKE_SHELL=/bin/sh
|
MAKE_SHELL=/bin/sh
|
|
|
AC_SUBST(MAKE_SHELL)
|
AC_SUBST(MAKE_SHELL)
|
|
|
AC_RETSIGTYPE
|
AC_RETSIGTYPE
|
AC_HEADER_STAT
|
AC_HEADER_STAT
|
AC_HEADER_DIRENT
|
AC_HEADER_DIRENT
|
AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
|
AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat)
|
AC_FUNC_STRCOLL
|
AC_FUNC_STRCOLL
|
AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
|
AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \
|
sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
|
sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
|
termcap.h termios.h termio.h sys/file.h locale.h)
|
termcap.h termios.h termio.h sys/file.h locale.h)
|
|
|
dnl yuck
|
dnl yuck
|
case "$host_os" in
|
case "$host_os" in
|
aix*) prefer_curses=yes ;;
|
aix*) prefer_curses=yes ;;
|
esac
|
esac
|
|
|
case "$host_cpu" in
|
case "$host_cpu" in
|
*cray*) LOCAL_CFLAGS=-DCRAY ;;
|
*cray*) LOCAL_CFLAGS=-DCRAY ;;
|
esac
|
esac
|
|
|
case "$host_os" in
|
case "$host_os" in
|
isc*) LOCAL_CFLAGS=-Disc386 ;;
|
isc*) LOCAL_CFLAGS=-Disc386 ;;
|
esac
|
esac
|
|
|
|
|
BUILD_DIR=`pwd`
|
BUILD_DIR=`pwd`
|
AC_SUBST(BUILD_DIR)
|
AC_SUBST(BUILD_DIR)
|
|
|
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
AC_SUBST(LOCAL_CFLAGS)
|
AC_SUBST(LOCAL_CFLAGS)
|
AC_SUBST(LOCAL_LDFLAGS)
|
AC_SUBST(LOCAL_LDFLAGS)
|
AC_SUBST(LOCAL_DEFS)
|
AC_SUBST(LOCAL_DEFS)
|
|
|
AC_SUBST(AR)
|
AC_SUBST(AR)
|
AC_SUBST(ARFLAGS)
|
AC_SUBST(ARFLAGS)
|
|
|
AC_SUBST(host_cpu)
|
AC_SUBST(host_cpu)
|
AC_SUBST(host_os)
|
AC_SUBST(host_os)
|
AC_SUBST(host)
|
AC_SUBST(host)
|
|
|
AC_SUBST(SUMVERSION)
|
AC_SUBST(SUMVERSION)
|
AC_SUBST(TERMCAP_LIB)
|
AC_SUBST(TERMCAP_LIB)
|
|
|
dnl yuck
|
dnl yuck
|
CPU_ARCH=or1k
|
case "$target_cpu" in
|
|
or1k*) CPU_ARCH=or1k;;
|
|
dlx*) CPU_ARCH=dlx;;
|
|
esac
|
AC_SUBST(CPU_ARCH)
|
AC_SUBST(CPU_ARCH)
|
|
|
dnl yuck
|
dnl yuck
|
INCLUDES="-I\${top_srcdir}/cpu/common -I\${top_srcdir}/cpu/$CPU_ARCH -I\${top_srcdir}/cache -I\${top_srcdir}/mmu \
|
INCLUDES="-I\${top_srcdir}/cpu/common -I\${top_srcdir}/cpu/$CPU_ARCH -I\${top_srcdir}/cache -I\${top_srcdir}/mmu \
|
-I\${top_srcdir}/bpb"
|
-I\${top_srcdir}/bpb"
|
AC_SUBST(INCLUDES)
|
AC_SUBST(INCLUDES)
|
|
|
|
|
AC_OUTPUT([Makefile bpb/Makefile cache/Makefile cpu/Makefile
|
AC_OUTPUT([Makefile bpb/Makefile cache/Makefile cpu/Makefile
|
cpu/common/Makefile cpu/or1k/Makefile
|
cpu/common/Makefile cpu/or1k/Makefile cpu/dlx/Makefile
|
support/Makefile mmu/Makefile],
|
support/Makefile mmu/Makefile],
|
[
|
[
|
# Makefile uses this timestamp file to record whether config.h is up to date.
|
# Makefile uses this timestamp file to record whether config.h is up to date.
|
echo > stamp-h
|
echo > stamp-h
|
])
|
])
|
|
|