# Path: tt/distutils.py
# def get_extra_fflags():
#     fflags = []
#     fcompiler = customized_fcompiler()
#     if fcompiler.compiler_type in ('g95', 'gnu', 'gnu95'):
#         if fcompiler.get_version() >= '11':
#             fflags.append('-fallow-argument-mismatch')
#     return fflags


from numpy.distutils.misc_util import Configuration
from os.path import join
from tt.distutils import get_extra_fflags

from __future__ import print_function, absolute_import


TTFORT_DIR = '../tt-fort'
EXPM_DIR = '../tt-fort/expm'

EXPOKIT_SRC = [
    'explib.f90',
    'normest.f90',
    'expokit.f',
    'dlacn1.f',
    'dlapst.f',
    'dlarpc.f',
    'zlacn1.f',
]

TTKSL_SRC = [
    'ttals.f90',
    'tt_ksl.f90',
    'tt_diag_ksl.f90'
]


def configuration(parent_package='', top_path=None):
    expokit_src = [join(EXPM_DIR, x) for x in EXPOKIT_SRC]

    ttksl_src = [join(TTFORT_DIR, x) for x in TTKSL_SRC]
    ttksl_src.append('tt_ksl.pyf')


# Path: tt/distutils.py
# def get_extra_fflags():
#     fflags = []
#     fcompiler = customized_fcompiler()
#     if fcompiler.compiler_type in ('g95', 'gnu', 'gnu95'):
#         if fcompiler.get_version() >= '11':
#             fflags.append('-fallow-argument-mismatch')
#     return fflags


# Path: tt/ksl/setup.py
from numpy.distutils.misc_util import Configuration
from os.path import join
from tt.distutils import get_extra_fflags


from __future__ import print_function, absolute_import


TTFORT_DIR = '../tt-fort'
EXPM_DIR = '../tt-fort/expm'

EXPOKIT_SRC = [
    'explib.f90',
    'normest.f90',
    'expokit.f',
    'dlacn1.f',
    'dlapst.f',
    'dlarpc.f',
    'zlacn1.f',
]

TTKSL_SRC = [
    'ttals.f90',
    'tt_ksl.f90',
    'tt_diag_ksl.f90'
]


def configuration(parent_package='', top_path=None):
    expokit_src = [join(EXPM_DIR, x) for x in EXPOKIT_SRC]

    ttksl_src = [join(TTFORT_DIR, x) for x in TTKSL_SRC]
    ttksl_src.append('tt_ksl.pyf')


    fflags = get_extra_fflags()