head 1.3; access; symbols; locks; strict; comment @# @; 1.3 date 2002.01.09.14.10.06; author rse; state Exp; branches; next 1.2; 1.2 date 2002.01.09.13.34.42; author rse; state Exp; branches; next 1.1; 1.1 date 2002.01.09.10.44.28; author rse; state Exp; branches; next ; desc @@ 1.3 log @CACHE is correct, yes @ text @#!/bin/sh ## ## cache - OSSP Caching Library ## Copyright (c) 2002 Ralf S. Engelschall ## Copyright (c) 2002 The OSSP Project ## Copyright (c) 2002 Cable & Wireless Deutschland ## ## This file is part of OSSP cache, a Caching library which ## can be found at http://www.ossp.org/pkg/cache/. ## ## 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. ## ## cache-config.in: cache library build utility ## DIFS=' ' prefix="@@prefix@@" exec_prefix="@@exec_prefix@@" cache_prefix="$prefix" cache_exec_prefix="$exec_prefix" cache_bindir="@@bindir@@" cache_libdir="@@libdir@@" cache_includedir="@@includedir@@" cache_mandir="@@mandir@@" cache_datadir="@@datadir@@" cache_acdir="@@datadir@@/aclocal" cache_cflags="@@CFLAGS@@" cache_ldflags="@@LDFLAGS@@" cache_libs="@@LIBS@@" cache_version="@@CACHE_VERSION_STR@@" help=no version=no usage="cache-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 "cache-config:Error: Invalid option" 1>&2 echo "cache-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 cache $cache_version" exit 0 ;; --all) all=yes ;; --prefix) output="$output $cache_prefix" ;; --exec-prefix) output="$output $cache_exec_prefix" ;; --bindir) output="$output $cache_bindir" ;; --libdir) output="$output $cache_libdir" ;; --includedir) output="$output $cache_includedir" ;; --mandir) output="$output $cache_mandir" ;; --datadir) output="$output $cache_datadir" ;; --acdir) output="$output $cache_acdir" ;; --cflags) output="$output -I$cache_includedir" output_extra="$output_extra $cache_cflags" ;; --ldflags) output="$output -L$cache_libdir" output_extra="$output_extra $cache_ldflags" ;; --libs) output="$output -lcache" output_extra="$output_extra $cache_libs" ;; * ) echo "sa-config:Error: Invalid option" 1>&2 echo "sa-config:Usage: $usage" 1>&2 exit 1; ;; esac done IFS="$OIFS" if [ ".$prev" != . ]; then echo "cache-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 @ 1.2 log @More build configuration fixes. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @a48 1 ## FIXME! Should be CACHE or cache? @ 1.1 log @Create a fresh build environment for new born child OSSP cache. This soon to be written library will provide a user-land cache with O(1) time complexity and fixed size memory usage. @ text @d29 1 a29 1 ## cache-config.in: SA library build utility d49 2 a50 1 cache_version="@@SA_VERSION_STR@@" @