#!/bin/sh
prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
CFLAGS=""
CPPFLAGS="-I@includedir@"
CXXFLAGS=""
OBJCFLAGS="-fexceptions -fobjc-exceptions -fconstant-string-class=OFConstString"
OBJCFLAGS="$OBJCFLAGS @NO_CONST_CFSTRINGS@ @NO_WARN_UNUSED@ @ATOMIC_OBJCFLAGS@"
LDFLAGS=""
LDFLAGS_RPATH="@LDFLAGS_RPATH@"
LIBS="-L${libdir} -lobjfw @LIBS@"
VERSION="0.3-dev"
show_help() {
echo "$0: Available arguments are:"
echo
echo " --all Outputs all flags + libs"
echo " --cflags Outputs the required CFLAGS"
echo " --cppflags Outputs the required CPPFLAGS"
echo " --cxxflags Outputs the required CXXFLAGS"
echo " --objcflags Outputs the required OBJCFLAGS"
echo " --ldflags Outputs the required LDFLAGS"
echo " --rpath Outputs LDFLAGS for using rpath"
echo " --libs Outputs the required LIBS"
echo " --version Outputs the installed version"
echo
exit 0
}
test -z "$1" && show_help
while test ! -z "$1"; do
case "$1" in
--all)
echo "$CFLAGS"
echo "$CPPFLAGS"
echo "$CXXFLAGS"
echo "$OBJCFLAGS"
echo "$LDFLAGS"
echo "$RPATH_LDFLAGS"
echo "$LIBS"
;;
--cflags)
echo "$CFLAGS"
;;
--cppflags)
echo "$CPPFLAGS"
;;
--cxxflags)
echo "$CXXFLAGS"
;;
--objcflags)
echo "$OBJCFLAGS"
;;
--libs)
echo "$LIBS"
;;
--ldflags)
echo "$LDFLAGS"
;;
--rpath)
echo "$LDFLAGS_RPATH"
;;
--version)
echo "$VERSION"
;;
*)
echo "Invalid option: $1" >/dev/stderr
exit 1
;;
esac
shift
done