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 4641 - (download) (annotate)
Tue Sep 27 20:58:08 2016 UTC (2 years, 10 months ago) by glk
File size: 2887 byte(s)
first pass at autoconf files
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) 2016 The University of Chicago
dnl All rights reserved.
dnl

AC_INIT(diderot-tests,0.1,)

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

dnl check for standard programs
dnl
AC_PROG_INSTALL

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"
  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
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
dnl ******************** write output ********************
dnl

AC_CONFIG_FILES([
  rtest/scripts/run.sh:rtest/scripts/run_sh.in
], [chmod +x rtest/scripts/run.sh])
AC_CONFIG_FILES([
  rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
], [chmod +x rtest/scripts/run-one.sh])

AC_OUTPUT

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