Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /tests/configure.ac
ViewVC logotype

View of /tests/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5076 - (download) (annotate)
Sat Jul 15 18:41:23 2017 UTC (2 years ago) by jhr
File size: 4082 byte(s)
working on regression tests
dnl Process this file with autoconf to produce a configure script.
dnl
dnl This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
dnl
dnl COPYRIGHT (c) 2017 The University of Chicago
dnl All rights reserved.
dnl

AC_INIT(diderot-tests,0.1,)

AC_PREREQ(2.60)
AC_COPYRIGHT([[COPYRIGHT (c) 2017 The University of Chicago]])
AC_CONFIG_SRCDIR(rtest/tests/heron/heron.diderot)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)

sinclude(config/ax_cxx_compile_stdcxx.m4)
sinclude(config/acx_pthread.m4)

dnl check for standard programs
dnl
AC_PROG_INSTALL

AC_PROG_CC([clang gcc cc])
AC_PROG_CXX([clang++ g++ c++])
AX_CXX_COMPILE_STDCXX(11,[],[mandatory])

dnl
dnl check for pthreads support
dnl
ACX_PTHREAD

dnl the path can be specified using "--with-teem=..." too
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
dnl search for Teem in some standard places
dnl
  AC_MSG_CHECKING([for teem])
  TEEM_DIR=none
  POSSIBLE_TEEM_DIRS="/usr/local/teem /usr/local"
  for dir in $POSSIBLE_TEEM_DIRS ; do
    if test -f $dir/include/teem/nrrd.h ; then
      TEEM_DIR=$dir
      AC_MSG_RESULT([$TEEM_DIR])
      break
    fi
  done
  if test $TEEM_DIR = none ; then
    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
  fi
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/bin/unu ; then
      AC_MSG_RESULT([yes])
    else
      TEEM_DIR=none
      AC_MSG_RESULT([invalid path to teem])
    fi
  else
    TEEM_DIR=none
    AC_MSG_RESULT([invalid path to teem])
  fi
fi
if test x"$TEEM_DIR" = xnone ; then
  AC_MSG_ERROR([unable to find teem])
fi
TEEM_BIN=$TEEM_DIR/bin
AC_SUBST(TEEM_DIR)
AC_SUBST(TEEM_BIN)

dnl ******************** Diderot configuration ********************
dnl

dnl
dnl get the path to the root of the Diderot source tree that is being
dnl tested (DIDEROT_ROOT).  We assume that diderotc will be found in
dnl $DIDEROT_ROOT/bin.
dnl
AC_ARG_WITH(diderot,
  AC_HELP_STRING([--with-diderot=<path>], [specify path to Diderot source]),
  [ac_cv_use_diderot=$withval], [ac_cv_use_diderot=no])
if test x"$ac_cv_use_diderot" = xno ; then
  DIDEROT_ROOT=none
else
  AC_MSG_CHECKING([path to diderot ($ac_cv_use_diderot)])
  case $ac_cv_use_diderot in
    /*) DIDEROT_ROOT=$ac_cv_use_diderot ;;
    *) DIDEROT_ROOT=$BMARKS_ROOT$ac_cv_use_diderot ;;
  esac
  # check that diderotc exists and is executable
  DIDEROTC=$DIDEROT_ROOT/bin/diderotc
  if test -x $DIDEROTC ; then
    AC_MSG_RESULT([ okay])
  else
    DIDEROT_ROOT=none
    DIDEROTC=none
    AC_MSG_RESULT([ invalid])
  fi
fi
if test x"$DIDEROT_ROOT" = xnone ; then
  AC_MSG_ERROR([please specify location of Diderot source using --with-diderot option])
fi
AC_SUBST(DIDEROT_ROOT)
AC_SUBST(DIDEROTC)

dnl
dnl ******************** write output ********************
dnl

dnl
dnl make definitions for regression tests
dnl
AC_CONFIG_FILES(
  rtest/scripts/makedefs.gmk:rtest/scripts/makedefs_gmk.in
)

dnl
dnl generate script files with proper paths
dnl
dnl usage: MK_SCRIPT(<prefix-path>)
dnl
dnl generates <prefix-path>.sh from <prefix-path>_sh.in
dnl
AC_DEFUN([MK_SCRIPT], [
    AC_CONFIG_FILES([$1.sh:$1_sh.in], [chmod +x $1.sh])
  ])

MK_SCRIPT(rtest/scripts/run)
MK_SCRIPT(rtest/scripts/run-one)
MK_SCRIPT(bc1d/run)
MK_SCRIPT(bc2d/run)
MK_SCRIPT(examples/vimg/run)
MK_SCRIPT(lamont-tests/run)
MK_SCRIPT(slinebug/run)
MK_SCRIPT(sqprnt/run)
MK_SCRIPT(synthetic/createmat3x3/mat3x3)
MK_SCRIPT(vis12-bugs/src/run)
MK_SCRIPT(vis15-bugs/circle)
MK_SCRIPT(vis15-bugs/sphere-snapbug)
MK_SCRIPT(vis15-bugs/halftone-bug2)
MK_SCRIPT(vis15-bugs/isohnd/run)
MK_SCRIPT(vis15-bugs/plot1d2d)
MK_SCRIPT(vis15-bugs/parlife)
MK_SCRIPT(vis15-bugs/parcircle)

AC_OUTPUT


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0