# -*- INI -*-
#
# Copyright (C) 2009-2014 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;
#                     * hidden, for options belonging to a subsystem;
#                     * new, for new options;
#                     * obsolete, 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';
#
#   * group       : mandatory attribute, specifying under which category
#                   the option will be displayed; must be a single word
#                   corresponding to a group option defined in this
#                   file;
#
#   * 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'.
#
# Notes:
#
#   * Though the 'description' attribute must always be provided, 'status'
#     may be omitted if it equals its default value (see '[DEFAULT]'
#     section).
#
#   * The option groups must start with 'group_'.
#

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

# ### enable_* options ###

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

[enable_atompaw]
description = Activate internal support for AtomPAW
default = no
status = hidden

[enable_libpaw]
description = Activate internal support for libPAW in ABINIT
default = yes
status = hidden
defines = HAVE_LIBPAW_ABINIT


[enable_bigdft]
description = Activate internal support for BigDFT
default = no
status = hidden

[enable_bindings]
description = Activate support for bindings (EXPERIMENTAL)
default = no
defines = HAVE_BINDINGS
conditionals = DO_BUILD_BINDINGS
status = removed

[enable_bse_unpacked]
description = Activate Bethe-Salpeter unpacking (EXPERIMENTAL)
default = no
defines = HAVE_BSE_UNPACKED

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

[enable_clib]
description = Enable the Abinit C library (EXPERIMENTAL)
default = no
defines = HAVE_CLIB
conditionals = DO_BUILD_02_CLIB

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

[enable_connectors]
description = Enable detection of external libraries (EXPERIMENTAL)
default = yes

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

[enable_dev_timer]
description = Enable the use of internal timer for developments
default = no
defines = HAVE_DEV_TIMER
status = removed

[enable_etsf_io]
description = Activate support for ETSF I/O
default = no
status = hidden

[enable_exports]
description = Activate build of exported libraries (EXPERIMENTAL)
default = no
conditionals = DO_BUILD_EXPORTS

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

[enable_fast_check]
description = Run 'make check' using 4 processors
default = no

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

[enable_fox]
description = Activate support for FoX (under development)
default = no
status = hidden

[enable_gpu]
description = Activate support for GPU (EXPERIMENTAL)
default = no

[enable_gui]
description = Enable the ABINIT GUI
default = no
status = dropped

[enable_gui_build]
description = Enable the build of the Java GUI (EXPERIMENTAL)
default = yes
status = dropped

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

[enable_hints]
description = Preset flags to have the source building properly
default = yes

[enable_libxc]
description = Activate support for LibXC
default = no
status = hidden

[enable_linalg]
description = Activate support for external linear algebra libraries
default = no
status = hidden

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

[enable_macroave]
description = Enable build of macroave (EXPERIMENTAL)
default = yes
defines = USE_MACROAVE
conditionals = DO_BUILD_01_MACROAVNEW_EXT DO_BUILD_MACROAVE

[enable_maintainer_checks]
description = Activate maintainer checks (BuildBot)
default = no

[enable_memory_profiling]
description = Enable memory profiling
defines = HAVE_MEM_PROFILING

[enable_mpi]
description = Enable MPI support
values = no yes auto
default = auto

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

[enable_mpi_trace]
description = Enable MPI time tracing (EXPERIMENTAL)
default = no
status = removed

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

[enable_netcdf]
description = Activate support for NetCDF
default = no
status = hidden

[enable_optim]
description = Set optimization level
values = no yes safe standard aggressive
default = standard

[enable_pkg_check]
description = Run 'make check' on a reduced set of tests (packages)
default = no
status = removed

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

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

[enable_test_timeout]
description = Activate timeout for tests (will build additional C code)
default = no
status = removed

[enable_wannier90]
description = Activate support for Wannier90
default = no
status = hidden

