#!/bin/sh

# The contents of this file are subject to the MonetDB Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is the MonetDB Database System.
#
# The Initial Developer of the Original Code is CWI.
# Portions created by CWI are Copyright (C) 1997-2008 CWI.
# All Rights Reserved.

# minimal inital version as required by Mtest.py

pkg="MonetDB-XQuery"
source="/tmp/Pathfinder"
build="/tmp/Pathfinder"
prefix="/usr/local"
exec_prefix="${prefix}"

libdir="${exec_prefix}/lib"
M4libdir="${libdir}/MonetDB4"
M5libdir="${libdir}/MonetDB5"

prog=`basename $0`
usage="Usage: $prog [OPTION]

Known values for OPTION are:

  --build		print ${pkg} build directory
  --source		print ${pkg} source directory
  --modpath4		print default ${pkg} module path (for M4)
  --modpath5		print default ${pkg} module path (for M5)
  --conds		conditionals as set by configure
  --help		display this help and exit
  --version		output version information

Install directories ${pkg} was configured to
  --prefix
"

if test $# -eq 0; then
    echo "$usage" >&2
    exit 1
fi

while test $# -gt 0; do
    case "$1" in
    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    *) optarg= ;;
    esac

    case "$1" in

    --prefix)
	echo $prefix
	;;

    --build)
	echo $build
	;;

    --source)
	echo $source
	;;

    --modpath4)
        echo 	$M4libdir:$M4libdir/lib:$M4libdir/bin
        ;;

    --modpath5)
        echo 	$M5libdir:$M5libdir/lib:$M5libdir/bin
        ;;

    --version)
	echo 0.41.0
	exit 0
	;;

    --help)
	echo "$usage"
	exit 0
	;;

    --conds)
	echo BITS32=
	echo BITS64=#
	echo DOCTOOLS=
	echo HAVE_BUILDTOOLS=#
	echo HAVE_CLIENTS=
	echo HAVE_EXTRA_MK=#
	echo HAVE_MONETDB4=
	echo HAVE_MONETDB5=
	echo HAVE_MONETDB5_RDF=
	echo HAVE_MONETDB5_XML=
	echo HAVE_MONETDB=
	echo HAVE_PCRE=#
	echo HAVE_PERL_DEVEL=#
	echo HAVE_PERL=#
	echo HAVE_PERL_SWIG=#
	echo HAVE_PYTHON=#
	echo HAVE_RUBYGEM=#
	echo HAVE_SWIG=#
	echo LINK_STATIC=
	echo NATIVE_WIN32=
	echo NEED_MX=#
	echo NOT_WIN32=#
	echo PROFILING=
	echo HAVE_LIBXML2=#
	echo HAVE_PFTIJAH=
	echo HAVE_PROBXML=
	;;

    *)
	echo "$usage" >&2
	exit 1
	;;
    esac
    shift
done

exit 0
