#!/bin/sh

# This file is generated by the configure script.

# use debugging code:                      false
# Zlib (gzipped file) support:             yes
# use malloc hooks:                        yes


# C compiler used for build: cc (Debian 4.4.3-2) 4.4.3
# --------------------------
# Using built-in specs.
# Target: mips-linux-gnu
# Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.3-2' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --disable-libssp --enable-targets=all --enable-checking=release --build=mips-linux-gnu --host=mips-linux-gnu --target=mips-linux-gnu
# Thread model: posix
# gcc version 4.4.3 (Debian 4.4.3-2) 

cc=cc


# Package Version
#----------------

version="1.1.2"


# Installation directories
#-------------------------

prefix="/usr"
exec_prefix="${prefix}"
includedir="${prefix}/include"
libdir="${exec_prefix}/lib"

cppflags=""
cflags=""
ldflags=""
libs=" -lz"

build_cppflags=" -D_GNU_SOURCE "
build_cflags="-g -O2 -g -Wall -O2"
build_ldflags=" -O "
build_libs=" -lz"


# Output info depending on command-line options
#----------------------------------------------

if test $# -eq 0; then
  show_help=yes

else
  for opt in $*
  do
    case $opt in
      --prefix)
        output="${output} $prefix"
        ;;
      --exec-prefix)
        if test "$exec_prefix" != "" ; then
          output="${output} $exec_prefix"
        else
          output="${output} $prefix/bin"
        fi
        ;;
      --includedir)
        if test "$includedir" != "" ; then
          output="${output} $includedir"
        else
          output="${output} $prefix/include"
        fi
        ;;
      --version)
        output="${output} $version"
        ;;
      --cppflags)
        echo_cppflags=yes
        ;;
      --cflags)
        echo_cflags=yes
        ;;
      --ldflags)
        echo_ldflags=yes
        ;;
      --libs)
        echo_libs=yes
        ;;
      --cc)
        output="${output} $cc"
        ;;
      -*)
        show_help=yes
        ;;
      *)
        scope=$opt
        ;;
    esac
  done
fi

if test "$show_help" = "yes"; then
  cat <<EOF
Usage: bft-config options scope

Options:
        --prefix            installation path prefix
        --exec-prefix       system-dependent path prefix
        --includedir        C header files path
        --version           library version

        --cppflags          C preprocessor flags (e.g. -D<macro>, ...)
        --cflags            C flags (e.g. -O, -g, ...)
        --ldflags           linker flags (e.g. -g, -L<path>, ...)
        --libs              librairies used (e.g. -l<libname>)

        --cc                C compiler used for build

Scope:
        use (default)       Options required for user code
        build               Options used for build
EOF
  exit 1
fi

case "$scope" in
  build)
    cppflags=$build_cppflags
    cflags=$build_cflags
    ldflags=$build_ldflags
    libs=$build_libs
    ;;
esac

if test "$echo_cppflags" = "yes" ; then
  output="${output} $cppflags"
fi
if test "$echo_cflags" = "yes" ; then
  output="${output} $cflags"
fi
if test "$echo_ldflags" = "yes" ; then
  output="${output} $ldflags"
fi
if test "$echo_libs" = "yes" ; then
  output="${output} $libs"
fi

if test "$output" != "" ; then
  echo $output
fi

