1217309Snwhitehorn#!@SHELL@ 2251843Sbapt# $Id: dialog-config.in,v 1.6 2012/10/06 14:29:45 tom Exp $ 3217309Snwhitehorn############################################################################## 4251843Sbapt# Copyright (c) 2007-2011,2012 Thomas E. Dickey # 5217309Snwhitehorn# # 6217309Snwhitehorn# Permission is hereby granted, free of charge, to any person obtaining a # 7217309Snwhitehorn# copy of this software and associated documentation files (the "Software"), # 8217309Snwhitehorn# to deal in the Software without restriction, including without limitation # 9217309Snwhitehorn# the rights to use, copy, modify, merge, publish, distribute, distribute # 10217309Snwhitehorn# with modifications, sublicense, and/or sell copies of the Software, and to # 11217309Snwhitehorn# permit persons to whom the Software is furnished to do so, subject to the # 12217309Snwhitehorn# following conditions: # 13217309Snwhitehorn# # 14217309Snwhitehorn# The above copyright notice and this permission notice shall be included in # 15217309Snwhitehorn# all copies or substantial portions of the Software. # 16217309Snwhitehorn# # 17217309Snwhitehorn# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # 18217309Snwhitehorn# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # 19217309Snwhitehorn# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # 20217309Snwhitehorn# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # 21217309Snwhitehorn# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # 22217309Snwhitehorn# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # 23217309Snwhitehorn# DEALINGS IN THE SOFTWARE. # 24217309Snwhitehorn# # 25217309Snwhitehorn# Except as contained in this notice, the name(s) of the above copyright # 26217309Snwhitehorn# holders shall not be used in advertising or otherwise to promote the sale, # 27217309Snwhitehorn# use or other dealings in this Software without prior written # 28217309Snwhitehorn# authorization. # 29217309Snwhitehorn############################################################################## 30217309Snwhitehorn 31217309Snwhitehornprefix="@prefix@" 32217309Snwhitehornexec_prefix="@exec_prefix@" 33251843Sbaptdatarootdir="@datarootdir@" 34217309Snwhitehorn 35217309Snwhitehornbindir="@bindir@" 36217309Snwhitehornlibdir="@libdir@" 37217309Snwhitehorndatadir="@datadir@" 38217309Snwhitehornmandir="@mandir@" 39217309Snwhitehorn 40220749SnwhitehornTHIS="@PACKAGE@" 41217309Snwhitehorn 42217309Snwhitehorntest $# = 0 && exec @SHELL@ $0 --error 43217309Snwhitehorn 44217309Snwhitehornwhile test $# -gt 0; do 45217309Snwhitehorn case "$1" in 46217309Snwhitehorn -*=*) 47217309Snwhitehorn ARG=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` 48217309Snwhitehorn ;; 49217309Snwhitehorn *) 50217309Snwhitehorn ARG= 51217309Snwhitehorn ;; 52217309Snwhitehorn esac 53217309Snwhitehorn 54217309Snwhitehorn case "$1" in 55217309Snwhitehorn # basic configuration 56217309Snwhitehorn --prefix=*) 57217309Snwhitehorn prefix="$ARG" 58217309Snwhitehorn test -z "$exec_prefix" && exec_prefix="$ARG" 59217309Snwhitehorn ;; 60217309Snwhitehorn --prefix) 61217309Snwhitehorn echo "$prefix" 62217309Snwhitehorn ;; 63217309Snwhitehorn --exec-prefix=*) 64217309Snwhitehorn exec_prefix="$ARG" 65217309Snwhitehorn ;; 66217309Snwhitehorn --exec-prefix) 67217309Snwhitehorn echo "$exec_prefix" 68217309Snwhitehorn ;; 69217309Snwhitehorn # compile/link 70217309Snwhitehorn --cflags) 71217309Snwhitehorn INCS= 72217309Snwhitehorn if test "${prefix}/include" != /usr/include ; then 73217309Snwhitehorn INCS="-I${prefix}/include" 74217309Snwhitehorn fi 75217309Snwhitehorn sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO 76217309Snwhitehorn $INCS 77217309SnwhitehornENDECHO 78217309Snwhitehorn ;; 79217309Snwhitehorn --libs) 80217309Snwhitehorn sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO 81217309Snwhitehorn -L${exec_prefix}/lib -l${THIS} @LIBS@ 82217309SnwhitehornENDECHO 83217309Snwhitehorn ;; 84217309Snwhitehorn # identification 85217309Snwhitehorn --version) 86217309Snwhitehorn echo "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@" 87217309Snwhitehorn ;; 88217309Snwhitehorn --abi-version) 89217309Snwhitehorn echo "@VERSION@" | sed -e 's/:/./g' 90217309Snwhitehorn ;; 91217309Snwhitehorn # locations 92217309Snwhitehorn --bindir) 93217309Snwhitehorn echo "${bindir}" 94217309Snwhitehorn ;; 95217309Snwhitehorn --datadir) 96217309Snwhitehorn echo "${datadir}" 97217309Snwhitehorn ;; 98217309Snwhitehorn --libdir) 99217309Snwhitehorn echo "${libdir}" 100217309Snwhitehorn ;; 101217309Snwhitehorn --mandir) 102217309Snwhitehorn echo "${mandir}" 103217309Snwhitehorn ;; 104217309Snwhitehorn # general info 105217309Snwhitehorn --help) 106217309Snwhitehorn cat <<ENDHELP 107217309SnwhitehornUsage: ${THIS}-config [options] 108217309Snwhitehorn 109217309SnwhitehornOptions: 110217309Snwhitehorn --prefix echos the package-prefix of ${THIS} 111217309Snwhitehorn --prefix=ARG sets the package-prefix of ${THIS} 112217309Snwhitehorn --exec-prefix echos the executable-prefix of ${THIS} 113217309Snwhitehorn --exec-prefix=ARG sets the executable-prefix of ${THIS} 114217309Snwhitehorn 115217309Snwhitehorn --cflags echos the C compiler flags needed to compile with ${THIS} 116217309Snwhitehorn --libs echos the libraries needed to link with ${THIS} 117217309Snwhitehorn 118217309Snwhitehorn --version echos the release+patchdate version of ${THIS} 119217309Snwhitehorn --abi-version echos the ABI version of ${THIS} 120217309Snwhitehorn 121217309Snwhitehorn --bindir echos the directory containing ${THIS} programs 122217309Snwhitehorn --datadir echos the directory containing ${THIS} data 123217309Snwhitehorn --libdir echos the directory containing ${THIS} libraries 124217309Snwhitehorn --mandir echos the directory containing ${THIS} manpages 125217309Snwhitehorn 126217309Snwhitehorn --help prints this message 127217309SnwhitehornENDHELP 128217309Snwhitehorn ;; 129217309Snwhitehorn --error|*) 130217309Snwhitehorn @SHELL@ $0 --help 1>&2 131217309Snwhitehorn exit 1 132217309Snwhitehorn ;; 133217309Snwhitehorn esac 134217309Snwhitehorn shift 135217309Snwhitehorndone 136217309Snwhitehorn# vile:shmode 137