# -*- INI -*-
#
# Copyright (C) 2009-2021 ABINIT Group (Yann Pouillon)
#
# This file is part of the ABINIT software package. For license information,
# please see the COPYING file in the top-level directory of the ABINIT source
# distribution.
#

#
# Config file for the configure options of ABINIT
#
# Note: The following statements are in the Python "INI" format, with
#       case-sensitivity activated.
#

#
# Each section of this file corresponds to a single configure option. If
# no specific attributes are provided, the default ones are applied.
#
# The recognized attributes are the following:
#
#   * description : mandatory attribute, with no default value,
#                   containing a short description of what the option does;
#
#   * values      : optional attribute, defining the permitted values of
#                   the option, as follows:
#
#                     * @includes : include flags ('-I...');
#                     * @integer  : integer values;
#                     * @libs     : library flags ('-L... -l...);
#                     * any space-separated enumeration of strings;
#
#                   for 'enable_*' options, 'values' defaults to 'no yes';
#
#   * default     : optional attribute, setting the default value of
#                   the option, which must be compatible with 'values';
#                   if omitted, the option will be left unset;
#
#   * status      : mandatory attribute, set as 'stable' in the '[DEFAULT]'
#                   section, which can be one of the following:
#
#                     * changed <what_changed> (e.g. 'changed meaning'),
#                       when the name of the option did not change;
#                     * dropped, for long-removed options;
#                     * new, for new options;
#                     * deprecated, for soon-to-be-removed options;
#                     * renamed <old_name>, for renamed options;
#                     * removed, for removed options;
#                     * stable, for unchanged options (expected default);
#
#                   NOTE: all new options must be set with
#                        'status = new';
#
#   * use_instead : optional attribute, to inform users about an alternative
#                   option, typically when a set of options has been replaced
#                   by a smaller one;
#
#   * help        : mandatory attribute, containing the help text of the
#                   option; if 'values' is defined, each of them must be
#                   described in a " * value: explanation" list;
#
#   * defines     : optional attribute, specifying a space-separated
#                   list of C preprocessing macros associated to the
#                   option, which will be set to 1 if the option is set
#                   to 'yes' (case-sensitive, 'enable_*' options only);
#                   prepending a '!' to a macro name will define it when
#                   the option is set to 'no';
#
#   * conditionals: optional attribute, specifying a space-separated
#                   list of Makefile conditionals associated to the
#                   option, which will be triggered if the option is
#                   set to 'yes' (case-sensitive, 'enable_*' options
#                   only); prepending a '!' to a conditional name will
#                   trigger it when the option is set to 'no'.
#
#   * negative    : optional attribute, containing the initial value of
#                   a --with-* when used in the form --with-*="no" or
#                   --without-* on the command line; if not specified,
#                   the option will be set to an empty string in such
#                   a case.
#
# Notes:
#
#   * Though the 'description' attribute must always be provided, 'status'
#     may be omitted if it equals its default value (see '[DEFAULT]'
#     section).
#

# WARNING: modify the defaults with *extreme* care!
[DEFAULT]
status = stable

# ### enable_* options ###

[enable_64bit_flags]
description = Use 64-bit flags (see documentation)
default = no
status = removed

[enable_avx_safe_mode]
description = Disable vectorization in problematic procedures
default = no
defines = HAVE_AVX_SAFE_MODE

[enable_bse_unpacked]
description = Activate Bethe-Salpeter unpacking
default = no
defines = HAVE_BSE_UNPACKED
status = deprecated

[enable_cclock]
description = Use C clock for timings
default = no

[enable_config_file]
description = Read options from config file
default = yes
status = removed

[enable_connectors]
description = Enable detection of external libraries
default = no
status = removed

[enable_crpa_optim]
description = Enable optimize cRPA calculations for ifort <= 17.0
default = no
defines = HAVE_CRPA_OPTIM

[enable_debug]
description = Set debug level
values = no yes basic verbose enhanced paranoid naughty
default = basic
status = removed
use_instead = with_debug_flavor

[enable_exports]
description = Activate build of exported libraries
default = no
conditionals = DO_BUILD_EXPORTS
status = deprecated

[enable_fallbacks]
description = Enable the internal build of external packages
values = no yes force
default = no
status = removed
use_instead = with_fallbacks

#FIXME: this option is force-enabled on test-farm bots
#[enable_fast_check]
#description = Run 'make check' using 4 processors
#default = no
#status = removed

[enable_fc_wrapper]
description = Wrap Fortran compiler calls
default = no

[enable_gpu]
description = Activate support for GPU
default = no
status = removed
use_instead = with_gpu

[enable_gw_dpc]
description = Activate double-precision GW calculations
default = no
defines = HAVE_GW_DPC

