package Cpanel::Easy::OptLib::mm;

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

sub path_installed {
    my ($easy_obj) = @_;

    my @configure = qw(./configure --prefix=/opt/mm/ --disable-shared);
    if ( $easy_obj->{'cpu_bits'} eq '64' ) {
        @configure = ('CFLAGS="-fPIC -m64" ./configure --prefix=/opt/mm/ --disable-shared --with-pic');
    }

    return {
        'name'         => 'mm',
        'install_path' => '/opt/mm/',
        'itis_up2date' => sub {
            `/opt/mm/bin/mm-config -v` =~ m{ MM \s+ 1[.]4[.]2 \s+ }xms;
        },
        'working_path' => 'mm-1.4.2',
        'command_list' => [ [@configure], ['make'], [qw(make test)], [qw(make install)], ],
    };
}

1;
