SCM Repository
View of /examples/configure.ac
Parent Directory
|
Revision Log
Revision 2126 -
(download)
(annotate)
Fri Feb 8 15:39:46 2013 UTC (9 years, 4 months ago) by lamonts
File size: 5451 byte(s)
Fri Feb 8 15:39:46 2013 UTC (9 years, 4 months ago) by lamonts
File size: 5451 byte(s)
fixed configure file to include boids example
dnl Process this file with autoconf to produce a configure script. dnl dnl COPYRIGHT (c) 2012 The Diderot Project dnl All rights reserved. dnl AC_INIT(diderot-examples,0.1,) AC_PREREQ(2.60) AC_COPYRIGHT([[COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu)]]) AC_CONFIG_SRCDIR(iso2d-demo/iso2d.diderot) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(config) dnl dnl include additional macros dnl sinclude(config/pkg.m4) 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" CPPFLAGS="-I/opt/local/include" elif test x"$HAS_FINK" = xyes ; then LDPATHS="-L/sw/lib" CPPFLAGS="-I/sw/include" 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 TEEM_CPPFLAGS="-I$TEEM_DIR/include" TEEM_LDFLAGS="-L$TEEM_DIR/lib -lteem" AC_SUBST(TEEM_CPPFLAGS) AC_SUBST(TEEM_LDFLAGS) dnl ******************** Graphics configuration ******************** dnl export PKG_CONFIG_PATH PKG_CONFIG_PATH=/lib/pkgconfig:/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig if test x"$HAS_MACPORTS" = xyes ; then PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/local/lib/pkgconfig fi if test x"$HAS_FINK" = xyes ; then PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/sw/lib/pkgconfig fi PKG_CHECK_MODULES([GLFW], [libglfw]) AC_SUBST([GLFW_CFLAGS]) AC_SUBST([GLFW_LIBS]) AC_ARG_WITH(ant-tweak-bar, AC_HELP_STRING([--with-ant-tweak-bar=<path>], [specify prefix for ant-tweak-bar lib and include dirs]), [ac_cv_use_atb=$withval], [ac_cv_use_atb=no]) if test x"$ac_cv_use_atb" != xno ; then AC_MSG_CHECKING([path to AntTweakBar ($ac_cv_use_atb)]) case $ac_cv_use_atb in /*) ;; *) AC_MSG_ERROR([path to AntTweakBar must be absolute]) ;; esac if test -d $ac_cv_use_atb ; then # check that ac_cv_use_atb points to something that looks right if test -f $ac_cv_use_atb/include/AntTweakBar.h -a -d $ac_cv_use_atb/lib ; then ATB_CPPFLAGS="-I$ac_cv_use_atb/include" ATB_LDFLAGS="-L$ac_cv_use_atb/lib -lAntTweakBar" AC_SUBST([ATB_CPPFLAGS]) AC_SUBST([ATB_LDFLAGS]) AC_MSG_RESULT([ okay]) else AC_MSG_RESULT([ invalid]) fi else AC_MSG_RESULT([ invalid]) fi else # check to see if AntTweakBar is installed in a standard place AC_CHECK_HEADERS([AntTweakBar.h]) if test x"$ac_cv_header_AntTweakBar_h" = xyes ; then ATB_CPPFLAGS="" ATB_LDFLAGS="-lAntTweakBar" AC_SUBST([ATB_CPPFLAGS]) AC_SUBST([ATB_LDFLAGS]) fi fi 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 ******************** 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 ***** iso2d-demo/Makefile vr-demo/Makefile boids/Makefile ) AC_OUTPUT
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |