# Create openlayer-config script for *nix based systems

setinput build/options
read tempstr
read tempstr
read tempstr
CONFIGFLAGS = ${'tempstr'}
read tempstr
CONFIGLIBS = ${'tempstr'}
setinput
writefile ${'LOCATION'}/bin/openlayer-config \#!/bin/sh
appendfile ${'LOCATION'}/bin/openlayer-config \# openlayer-config autogenerated by cbuild script from the OpenLayer library
appendfile ${'LOCATION'}/bin/openlayer-config
appendfile ${'LOCATION'}/bin/openlayer-config version=2.0
appendfile ${'LOCATION'}/bin/openlayer-config prefix=${'LOCATION'}
appendfile ${'LOCATION'}/bin/openlayer-config cflags=\"-I\$prefix/include -I\$prefix/include/OpenLayer ${CONFIGFLAGS}\"
appendfile ${'LOCATION'}/bin/openlayer-config libs=\"-lopenlayer ${CONFIGLIBS}\"
appendfile ${'LOCATION'}/bin/openlayer-config
appendfile ${'LOCATION'}/bin/openlayer-config usage()
appendfile ${'LOCATION'}/bin/openlayer-config {
appendfile ${'LOCATION'}/bin/openlayer-config     cat <<EOF
appendfile ${'LOCATION'}/bin/openlayer-config Usage: openlayer-config [OPTION]...
appendfile ${'LOCATION'}/bin/openlayer-config 
appendfile ${'LOCATION'}/bin/openlayer-config Known values for OPTION are:
appendfile ${'LOCATION'}/bin/openlayer-config 
appendfile ${'LOCATION'}/bin/openlayer-config   --libs                print library linking information
appendfile ${'LOCATION'}/bin/openlayer-config   --cflags              print pre-processor and compiler flags
appendfile ${'LOCATION'}/bin/openlayer-config   --version             output version information
appendfile ${'LOCATION'}/bin/openlayer-config 
appendfile ${'LOCATION'}/bin/openlayer-config EOF
appendfile ${'LOCATION'}/bin/openlayer-config 
appendfile ${'LOCATION'}/bin/openlayer-config     exit \$1
appendfile ${'LOCATION'}/bin/openlayer-config }
appendfile ${'LOCATION'}/bin/openlayer-config 
appendfile ${'LOCATION'}/bin/openlayer-config if test \$\# -eq 0; then
appendfile ${'LOCATION'}/bin/openlayer-config     usage 1
appendfile ${'LOCATION'}/bin/openlayer-config fi
appendfile ${'LOCATION'}/bin/openlayer-config 
appendfile ${'LOCATION'}/bin/openlayer-config while test \$\# -gt 0; do
appendfile ${'LOCATION'}/bin/openlayer-config     case "\$1" in
appendfile ${'LOCATION'}/bin/openlayer-config     -*=*) optarg=`echo "\$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
appendfile ${'LOCATION'}/bin/openlayer-config     *) optarg= ;;
appendfile ${'LOCATION'}/bin/openlayer-config     esac
appendfile ${'LOCATION'}/bin/openlayer-config
appendfile ${'LOCATION'}/bin/openlayer-config     case "\$1" in
appendfile ${'LOCATION'}/bin/openlayer-config     --version)
appendfile ${'LOCATION'}/bin/openlayer-config         echo \$version
appendfile ${'LOCATION'}/bin/openlayer-config         ;;
appendfile ${'LOCATION'}/bin/openlayer-config     --cflags)
appendfile ${'LOCATION'}/bin/openlayer-config         echo \$cflags
appendfile ${'LOCATION'}/bin/openlayer-config         ;;
appendfile ${'LOCATION'}/bin/openlayer-config 
appendfile ${'LOCATION'}/bin/openlayer-config     --libs)
appendfile ${'LOCATION'}/bin/openlayer-config         echo \$libs
appendfile ${'LOCATION'}/bin/openlayer-config         ;;
appendfile ${'LOCATION'}/bin/openlayer-config     esac
appendfile ${'LOCATION'}/bin/openlayer-config     shift
appendfile ${'LOCATION'}/bin/openlayer-config done
-call chmod +x ${'LOCATION'}/bin/openlayer-config
