def METHOD_NAME(self, cmd_prefix=''):
    """
    Configure with Meson.
    """
    # make sure both Meson and Ninja are included as build dependencies
    build_dep_names = [d['name'] for d in self.cfg.builddependencies()]
    for tool in ['Ninja', 'Meson']:
        if tool not in build_dep_names:
            raise EasyBuildError("%s not included as build dependency", tool)
        cmd = tool.lower()
        if not which(cmd):
            raise EasyBuildError("'%s' command not found", cmd)
    if self.cfg.get('separate_build_dir', True):
        builddir = create_unused_dir(self.builddir, 'easybuild_obj')
        change_dir(builddir)
    # Make sure libdir doesn't get set to lib/x86_64-linux-gnu or something
    # on Debian/Ubuntu multiarch systems and others.
    no_Dlibdir = '-Dlibdir' not in self.cfg['configopts']
    no_libdir = '--libdir' not in self.cfg['configopts']
    if no_Dlibdir and no_libdir:
        self.cfg.update('configopts', '-Dlibdir=lib')
    configure_cmd = self.cfg.get('configure_cmd') or DEFAULT_CONFIGURE_CMD
    # Meson >= 0.64.0 has a deprecatation warning for running `meson [options]`
    # instead of `meson setup [options]`
    if (LooseVersion(get_software_version('Meson')) >= LooseVersion('0.64.0') and
            configure_cmd == DEFAULT_CONFIGURE_CMD):
        configure_cmd += ' setup'
    build_dir = self.cfg.get('build_dir') or self.start_dir
    cmd = "%(preconfigopts)s %(configure_cmd)s --prefix %(installdir)s %(configopts)s %(source_dir)s" % {
        'configopts': self.cfg['configopts'],
        'configure_cmd': configure_cmd,
        'installdir': self.installdir,
        'preconfigopts': self.cfg['preconfigopts'],
        'source_dir': build_dir,
    }
    (out, _) = run_cmd(cmd, log_all=True, simple=False)
    return out