view src/configure.ac @ 211:5b2a3d09f524

maint: changing configure.ac option to ---with-eigen-includedir
author Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
date Sat, 01 Mar 2014 14:11:24 +0100
parents b9999ff4fe5e
children 5292e0614efc
line wrap: on
line source

AC_PREREQ([2.67])
AC_INIT([Msh Package], [1.0])

AC_USE_SYSTEM_EXTENSIONS

AC_PROG_CXX
AC_LANG(C++)

# Get Dense include locations
AC_ARG_WITH([eigen-includedir],
  [AS_HELP_STRING([--with-eigen-includedir=DIR],
    [location of the Eigen headers, defaults to /usr/include/])],
  [DENSE_CPPFLAGS="-I$withval"],
  [DENSE_CPPFLAGS='-I/usr/include/'])
AC_SUBST(DENSE_CPPFLAGS)
echo $DENSE_CPPFLAGS

CPPFLAGS="$DENSE_CPPFLAGS $CPPFLAGS"

# Check for Dense and dolfin
have_dense_ok=no
AC_CHECK_HEADERS([Eigen/Dense],[have_dense_ok=yes;break],[],[])

if test $have_dense_ok = no; then
  AC_MSG_WARN([Dense headers could not be found,
                some functionalities will be disabled,
                don't worry your package will still be
                working, though.])
fi

have_dolfin_ok=no
AC_CHECK_HEADERS([dolfin.h], [have_dolfin_ok=yes; break], [],
  [#ifdef HAVE_DOLFIN_H
   #include<dolfin.h>
   #endif])
if test $have_dolfin_ok = no; then
  AC_MSG_WARN([dolfin headers could not be found,
                some functionalities will be disabled,
                don't worry your package will still be
                working, though.])
fi

AC_CHECK_PROG([HAVE_FFC], [ffc], [yes], [no])
if [test $HAVE_FFC = "no"]; then
  AC_MSG_ERROR([ffc required to install $PACKAGE_NAME])
fi

AC_CHECK_PROG([HAVE_MKOCTFILE], [mkoctfile], [yes], [no])
if [test $HAVE_MKOCTFILE = "no"]; then
  AC_MSG_ERROR([mkoctfile required to install $PACKAGE_NAME])
fi

AC_CONFIG_FILES([Makefile])
AC_OUTPUT