SCM Repository
View of /benchmarks/configure.ac
Parent Directory
|
Revision Log
Revision 1574 -
(download)
(annotate)
Sat Oct 29 14:49:18 2011 UTC (10 years, 6 months ago) by jhr
File size: 4341 byte(s)
Sat Oct 29 14:49:18 2011 UTC (10 years, 6 months ago) by jhr
File size: 4341 byte(s)
Working on benchmark configuration; added README file to explain how to add new benchmarks.
dnl Process this file with autoconf to produce a configure script. dnl dnl COPYRIGHT (c) 2011 The Diderot Project dnl All rights reserved. dnl AC_INIT(diderot-benchmarks,0.1,) AC_PREREQ(2.60) AC_COPYRIGHT([[COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)]]) AC_CONFIG_SRCDIR(programs/vr-lite-cam/bmark-teem.c) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(config) dnl dnl get host information dnl AC_CANONICAL_HOST dnl check for standard programs dnl AC_PROG_CC([clang gcc cc]) AC_PROG_CPP AC_PROG_INSTALL AC_PROG_MAKE_SET dnl check for c99 support dnl AC_PROG_CC_C99 if test x"$ac_cv_prog_cc_c99" = xno ; then AC_MSG_ERROR([Diderot requires c99 support]) fi dnl extra C compiler options dnl CFLAGS="" CFLAG_M64="-m64" CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized" AC_SUBST(CFLAG_M64) AC_SUBST(CFLAGS_BASE) dnl dnl OS-specific linking issues dnl LD_NEEDS_RPATH=false; LIBM="" case "$host_os" in darwin*) # On Mac OS X we check for the presence of macports and/or fink if test -x /opt/local/bin/port ; then HAS_MACPORTS=yes else HAS_MACPORTS=no fi if test -x /sw/bin/fink ; then HAS_FINK=yes else HAS_FINK=no fi ;; linux*) # On Linux we include the -rpath option to pick up dynamically-loaded libraries LD_NEEDS_RPATH=true LIBM="-lm" ;; esac if test x"$HAS_MACPORTS" = xyes ; then LDPATHS="-L/opt/local/lib" elif test x"$HAS_FINK" = xyes ; then LDPATHS="-L/sw/lib" else LDPATHS="" fi AC_SUBST(LDPATHS) AC_SUBST(LD_NEEDS_RPATH) AC_SUBST(LIBM) dnl dnl get the path to the TEEM installation dnl AC_ARG_WITH(teem, AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]), [ac_cv_use_teem=$withval], [ac_cv_use_teem=no]) if test x"$ac_cv_use_teem" = xno ; then TEEM_DIR=none else AC_MSG_CHECKING([path to teem ($ac_cv_use_teem)]) case $ac_cv_use_teem in /*) ;; *) AC_MSG_ERROR([path to teem must be absolute]) ;; esac if test -x $ac_cv_use_teem ; then TEEM_DIR=$ac_cv_use_teem # check that TEEM_DIR actually points to something that looks like teem if test -f $TEEM_DIR/include/teem/nrrd.h ; then AC_MSG_RESULT([ okay]) else TEEM_DIR=none AC_MSG_RESULT([ invalid]) fi else TEEM_DIR=none AC_MSG_RESULT([ invalid]) fi fi if test x"$TEEM_DIR" = xnone ; then AC_MSG_ERROR([unable to find teem]) fi AC_SUBST(TEEM_DIR) dnl ******************** Diderot configuration ******************** dnl dnl dnl get the path to the diderot executable dnl AC_ARG_WITH(diderotc, AC_HELP_STRING([--with-diderotc=<path>], [specify path to Diderot compiler]), [ac_cv_use_diderotc=$withval], [ac_cv_use_diderotc=no]) if test x"$ac_cv_use_diderotc" = xno ; then DIDEROTC=none else AC_MSG_CHECKING([path to diderotc ($ac_cv_use_diderotc)]) case $ac_cv_use_diderotc in /*) DIDEROTC=$ac_cv_use_diderotc ;; *) DIDEROTC=$BMARKS_ROOT$ac_cv_use_diderotc ;; esac # check that diderotc exists and is executable if test -x $DIDEROTC ; then AC_MSG_RESULT([ okay]) else DIDEROTC=none AC_MSG_RESULT([ invalid]) fi fi if test x"$DIDEROTC" = xnone ; then AC_MSG_ERROR([unable to find diderotc]) fi AC_SUBST(DIDEROTC) dnl ******************** Paths ******************** BMARKS_ROOT=`pwd` BMARKS_DATADIR=$BMARKS_ROOT/data BMARKS_SRCDIR=$BMARKS_ROOT/programs BMARKS_BINDIR=$BMARKS_ROOT/scripts BMARKS_MKDIR=$BMARKS_ROOT/mk AC_SUBST(BMARKS_ROOT) AC_SUBST(BMARKS_DATADIR) AC_SUBST(BMARKS_SRCDIR) AC_SUBST(BMARKS_BINDIR) AC_SUBST(BMARKS_MKDIR) dnl dnl ******************** C compiler properties ******************** dnl dnl dnl run the compiler tests in 64-bit mode dnl save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $CFLAG_M64" AC_C_BIGENDIAN dnl dnl restore CFLAGS dnl CFLAGS=$save_CFLAGS dnl dnl ******************** write output ******************** dnl AC_CONFIG_FILES( dnl dnl ***** Makefiles ***** mk/build-rules.gmk:mk/build-rules_gmk.in mk/Makefile ) dnl dnl shell scripts dnl AC_CONFIG_FILES([ scripts/run-one.sh:scripts/run-one_sh.in ], [chmod +x scripts/run-one.sh]) AC_CONFIG_FILES([ scripts/run.sh:scripts/run_sh.in ], [chmod +x scripts/run.sh]) AC_CONFIG_COMMANDS([makefiles], [for d in programs/* ; do echo " create $d/Makefile" cp -p ./mk/Makefile $d/Makefile done], []) AC_OUTPUT
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |