blob: f29b023392b8999cd470e7ea14733bc635dd18ae [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001#!/bin/sh
2#
3# Configure options script for re-calling MagickWand compilation options
4# required to use the MagickWand library.
5#
6
7prefix=@prefix@
8exec_prefix=@exec_prefix@
cristy3ed852e2009-09-05 21:47:34 +00009
10usage="\
11Usage: MagickWand-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]"
12
13if test $# -eq 0; then
cristy549177c2010-11-11 13:51:21 +000014 echo "${usage}" 1>&2
15 echo "Example: gcc \`MagickWand-config --cflags --cppflags\` -o wand wand.c \`MagickWand-config --ldflags --libs\`" 1>&2
cristy3ed852e2009-09-05 21:47:34 +000016 exit 1
17fi
18
19while test $# -gt 0; do
20 case "$1" in
cristy549177c2010-11-11 13:51:21 +000021 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
cristy3ed852e2009-09-05 21:47:34 +000022 *) optarg= ;;
23 esac
24 case $1 in
25 --prefix=*)
26 prefix=$optarg
27 ;;
28 --prefix)
cristy549177c2010-11-11 13:51:21 +000029 echo $prefix
cristy3ed852e2009-09-05 21:47:34 +000030 ;;
31 --exec-prefix=*)
32 exec_prefix=$optarg
33 ;;
34 --exec-prefix)
cristy549177c2010-11-11 13:51:21 +000035 echo $exec_prefix
cristy3ed852e2009-09-05 21:47:34 +000036 ;;
37 --version)
cristy549177c2010-11-11 13:51:21 +000038 echo '@PACKAGE_VERSION@ Q@QUANTUM_DEPTH@ @MAGICK_HDRI@'
cristy3ed852e2009-09-05 21:47:34 +000039 ;;
40 --cflags)
cristy0c5e7532011-10-22 12:59:02 +000041 pkg-config --cflags MagickWand
cristy3ed852e2009-09-05 21:47:34 +000042 ;;
43 --cxxflags)
cristy0c5e7532011-10-22 12:59:02 +000044 pkg-config --cflags MagickWand
cristy3ed852e2009-09-05 21:47:34 +000045 ;;
46 --cppflags)
cristy0c5e7532011-10-22 12:59:02 +000047 pkg-config --cflags MagickWand
cristy3ed852e2009-09-05 21:47:34 +000048 ;;
49 --ldflags)
cristy0c5e7532011-10-22 12:59:02 +000050 pkg-config --libs MagickWand
cristy3ed852e2009-09-05 21:47:34 +000051 ;;
52 --libs)
cristy0c5e7532011-10-22 12:59:02 +000053 pkg-config --libs MagickWand
cristy3ed852e2009-09-05 21:47:34 +000054 ;;
55 *)
56 echo "${usage}" 1>&2
57 exit 1
58 ;;
59 esac
60 shift
61done
62