diff --git a/Geo/GModelIO.cpp b/Geo/GModelIO.cpp index 9de79ab4162726e9efe0447ca8770282121ee61f..a770be0b50bc7f47acf5cf8d88e75d7070ca4051 100644 --- a/Geo/GModelIO.cpp +++ b/Geo/GModelIO.cpp @@ -1,4 +1,4 @@ -// $Id: GModelIO.cpp,v 1.28 2006-08-19 19:46:07 geuzaine Exp $ +// $Id: GModelIO.cpp,v 1.29 2006-08-24 16:55:28 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -309,7 +309,7 @@ static void createElementMSH(GModel *m, int num, int type, int physical, int GModel::readMSH(const std::string &name) { - FILE *fp = fopen(name.c_str(), "r"); + FILE *fp = fopen(name.c_str(), "rb"); if(!fp){ Msg(GERROR, "Unable to open file '%s'", name.c_str()); return 0; diff --git a/configure b/configure index 9a71d92d79419ed9be10647b93ca2dd15c5ba5e5..97e59b847fbc376912f18cfd47e7b71e815dc0a9 100755 --- a/configure +++ b/configure @@ -4129,6 +4129,35 @@ fi fi fi + echo "$as_me:$LINENO: checking for ./contrib/FourierModel/model.cpp" >&5 +echo $ECHO_N "checking for ./contrib/FourierModel/model.cpp... $ECHO_C" >&6 +if test "${ac_cv_file___contrib_FourierModel_model_cpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "./contrib/FourierModel/model.cpp"; then + ac_cv_file___contrib_FourierModel_model_cpp=yes +else + ac_cv_file___contrib_FourierModel_model_cpp=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file___contrib_FourierModel_model_cpp" >&5 +echo "${ECHO_T}$ac_cv_file___contrib_FourierModel_model_cpp" >&6 +if test $ac_cv_file___contrib_FourierModel_model_cpp = yes; then + FOURIER="yes" +else + FOURIER="no" +fi + + if test "x${FOURIER}" = "xyes"; then + GMSH_DIRS="${GMSH_DIRS} contrib/FourierModel" + GMSH_LIBS="${GMSH_LIBS} -Lcontrib/FourierModel -lFourierModel" + FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS}" + fi + fi if test "x$enable_gsl" != "xno"; then diff --git a/configure.in b/configure.in index 8809bbd876a4faf3d65fd00b8d251c90a2c225c2..27eb08485ea651d93925bf019d78d1134f49fb6b 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.100 2006-08-12 19:34:14 geuzaine Exp $ +dnl $Id: configure.in,v 1.101 2006-08-24 16:55:28 geuzaine Exp $ dnl dnl Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle dnl @@ -457,6 +457,14 @@ if test "x$enable_contrib" != "xno"; then fi fi + dnl Check for FourierModel + AC_CHECK_FILE(./contrib/FourierModel/model.cpp, FOURIER="yes", FOURIER="no") + if test "x${FOURIER}" = "xyes"; then + GMSH_DIRS="${GMSH_DIRS} contrib/FourierModel" + GMSH_LIBS="${GMSH_LIBS} -Lcontrib/FourierModel -lFourierModel" + FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS}" + fi + fi dnl Check for GSL