libiir/src/libiir++/config-script
Laurence Withers 911b3eab3d Add C++ wrapper library
This commit adds libiir++, a C++ wrapper library which provides a true
object-oriented interface. The library has two primary objects, Coeff
(coefficient set) and Filter (filter instance) which are implemented
internally using the C objects.

The C++ implementation does produce additional copies of various bits
of information at setup time in order to better support querying the
structure of the filter at runtime. This is intended to be useful for a
future Python extension that will provide a filter experimentation lab.
2014-07-07 14:56:25 +00:00

97 lines
1.6 KiB
Bash

#!/bin/bash
# libiir/src/libiir++/config-script
#
# libiir++-config template. Variables are finalised at install time.
#
dep_cflags="@DEP_CFLAGS@"
dep_libs="@DEP_LIBS@"
include_dir="@INCLUDE_DIR@"
include_dir_set="no"
lib_dir="@LIB_DIR@"
lib_dir_set="no"
usage() {
cat <<EOF
Usage: libiir++-config [options]
Options:
[--version]
[--libs]
[--libdir[=DIR]]
[--cflags]
[--includedir[=DIR]]
EOF
exit $1
}
[ $# -eq 0 ] && usage 1 1>&2
while [ $# -gt 0 ]
do
case "$1" in
-*=*)
optarg="$(echo "$1" | sed 's/[-_a-zA-Z0-9]*=//')"
;;
*)
optarg=""
;;
esac
case "$1" in
--libdir=*)
lib_dir="${optarg}"
lib_dir_set="yes"
;;
--libdir)
echo_lib_dir="yes"
;;
--includedir=*)
include_dir="${optarg}"
include_dir_set="yes"
;;
--includedir)
echo_include_dir="yes"
;;
--version)
echo "@VERSION@"
exit 0
;;
--cflags)
[ "${include_dir}" != "/usr/include" ] && includes="-I${include_dir}"
echo_cflags="yes"
;;
--libs)
echo_libs="yes"
;;
*)
usage 1 1>&2
;;
esac
shift
done
[ "${echo_prefix}" == "yes" ] && echo "${prefix}"
[ "${echo_exec_prefix}" == "yes" ] && echo "${exec_prefix}"
[ "${echo_cflags}" == "yes" ] && echo "${dep_cflags} ${includes}"
[ "${echo_libs}" == "yes" ] && echo "${dep_libs} -L${lib_dir} -liir++"
true
# kate: