From 8a2138c79e328b53f5f0543c4272feb9b193ded2 Mon Sep 17 00:00:00 2001
From: rschulz
Date: Thu, 10 Mar 2005 10:09:06 +0000
Subject: [PATCH] *** empty log message ***
git-svn-id: https://svn.dealii.org/trunk@10075 0785d39b-7218-0410-832d-ea1e28bc413d
---
deal.II/aclocal.m4 | 64 ++++++++++++++++++++-------
deal.II/base/include/base/config.h.in | 6 +--
deal.II/common/scripts/.cvsignore | 1 +
deal.II/configure | 49 +++++++++++++++++---
deal.II/configure.in | 12 ++++-
deal.II/doc/faq.html | 20 +++------
deal.II/doc/platforms/windows.html | 16 ++++---
deal.II/doc/readme.html | 38 ++++++++++++++--
deal.II/examples/step-1/.cvsignore | 2 +-
deal.II/examples/step-10/.cvsignore | 2 +-
deal.II/examples/step-11/.cvsignore | 2 +-
deal.II/examples/step-12/.cvsignore | 2 +-
deal.II/examples/step-13/.cvsignore | 2 +-
deal.II/examples/step-14/.cvsignore | 2 +-
deal.II/examples/step-16/.cvsignore | 2 +-
deal.II/examples/step-17/.cvsignore | 2 +-
deal.II/examples/step-2/.cvsignore | 2 +-
deal.II/examples/step-3/.cvsignore | 2 +-
deal.II/examples/step-4/.cvsignore | 2 +-
deal.II/examples/step-5/.cvsignore | 2 +-
deal.II/examples/step-6/.cvsignore | 2 +-
deal.II/examples/step-7/.cvsignore | 2 +-
deal.II/examples/step-8/.cvsignore | 2 +-
deal.II/examples/step-9/.cvsignore | 2 +-
24 files changed, 173 insertions(+), 65 deletions(-)
diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4
index 77dc38b897..c42b1a4025 100644
--- a/deal.II/aclocal.m4
+++ b/deal.II/aclocal.m4
@@ -296,6 +296,11 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl
LDFLAGS="$LDFLAGS -lpthread"
;;
+ *cygwin* )
+ CXXFLAGSPIC=
+ LDFLAGSPIC=
+ ;;
+
*)
CXXFLAGSPIC="-fPIC"
LDFLAGSPIC="-fPIC"
@@ -987,6 +992,10 @@ AC_DEFUN(DEAL_II_SET_CC_FLAGS, dnl
CFLAGSPIC="-fPIC"
;;
+ *cygwin*)
+ CFLAGSPIC=
+ ;;
+
*)
CFLAGSPIC="-fPIC"
;;
@@ -1206,7 +1215,15 @@ AC_DEFUN(DEAL_II_SET_F77_FLAGS, dnl
F77FLAGSO="$F77FLAGSO -funroll-loops -funroll-all-loops -fstrict-aliasing"
fi
- F77FLAGSPIC="-fPIC"
+ case "$target" in
+ *cygwin* )
+ F77FLAGSPIC=
+ ;;
+ * )
+ F77FLAGSPIC="-fPIC"
+ ;;
+ esac
+
F77LIBS="$F77LIBS -lg2c"
;;
@@ -1315,7 +1332,20 @@ AC_DEFUN(DEAL_II_CHECK_CPU_OPTIMIZATIONS, dnl
;;
esac
;;
+ athlon* | pentium* | i386 | i486 | i586 | i686 | k6* | winchip*)
+ AC_MSG_RESULT(x86 derivate ($withcpu))
+ case "$GXX_VERSION" in
+ gcc*)
+ dnl Tune for this processor, but only in optimized mode
+ dnl (to prevent the effects of possible compiler bugs to affect
+ dnl both debug as well as optimized versions)
+ CXXFLAGSO="$CXXFLAGSO -march=$withcpu"
+ dnl Also set the mode for f77 compiler
+ F77FLAGSO="$F77FLAGSO -march=$withcpu"
+ ;;
+ esac
+ ;;
*)
AC_MSG_RESULT(none given or not recognized)
;;
@@ -3957,22 +3987,24 @@ using namespace std;
dnl -------------------------------------------------------------
-dnl Check whether the gethostname() function is available. To
-dnl spice up things, some versions of cygwin have a problem in
-dnl that when you call that function on an AMD system, the FPU
-dnl is set into 64bit mode, rather than 80bit mode, and doesn't
-dnl do any long double computations any more, even though the
-dnl compiler still announces that it does through the std::limits
-dnl class. We have to check for this.
+dnl Check whether socket functions (i.e. functions using the
+dnl network) affect the numerical accuracy. To spice up things,
+dnl on some versions of cygwin (<=1.5.13), calling the windows
+dnl socket function (e.g. the functions defined in unistd.h)
+dnl will set the internal accuracy of the FPU to 64 bits (double)
+dnl instead of 80 bits. Consequently, all long double operations
+dnl are performed with double accuracy only. The compiler will
+dnl not notice this fact and still report long double limits in
+dnl the linits<>-class. We have to check for this, otherwise
+dnl some functions like the QGauss constructor will go into an
+dnl infinite loop.
dnl
-dnl Usage: DEAL_II_CHECK_GETHOSTNAME
+dnl Usage: DEAL_II_CHECK_BROKEN_SOCKETS
dnl
dnl -------------------------------------------------------------
-AC_DEFUN(DEAL_II_CHECK_GETHOSTNAME, dnl
+AC_DEFUN(DEAL_II_CHECK_BROKEN_SOCKETS, dnl
[
- AC_CHECK_FUNCS(gethostname)
-
- AC_MSG_CHECKING(for bad gethostname/FPU interaction)
+ AC_MSG_CHECKING(for bad socket functions/FPU interaction)
AC_LANG(C++)
CXXFLAGS="$CXXFLAGSG"
AC_TRY_RUN(
@@ -3999,9 +4031,9 @@ int main()
AC_MSG_RESULT(no)
],
[
- AC_MSG_RESULT([yes. disabling gethostname()])
- AC_DEFINE(DEAL_II_BROKEN_GETHOSTNAME, 1,
- [Define if the use of gethostname() leads to strange
+ AC_MSG_RESULT([yes. disabling socket functions])
+ AC_DEFINE(DEAL_II_BROKEN_SOCKETS, 1,
+ [Define if the use of socket functionality leads to strange
results with floating point computations on cygwin
systems.])
])
diff --git a/deal.II/base/include/base/config.h.in b/deal.II/base/include/base/config.h.in
index d336bac2a9..2ae411434b 100644
--- a/deal.II/base/include/base/config.h.in
+++ b/deal.II/base/include/base/config.h.in
@@ -53,9 +53,9 @@
*/
#undef DEAL_II_ARRAY_CONDITIONAL_DECAY_BUG
-/* Define if the use of gethostname() leads to strange results with floating
- point computations on cygwin systems. */
-#undef DEAL_II_BROKEN_GETHOSTNAME
+/* Define if the use of socket functionality leads to strange results with
+ floating point computations on cygwin systems. */
+#undef DEAL_II_BROKEN_SOCKETS
/* Backward compatibility support for functions and classes that do not take
an explicit mapping variable, but rather use a default Q1 mapping instead
diff --git a/deal.II/common/scripts/.cvsignore b/deal.II/common/scripts/.cvsignore
index cf9e5fd3bd..f016ee81a0 100644
--- a/deal.II/common/scripts/.cvsignore
+++ b/deal.II/common/scripts/.cvsignore
@@ -1,2 +1,3 @@
make_dependencies
make_dependencies.pl
+make_dependencies.exe
diff --git a/deal.II/configure b/deal.II/configure
index d4d836f43d..c4ceeb45ab 100755
--- a/deal.II/configure
+++ b/deal.II/configure
@@ -3072,6 +3072,11 @@ echo "$as_me: error: Unrecognized compiler -- sorry" >&2;}
LDFLAGS="$LDFLAGS -lpthread"
;;
+ *cygwin* )
+ CXXFLAGSPIC=
+ LDFLAGSPIC=
+ ;;
+
*)
CXXFLAGSPIC="-fPIC"
LDFLAGSPIC="-fPIC"
@@ -3843,6 +3848,10 @@ echo "$as_me: error: Unrecognized compiler -- sorry" >&2;}
CFLAGSPIC="-fPIC"
;;
+ *cygwin*)
+ CFLAGSPIC=
+ ;;
+
*)
CFLAGSPIC="-fPIC"
;;
@@ -8126,7 +8135,6 @@ fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
for ac_func in gethostname
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -8229,8 +8237,8 @@ fi
done
- echo "$as_me:$LINENO: checking for bad gethostname/FPU interaction" >&5
-echo $ECHO_N "checking for bad gethostname/FPU interaction... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for bad socket functions/FPU interaction" >&5
+echo $ECHO_N "checking for bad socket functions/FPU interaction... $ECHO_C" >&6
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8293,11 +8301,11 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
- echo "$as_me:$LINENO: result: yes. disabling gethostname()" >&5
-echo "${ECHO_T}yes. disabling gethostname()" >&6
+ echo "$as_me:$LINENO: result: yes. disabling socket functions" >&5
+echo "${ECHO_T}yes. disabling socket functions" >&6
cat >>confdefs.h <<\_ACEOF
-#define DEAL_II_BROKEN_GETHOSTNAME 1
+#define DEAL_II_BROKEN_SOCKETS 1
_ACEOF
@@ -8498,7 +8506,15 @@ echo "${ECHO_T}F77 compiler is unkown. no flags set!" >&6
F77FLAGSO="$F77FLAGSO -funroll-loops -funroll-all-loops -fstrict-aliasing"
fi
- F77FLAGSPIC="-fPIC"
+ case "$target" in
+ *cygwin* )
+ F77FLAGSPIC=
+ ;;
+ * )
+ F77FLAGSPIC="-fPIC"
+ ;;
+ esac
+
F77LIBS="$F77LIBS -lg2c"
;;
@@ -8593,6 +8609,7 @@ esac
case "$target" in
*cygwin )
shared_lib_suffix=".dll"
+ cygwin_shared_lib="yes"
;;
esac
@@ -9762,7 +9779,17 @@ echo "${ECHO_T}PowerPC64" >&6
;;
esac
;;
+ athlon* | pentium* | i386 | i486 | i586 | i686 | k6* | winchip*)
+ echo "$as_me:$LINENO: result: x86 derivate ($withcpu)" >&5
+echo "${ECHO_T}x86 derivate ($withcpu)" >&6
+ case "$GXX_VERSION" in
+ gcc*)
+ CXXFLAGSO="$CXXFLAGSO -march=$withcpu"
+ F77FLAGSO="$F77FLAGSO -march=$withcpu"
+ ;;
+ esac
+ ;;
*)
echo "$as_me:$LINENO: result: none given or not recognized" >&5
echo "${ECHO_T}none given or not recognized" >&6
@@ -11399,6 +11426,14 @@ echo
echo -------------------------------------------------------------
echo
+if test "x$cygwin_shared_lib" = "xyes" ; then
+ echo " Please add the line"
+ echo " export PATH=\$PATH:$DEAL2_DIR/lib"
+ echo " to your .bash_profile file so that windows will be"
+ echo " able to find the deal.II shared libraries when"
+ echo " executing your programs."
+fi
+
if test "x$doxygen_not_found" = "xyes" ; then
echo " WARNING: During configuration, no version of the doxygen"
echo " WARNING: documentation generation program could be found."
diff --git a/deal.II/configure.in b/deal.II/configure.in
index 315bbc000a..77f68333f2 100644
--- a/deal.II/configure.in
+++ b/deal.II/configure.in
@@ -206,7 +206,8 @@ DEAL_II_CHECK_ISNAN
DEAL_II_CHECK_RAND_R
DEAL_II_CHECK_QUAD_DEFINE
DEAL_II_CHECK_ERROR_CODES_DEFINITION
-DEAL_II_CHECK_GETHOSTNAME
+AC_CHECK_FUNCS(gethostname)
+DEAL_II_CHECK_BROKEN_SOCKETS
@@ -281,6 +282,7 @@ esac
case "$target" in
*cygwin )
shared_lib_suffix=".dll"
+ cygwin_shared_lib="yes"
;;
esac
@@ -616,6 +618,14 @@ echo
echo -------------------------------------------------------------
echo
+if test "x$cygwin_shared_lib" = "xyes" ; then
+ echo " Please add the line"
+ echo " export PATH=\$PATH:$DEAL2_DIR/lib"
+ echo " to your .bash_profile file so that windows will be"
+ echo " able to find the deal.II shared libraries when"
+ echo " executing your programs."
+fi
+
if test "x$doxygen_not_found" = "xyes" ; then
echo " WARNING: During configuration, no version of the doxygen"
echo " WARNING: documentation generation program could be found."
diff --git a/deal.II/doc/faq.html b/deal.II/doc/faq.html
index 787e00e59b..b8e6a900e0 100644
--- a/deal.II/doc/faq.html
+++ b/deal.II/doc/faq.html
@@ -167,19 +167,12 @@
more specific. The configuration program for
deal.II expects a Unix-like environment. This is
provided by the cygwin
- compiler. People reported successful compilation with the
- following combination of tools:
-
-
- - cygwin 1.3.9-1
-
- make 3.79.1-5
-
-
-
- Earlier versions of "make" caused trouble, still you should try the latest
- versions first. A look into the . You should always use a current cygwin distribution
+ A look into the mail
- archive might be advisable in case of difficulties.
+ archive might be advisable in case of difficulties. There is a
+ small but growing community of deal.II users
+ under cygwin.
@@ -256,7 +249,8 @@
(or the place where you have installed deal.II, respectively) in the shell
- prior to execution, or add this line to .bashrc
.
+ prior to execution, or add this line to .bashrc
or
+ .bash_profile
.
To disable shared libraries, run ./configure --disable-shared
and compile deal.II again (with make all
).
diff --git a/deal.II/doc/platforms/windows.html b/deal.II/doc/platforms/windows.html
index d3209a7bd5..9b4acd0fe8 100644
--- a/deal.II/doc/platforms/windows.html
+++ b/deal.II/doc/platforms/windows.html
@@ -13,17 +13,19 @@
Installation instructions for Microsoft
- Windows 95/98/2000/NT
+ Windows 95/98/2000/NT/XP
- We have no such system to try, but we have been told that it is
- possible to use deal.II on Microsoft Windows
- systems as well, using either the CygWin or MingW environments
+ It is possible to install deal.II on Microsoft Windows
+ systems as well, using either the Cygwin
+ or MingW environments
that provide most of the Unix like features for the Windows system
as well (such as ``perl'', or ``make''). You simply have to run the
``./configure'' script on the shell and follow the installation
instructions in the ReadMe
- file.
+ file. Also, you need to include the deal.II/lib
path in your PATH
+ environment variable (e.g. by editing your .bash_profile
+ file or the Windows registry).
@@ -34,5 +36,9 @@
fixes for them.
+
+ For more details, please have a look at the FAQ section.
+
+