easyblock = 'ConfigureMake'

name = 'M4'
version = '1.4.18'

homepage = 'http://www.gnu.org/software/m4/m4.html'

description = """
 GNU M4 is an implementation of the traditional Unix macro processor. It is
 mostly SVR4 compatible although it has some extensions (for example, handling
 more than 9 positional parameters to macros). GNU M4 also has built-in
 functions for including files, running shell commands, doing arithmetic, etc.
"""

toolchain = {'name': 'GCCcore', 'version': '6.4.0'}

source_urls = [GNU_SOURCE]
sources = [SOURCELOWER_TAR_GZ]
checksums = ['ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab']

# use same binutils version that was used when building GCC toolchain
builddependencies = [
    ('binutils', '2.28', '', True),
]

# '-fgnu89-inline' is required to avoid linking errors with older glibc's,
# see https://github.com/easybuilders/easybuild-easyconfigs/issues/529
configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline"

sanity_check_paths = {
    'files': ['bin/m4'],
    'dirs': [],
}

moduleclass = 'devel'
