forked from OSchip/llvm-project
Refactor external benchmark checking stuff into one hairy
macro-to-bind-them-all, called EXTERNAL_BENCHMARK(). llvm-svn: 12994
This commit is contained in:
parent
c08a573515
commit
fe766057a9
|
@ -298,87 +298,50 @@ else
|
||||||
AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]])
|
AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Spec 2000 Benchmarks
|
AC_DEFUN(EXTERNAL_BENCHMARK,
|
||||||
AC_ARG_ENABLE(spec2000,AC_HELP_STRING([--enable-spec2000],[Compile SPEC 2000 benchmarks (default is NO)]),,enableval=no)
|
[m4_define([allcapsname],translit($1,a-z,A-Z))
|
||||||
if test ${enableval} = "no"
|
AC_ARG_ENABLE($1,
|
||||||
then
|
AC_HELP_STRING([--enable-$1=ARG],
|
||||||
if test -d /home/vadve/shared/benchmarks/speccpu2000/benchspec
|
[Use $1 as a benchmark (srcs in DIR)]),
|
||||||
then
|
checkresult=$enableval,
|
||||||
AC_SUBST(SPEC2000_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec])
|
checkresult=auto)
|
||||||
AC_SUBST(USE_SPEC2000,[[USE_SPEC2000=1]])
|
AC_MSG_CHECKING([for $1 benchmark sources])
|
||||||
else
|
case "$checkresult" in
|
||||||
AC_SUBST(USE_SPEC2000,[[]])
|
|
||||||
AC_SUBST(SPEC2000_ROOT,[])
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if test ${enableval} = ""
|
|
||||||
then
|
|
||||||
AC_SUBST(SPEC2000_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec])
|
|
||||||
else
|
|
||||||
AC_SUBST(SPEC2000_ROOT,[${enableval}])
|
|
||||||
fi
|
|
||||||
AC_SUBST(USE_SPEC2000,[[USE_SPEC2000=1]])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Spec 95 Benchmarks
|
|
||||||
AC_ARG_ENABLE(spec95,AC_HELP_STRING([--enable-spec95],[Compile SPEC 95 benchmarks (default is NO)]),,enableval=no)
|
|
||||||
if test ${enableval} = "no"
|
|
||||||
then
|
|
||||||
if test -d /home/vadve/shared/benchmarks/spec95/benchspec
|
|
||||||
then
|
|
||||||
AC_SUBST(SPEC95_ROOT,[/home/vadve/shared/benchmarks/spec95/benchspec])
|
|
||||||
AC_SUBST(USE_SPEC95,[[USE_SPEC95=1]])
|
|
||||||
else
|
|
||||||
AC_SUBST(USE_SPEC95,[[]])
|
|
||||||
AC_SUBST(SPEC95_ROOT,[])
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if test ${enableval} = ""
|
|
||||||
then
|
|
||||||
AC_SUBST(SPEC95_ROOT,[/home/vadve/shared/benchmarks/spec95/benchspec])
|
|
||||||
else
|
|
||||||
AC_SUBST(SPEC95_ROOT,[${enableval}])
|
|
||||||
fi
|
|
||||||
AC_SUBST(USE_SPEC95,[[USE_SPEC95=1]])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl We can use POV-Ray as an external benchmark, if they have the sources.
|
|
||||||
AC_ARG_ENABLE(povray,
|
|
||||||
AC_HELP_STRING([--enable-povray=ARG],
|
|
||||||
[Use POV-Ray as a benchmark (srcs in DIR)]),
|
|
||||||
povray=$enableval,
|
|
||||||
povray=auto)
|
|
||||||
AC_MSG_CHECKING([for POV-Ray benchmark sources])
|
|
||||||
case "$povray" in
|
|
||||||
auto|yes)
|
auto|yes)
|
||||||
defaultdir=/home/vadve/shared/benchmarks/povray31
|
defaultdir=$2
|
||||||
if test -d $defaultdir
|
if test -d "$defaultdir"
|
||||||
then
|
then
|
||||||
AC_SUBST(POVRAY_ROOT,[$defaultdir])
|
AC_SUBST(allcapsname()[_ROOT],[$defaultdir])
|
||||||
AC_SUBST(USE_POVRAY,[[USE_POVRAY=1]])
|
AC_SUBST([USE_]allcapsname(),[USE_]allcapsname()=1)
|
||||||
povray="yes, found in $defaultdir"
|
checkresult="yes, found in $defaultdir"
|
||||||
else
|
else
|
||||||
povray=no
|
checkresult=no
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
AC_SUBST(POVRAY_ROOT,[])
|
AC_SUBST(allcapsname()[_ROOT],[])
|
||||||
AC_SUBST(USE_POVRAY,[[]])
|
AC_SUBST([USE_]allcapsname(),[])
|
||||||
povray=no
|
checkresult=no
|
||||||
;;
|
;;
|
||||||
*) if test -d "$povray"
|
*) if test -d "$checkresult"
|
||||||
then
|
then
|
||||||
AC_SUBST(POVRAY_ROOT,"$povray")
|
AC_SUBST(allcapsname()[_ROOT],"$checkresult")
|
||||||
AC_SUBST(USE_POVRAY,[[USE_POVRAY=1]])
|
AC_SUBST([USE_]allcapsname(),[USE_]allcapsname()=1)
|
||||||
povray="yes, in $povray"
|
checkresult="yes, in $checkresult"
|
||||||
else
|
else
|
||||||
AC_SUBST(POVRAY_ROOT,[])
|
AC_SUBST(allcapsname()[_ROOT],[])
|
||||||
AC_SUBST(USE_POVRAY,[[]])
|
AC_SUBST([USE_]allcapsname(),[])
|
||||||
povray="no, not found in $povray"
|
checkresult="no, not found in $checkresult"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_MSG_RESULT($povray)
|
AC_MSG_RESULT($checkresult)
|
||||||
|
m4_undefine([allcapsname])
|
||||||
|
])
|
||||||
|
|
||||||
|
EXTERNAL_BENCHMARK(spec95,/home/vadve/shared/benchmarks/spec95/benchspec)
|
||||||
|
EXTERNAL_BENCHMARK(spec2000,/home/vadve/shared/benchmarks/speccpu2000/benchspec)
|
||||||
|
EXTERNAL_BENCHMARK(povray,/home/vadve/shared/benchmarks/povray31)
|
||||||
|
|
||||||
dnl Precompiled Bytecode Option
|
dnl Precompiled Bytecode Option
|
||||||
AC_ARG_ENABLE(precompiled_bytecode,AC_HELP_STRING([--enable-precompiled_bytecode],[Use pre-compiled bytecode (default is NO)]),,enableval=no)
|
AC_ARG_ENABLE(precompiled_bytecode,AC_HELP_STRING([--enable-precompiled_bytecode],[Use pre-compiled bytecode (default is NO)]),,enableval=no)
|
||||||
|
|
Loading…
Reference in New Issue