1#!/bin/sh 2# Copyright (C) 2006-2007 David Sugar, Tycho Softworks. 3# 4# This file is free software; as a special exception the author gives 5# unlimited permission to copy and/or distribute it, with or without 6# modifications, as long as this notice is preserved. 7# 8# This program is distributed in the hope that it will be useful, but 9# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 10# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 12prefix="@CMAKE_INSTALL_PREFIX@" 13includedir="@CMAKE_INSTALL_FULL_INCLUDEDIR@" 14libdir="@CMAKE_INSTALL_FULL_LIBDIR@" 15 16usage() 17{ 18 cat <<EOF 19Usage: ucommon-config [OPTION] 20 21Known values for OPTION are: 22 23 --prefix=DIR change ucommon prefix [default $prefix] 24 --libs print library linking information 25 --minimal linking without usecure 26 --cflags print pre-processor and compiler flags 27 --includes print framework include directory 28 --plugins print framework plugin directory 29 --help display this help and exit 30 --version output version information 31EOF 32 33 exit $1 34} 35 36if test $# -eq 0; then 37 usage 1 38fi 39 40cflags=false 41libs=false 42 43while test $# -gt 0; do 44 case "$1" in 45 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 46 *) optarg= ;; 47 esac 48 49 case "$1" in 50 --prefix=*) 51 prefix=$optarg 52 includedir=$prefix/include 53 libdir=$prefix/lib 54 ;; 55 56 --prefix) 57 echo $prefix 58 ;; 59 60 --version) 61 echo @VERSION@ 62 exit 0 63 ;; 64 65 --help) 66 usage 0 67 ;; 68 69 --cflags) 70 echo @PKG_UCOMMON_FLAGS@ 71 ;; 72 73 --libtool-libs) 74 if [ -r ${libdir}/libucommon.la ] ; then 75 echo ${libdir}/libucommon.la ; fi 76 ;; 77 78 --libs) 79 echo -L@CMAKE_INSTALL_FULL_LIBDIR@ -lusecure -lucommon @PKG_SECURE_LIBS@ @PKG_UCOMMON_LIBS@ 80 ;; 81 82 --minimal) 83 echo -lucommon @PKG_UCOMMON_LIBS@ 84 ;; 85 86 --includes) 87 echo @CMAKE_INSTALL_FULL_INCLUDEDIR@ 88 ;; 89 90 *) 91 usage 92 exit 1 93 ;; 94 esac 95 shift 96done 97 98exit 0 99