blob: ef306e785029bf47a85d183b9fadf591e4ffd67e [file] [log] [blame]
#!/bin/sh
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
usage()
{
cat <<EOF
Usage: liblucy-config [OPTION]
Known values for OPTION are:
--prefix=DIR liblucy prefix [default $prefix]
--exec-prefix=DIR liblucy exec prefix [default $exec_prefix]
--libs print library linking information
--libtool-libs print linking information for use with libtool
--cflags print pre-processor and compiler flags
--help display this help and exit
--version output version information
EOF
exit $1
}
if test $# -eq 0; then
usage 1
fi
cflags=false
libs=false
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case "$1" in
--prefix=*)
prefix=$optarg
includedir=$prefix/include
libdir=$prefix/lib
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
libdir=$exec_prefix/lib
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo @VERSION@
exit 0
;;
--help)
usage 0
;;
--cflags)
echo @CFLAGS@ -I${includedir}
;;
--libtool-libs)
echo ${libdir}/liblucy.la
;;
--libs)
echo -L${libdir} -llucy @LIBS@
;;
*)
usage 1
exit 1
;;
esac
shift
done
exit 0