ossp-pkg/pcre/pcre-config.in
#!/bin/sh
##
## pcre-config -- PCRE library build configuration utility
## Copyright (c) 1999-2001 Ralf S. Engelschall, All Rights Reserved.
##
DIFS='
'
prefix="@prefix@"
exec_prefix="@exec_prefix@"
pcre_prefix="$prefix"
pcre_libdir="@libdir@"
pcre_includedir="@includedir@"
pcre_mandir="@mandir@"
pcre_cflags="@CFLAGS@"
pcre_ldflags="@LDFLAGS@"
pcre_libs="@LIBS@"
pcre_version="@PCRE_VERSION@"
help=no
version=no
usage="$0 [--help] [--version] [--cflags] [--ldflags] [--libs]"
if [ $# -eq 0 ]; then
echo "$0:Error: Invalid option" 1>&2
echo "$0:Usage: $usage" 1>&2
exit 1
fi
prev=''
OIFS="$IFS" IFS="$DIFS"
for option
do
if [ ".$prev" != . ]; then
eval "$prev=\$option"
prev=""
continue
fi
case "$option" in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg='' ;;
esac
case "$option" in
--help|-h)
echo "$0:Usage: $usage"
exit 1
;;
--version|-v)
echo "OSSP PCRE $pcre_version"
exit 0
;;
--cflags)
echo "-I$pcre_includedir"
;;
--ldflags)
echo "-L$pcre_libdir"
;;
--libs)
echo "-lpcreposix -lpcre"
;;
* )
echo "$0:Error: Invalid option" 1>&2
echo "$0:Usage: $usage" 1>&2
exit 1;
;;
esac
done
IFS="$OIFS"
if [ ".$prev" != . ]; then
echo "$-1:${T_MD}Error${T_ME}: missing argument to --`echo $prev | sed 's/_/-/g'`" 1>&2
exit 1
fi