package Cpanel::Easy::PHP5::MM;

# cpanel - Cpanel/Easy/PHP5/MM.pm                 Copyright(c) 2011 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

our $easyconfig = {
    'name'    => 'MM',
    'url'     => 'http://www.ossp.org/pkg/lib/mm/',
    'depends' => {
        'optmods' => {
            'Cpanel::Easy::Apache::MPMThreadpool' => 0,
            'Cpanel::Easy::Apache::MPMWorker'     => 0,
            'Cpanel::Easy::Apache::MPMLeader'     => 0,
            'Cpanel::Easy::Apache::MPMEvent'      => 0,
        },
    },
    'dryrun' => {
        '0' => {
            'name'    => 'Find mm path for PHP 5',
            'command' => sub {
                my ($self) = @_;
                my ( $path, @text ) = $self->get_path_installed('Cpanel::Easy::OptLib::mm');

                if ($path) {
                    $self->{'__'}{'MMPath'} = $path;
                    return ( 1, 'Ok' );
                }
                else {
                    return $path, @text;
                }
            },
        },
    },
    'step' => {
        '0' => {
            'name'    => 'to config options',
            "command" => sub {
                my ($self) = @_;
                $self->add_to_configure( { '--with-mm' => $self->{'__'}{'MMPath'} } );
                return ( 1, 'Ok' );
            },
        },
    },
};

1;
