1# Process this file with autoconf to produce a configure script 2 3#------------------------------------------------------------------------------- 4 5# This file is part of Code_Saturne, a general-purpose CFD tool. 6# 7# Copyright (C) 1998-2021 EDF S.A. 8# 9# This program is free software; you can redistribute it and/or modify it under 10# the terms of the GNU General Public License as published by the Free Software 11# Foundation; either version 2 of the License, or (at your option) any later 12# version. 13# 14# This program is distributed in the hope that it will be useful, but WITHOUT 15# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17# details. 18# 19# You should have received a copy of the GNU General Public License along with 20# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 21# Street, Fifth Floor, Boston, MA 02110-1301, USA. 22 23#------------------------------------------------------------------------------- 24 25#------------------------------------------------------------------------------ 26# Initialization 27#------------------------------------------------------------------------------ 28 29m4_define([cs_licence_c_comment], 30[/* 31 This file is part of Code_Saturne, a general-purpose CFD tool. 32 33 Copyright (C) 1998-2021 EDF S.A. 34 35 This program is free software; you can redistribute it and/or modify it under 36 the terms of the GNU General Public License as published by the Free Software 37 Foundation; either version 2 of the License, or (at your option) any later 38 version. 39 40 This program is distributed in the hope that it will be useful, but WITHOUT 41 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 42 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 43 details. 44 45 You should have received a copy of the GNU General Public License along with 46 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 47 Street, Fifth Floor, Boston, MA 02110-1301, USA. 48*/]) 49 50# Note: proper determination of the version string requires the NEWS file 51# to be maintained properly (as it should be anyways). 52 53m4_define([cs_version_string], 54 [m4_normalize(esyscmd([build-aux/cs_version.py]))]) 55 56AC_INIT([code_saturne],[cs_version_string],[saturne-support@edf.fr],[],[https://code-saturne.org]) 57AC_CONFIG_SRCDIR([src/apps/cs_solver.c]) 58 59# Use the config directory for libtool stuff ... 60AC_CONFIG_AUX_DIR(build-aux) 61AC_CONFIG_MACRO_DIR(m4) 62 63AC_CANONICAL_TARGET 64AC_CONFIG_HEADERS([cs_config.h]) 65 66# Initialize automake with the following options: 67# - foreign, so as to handle the absence of ChangeLog (automatically generated) 68# - tar-pax, so as to handle long lines (> 99 characters) in tar archives 69# Warnings can be activated at bootstrap with 'autoreconf -vi --warnings=all' 70AM_INIT_AUTOMAKE([foreign tar-pax subdir-objects]) 71 72# Enable maintainer mode by default for a developer checkout 73AS_IF([test -d ${srcdir}/.git], 74 [AM_MAINTAINER_MODE([enable])], 75 [AM_MAINTAINER_MODE([disable])]) 76 77# Enable silent rules with "./configure --enable-silent-rules" or "make V=0" 78m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) 79 80#------------------------------------------------------------------------------ 81# Checks for programs. 82#------------------------------------------------------------------------------ 83 84AC_ARG_WITH(shell-env, 85 [AS_HELP_STRING([--with-shell-env], 86 [source given or detected shell environment])], 87 [if test "x$with_shell_env" = "x"; then 88 shell_env=auto 89 elif test -f "$with_shell_env"; then 90 shell_env="$with_shell_env" 91 fi], 92 [shell_env=no] 93) 94AC_SUBST(shell_env) 95 96AM_CONDITIONAL(HAVE_SHELL_LAUNCHER, [test "${shell_env}" != no]) 97 98# Check for environment modules 99#------------------------------ 100 101CS_AC_TEST_ENV_MODULES 102 103CS_AC_SALOME_ENV 104 105# Check for C and Fortran compilers 106#---------------------------------- 107 108user_CPPFLAGS=$CPPFLAGS 109user_CFLAGS=$CFLAGS 110user_CFLAGS_HOT=$CFLAGS_HOT 111user_CXXFLAGS=$CXXFLAGS 112user_FCFLAGS=$FCFLAGS 113user_FCFLAGS_HOT=$FCFLAGS_HOT 114user_LDFLAGS=$LDFLAGS 115user_LIBS=$LIBS 116user_CS_LD=$CS_LD 117 118AC_PROG_CC 119AC_PROG_CXX 120AC_PROG_FC 121 122AC_PROG_INSTALL 123AC_PROG_LN_S 124AM_PROG_CC_C_O 125AC_PROG_SED 126 127if test "x$CC" = "x" ; then 128 AC_MSG_FAILURE([cannot find C compiler]) 129fi 130if test "x$FC" = "x" ; then 131 AC_MSG_FAILURE([cannot find Fortran compiler]) 132fi 133 134# Check for CUDA compiler 135CS_AC_TEST_CUDA 136 137# Needed to use Microsoft archiver lib.exe 138# It copies the ar-lib script, similar to the compile script 139m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) 140 141# Debug or production compilation mode (debug by default) ? 142 143AC_ARG_ENABLE(debug, 144 [AS_HELP_STRING([--enable-debug], [enable debugging (reduces optimization)])], 145 [ 146 case "${enableval}" in 147 yes) debug=yes ;; 148 no) debug=no ;; 149 *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; 150 esac 151 ], 152 [ debug=no ] 153) 154AC_SUBST(debug) 155 156AC_ARG_ENABLE(profile, 157 [AS_HELP_STRING([--enable-profile], [enable profiling])], 158 [ 159 case "${enableval}" in 160 yes) profile=yes ;; 161 no) profile=no ;; 162 *) AC_MSG_ERROR([bad value ${enableval} for --enable-profile]) ;; 163 esac 164 ], 165 [ profile=no ] 166) 167AC_SUBST(profile) 168 169# Optionally deactivate automatic determination of flags on known systems 170 171AC_ARG_ENABLE(auto-flags, 172 [AS_HELP_STRING([--disable-auto-flags], [do not define *FLAGS on known systems])], 173 [ 174 case "${enableval}" in 175 yes) auto_flags=yes ;; 176 no) auto_flags=no ;; 177 *) AC_MSG_ERROR([bad value ${enableval} for --enable-auto-flags]) ;; 178 esac 179 ], 180 [ auto_flags=yes ] 181) 182 183# Optionally install the code with relocatable features 184 185AC_ARG_ENABLE(relocatable, 186 [AS_HELP_STRING([--enable-relocatable], [enable relocatable installation])], 187 [ 188 case "${enableval}" in 189 yes) relocatable=yes ;; 190 no) relocatable=no ;; 191 *) AC_MSG_ERROR([bad value ${enableval} for --enable-relocatable]) ;; 192 esac 193 ], 194 [ relocatable=no ] 195) 196AC_SUBST(relocatable) 197AM_CONDITIONAL(HAVE_RELOCATABLE, [test "${relocatable}" = yes]) 198if test "${relocatable}" = yes ; then 199 AC_DEFINE([HAVE_RELOCATABLE], 1, [Relocatable installation]) 200fi 201 202# Default compiler options (may be modified 203# by defining CFLAGS in the environment) 204#------------------------------------------ 205 206if test "x$auto_flags" = "xyes" ; then 207 208 # Source associated recommended compiler options 209 210 if test -f "$srcdir/config/cs_auto_flags.sh" ; then 211 AC_MSG_NOTICE([sourcing config/cs_auto_flags.sh (test for known compilers)]) 212 . "$srcdir/config/cs_auto_flags.sh" 213 else 214 AC_MSG_WARN([config/cs_auto_flags.sh default configuration file not found]) 215 fi 216 217 # Default flags 218 CPPFLAGS="$cppflags_default $user_CPPFLAGS" 219 CFLAGS="$cflags_default $user_CFLAGS" 220 CXXFLAGS="$cxxflags_default $user_CXXFLAGS" 221 CXXFLAGS_STD="$cxxflags_default_std" 222 FCFLAGS="$fcflags_default $user_FCFLAGS" 223 LDFLAGS="$ldflags_default $user_LDFLAGS" 224 LIBS="$libs_default $user_LIBS" 225 LDRPATH="$ldflags_rpath" 226 227 if test "x$debug" = xyes; then 228 # Debug flags 229 CFLAGS_DBG="$cflags_default_dbg" 230 CXXFLAGS_DBG="$cxxflags_default_dbg" 231 FCFLAGS_DBG="$fcflags_default_dbg" 232 # Add debug flags for linker 233 LDFLAGS="$LDFLAGS $ldflags_default_dbg" 234 else 235 # Normal optimization flags 236 CFLAGS_OPT="$cflags_default_opt" 237 CXXFLAGS_OPT="$cxxflags_default_opt" 238 FCFLAGS_OPT="$fcflags_default_opt" 239 # Hot optimization flags 240 CFLAGS_HOT="$cflags_default_hot $user_CFLAGS_HOT" 241 CXXFLAGS_HOT="$cxxflags_default_hot" 242 FCFLAGS_HOT="$fcflags_default_hot $user_FCFLAGS_HOT" 243 # Add optimization flags for linker 244 LDFLAGS="$LDFLAGS $ldflags_default_opt" 245 if test "x$profile" = xyes; then 246 # Profiling flags 247 CFLAGS_DBG="$cflags_default_prf" 248 CXXFLAGS_DBG="$cxxflags_default_prf" 249 FCFLAGS_DBG="$fcflags_default_prf" 250 # Add profiling flags for linker 251 LDFLAGS="$LDFLAGS $ldflags_default_prf" 252 fi 253 fi 254 255 AC_SUBST(CFLAGS_DBG) 256 AC_SUBST(CFLAGS_OPT) 257 AC_SUBST(CFLAGS_HOT) 258 259 AC_SUBST(CXXFLAGS_DBG) 260 AC_SUBST(CXXFLAGS_OPT) 261 AC_SUBST(CXXFLAGS_HOT) 262 AC_SUBST(CXXFLAGS_STD) 263 264 AC_SUBST(FCFLAGS_DBG) 265 AC_SUBST(FCFLAGS_OPT) 266 AC_SUBST(FCFLAGS_HOT) 267 268 AC_SUBST(LDRPATH) 269 AC_SUBST(cs_cc_version_string, [${cs_ac_cc_version}]) 270 AC_SUBST(cs_cxx_version_string, [${cs_ac_cxx_version}]) 271 AC_SUBST(cs_fc_version_string, [${cs_ac_fc_version}]) 272 AC_SUBST(cs_nvcc_version_string, [${cs_ac_nvcc_version}]) 273 274 if test "x$cs_ac_cc_version" != "x" -a "x$cs_ac_cc_version" != "xunknown" ; then 275 AC_DEFINE_UNQUOTED([CS_CC_VERSION_STRING], ["$cs_ac_cc_version"], [C compiler version string]) 276 fi 277 if test "x$cs_ac_cxx_version" != "x" -a "x$cs_ac_cxx_version" != "xunknown" ; then 278 AC_DEFINE_UNQUOTED([CS_CXX_VERSION_STRING], ["$cs_ac_cxx_version"], [C++ compiler version string]) 279 fi 280 if test "x$cs_ac_fc_version" != "x" -a "x$cs_ac_fc_version" != "xunknown" ; then 281 AC_DEFINE_UNQUOTED([CS_FC_VERSION_STRING], ["$cs_ac_fc_version"], [Fortran compiler version string]) 282 fi 283 if test "x$cs_ac_nvcc_version" != "x" ; then 284 AC_DEFINE_UNQUOTED([CS_NVCC_VERSION_STRING], ["$cs_ac_nvcc_version"], [CUDA compiler version string]) 285 fi 286 287fi 288 289# Add some preprocessor flags to include additional system features 290#------------------------------------------------------------------ 291 292case "$host_os" in 293 linux*) 294 CPPFLAGS="${CPPFLAGS} -D_POSIX_C_SOURCE=200809L" 295 ;; 296 darwin*) 297 CPPFLAGS="${CPPFLAGS} -D_DARWIN_C_SOURCE" 298 ;; 299 *) 300 ;; 301esac 302 303# Preprocessor flags for debugging purposes 304 305if test "x$debug" = "xyes"; then 306 CPPFLAGS="${CPPFLAGS} -DDEBUG" 307else 308 CPPFLAGS="${CPPFLAGS} -DNDEBUG" 309fi 310 311# We may only turn on processing for libtool now that the basic compiler 312# and linker flags are set (to avoid issues with linkers with different 313# modes such as 32 and 64 bit which may be modified by compiler or 314# linker flags). 315 316# AC_DISABLE_SHARED may not be used inside a test, as it seems to 317# take effect whether the result is true or not (maybe due to a bug), 318# so we directly use autoconf's enable_shared variable. 319 320if test "$host_os" = mingw64 ; then 321 enable_shared=no 322fi 323AC_SUBST(enable_shared) 324 325# Initialize libtool. 326 327m4_pushdef([cs_lt_init_args], [disable-static, win32-dll, no-pic]) 328LT_INIT([disable-static, win32-dll]) 329 330# In static mode, multiple definitions must be allowed for the linker. 331# On some systems, such as Mac OS X in static mode, limitations 332# of the linker require special handling for user user subroutines 333# (due to not handling multiple definitions in the case of Mac OS X). 334# Detect this here, so as to transfer the name of a specific solution 335# (if necessary) to the Python package. 336 337cs_special_user_link= 338if test "x$enable_shared" = "xno" ; then 339 case "$host_os" in 340 linux* | *bsd* | cnk* | mingw64 | cygwin* ) 341 if test "x$auto_flags" = "xyes" ; then 342 LDFLAGS="${LDFLAGS} -Wl,--allow-multiple-definition" 343 fi 344 ;; 345 darwin*) 346 cs_special_user_link='ar_x' 347 ;; 348 esac 349else 350 case "$host_os" in 351 linux* ) 352 if test "x$auto_flags" = "xyes" ; then 353 case "$cs_ac_cc_version" in 354 Cray* ) 355 CFLAGS="${CFLAGS} -fPIC" 356 ;; 357 *) 358 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" 359 ;; 360 esac 361 case "$cs_ac_cxx_version" in 362 Cray* ) 363 CXXFLAGS="${CXXFLAGS} -fPIC" 364 ;; 365 *) 366 ;; 367 esac 368 case "$cs_ac_fc_version" in 369 Cray* ) 370 FCFLAGS="${FCFLAGS} -fPIC" 371 ;; 372 *) 373 ;; 374 esac 375 fi 376 ;; 377 esac 378fi 379AC_SUBST(cs_special_user_link) 380 381#------------------------------------------------------------------------------ 382# Checks for typedefs, structures, and compiler characteristics. 383#------------------------------------------------------------------------------ 384 385AC_C_CONST 386AC_C_INLINE 387AC_TYPE_SIZE_T 388AC_TYPE_PID_T 389 390AC_HEADER_STDBOOL 391 392AC_CHECK_TYPES([long long, unsigned long long]) 393AC_CHECK_TYPES([int32_t]) 394AC_CHECK_TYPES([int64_t]) 395AC_CHECK_TYPES([uint32_t]) 396AC_CHECK_TYPES([uint64_t]) 397AC_CHECK_TYPES([ptrdiff_t]) 398 399AC_CHECK_SIZEOF([void *]) 400AC_CHECK_SIZEOF([short]) 401AC_CHECK_SIZEOF([int]) 402AC_CHECK_SIZEOF([long]) 403AC_CHECK_SIZEOF([long long]) 404AC_CHECK_SIZEOF([float]) 405AC_CHECK_SIZEOF([double]) 406 407# Use long global numbers ? 408AC_ARG_ENABLE(long-gnum, 409 [AS_HELP_STRING([--enable-long-gnum],[use long global numbers])], 410 [ 411 case "${enableval}" in 412 yes) cs_have_long_gnum=yes ;; 413 no) cs_have_long_gnum=no ;; 414 *) AC_MSG_ERROR([bad value ${enableval} for --enable-long-gnum]) ;; 415 esac 416 ], 417 [ cs_have_long_gnum=yes ] 418) 419 420if test "x$cs_have_long_gnum" = "xyes"; then 421 AC_DEFINE([HAVE_LONG_GNUM], 1, [Use 64-bit type for cs_gnum_t.]) 422fi 423AC_SUBST(cs_have_long_gnum) 424 425# Use long local numbers ? 426AC_ARG_ENABLE(long-lnum, 427 [AS_HELP_STRING([--enable-long-lnum],[use long local numbers])], 428 [ 429 case "${enableval}" in 430 yes) cs_have_long_lnum=yes ;; 431 no) cs_have_long_lnum=no ;; 432 *) AC_MSG_ERROR([bad value ${enableval} for --enable-long-lnum]) ;; 433 esac 434 ], 435 [ cs_have_long_lnum=no ] 436) 437 438if test "x$cs_have_long_lnum" = "xyes"; then 439 AC_DEFINE([HAVE_LONG_LNUM], 1, [Use 64-bit type for cs_lnum_t.]) 440fi 441AC_SUBST(cs_have_long_lnum) 442 443# Check for Fortran module generation 444CS_AC_TEST_FC_MOD 445 446# First determination of Fortran libraries (before OpenMP test) 447AC_FC_LIBRARY_LDFLAGS 448 449#------------------------------------------------------------------------------ 450# Determine OpenMP support 451#------------------------------------------------------------------------------ 452 453# It seems that we may not use AC_OPENMP both for C and Fortran, so 454# we use our own method here, based on flags already set by default 455# or by the user. 456 457# From this point, no runtime tests should be run, so no issues should 458# arise due to missing RPATH or LD_LIBRARY_PATH values in case of non-standard 459# compiler install paths, such as may happen with gcc's libgomp. 460 461cs_have_openmp=no 462cs_have_openmp_target=no 463cs_have_openmp_f=no 464 465AC_ARG_ENABLE(openmp, 466 [AS_HELP_STRING([--disable-openmp], [disable OpenMP support])], 467 [ 468 case "${enableval}" in 469 yes) cs_have_openmp=yes ;; 470 no) cs_have_openmp=no ;; 471 *) AC_MSG_ERROR([bad value ${enableval} for --enable-openmp]) ;; 472 esac 473 ], 474 [ cs_have_openmp=yes ] 475) 476 477AC_ARG_ENABLE(openmp_target, 478 [AS_HELP_STRING([--enable-openmp-target], [enable OpenMP accelerator support])], 479 [ 480 case "${enableval}" in 481 yes) cs_have_openmp_target=yes 482 cs_have_openmp=yes ;; 483 no) cs_have_openmp_target=no ;; 484 *) AC_MSG_ERROR([bad value ${enableval} for --enable-openmp-target]) ;; 485 esac 486 ], 487 [ cs_have_openmp=yes ] 488) 489 490if test "x$cs_have_openmp_target" = "xyes" ; then 491 cs_have_openmp=yes 492fi 493 494if test "x$cs_have_openmp" = "xyes" ; then 495 496 saved_CFLAGS="$CFLAGS" 497 saved_CXXFLAGS="$CFLAGS" 498 saved_FCFLAGS="$FCFLAGS" 499 saved_LDFLAGS="$LDFLAGS" 500 501 CFLAGS="${CFLAGS} ${cflags_default_omp}" 502 CXXFLAGS="${CXXFLAGS} ${cxxflags_default_omp}" 503 FCFLAGS="${FCFLAGS} ${fcflags_default_omp}" 504 LDFLAGS="${LDFLAGS} ${cflags_default_omp}" 505 506 AC_MSG_CHECKING([for OpenMP (C)]) 507 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <omp.h>]], 508 [[ omp_get_num_threads();]])], 509 [cs_have_openmp=yes], 510 [cs_have_openmp=no]) 511 AC_MSG_RESULT($cs_have_openmp) 512 if test "x$cs_have_openmp" = "xyes" ; then 513 AC_LANG_PUSH([Fortran]) 514 AC_MSG_CHECKING([for OpenMP (Fortran)]) 515 AC_LINK_IFELSE([AC_LANG_PROGRAM([], 516 [[ 517 integer n 518 n = omp_get_num_threads() 519]])], 520 [cs_have_openmp_f=yes], 521 [cs_have_openmp_f=no]) 522 AC_MSG_RESULT($cs_have_openmp_f) 523 AC_LANG_POP([Fortran]) 524 fi 525 if test "x$cs_have_openmp" = "xyes" ; then 526 AC_DEFINE([HAVE_OPENMP], 1, [openmp support]) 527 if test "x$cs_have_openmp_f" = "xno" ; then 528 FCFLAGS="$saved_FCFLAGS" 529 fi 530 if test "x$cs_have_openmp_target" = "xyes" ; then 531 AC_DEFINE([HAVE_OPENMP_TARGET], 1, [openmp accelerator support]) 532 fi 533 else 534 cs_have_openmp=no 535 CFLAGS="$saved_CFLAGS" 536 CXXFLAGS="$saved_CXXFLAGS" 537 FCFLAGS="$saved_FCFLAGS" 538 LDFLAGS="$saved_LDFLAGS" 539 fi 540fi 541 542AC_SUBST(cs_have_openmp) 543AC_SUBST(cs_have_openmp_target) 544 545# Now that compiler options are determined (relative notably to OpenMP), 546# update Fortran libraries necessary to link. 547 548if test "x$cs_have_openmp_f" = "xyes" ; then 549 AC_FC_LIBRARY_LDFLAGS 550fi 551 552#------------------------------------------------------------------------------ 553# Determine Accelerator support 554#------------------------------------------------------------------------------ 555 556cs_have_accel=no 557 558if test "x$auto_flags" = "xyes" ; then 559 if test "$cs_have_cuda" = "yes"; then 560 cs_have_accel=yes 561 NVCCFLAGS="$NVCCFLAGS $nvccflags_default" 562 if test "x$enable_shared" = "xyes" ; then 563 NVCCFLAGS="${NVCCFLAGS} --compiler-options -fPIC" 564 fi 565 if test "x$debug" = xyes; then 566 NVCCFLAGS_DBG="$nvccflags_default_dbg" 567 else 568 NVCCFLAGS="$NVCCFLAGS $nvccflags_default_opt" 569 if test "x$profile" = xyes; then 570 NVCCFLAGS="$NVCCFLAGS $nvccflags_default_prf" 571 fi 572 fi 573 AC_SUBST(NVCCFLAGS_DBG) 574 AC_SUBST(NVCCFLAGS_OPT) 575 AC_SUBST(NVCCCFLAGS_HOT) 576 fi 577 578 if test "$cs_have_openmp_target" = "yes"; then 579 cs_have_accel=yes 580 CFLAGS="${CFLAGS} ${cflags_default_omp_ad}" 581 CXXFLAGS="${CXXFLAGS} ${cxxflags_default_omp_ad}" 582 FCFLAGS="${FCFLAGS} ${fcflags_default_omp_ad}" 583 LDFLAGS="${LDFLAGS} ${cflags_default_omp_ad}" 584 fi 585fi 586 587AM_CONDITIONAL([HAVE_ACCEL], [test "$cs_have_accel" = "yes"]) 588AM_CONDITIONAL([HAVE_OPENMP_TARGET], [test "$cs_have_openmp_target" = "yes"]) 589 590#------------------------------------------------------------------------------ 591# Checks for Python support. 592#------------------------------------------------------------------------------ 593 594AC_ARG_VAR([PYTHON], [the Python interpreter]) 595AM_PATH_PYTHON(["3.4"]) 596 597# On MinGW hosts, Automake/Python mixes Windows-style and GNU-style paths 598# It seems better to use the standard way of installing Python modules, 599# as it is on Unix systems (whichever is chosen, Python modules will be 600# frozen by cx_freeze for Windows packaging). 601# So, we choose to override some Python paths. 602if test "$host_os" = mingw64 ; then 603 604 AC_MSG_NOTICE([Overriding Python paths on MinGW hosts]) 605 606 am_cv_python_pythondir=\${prefix}/lib/python$PYTHON_VERSION/site-packages 607 AC_MSG_CHECKING([for $PYTHON script directory]) 608 pythondir=$am_cv_python_pythondir 609 pkgpythondir=\${pythondir}/$PACKAGE 610 AC_MSG_RESULT([$pythondir]) 611 612 am_cv_python_pyexecdir=\${exec_prefix}/lib/python$PYTHON_VERSION/site-packages 613 AC_MSG_CHECKING([for $PYTHON extension module directory]) 614 pyexecdir=$am_cv_python_pyexecdir 615 pkgpyexecdir=\${pyexecdir}/$PACKAGE 616 AC_MSG_RESULT([$pyexecdir]) 617 AC_SUBST(pythonversion, [${PYTHON_VERSION}]) 618fi 619 620win_prefix="" 621if test "$host_os" = mingw64 ; then 622 win_prefix=`cygpath --path --windows "${prefix}"` 623 AC_SUBST(win_prefix, [${win_prefix}]) 624fi 625 626#------------------------------------------------------------------------------ 627# Checks for additional version information. 628#------------------------------------------------------------------------------ 629 630# Define the different version number where needed 631# (detailed version numbers are generated during the build step as a 632# precaution, so that when switching revisions not requiring 633# rebuild of the configure file / re-configure, the correct 634# version number is used). 635 636cs_version_short=`$PYTHON ${srcdir}/build-aux/cs_version.py --short` 637AC_SUBST(cs_version_short) 638 639#------------------------------------------------------------------------------ 640# Optional shared library and plugin support 641#------------------------------------------------------------------------------ 642 643cs_have_dlloader=no 644 645AC_ARG_ENABLE(dlloader, 646 [AS_HELP_STRING([--disable-dlloader], [disable dynamic shared library loading])], 647 [ 648 case "${enableval}" in 649 yes) cs_have_dlloader=yes ;; 650 no) cs_have_dlloader=no ;; 651 *) AC_MSG_ERROR([bad value ${enableval} for --enable-dlloader]) ;; 652 esac 653 ], 654 [ cs_have_dlloader=yes ] 655) 656 657if test "x$cs_have_dlloader" = "xyes" ; then 658 659 saved_LIBS="$LIBS" 660 LIBS="$LIBS -ldl" 661 662 AC_MSG_CHECKING([for dlopen]) 663 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <dlfcn.h>]], 664 [[ dlopen("none.so", RTLD_LAZY);]])], 665 [cs_have_dlloader=dlopen], 666 [cs_have_dlloader=no]) 667 AC_MSG_RESULT($cs_have_dlloader) 668 if test "x$cs_have_dlloader" = "xdlopen" ; then 669 AC_DEFINE([HAVE_DLOPEN], 1, [dlopen support]) 670 else 671 LIBS="$saved_LIBS" 672 cs_have_dlloader=no 673 fi 674 675fi 676 677# Use RTLD_GLOBAL for dlopen ? 678 679# Note setting enable_dlopen_rtld_global in the last statement is not 680# useful on modern systems but avoids error due to empty else on Centos 6... 681 682AC_ARG_ENABLE(dlopen-rtld-global, 683 [AS_HELP_STRING([--enable-dlopen-rtld-global], [add RTLD_GLOBAL to dlopen flags])], 684 [ 685 case "${enableval}" in 686 yes) AC_DEFINE([CS_DLOPEN_USE_RTLD_GLOBAL], 1, 687 [use RTLD_GLOBAL in dlopen flags.]) ;; 688 no) ;; 689 *) AC_MSG_ERROR([bad value ${enableval} for --enable-dlopen-rtld-global]) ;; 690 esac 691 ], 692 [ enable_dlopen_rtld_global=no ] 693) 694 695# Cleanup Fortran library flags 696 697FCLIBS=`$PYTHON ${srcdir}/build-aux/cs_build_tools.py clean-lib-flags $FCLIBS` 698AC_SUBST(FCLIBS) 699 700#------------------------------------------------------------------------------ 701# Checks for libraries. 702#------------------------------------------------------------------------------ 703 704CS_AC_TEST_PLE(["2.0.0"]) 705 706AM_CONDITIONAL(HAVE_INTERNAL_PLE, test x$cs_have_internal_ple = xyes) 707if test "x$cs_have_internal_ple" = xyes; then 708 AC_CONFIG_SUBDIRS([libple]) 709fi 710 711CS_AC_TEST_BLAS([$cs_have_openmp]) 712CS_AC_TEST_MPI 713CS_AC_TEST_METIS 714CS_AC_TEST_SCOTCH 715CS_AC_TEST_HDF5 716CS_AC_TEST_CGNS 717CS_AC_TEST_MED 718CS_AC_TEST_CCM 719CS_AC_TEST_EOS 720CS_AC_TEST_FREESTEAM 721CS_AC_TEST_COOLPROP 722CS_AC_TEST_ZLIB 723CS_AC_TEST_MEDCOUPLING 724CS_AC_TEST_CATALYST 725CS_AC_TEST_MELISSA 726CS_AC_TEST_MUMPS 727CS_AC_TEST_PETSC 728CS_AC_TEST_HYPRE 729CS_AC_TEST_AMGX 730 731CS_AC_TEST_DOCS 732 733cs_have_neptune_cfd=no 734if test -f ${srcdir}/neptune_cfd/configure; then 735 cs_have_neptune_cfd=yes 736fi 737 738# Check if we need to force link with C++ 739cs_have_link_cxx=no 740if test x$cs_have_neptune_cfd = xyes ; then 741 cs_have_link_cxx=yes 742elif test x$cs_have_accel = xyes; then 743 cs_have_link_cxx=yes 744elif test x$cs_have_med_link_cxx = xyes ; then 745 cs_have_link_cxx=yes 746elif test x$cs_have_medcoupling = xyes -o x$cs_have_paramedmem = xyes ; then 747 if test x$enable_shared = xno -o x$cs_have_plugin_medcoupling = xno ; then 748 cs_have_link_cxx=yes 749 fi 750elif test x$cs_have_eos = xyes ; then 751 cs_have_link_cxx=yes 752elif test x$cs_have_coolprop = xyes ; then 753 cs_have_link_cxx=yes 754elif test x$cs_have_catalyst = xyes ; then 755 if test x$enable_shared = xno -o x$cs_have_plugin_catalyst = xno ; then 756 cs_have_link_cxx=yes 757 fi 758fi 759if test x$user_CS_LD != "x" ; then 760 CS_LD=$user_CS_LD 761elif test $cs_have_link_cxx = yes ; then 762 CS_LD=$CXX 763else 764 CS_LD=$CC 765fi 766AC_SUBST(CS_LD) 767AM_CONDITIONAL(HAVE_LINK_CXX, test x$cs_have_link_cxx = xyes) 768 769#------------------------------------------------------------------------------ 770# Enables Code_Saturne front-end 771#------------------------------------------------------------------------------ 772 773AC_ARG_ENABLE(frontend, [AS_HELP_STRING([--disable-frontend], 774 [disable front-end elements])], 775 [ 776 case "${enableval}" in 777 yes) cs_have_frontend=yes ;; 778 no) cs_have_frontend=no ;; 779 *) AC_MSG_ERROR([bad value ${enableval} for --enable-frontend]) ;; 780 esac 781 ], 782 [ cs_have_frontend=yes ] 783) 784AM_CONDITIONAL(HAVE_FRONTEND, test x$cs_have_frontend = xyes) 785AC_SUBST(cs_have_frontend) 786 787#------------------------------------------------------------------------------ 788# Enables Code_Saturne back-end 789#------------------------------------------------------------------------------ 790 791AC_ARG_ENABLE(backend, [AS_HELP_STRING([--disable-backend], 792 [disable back-end elements])], 793 [ 794 case "${enableval}" in 795 yes) cs_have_backend=yes ;; 796 no) cs_have_backend=no ;; 797 *) AC_MSG_ERROR([bad value ${enableval} for --enable-backend]) ;; 798 esac 799 ], 800 [ cs_have_backend=yes ] 801) 802AM_CONDITIONAL(HAVE_BACKEND, test x$cs_have_backend = xyes) 803AC_SUBST(cs_have_backend) 804 805#------------------------------------------------------------------------------ 806# Enables Code_Saturne graphical user interface 807#------------------------------------------------------------------------------ 808 809AC_ARG_ENABLE(gui, [AS_HELP_STRING([--disable-gui], 810 [disable the Graphical User Interface])], 811 [ 812 case "${enableval}" in 813 yes) cs_have_gui=check ;; 814 no) cs_have_gui=no ;; 815 *) AC_MSG_ERROR([bad value ${enableval} for --enable-gui]) ;; 816 esac 817 ], 818 [ cs_have_gui=check ] 819) 820 821if test "x$cs_have_frontend" = "xno" ; then 822 cs_have_gui=no 823fi 824 825#------------------------------------------------------------------------------ 826# Checks for PyQt support. 827#------------------------------------------------------------------------------ 828 829# Test for PyQt4 or PyQt5 830cs_have_gui_qt4=no 831cs_have_gui_qt5=no 832 833if test "x$cs_have_gui" = "xcheck" ; then 834 835 if test "x$QT_SELECT" = "x" -o "x$QT_SELECT" = "x5" ; then 836 837 AC_MSG_CHECKING([for PyQt5 version >= 5.0]) 838 839 prog="[import sys, string 840try: import PyQt5 841except ImportError: sys.exit(1) 842from PyQt5.QtCore import * 843if list(map(int, QT_VERSION_STR.split('.'))) < [5,0,0]: sys.exit(1) 844if list(map(int, PYQT_VERSION_STR.split('.'))) < [5,0,0]: sys.exit(1) 845sys.exit(0)]" 846 847 ${PYTHON} -c "${prog}" 848 retval=$? 849 850 if test $retval -ne 0 ; then 851 AC_MSG_RESULT([no]) 852 else 853 AC_MSG_RESULT([yes]) 854 cs_have_gui=yes 855 cs_have_gui_qt5=yes 856 fi 857 858 fi 859 860fi 861 862if test "x$cs_have_gui" = "xcheck" ; then 863 864 cs_have_gui=no 865 866 if test "x$QT_SELECT" = "x" -o "x$QT_SELECT" = "x4" ; then 867 868 AC_MSG_CHECKING([for PyQt4 version >= 4.5]) 869 870 prog="[import sys, string 871try: import PyQt4 872except ImportError: sys.exit(1) 873from PyQt4.QtCore import * 874if list(map(int, QT_VERSION_STR.split('.'))) < [4,5,0]: sys.exit(1) 875if list(map(int, PYQT_VERSION_STR.split('.'))) < [4,5,0]: sys.exit(1) 876sys.exit(0)]" 877 878 ${PYTHON} -c "${prog}" 879 retval=$? 880 881 if test $retval -ne 0 ; then 882 AC_MSG_RESULT([no]) 883 AC_MSG_FAILURE([cannot find PyQt5 support (>= 5.0) or PyQt4 support (>= 4.5), Graphical User Interface cannot be installed]) 884 else 885 AC_MSG_RESULT([yes]) 886 cs_have_gui=yes 887 cs_have_gui_qt4=yes 888 fi 889 fi 890 891fi 892 893# Test for PyQt4 developer tools 894if test "x$cs_have_gui_qt4" = "xyes" ; then 895 896 # Try to find PyQt4 tools through Python interpreter 897 prog="[import os, sys 898from PyQt4.QtCore import QCoreApplication 899app = QCoreApplication([]) 900path = app.applicationDirPath() 901sys.stdout.write(path)]" 902 903 PYPATH=`${PYTHON} -c "${prog}"` 904 905 # On Cygwin hosts, the PATH does not seem to be correctly found 906 if test "$host_os" = cygwin ; then 907 PYPATH=/usr/lib/python$PYTHON_VERSION/site-packages/PyQt4 908 fi 909 910 AC_ARG_VAR([PYUIC4], [PyQt4 user interfaces compiler]) 911 AC_ARG_VAR([PYRCC4], [PyQt4 resources compiler]) 912 913 # On MinGW (MSYS) or Cygwin (BASH) build systems, and for MinGW hosts, 914 # pyuic4 is a batch file and cannot be run from the shell. 915 # To bypass this issue, we launch pyuic4 through cmd.exe 916 # with a "standard" PATH. 917 # pyrcc4 does not need this trick as it is a standard executable. 918 if test "$host_os" = mingw64 ; then 919 if test "$build_os" = mingw64 ; then 920 CMDPYUIC4="cmd //C $PYPATH/Lib/site-packages/PyQt4/pyuic4" 921 elif test "$build_os" = cygwin ; then 922 CMDPYUIC4="cmd /C $PYPATH/Lib/site-packages/PyQt4/pyuic4" 923 fi 924 fi 925 926 if test "x$PYUIC4" = "x" ; then 927 AC_PATH_PROG([PYUIC4], [pyuic4], [$CMDPYUIC4], [${PYPATH}:$PATH]) 928 fi 929 if test "x$PYRCC4" = "x" ; then 930 AC_PATH_PROG([PYRCC4], [pyrcc4], [], [${PYPATH}:$PATH]) 931 fi 932 933 if test "x$PYUIC4" = "x" -o "x$PYRCC4" = "x" ; then 934 AC_MSG_FAILURE([cannot find PyQt4 dev tools, Graphical User Interface cannot be installed]) 935 cs_have_gui=no 936 fi 937 938fi 939 940# Test for PyQt5 developer tools 941if test "x$cs_have_gui_qt5" = "xyes" ; then 942 943 # Try to find PyQt5 tools through Python interpreter 944 prog="[import os, sys 945from PyQt5.QtCore import QCoreApplication 946app = QCoreApplication([]) 947path = app.applicationDirPath() 948sys.stdout.write(path)]" 949 950 PYPATH=`${PYTHON} -c "${prog}"` 951 952 ## On Cygwin hosts, the PATH does not seem to be correctly found 953 #if test "$host_os" = cygwin ; then 954 # PYPATH=/usr/lib/python$PYTHON_VERSION/site-packages/PyQt5 955 #fi 956 957 AC_ARG_VAR([PYUIC5], [PyQt5 user interfaces compiler]) 958 AC_ARG_VAR([PYRCC5], [PyQt5 resources compiler]) 959 960 if test "x$PYUIC5" = "x" ; then 961 AC_PATH_PROG([PYUIC5], [pyuic5], [$CMDPYUIC5], [${PYPATH}:$PATH]) 962 fi 963 if test "x$PYRCC5" = "x" ; then 964 AC_PATH_PROG([PYRCC5], [pyrcc5], [], [${PYPATH}:$PATH]) 965 fi 966 967 if test "x$PYUIC5" = "x" -o "x$PYRCC5" = "x" ; then 968 AC_MSG_FAILURE([cannot find PyQt5 dev tools, Graphical User Interface cannot be installed]) 969 cs_have_gui=no 970 fi 971 972fi 973 974#------------------------------------------------------------------------------ 975# Checks for Qt tools. 976#------------------------------------------------------------------------------ 977 978AM_CONDITIONAL(HAVE_GUI, [test "x$cs_have_gui" = "xyes"]) 979AC_SUBST(cs_have_gui) 980AM_CONDITIONAL(HAVE_QT4, [test "x$cs_have_gui_qt4" = "xyes"]) 981AC_SUBST(cs_have_gui_qt4) 982AM_CONDITIONAL(HAVE_QT5, [test "x$cs_have_gui_qt5" = "xyes"]) 983AC_SUBST(cs_have_gui_qt5) 984 985#------------------------------------------------------------------------------ 986# Checks for header files. 987#------------------------------------------------------------------------------ 988 989AC_CHECK_HEADERS([sys/types.h sys/utsname.h sys/stat.h dirent.h stddef.h]) 990AC_CHECK_HEADERS([unistd.h fcntl.h sys/types.h sys/signal.h]) 991AC_CHECK_HEADERS([sys/procfs.h sys/sysinfo.h sys/resource.h]) 992AC_CHECK_HEADERS([float.h string.h sys/time.h]) 993 994#------------------------------------------------------------------------------ 995# Checks for library functions. 996#------------------------------------------------------------------------------ 997 998AC_CHECK_FUNCS([mkdir chdir stat dup2 access]) 999AC_CHECK_FUNCS([snprintf]) 1000AC_CHECK_FUNCS([getcwd sleep]) 1001AC_CHECK_FUNCS([getpwuid geteuid]) 1002AC_CHECK_FUNCS([uname linkat]) 1003AC_CHECK_FUNCS([clock_gettime clock_getcpuclockid]) 1004AC_CHECK_FUNCS([getrusage gettimeofday sbrk sysinfo]) 1005AC_CHECK_FUNCS([posix_memalign]) 1006AC_CHECK_FUNCS([memset]) 1007AC_CHECK_FUNCS([sigaction]) 1008AC_CHECK_FUNCS([strtok_r]) 1009 1010saved_LIBS="$LIBS" 1011LIBS="${LIBS} -lm" 1012AC_CHECK_FUNCS([pow modf tgamma erf]) 1013LIBS="$saved_LIBS" 1014 1015AC_FUNC_STRTOD 1016 1017#------------------------------------------------------------------------------ 1018# Checks for system services. 1019#------------------------------------------------------------------------------ 1020 1021# Largefile support (may be disabled in case of conflicts) 1022#------------------ 1023 1024AC_SYS_LARGEFILE 1025AC_FUNC_FSEEKO 1026 1027# Test for size of off_t once largefile support is activated 1028 1029AC_CHECK_SIZEOF([off_t]) 1030 1031# Optional malloc hooks support (for glibc) 1032#------------------------------ 1033 1034cs_have_malloc_hooks=no 1035 1036AC_ARG_ENABLE(malloc_hooks, 1037 [AS_HELP_STRING([--enable-malloc-hooks], [use malloc hooks when available])], 1038 [ 1039 case "${enableval}" in 1040 yes) malloc_hooks=yes ;; 1041 no) malloc_hooks=no ;; 1042 *) AC_MSG_ERROR([bad value ${enableval} for --enable-malloc-hooks]) ;; 1043 esac 1044 ], 1045 [ malloc_hooks=no ] 1046) 1047 1048# If we use malloc hooks, we may need to add a -lmalloc link flag. 1049 1050if test "x$malloc_hooks" = "xyes" ; then 1051 1052 # Basic test 1053 AC_MSG_CHECKING([for malloc hooks]) 1054 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], 1055 [[ int __malloc_hook(); __malloc_hook(); ]])], 1056 [cs_have_malloc_hooks=yes], 1057 [cs_have_malloc_hooks=no]) 1058 AC_MSG_RESULT($cs_have_malloc_hooks) 1059 1060fi 1061 1062if test "x$cs_have_malloc_hooks" = "xyes"; then 1063 AC_DEFINE(HAVE_MALLOC_HOOKS, 1, HAVE_MALLOC_HOOKS) 1064fi 1065 1066# Backtrace support (for glibc) 1067#------------------ 1068 1069# Basic backtrace functionnality 1070 1071cs_have_glibc_backtrace=no 1072 1073AC_MSG_CHECKING([for glibc backtrace]) 1074AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if defined(__GNUC__) 1075#define _GNU_SOURCE 1076#include <memory.h> 1077#include <execinfo.h> 1078#endif]], 1079 [[ void *tr_array[10]; backtrace(tr_array, 10); ]])], 1080 [cs_have_glibc_backtrace=yes], 1081 [cs_have_glibc_backtrace=no]) 1082AC_MSG_RESULT($cs_have_glibc_backtrace) 1083 1084if test "x$cs_have_glibc_backtrace" = "xyes"; then 1085 AC_DEFINE(HAVE_GLIBC_BACKTRACE, 1, HAVE_GLIBC_BACKTRACE) 1086fi 1087 1088# C++ demangling 1089 1090cs_have_cplus_demangle=no 1091 1092AC_MSG_CHECKING([for glibc cplus_demangle]) 1093AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <demangle.h>]], 1094 [[ const char *s; cplus_demangle(s, auto_demangling); ]])], 1095 [cs_have_cplus_demangle=yes], 1096 [cs_have_cplus_demangle=no]) 1097AC_MSG_RESULT($cs_have_cplus_demangle) 1098 1099if test "x$cs_have_cplus_demangle" = "xyes"; then 1100 AC_DEFINE(HAVE_CPLUS_DEMANGLE, 1, HAVE_CPLUS_DEMANGLE) 1101fi 1102 1103# Optional socket support 1104#------------------------ 1105 1106have_socket=no 1107 1108AC_ARG_ENABLE(sockets, 1109 [ --disable-sockets disable communications through IP sockets], 1110 [ 1111 case "${enableval}" in 1112 yes) have_socket=yes ;; 1113 no) have_socket=no ;; 1114 *) AC_MSG_ERROR([bad value ${enableval} for --enable-sockets]) ;; 1115 esac 1116 ], 1117 [ have_socket=yes ] 1118) 1119if test "x$have_socket" = "xyes" ; then 1120 AC_DEFINE([HAVE_SOCKET], 1, [sockets support]) 1121fi 1122 1123# Plugin modules support 1124#----------------------- 1125 1126cs_have_plugins=no 1127cs_py_have_plugins=False 1128if test "x$enable_shared" = "xyes" ; then 1129 if test "x$cs_have_dlloader" = "xdlopen" ; then 1130 # Test for different plugins here 1131 if test x$cs_have_plugin_medcoupling = xyes ; then 1132 cs_have_plugins=yes 1133 elif test x$cs_have_plugin_catalyst = xyes ; then 1134 cs_have_plugins=yes 1135 elif test x$cs_have_ccm = xyes ; then 1136 cs_have_plugins=yes 1137 fi 1138 fi 1139fi 1140 1141if test "x$cs_have_plugins" = "xyes" ; then 1142 cs_py_have_plugins=True 1143 AC_DEFINE([HAVE_PLUGINS], 1, [plugins support]) 1144fi 1145 1146AC_SUBST(cs_py_have_plugins) 1147AM_CONDITIONAL(HAVE_PLUGINS, test x$cs_have_plugins = xyes) 1148 1149#------------------------------------------------------------------------------ 1150# Pass compiler options to automake files and code_saturne_build.cfg.in 1151#------------------------------------------------------------------------------ 1152 1153AC_SUBST(CPPFLAGS) 1154AC_SUBST(CFLAGS) 1155AC_SUBST(CXXFLAGS) 1156AC_SUBST(FCFLAGS) 1157AC_SUBST(LDFLAGS) 1158AC_SUBST(LIBS) 1159 1160#------------------------------------------------------------------------------ 1161# Output 1162#------------------------------------------------------------------------------ 1163 1164NEPTUNE_CFD= 1165if test x$cs_have_neptune_cfd = xyes; then 1166 AC_CONFIG_SUBDIRS([neptune_cfd]) 1167 NEPTUNE_CFD=neptune_cfd 1168 NEPTUNE_CFD_LIBS="-lneptune" 1169fi 1170 1171AC_SUBST(NEPTUNE_CFD) 1172 1173#------------------------------------------------------------------------------ 1174# Output 1175#------------------------------------------------------------------------------ 1176 1177# Main configuration 1178 1179AC_CONFIG_FILES([Makefile 1180 preprocessor/Makefile 1181 preprocessor/appli/Makefile preprocessor/base/Makefile 1182 preprocessor/pre-post/Makefile preprocessor/util/Makefile 1183 src/Makefile src/apps/Makefile src/gui/Makefile 1184 src/bft/Makefile src/fvm/Makefile 1185 src/base/Makefile src/atmo/Makefile src/cdo/Makefile 1186 src/cfbl/Makefile src/cogz/Makefile src/ctwr/Makefile 1187 src/darc/Makefile src/elec/Makefile src/comb/Makefile 1188 src/pprt/Makefile src/lagr/Makefile src/rayt/Makefile 1189 src/turb/Makefile src/alge/Makefile src/mesh/Makefile 1190 src/user/Makefile src/user_examples/Makefile 1191 src/meg/Makefile 1192 gui/Makefile gui/Base/Makefile gui/Pages/Makefile 1193 gui/studymanager_gui/Makefile gui/trackcvg/Makefile 1194 docs/Makefile docs/doxygen/Makefile docs/style/csvers.tex 1195 docs/refcard/Makefile docs/theory/Makefile 1196 docs/user/Makefile 1197 tests/Makefile 1198 config/code_saturne_build.cfg.in]) 1199 1200#------------------------------------------------------------------------------ 1201 1202AC_OUTPUT 1203 1204#------------------------------------------------------------------------------ 1205 1206# Libtool configuration bug workaround (problem encountered with compilers 1207# which do not recognize "-soname", so that "-Wl,-soname" is needed to pass 1208# flags to the linker; Manually setting $wl to "-Wl" in libtool corrects 1209# the problem, and so does this workaround borrowed from 1210# the HDF5 configure.in, which does it automatically). 1211 1212if test "x$GCC" != "xyes"; then 1213 echo 'fixing $wl in libtool' 1214ed - libtool <<EOF 2> /dev/null 1215/^wl=""/s//wl="-Wl,"/ 1216w 1217q 1218EOF 1219fi 1220 1221# Copy modified version of libtool to avoid issues with " -fPIC -DPIC" 1222# insertion in CUDA compiler options. The -no-fpic option cannot be used 1223# as pic_mode propagates to sub-libraries. 1224 1225if test "$cs_have_cuda" = "yes"; then 1226 sed -e "s/ -fPIC -DPIC//" libtool > libtool_cuda 1227 chmod +x libtool_cuda 1228fi 1229 1230#------------------------------------------------------------------------------ 1231 1232echo 1233echo "Configuration options:" 1234if test x$cs_have_neptune_cfd = xyes ; then 1235 echo " NEPTUNE_CFD module support" 1236fi 1237echo " use debugging code: "$debug"" 1238echo " use malloc hooks: "$cs_have_malloc_hooks"" 1239if test x$cs_have_frontend = xno ; then 1240 echo " use frontend: no" 1241else 1242 echo " use graphical user interface: "$cs_have_gui"" 1243 if test x$cs_have_gui_qt4 = xyes ; then 1244 echo " Warning: using PyQt4 is deprecated" 1245 fi 1246fi 1247if test x$cs_have_backend = xno ; then 1248 echo " use backend: no" 1249fi 1250echo " use long global numbers: "$cs_have_long_gnum"" 1251echo " Zlib (gzipped file) support: "$cs_have_zlib"" 1252echo " MPI (Message Passing Interface) support: "$cs_have_mpi"" 1253if (test x$cs_have_mpi = xyes) ; then 1254 echo " MPI I/O support: "$cs_have_mpi_io"" 1255 echo " MPI3 nonblocking barrier support: "$cs_have_mpi_ibarrier"" 1256fi 1257echo " OpenMP support: "$cs_have_openmp"" 1258if test x$cs_have_openmp = xyes ; then 1259 echo " OpenMP accelerator support: "$cs_have_openmp_target"" 1260 echo " OpenMP Fortran support: "$cs_have_openmp_f"" 1261fi 1262echo " CUDA support: "$cs_have_cuda"" 1263echo " BLAS (Basic Linear Algebra Subprograms) support: "$cs_have_blas"" 1264echo " ParMETIS (Parallel Graph Partitioning) support: "$cs_have_parmetis"" 1265if test x$cs_have_parmetis = xno ; then 1266 echo " METIS (Graph Partitioning) support: "$cs_have_metis"" 1267fi 1268echo " PT-SCOTCH (Parallel Graph Partitioning) support: "$cs_have_ptscotch"" 1269if test x$cs_have_ptscotch = xno ; then 1270 echo " SCOTCH (Graph Partitioning) support: "$cs_have_scotch"" 1271fi 1272echo " CCM support: "$cs_have_ccm"" 1273echo " HDF (Hierarchical Data Format) support: "$cs_have_hdf5"" 1274echo " CGNS (CFD General Notation System) support: "$cs_have_cgns"" 1275echo " MED (Model for Exchange of Data) support: "$cs_have_med"" 1276if (test x$cs_have_med = xyes) ; then 1277 echo " MED MPI I/O support: "$cs_have_med_mpi"" 1278fi 1279echo " MEDCoupling support: "$cs_have_medcoupling"" 1280if test x$cs_have_medcoupling = xyes ; then 1281 echo " MEDLoader support: "$cs_have_medcoupling_loader"" 1282 echo " ParaMEDMEM support: "$cs_have_paramedmem"" 1283 echo " MEDCoupling as plugin: "$cs_have_plugin_medcoupling"" 1284fi 1285echo " Catalyst (ParaView co-processing) support: "$cs_have_catalyst"" 1286if (test x$cs_have_catalyst = xyes) ; then 1287 echo " Catalyst as plugin: "$cs_have_plugin_catalyst"" 1288fi 1289echo " Melissa (in-situ statistics) support: "$cs_have_melissa"" 1290if (test x$cs_have_melissa = xyes) ; then 1291 echo " Melissa as plugin: "$cs_have_plugin_melissa"" 1292fi 1293echo " EOS support: "$cs_have_eos"" 1294echo " freesteam support: "$cs_have_freesteam"" 1295echo " CoolProp support: "$cs_have_coolprop"" 1296echo " PETSc support: "$cs_have_petsc"" 1297echo " MUMPS support: "$cs_have_mumps"" 1298echo " HYPRE support: "$cs_have_hypre"" 1299echo " AMGX support: "$cs_have_amgx"" 1300echo " Dynamic loader support: "$cs_have_dlloader"" 1301if (test "x$cs_env_modules" != "x") ; then 1302 echo " Auto load environment modules: "$cs_env_modules"" 1303fi 1304echo 1305echo " PdfLaTeX (document typesetting) available: "$cs_have_latex"" 1306echo " Doxygen (document generation) available: "$cs_have_doxygen"" 1307if (test x$cs_have_doxygen = xyes) ; then 1308 echo " dot (Graphviz) available: "$cs_have_dot"" 1309 echo " MathJax enabled: "$cs_enable_mathjax"" 1310fi 1311echo 1312echo "The package has been configured. Type:" 1313echo " make" 1314echo " make install" 1315echo 1316echo "To generate and install the Code_Saturne kernel" 1317echo 1318