From 3a9989623ed5f7824947f4712f42c76385ff3782 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/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 ++++++++++++++-- 7 files changed, 156 insertions(+), 49 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/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: -

- - -

- 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. +

+ diff --git a/deal.II/doc/readme.html b/deal.II/doc/readme.html index 440c504290..bf3c59081d 100644 --- a/deal.II/doc/readme.html +++ b/deal.II/doc/readme.html @@ -57,7 +57,10 @@ the use of shared libraries; courtesy of testdrive.hp.com);
  • Mac OS X 10.2 with gcc 3.x (with some restrictions on - the use of shared libraries). + the use of shared libraries); +
  • Cygwin/Windows with + cygwin1.dll versions 1.5.xx and gcc 3.3 under Windows XP + and NT. Furthermore, for the following list of systems, we have collected our experiences on separate pages: @@ -82,7 +85,7 @@ PGCC 3.x and 4.x on x86 Linux.
  • Microsoft - Windows 95/98/2000/NT. + Windows 95/98/2000/NT/XP.
  • Borland C++/Kylix. @@ -407,7 +410,8 @@

    If shared libraries were built instead of static ones, then the - suffix .a is replaced by .so + suffix .a is replaced by .so or + .dll (for Cygwin/Windows).

    @@ -478,7 +482,7 @@ --disable-shared. (They are disabled by default on those systems for which we could not make them work. This applies to AIX, DEC Alpha stations running Linux and OSF1, - CygWin Windows systems, and some other systems as + and some other systems as well. Probably, there are simple solutions, but since we can't regularly test on these systems, we did not try very hard. If anyone would like to look into this, we would be pleased to @@ -552,6 +556,32 @@ systems.

    +
  • +

    + --with-cpu=...: this enables specific optimization + flags for your processor. Programs compiled with these options + might not execute on an other system, even if that system has a very + similar CPU (e.g. AMD and Intel processors). However, execution time + can be increased by up to 30 percent if this optimization is enabled. +

    + +

    + Currently supported CPUs are PowerPC64, i386, + i486, i586, i686, + pentium, pentium-mmx, pentiumpro, + pentium2, pentium3, pentium4, + k6, k6-2, k6-3, athlon, + athlon-tbird, athlon-4, athlon-xp, + athlon-mp, winchip-c6, and winchip2. +

    + +

    + Optimizations currently only work in conjunction with gcc. Without the + option --with-cpu=xxx, no cpu specific optimization is applied. + Furthermore, CPU specific optimization is switched on only for the compilation + of the optimized library versions. +

    +
  • --with-doxygen=...: usually, ./configure is -- 2.39.5