[enable_hints]
description = Automatically adjust build flags to the current configuration
default = yes

[enable_libtetra]
description = Activate internal support for libtetra(hedron) in ABINIT
default = yes
defines = HAVE_LIBTETRA_ABINIT
status = new

[enable_lotf]
description = Activate LOTF functionality (UNMAINTAINED)
default = no
defines = HAVE_LOTF
conditionals = DO_BUILD_65_LOTF_BASE DO_BUILD_68_LOTF 

[enable_macroave]
description = Enable build of macroave (OBSOLETE)
default = no
defines = USE_MACROAVE
conditionals = DO_BUILD_01_MACROAVNEW_EXT DO_BUILD_MACROAVE
status = removed

[enable_memory_profiling]
description = Enable memory profiling
default = no
defines = HAVE_MEM_PROFILING

[enable_mpi]
description = Enable MPI support
values = no yes auto
default = auto
status = removed
use_instead = with_mpi

[enable_mpi_inplace]
description = Activate support for MPI_IN_PLACE 
default = no
defines = HAVE_MPI2_INPLACE 

[enable_mpi_io]
description = Enable MPI I/O
values = no yes auto
default = auto

[enable_mpi_io_default]
description = Use MPI I/O as default I/O library (maintainer-only option)
default = no
defines = HAVE_MPI_IO_DEFAULT

[enable_netcdf_default]
description = Use NetCDF as default I/O library (maintainer-only option)
default = no
defines = HAVE_NETCDF_DEFAULT

[enable_openmp]
description = Activate support for OpenMP
default = no
defines = HAVE_OPENMP

[enable_optim]
description = Set optimization level
values = no yes safe standard aggressive
default = standard
status = removed
use_instead = with_optim_flavor

[enable_source_debug]
description = Build debugging instructions present in the source code
default = no
status = new

[enable_python_invocation]
description = Activate possibility to call python scripts externally by invoking a python interpreter
default = no
defines = HAVE_PYTHON_INVOCATION
status = new

[enable_stdin]
description = Tell ABINIT to read file lists from standard input
default = yes
defines = !READ_FROM_FILE

# Note: enable_timer is overridden by the PAPI library
[enable_timer]
description = Activate support for the internal ABINIT timer
default = yes
status = new

# Note: now handled by the build system in config/m4/sd_triqs.m4
[enable_triqs_v1_4]
description = Activate internal support for TRIQS 1.4
default = no
defines = HAVE_TRIQS_v1_4
status = deprecated

# Note: now handled by the build system in config/m4/sd_triqs.m4
[enable_triqs_v2_0]
description = Activate internal support for TRIQS 2.0 (This option is dominant over the others versions)
default = no
defines = HAVE_TRIQS_v2_0
status = deprecated

[enable_wannier90_v1]
description = Activate support for Wannier90 v1.x (default is v2.x)
default = no
defines = HAVE_DFT_WANNIER90_V1
status = removed

[enable_zdot_bugfix]
description = Activate workaround for bugged ZDOTC and ZDOTU
default = no
defines = HAVE_LINALG_ZDOTC_BUG HAVE_LINALG_ZDOTU_BUG

# ### with_* options ###

[with_algo_flavor]
description = Kind of external algorithms to support
values = levmar
default = none
status = removed
use_instead = with_levmar

[with_algo_incs]
description = Include parameters for the algorithmic libraries
values = @includes
status = removed
use_instead = LEVMAR_CPPFLAGS, LEVMAR_FCFLAGS

[with_algo_libs]
description = Algorithmic libraries to link ABINIT binaries with
values = @libs
status = removed
use_instead = LEVMAR_LIBS

[with_atompaw_bins]
description = Path to the AtomPAW executables
status = removed

[with_atompaw_incs]
description = Include parameters for AtomPAW support
values = @includes
status = removed

[with_atompaw_libs]
description = AtomPAW libraries to link ABINIT binaries with
values = @libs
status = removed

[with_config_file]
description = Specify config file to read options from

[with_debug_flavor]
description = Set debug level
values = none custom basic verbose enhanced paranoid naughty
default = basic
negative = none
status = new renamed enable_debug

[with_dft_flavor]
description = Kind of DFT support to activate
values = atompaw bigdft libxc none wannier90
default = none
status = removed
use_instead = individual package options

[with_fallbacks]
description = Installation prefix of the ABINIT Fallbacks
values = @install
status = new renamed enable_fallbacks

[with_fc_vendor]
description = Fortran compiler vendor to be used by the build system
negative = generic

[with_fc_version]
description = Fortran compiler version to be used by the build system
negative = 0.0

