# Copyright (C) 2004-2009, Parrot Foundation.
# $Id: config_lib_pir.in 45623 2010-04-12 23:48:39Z plobsing $

.include 'datatypes.pasm'

.sub 'main'
    get_params "(0)", $P5
    set $I10, $P5     # argv
    set $I11, 0      # flag
    le $I10, 1, no_arg
    set $S10, $P5[1]
    ne $S10, "--install", no_arg
    set $I11, 1      # install flag
no_arg:
    new $P0, 'Hash'
    $P0.'set_value_type'(.DATATYPE_STRING)
    $S2 = null

    @PCONFIG@

    if $I11, is_install
    set $S1, "@PWD@"
    set $P0["prefix"], $S1
    set $P0["installed"], "0"
    branch freeze_config
is_install:
    set $P0["installed"], "1"
freeze_config:

    freeze $S0, $P0
    print $S0
.end

# Local Variables:
#   mode: pir
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