[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

[with_algo_incs]
description = Include parameters for the algorithmic libraries
values = @includes

[with_algo_libs]
description = Algorithmic libraries to link Abinit binaries with
values = @libs

[with_atompaw_bins]
description = Path to the AtomPAW executables

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

[with_atompaw_libs]
description = AtomPAW libraries to link Abinit binaries with
values = @libs

[with_bigdft_incs]
description = Include parameters for BigDFT support
values = @includes

[with_bigdft_libs]
description = BigDFT libraries to link Abinit binaries with
values = @libs

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

[with_dft_flavor]
description = Kind of DFT support to activate
values = atompaw atompaw-fallback bigdft bigdft-fallback libxc libxc-fallback none wannier90 wannier90-fallback
default = none

[with_etsf_io_incs]
description = Include parameters for ETSF I/O support
values = @includes

[with_etsf_io_libs]
description = ETSF I/O libraries to link Abinit binaries with
values = @libs

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

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

[with_fft_flavor]
description = Kind of FFT support to activate
values = asl custom fftw2 fftw2-threads fftw3 fftw3-mkl fftw3-threads fftw3-mpi none sgimath dfti dfti-threads
default = none

[with_fft_incs]
description = Include parameters for the FFT libraries
values = @includes

[with_fft_libs]
description = FFT libraries to link Abinit binaries with
values = @libs

[with_fox_incs]
description = Include parameters for FoX support
values = @includes

[with_fox_libs]
description = FoX libraries to link Abinit binaries with
values = @libs

[with_gpu_cflags]
description = C flags to build GPU kernels

[with_gpu_cppflags]
description = Preprocessing options to build GPU kernels

[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

[with_gpu_ldflags]
description = Link flags to build GPU-specific binaries

[with_gpu_libs]
description = GPU libraries to link Abinit binaries with
values = @libs

[with_gpu_prefix]
description = Prefix path for the GPU installation

[with_libxc_incs]
description = Include parameters for ETSF XC support
values = @includes

[with_libxc_libs]
description = ETSF XC libraries to link Abinit binaries with
values = @libs

[with_linalg_flavor]
description = See ~abinit/doc/build/config-template.ac for information, in particular for ScaLAPACK support
values = acml asl atlas custom elpa essl goto magma mkl mlib netlib netlib-fallback none plasma scalapack sgimath sunperf
default = netlib

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

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

[with_libpspio_incs]
description = Include parameters for Libpspio support
values = @includes

[with_libpspio_libs]
description = Libpspio libraries to link Abinit binaries with
values = @libs

[with_math_flavor]
description = Kind of math library to use
values = gsl mlib none
default = none

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

[with_math_libs]
description = GSL libraries to link Abinit binaries with
values = @libs

[with_mpi_incs]
description = Include parameters for the MPI library
values = @includes

[with_mpi_level]
description = MPI standard level to use (1 or 2)
values = 1 2

[with_mpi_libs]
description = MPI libraries to link Abinit binaries with
values = @libs

[with_mpi_prefix]
description = Prefix path to the MPI installation

[with_netcdf_incs]
description = Include parameters for NetCDF support
values = @includes

[with_netcdf_libs]
description = NetCDF libraries to link Abinit binaries with
values = @libs

[with_tardir]
description = Repository of tarballs for fallbacks
status = hidden

[with_test_timeout]
description = Automatic test timeout
values = @integer
default = 900
status = removed

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

[with_timer_incs]
description = Include parameters for the timer library
values = @includes

[with_timer_libs]
description = PAPI libraries to link Abinit binaries with
values = @libs

[with_trio_flavor]
description = Kind of transferable I/O to activate
values = etsf_io etsf_io-fallback fox fox-fallback libpspio netcdf netcdf-fallback yaml none
default = none

[with_wannier90_bins]
description = Full path to the Wannier90 executables

[with_wannier90_incs]
description = Include parameters for Wannier90 support
values = @includes

[with_wannier90_libs]
description = Wannier90 libraries to link Abinit binaries with
values = @libs

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

[with_yaml_libs]
description = YAML libraries to link Abinit binaries with
values = @libs

# ### Option groups ###

[group_global]
description = Global build options
weight = 0

[group_c]
description = C support
weight = 10

[group_cxx]
description = C++ support
weight = 20

[group_fortran]
description = Fortran support
weight = 30

[group_custom]
description = Build customization
weight = 40

[group_link]
description = Libraries and linking
weight = 50

[group_mpi]
description = MPI options
weight = 60

[group_gpu]
description = GPU options
weight = 70

[group_connectors]
description = Connectors
weight = 80

[group_fallbacks]
description = Fallbacks
weight = 85

[group_timer]
description = Timer library connector
weight = 90

[group_trio]
description = Transferable I/O (TRIO) connector
weight = 100

[group_fft]
description = FFT connector
weight = 110

[group_linalg]
description = Linear algebra connector
weight = 120

[group_math]
description = Mathematical library connector
weight = 130

[group_dft]
description = DFT library connector
weight = 140

[group_developers]
description = Developer options
weight = 150

[group_maintainers]
description = Maintainer options
weight = 160

[group_doc]
description = Documentation options
weight = 170