[with_fft_incs]
description = Include parameters for the FFT libraries
values = @includes
status = removed
use_instead = FFT_CPPFLAGS, FFT_FCFLAGS

[with_fft_libs]
description = FFT libraries to link Abinit binaries with
values = @libs
status = removed
use_instead = FFT_LIBS

[with_gpu_cflags]
description = C flags to build GPU kernels
status = removed
use_instead = GPU_CFLAGS

[with_gpu_cppflags]
description = Preprocessing options to build GPU kernels
status = removed
use_instead = GPU_CPPFLAGS

# This has been taken over by Steredeg, which declares this option
#[with_gpu_flavor]
#description = Kind of GPU support to activate
#values = cuda-single cuda-double none
#default = cuda-double

[with_gpu_incs]
description = Include parameters for GPU support
values = @includes
status = removed
use_instead = GPU_CPPFLAGS, GPU_FCFLAGS

[with_gpu_ldflags]
description = Link flags to build GPU-specific binaries
status = removed
use_instead = GPU_LDFLAGS

[with_gpu_libs]
description = GPU libraries to link ABINIT binaries with
values = @libs
status = removed
use_instead = GPU_LIBS

[with_gpu_prefix]
description = Prefix path for the GPU installation
status = removed
use_instead = with_gpu

[with_linalg_incs]
description = Include parameters for the linear algebra libraries (BLAS+LAPACK)
values = @includes
status = removed
use_instead = LINALG_FCFLAGS

[with_linalg_libs]
description = Linear algebra libraries (BLAS+LAPACK) to link with
values = @libs
status = removed
use_instead = LINALG_LIBS

[with_libxc_incs]
description = Include parameters for ETSF XC support
values = @includes
status = removed
use_instead = LIBXC_CPPFLAGS, LIBXC_FCFLAGS

[with_libxc_libs]
description = LibXC libraries to link ABINIT binaries with
values = @libs
status = removed
use_instead = LIBXC_LIBS

[with_libxml2]
description = Enable support for the C XML library
values = @install
status = new

[with_math_flavor]
description = Kind of math library to use
values = none
default = none
status = removed

[with_math_incs]
description = Include parameters for the math library
values = @includes
status = removed

[with_math_libs]
description = GSL libraries to link ABINIT binaries with
values = @libs
status = removed

[with_mpi_incs]
description = Include parameters for the MPI library
values = @includes
status = removed
use_instead = MPI_CPPFLAGS, MPI_FCFLAGS

[with_mpi_level]
description = level of the MPI standard to use
values = 2 3
default = 2
status = changed : removed level 1, added level 3, defaulted level 2

[with_mpi_libs]
description = MPI libraries to link Abinit binaries with
values = @libs
status = removed
use_instead = MPI_LIBS

[with_mpi_prefix]
description = Prefix path to the MPI installation
status = removed
use_instead = with_mpi

[with_optim_flavor]
description = Set optimization level
values = none custom safe standard aggressive
default = standard
negative = none
status = new renamed enable_optim

[with_psml_incs]
description = Include parameters for PSML support
values = @includes
status = removed
use_instead = LIBPSML_FCFLAGS

[with_psml_libs]
description = PSML libraries to link ABINIT binaries with
values = @libs
status = removed
use_instead = LIBPSML_LIBS

[with_timer_flavor]
description = Kind of timer to use
values = abinit gptl none papi
default = abinit
status = removed

[with_timer_incs]
description = Include parameters for the timer library
values = @includes
status = removed
use_instead = PAPI_CPPFLAGS, PAPI_FCFLAGS

[with_timer_libs]
description = PAPI libraries to link ABINIT binaries with
values = @libs
status = removed
use_instead = PAPI_LIBS

[with_trio_flavor]
description = Kind of transferable I/O to activate
values = psml netcdf none
default = none
status = removed
use_instead = individual package options

[with_triqs_incs]
description = Include parameters for TRIQS support
values = @includes
status = removed
use_instead = TRIQS_CPPFLAGS, TRIQS_FCFLAGS

[with_triqs_libs]
description = TRIQS libraries to link ABINIT binaries with
values = @libs
status = removed
use_instead = TRIQS_LIBS

[with_wannier90_bins]
description = Full path to the Wannier90 executables
status = removed

[with_wannier90_incs]
description = Include parameters for Wannier90 support
values = @includes
status = removed
use_instead = WANNIER90_FCFLAGS

[with_wannier90_libs]
description = Wannier90 libraries to link ABINIT binaries with
values = @libs
status = removed
use_instead = WANNIER90_LIBS

[with_yaml_incs]
description = Include parameters for YAML output support
values = @includes
status = removed

[with_yaml_libs]
description = YAML libraries to link ABINIT binaries with
values = @libs
status = removed
