+
+dnl -------------------------------------------------------------
+dnl Check whether user wants optimization for a certain type of
+dnl CPU. If so, then set some flags, dependent on what he
+dnl wants and the compiler. Not very many CPUS are listed here,
+dnl but this is simple to expand if desired.
+dnl
+dnl To use this feature, use --with-cpu=something
+dnl
+dnl Usage: DEAL_II_CHECK_CPU_OPTIMIZATIONS
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_CPU_OPTIMIZATIONS, dnl
+[
+ AC_ARG_WITH(cpu,
+ [ --with-cpu=cpu Optimize specifically for the given CPU type,
+ rather than just generating code for this
+ processor family],
+ withcpu=$withval,
+ withcpu=)
+ AC_MSG_CHECKING(for CPU to optimize for)
+ case $withcpu in
+ PowerPC64)
+ AC_MSG_RESULT(PowerPC64)
+ case $GXX_VERSION in
+ gcc*)
+ CXXFLAGSG="$CXXFLAGSG -maix64"
+ CXXFLAGSO="$CXXFLAGSO -maix64 -mpowerpc64 -mcpu=powerpc64 -mtune=powerpc64"
+ AR="$AR -X 64"
+ LDFLAGS="$LDFLAGS -maix64"
+ ;;
+ esac
+ ;;
+
+ *)
+ AC_MSG_RESULT(none given or not recognized)
+ esac
+])
+
+
+
dnl -------------------------------------------------------------
dnl In some cases, -threads (or whatever else command line option)
dnl switches on some preprocessor flags. If this is not the case,
AC_DEFUN(DEAL_II_CHECK_MULTITHREADING, dnl
[
AC_ARG_ENABLE(multithreading,
- [ --enable-multithreading Set compiler flags to allow for
- multithreaded programs],
+ [ --enable-multithreading set compiler flags to allow for
+ multithreaded programs],
enablemultithreading=$enableval,
enablemultithreading=no)
])
[
AC_ARG_WITH(multithreading,
[ --with-multithreading=name If name==posix, or no name given, then use
- POSIX threads],
+ POSIX threads],
withmultithreading=$withval,
withmultithreading=no)
AC_DEFUN(DEAL_II_CHECK_COMPAT_BLOCKER, dnl
[
AC_ARG_ENABLE(compat-blocker,
- [ --enable-compat-blocker=mapping Block functions that implicitely
- assume a Q1 mapping],
+ [ --enable-compat-blocker=mapping block functions that implicitely
+ assume a Q1 mapping],
enable_compat_blocker=$enableval,
enable_compat_blocker="")
dnl Find the kdoc directory for documentation. kdoc2 is in
dnl the contrib directory, but you might want another one
AC_ARG_WITH(kdoc,
- [ --with-kdoc=DIR use kdoc installed in DIR],
+ [ --with-kdoc=DIR use kdoc installed in DIR],
kdocdir=$withval,
kdocdir=${DEAL2_DIR}/contrib/kdoc/bin)
AC_MSG_CHECKING(for kdoc)
AC_DEFUN(DEAL_II_CHECK_DOCXX, dnl
[
AC_ARG_WITH(docxx,
- [ --with-docxx=PATH use the doc++ executable pointed to by PATH],
+ [ --with-docxx=PATH use the doc++ executable pointed to by PATH],
docxx=$withval,
docxx=to-be-determined)
if test "$docxx" = to-be-determined ; then
#! /bin/sh
-# From configure.in Revision: 1.144 .
+# From configure.in Revision: 1.145 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57.
#
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-multithreading Set compiler flags to allow for
- multithreaded programs
- --enable-shared Set compiler flags to generate shared libraries
- --enable-compat-blocker=mapping Block functions that implicitely
- assume a Q1 mapping
- --enable-multigrid Include multigrid code in library
+ --enable-multithreading set compiler flags to allow for
+ multithreaded programs
+ --enable-shared set compiler flags to generate shared libraries
+ --enable-compat-blocker=mapping block functions that implicitely
+ assume a Q1 mapping
+ --enable-multigrid include multigrid code in library
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-multithreading=name If name==posix, or no name given, then use
- POSIX threads
- --with-kdoc=DIR use kdoc installed in DIR
- --with-docxx=PATH use the doc++ executable pointed to by PATH
+ POSIX threads
+ --with-cpu=cpu Optimize specifically for the given CPU type,
+ rather than just generating code for this
+ processor family
+ --with-kdoc=DIR use kdoc installed in DIR
+ --with-docxx=PATH use the doc++ executable pointed to by PATH
Some influential environment variables:
CC C compiler command
echo "${ECHO_T}------------------ checking compiler flags ------------------" >&6
+
+# Check whether --with-cpu or --without-cpu was given.
+if test "${with_cpu+set}" = set; then
+ withval="$with_cpu"
+ withcpu=$withval
+else
+ withcpu=
+fi;
+ echo "$as_me:$LINENO: checking for CPU to optimize for" >&5
+echo $ECHO_N "checking for CPU to optimize for... $ECHO_C" >&6
+ case $withcpu in
+ PowerPC64)
+ echo "$as_me:$LINENO: result: PowerPC64" >&5
+echo "${ECHO_T}PowerPC64" >&6
+ case $GXX_VERSION in
+ gcc*)
+ CXXFLAGSG="$CXXFLAGSG -maix64"
+ CXXFLAGSO="$CXXFLAGSO -maix64 -mpowerpc64 -mcpu=powerpc64 -mtune=powerpc64"
+ AR="$AR -X 64"
+ LDFLAGS="$LDFLAGS -maix64"
+ ;;
+ esac
+ ;;
+
+ *)
+ echo "$as_me:$LINENO: result: none given or not recognized" >&5
+echo "${ECHO_T}none given or not recognized" >&6
+ esac
+
+
+
echo "$as_me:$LINENO: checking for consistency of CXXFLAGSG flags" >&5
echo $ECHO_N "checking for consistency of CXXFLAGSG flags... $ECHO_C" >&6
ac_ext=cc
AC_MSG_RESULT(-------------- configuring shared/static libs ---------------)
AC_ARG_ENABLE(shared,
-[ --enable-shared Set compiler flags to generate shared libraries],
+[ --enable-shared set compiler flags to generate shared libraries],
enableshared=$enableval,
enableshared=yes)
dnl Test if multigrid should be enabled
dnl default is yes if multigrid directory present
AC_ARG_ENABLE(multigrid,
-[ --enable-multigrid Include multigrid code in library],
+[ --enable-multigrid include multigrid code in library],
enablemultigrid=$enableval,
if test -r deal.II/include/multigrid/multigrid.h ; then
enablemultigrid=yes ;
dnl -------------------------------------------------------------
-dnl Consistency of compiler flags
+dnl Optimizations and consistency of compiler flags
dnl -------------------------------------------------------------
AC_MSG_RESULT()
AC_MSG_RESULT(------------------ checking compiler flags ------------------)
+dnl Possible add some flags is optimizations are requested
+DEAL_II_CHECK_CPU_OPTIMIZATIONS
+
dnl Last check: test whether CXXFLAGS and F77FLAGS are ok
DEAL_II_CHECK_CXXFLAGS_CONSISTENCY
DEAL_II_CHECK_F77FLAGS_CONSISTENCY