#!/bin/sh ## ## L2 - OSSP Logging Library ## Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) ## Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) ## ## This file is part of OSSP L2, a flexible logging library which ## can be found at http://www.ossp.com/pkg/l2/. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## ## l2-config.in: L2 library build utility ## DIFS=' ' prefix="@prefix@" exec_prefix="@exec_prefix@" l2_prefix="$prefix" l2_exec_prefix="$exec_prefix" l2_bindir="@bindir@" l2_libdir="@libdir@" l2_includedir="@includedir@" l2_mandir="@mandir@" l2_datadir="@datadir@" l2_acdir="@datadir@/aclocal" l2_cflags="@CFLAGS@" l2_ldflags="@LDFLAGS@" l2_libs="@LIBS@" l2_version="@L2_VERSION_STR@" help=no version=no usage="l2-config" usage="$usage [--help] [--version] [--all]" usage="$usage [--prefix] [--exec-prefix] [--bindir] [--libdir] [--includedir] [--mandir] [--datadir] [--acdir]" usage="$usage [--cflags] [--ldflags] [--libs]" if [ $# -eq 0 ]; then echo "l2-config:Error: Invalid option" 1>&2 echo "l2-config:Usage: $usage" 1>&2 exit 1 fi output='' output_extra='' all=no 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 "Usage: $usage" exit 0 ;; --version|-v) echo "OSSP L2 $l2_version" exit 0 ;; --all) all=yes ;; --prefix) output="$output $l2_prefix" ;; --exec-prefix) output="$output $l2_exec_prefix" ;; --bindir) output="$output $l2_bindir" ;; --libdir) output="$output $l2_libdir" ;; --includedir) output="$output $l2_includedir" ;; --mandir) output="$output $l2_mandir" ;; --datadir) output="$output $l2_datadir" ;; --acdir) output="$output $l2_acdir" ;; --cflags) output="$output -I$l2_includedir" output_extra="$output_extra $l2_cflags" ;; --ldflags) output="$output -L$l2_libdir" output_extra="$output_extra $l2_ldflags" ;; --libs) output="$output -ll2" output_extra="$output_extra $l2_libs" ;; * ) echo "l2-config:Error: Invalid option" 1>&2 echo "l2-config:Usage: $usage" 1>&2 exit 1; ;; esac done IFS="$OIFS" if [ ".$prev" != . ]; then echo "l2-config:Error: missing argument to --`echo $prev | sed 's/_/-/g'`" 1>&2 exit 1 fi if [ ".$output" != . ]; then if [ ".$all" = .yes ]; then output="$output $output_extra" fi echo $output fi