[cdbf02]: src / configure.ac Maximize Restore History

Download this file

configure.ac    55 lines (44 with data), 1.5 kB

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