# 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.

use strict;
use ExtUtils::MakeMaker 5.16 qw(WriteMakefile prompt);
use Config;

die "RDFStore needs Perl 5.004_05 or better. This is $]
"
    if $] <= 5.00404;

$| = 1;

# this makefile will be used *just* for perl based dbmsd(8) testing (see ../README)
WriteMakefile(
        # any idea how to just make the bloody Makefile.PL to see ../../lib/DBMS.pm dyna linked to ../blib/arch/auto/RDFStore/RDFStore.so ???
        # just now copy all the modules of the main dir locally to while makeing test - the DBMS.pm module is installed with the main dist anyway!
        #PM => {'../../blib/lib/DBMS.pm' => '$(INST_LIBDIR)/DBMS.pm'}
        #PM => { '../../blib/lib/RDFStore.pm' => '$(INST_LIBDIR)/RDFStore.pm', '../../blib/lib/DBMS.pm' => '$(INST_LIBDIR)/DBMS.pm' }
        # this is the only one making sense and kinda working....
        PMLIBDIRS => [ '../../blib/lib', '../../blib/arch/' ]
        );

# XXXX -- perhaps overwrite the DBMS.pm and
# add:
#	eval("sub DBMS_XSMODE_DEFAULT () { 0; }") unless defined(&DBMS_XSMODE_DEFAULT);
#	eval("sub DBMS_XSMODE_RDONLY () { 1; }") unless defined(&DBMS_XSMODE_RDONLY);
#	eval("sub DBMS_XSMODE_RDWR () { 2; }") unless defined(&DBMS_XSMODE_RDWR);
#	eval("sub DBMS_XSMODE_CREAT () { 3; }") unless defined(&DBMS_XSMODE_CREAT);
#	eval("sub DBMS_XSMODE_DROP () { 4; }") unless defined(&DBMS_XSMODE_DROP);
