8
      #ˆ¿‘äÇò 8àIR€ClRÿ?Ñƒh¹Ð¾Î      #7:6
      %ˆ¿‘äÇò 8àIR� ñ?Ñƒh¹Ð¾Î      %9
      'ˆ¿‘äÇò 8àIR�·Y•¯çÑƒh¹Ð¾Î      '12
  H   )ˆl–Ü4ý('ÜZÔâ€vã,ÜÅ£Žþ\•g#rHóO£{ùÒ‚CÑ_“I|¥ŽõHºl=$¤�zTÖ™	ÀÐ  o    )import type { FormatDistanceFn } from "../../types.ts";
export declare const formatDistance: FormatDistanceFn;
  7   +ˆl–Ým_J22Ž¥	@³p¸ ©‹Fÿ�þDÜY¹!u§�üÿÔƒy—ZÓÏÁÑ  ¶    +# please insert nothing before this line: -*- mode: cperl; cperl-indent-level: 4; cperl-continued-statement-offset: 4; indent-tabs-mode: nil -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package ModPerl::BuildOptions;

use strict;
use warnings;

use Apache2::Build ();
use Apache::TestTrace;
use Config ();
my $param_qr = qr([\s=]+);

use constant VERBOSE => 1;
use constant UNKNOWN_FATAL => 2;

use File::Spec;

sub init {
    my ($class, $build) = @_;

    #@ARGV should override what's in .makepl_args.mod_perl2
    #but @ARGV might also override the default MP_OPTS_FILE
    #so snag that first
    parse($build, [grep { /^MP_OPTIONS_FILE/ } @ARGV]);
    parse_file($build);
    parse_argv($build);

    # if AP_PREFIX is used apxs and apr-config from the apache build
    # tree won't work, so it can't co-exist with APXS and APR_CONFIG
    # options
    if ($build->{MP_AP_PREFIX} and $build->{MP_APXS}) {
        error "You need to pass either MP_AP_PREFIX or MP_APXS, but not both";
        die "\n";
    }
    if ($build->{MP_AP_PREFIX} and $build->{MP_APR_CONFIG}) {
        error "You need to pass either MP_AP_PREFIX or MP_APR_CONFIG, " .
            "but not both";
        die "\n";
    }

    if ($build->{MP_DEBUG} and $build->{MP_USE_GTOP} and !$build->find_gtop) {
        error "Can't find libgtop, resetting MP_USE_GTOP=0";
        $build->{MP_USE_GTOP} = 0;
    }

    unless ($build->{MP_USE_DSO} or $build->{MP_USE_STATIC}) {
        # default to DSO
        $build->{MP_USE_DSO} = 1;
    }

    $build->{MP_GENERATE_XS} = 1 unless exists $build->{MP_GENERATE_XS};

    # define MP_COMPAT_1X unless explicitly told to disable it
    $build->{MP_COMPAT_1X} = 1
        unless exists $build->{MP_COMPAT_1X} && !$build->{MP_COMPAT_1X};

    # try to find apxs
    if (!$build->{MP_AP_PREFIX} && !$build->{MP_APXS}) {
        $build->find_apxs_util();

        # make a last ditch effort to find apxs in $ENV{PATH}
        if (!$build->{MP_APXS}) {
            my @paths = split(/$Config::Config{path_sep}/, $ENV{PATH});
            my $potential_apxs;
            while (!$potential_apxs) {
                last if scalar(@paths) == 0; # don't loop endlessly
                $potential_apxs = File::Spec->catfile(shift @paths, 'apxs');
                $potential_apxs .= '.bat' if Apache2::Build::WIN32();
                if (-e $potential_apxs && -x $potential_apxs) {
                    $build->{MP_APXS} = $potential_apxs;
                } else {
                    undef $potential_apxs;
                }
            }
        }
    }
}

sub parse {
    my ($build, $lines, $opts) = @_;

    $opts = VERBOSE|UNKNOWN_FATAL unless defined $opts;
    my $table = table();
    my @unknown;
    my $continue = "";

    my @data = ();
    for (@$lines) {
        chomp;
        s/^\s+//; s/\s+$//;
        next if /^\#/ || /^$/;
        last if /^__END__/;

        # more than one entry on the sam