SCM Repository
View of /branches/pure-cfg/configure.ac
Parent Directory
|
Revision Log
Revision 989 -
(download)
(annotate)
Tue Apr 26 23:08:45 2011 UTC (9 years, 9 months ago) by jhr
File size: 4694 byte(s)
Tue Apr 26 23:08:45 2011 UTC (9 years, 9 months ago) by jhr
File size: 4694 byte(s)
Make the -rpath option something that is only used on Linux
dnl Process this file with autoconf to produce a configure script. dnl dnl COPYRIGHT (c) 2010 The Diderot Project dnl All rights reserved. dnl dnl NOTE: MANTICORE_DIST_VERSION is an M4 variable defined in config/aclocal.m4 dnl AC_INIT(diderot,0.1,) AC_PREREQ(2.60) AC_COPYRIGHT([[COPYRIGHT (c) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu)]]) AC_CONFIG_SRCDIR(src/dnorm/dnorm.c) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(config) dnl dnl include additional macros dnl sinclude(config/acx_pthread.m4) sinclude(config/check_smlnj.m4) sinclude(config/check_smlnj_heap_suffix.m4) dnl dnl get host information dnl AC_CANONICAL_HOST dnl check for standard programs dnl 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 CC="$CC -m64" CFLAGS="$CFLAGS -Wformat -Wreturn-type -Wuninitialized" dnl dnl Look for NVIDIA's nvcc compiler dnl AC_MSG_CHECKING([for CUDA and nvcc]) AC_PATH_PROG(NVCC, nvcc, ":", $PATH) if test $NVCC = none ; then AC_MSG_WARN([nvcc not found]) else AC_MSG_RESULT([$NVCC]) fi AC_SUBST(NVCC) dnl dnl OS-specific linking issues dnl LD_NEEDS_RPATH=false; 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 ;; 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) 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 AC_MSG_RESULT([ okay]) 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 ******************** SML/NJ configuration ******************** dnl dnl check that we have a compatible version of SML/NJ dnl CHECK_SMLNJ([AC_MSG_ERROR([unable to find SML/NJ installation; check your PATH or set SMLNJ_CMD])]) if test $SMLNJ_MAJOR_VERSION -lt 110 \ -o $SMLNJ_MINOR_VERSION -lt 72 then AC_MSG_ERROR([installation requires SML/NJ version 110.72+]) fi AC_SUBST(SMLNJ_VERSION) dnl determine the heap-image suffix dnl CHECK_SMLNJ_HEAP_SUFFIX([ AC_MSG_ERROR([unsupported configuration ${host_cpu}-${host_os}])]) dnl look for ml-makedepend dnl AC_MSG_CHECKING([for ml-makedepend]) tmpPATH="$SMLNJ_PATH:$PATH" AC_PATH_PROG(ML_MAKEDEPEND, ml-makedepend, ":", $tmpPATH) if test $ML_MAKEDEPEND = none ; then AC_MSG_ERROR([ml-makedepend not found]) else AC_MSG_RESULT([$ML_MAKEDEPEND]) fi AC_SUBST(ML_MAKEDEPEND) dnl dnl look for ml-build dnl tmpPATH="$SMLNJ_PATH:$PATH" AC_PATH_PROG(ML_BUILD, ml-build, none, $tmpPATH) if test $ML_BUILD = none ; then AC_MSG_ERROR([ml-build not found]) fi AC_SUBST(ML_BUILD) dnl ******************** Paths ******************** DIDEROT_ROOT=`pwd` DIDEROT_DOCDIR=$DIDEROT_ROOT/doc DIDEROT_SRCDIR=$DIDEROT_ROOT/src DIDEROT_LIBDIR=$DIDEROT_ROOT/lib DIDEROT_BINDIR=$DIDEROT_ROOT/bin DIDEROT_MKDIR=$DIDEROT_ROOT/mk HEAP_IMAGE_DIR=$DIDEROT_BINDIR/.heap INSTALL_SMLNJ_WRAPPER=$DIDEROT_BINDIR/install-sml-wrapper.sh AC_SUBST(DIDEROT_ROOT) AC_SUBST(DIDEROT_DOCDIR) AC_SUBST(DIDEROT_SRCDIR) AC_SUBST(DIDEROT_LIBDIR) AC_SUBST(DIDEROT_BINDIR) AC_SUBST(DIDEROT_MKDIR) AC_SUBST(HEAP_IMAGE_DIR) AC_SUBST(INSTALL_SMLNJ_WRAPPER) dnl dnl ******************** write output ******************** dnl AC_CONFIG_FILES( dnl dnl ***** Makefiles ***** Makefile src/dnorm/Makefile src/compiler/Makefile src/lib/Makefile test/Makefile test/MIP/Makefile test/probe/Makefile dnl dnl ***** SML source files ***** src/compiler/fields/run-dnorm.sml:src/compiler/fields/run-dnorm_sml.in src/compiler/common/paths.sml:src/compiler/common/paths_sml.in ) dnl dnl shell scripts dnl AC_CONFIG_FILES([ bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in ], [chmod +x bin/install-sml-wrapper.sh]) AC_OUTPUT
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |