#!/bin/sh

# tp-magic-config

# "Tux Paint Magic Config"
# Tool that reports compiler options used when buidling Magic Tool
# shared objects for Tux Paint

# (c) Copyright 2007, by Bill Kendrick
# bill@newbreedsoftware.com
# http://www.tuxpaint.org/

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# (See COPYING.txt)

# Note: "0.9.21", "0x00000002", "/usr/local/include/tuxpaint",
# "/usr/local/lib/tuxpaint/plugins", "/usr/local/share/doc/tuxpaint/magic-docs" and "/usr/local/share/tuxpaint" are replaced
# by values in Tux Paint's Makefile, via 'sed', by the 'make tp-magic-config'
# target.

# July 5, 2007 - August 2, 2007


if [ $# -ne 0 ]; then
  if [ $1 = "--version" ]; then
    echo "0.9.21"
    exit
  fi
  if [ $1 = "--apiversion" ]; then
    echo "0x00000002"
    exit
  fi
  if [ $1 = "--cflags" ]; then
    echo `sdl-config --cflags` -I/usr/local/include/tuxpaint
    exit
  fi
  if [ $1 = "--dataprefix" ]; then
    echo "/usr/local/share/tuxpaint"
    exit
  fi
  if [ $1 = "--localdataprefix" ]; then
    echo "$HOME/.tuxpaint/plugins/data"
    exit
  fi
  if [ $1 = "--pluginprefix" ]; then
    echo "/usr/local/lib/tuxpaint/plugins"
    exit
  fi
  if [ $1 = "--localpluginprefix" ]; then
    echo "$HOME/.tuxpaint/plugins"
    exit
  fi
  if [ $1 = "--plugindocprefix" ]; then
    echo "/usr/local/share/doc/tuxpaint/magic-docs"
    exit
  fi
fi

echo "Usage: tp-magic-config [--apiversion | --version | --cflags | --pluginprefix | --plugindocprefix | --dataprefix]"

