Build system:

* configure: don't fail if no Fortran 77 compiler is present
* boost detection: adapt for cross-compiling


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2953 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
sebastien 2009-09-21 09:45:23 +00:00
parent 4dff75d79c
commit 0fd4938b53
2 changed files with 17 additions and 10 deletions

View File

@ -22,6 +22,7 @@ AC_INIT([dynare], [4.1-unstable])
AC_CONFIG_SRCDIR([preprocessor/DynareMain.cc])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_PROG_CXX
# Use C++ for testing headers
@ -123,10 +124,12 @@ fi
AC_CHECK_PROG([CWEAVE], [cweave], [cweave])
AM_CONDITIONAL([HAVE_CWEAVE], [test "x$CWEAVE" != "x"])
AX_BLAS
AC_PROG_F77
if test "x$F77" != "x"; then
AX_BLAS
AX_LAPACK
fi
AM_CONDITIONAL([HAVE_BLAS], [test x"$ax_blas_ok" = "xyes"])
AX_LAPACK
AM_CONDITIONAL([HAVE_LAPACK], [test x"$ax_lapack_ok" = "xyes"])
AX_PTHREAD

View File

@ -26,6 +26,7 @@
# LICENSE
#
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
# Copyright (c) 2009 Dynare Team
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
@ -83,13 +84,16 @@ if test "x$want_boost" = "xyes"; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
# If cross-compiling, adding /usr/include can confuse the compiler
if test "x$cross_compiling" != "xyes"; then
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
fi
dnl overwrite ld flags if we have required special directory with