diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/m4/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/m4/package.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py index f7150727fe..15dbf4793b 100644 --- a/var/spack/repos/builtin/packages/m4/package.py +++ b/var/spack/repos/builtin/packages/m4/package.py @@ -26,8 +26,9 @@ from spack import * import sys -class M4(Package): +class M4(AutotoolsPackage): """GNU M4 is an implementation of the traditional Unix macro processor.""" + homepage = "https://www.gnu.org/software/m4/m4.html" url = "ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz" @@ -40,19 +41,19 @@ class M4(Package): depends_on('libsigsegv', when='+sigsegv') - def install(self, spec, prefix): - configure_args = [] - if 'libsigsegv' in spec: - configure_args.append('--with-libsigsegv-prefix=%s' % - spec['libsigsegv'].prefix) + def configure_args(self): + spec = self.spec + args = ['--enable-c++'] + + if '+sigsegv' in spec: + args.append('--with-libsigsegv-prefix={0}'.format( + spec['libsigsegv'].prefix)) else: - configure_args.append('--without-libsigsegv-prefix') + args.append('--without-libsigsegv-prefix') # http://lists.gnu.org/archive/html/bug-m4/2016-09/msg00002.html - if (sys.platform == "darwin") and (spec.satisfies('%gcc')) and \ - (spec.architecture.platform_os.version == "10.12"): - configure_args.append('ac_cv_type_struct_sched_param=yes') + if (sys.platform == 'darwin') and (spec.satisfies('%gcc')) and \ + (spec.architecture.platform_os.version == '10.12'): + args.append('ac_cv_type_struct_sched_param=yes') - configure("--prefix=%s" % prefix, *configure_args) - make() - make("install") + return args |