cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | #!/bin/sh |
2 | # | ||||
3 | # Configure options script for re-calling MagickWand compilation options | ||||
4 | # required to use the MagickWand library. | ||||
5 | # | ||||
6 | |||||
7 | prefix=@prefix@ | ||||
8 | exec_prefix=@exec_prefix@ | ||||
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 9 | |
10 | usage="\ | ||||
11 | Usage: MagickWand-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]" | ||||
12 | |||||
13 | if test $# -eq 0; then | ||||
cristy | 549177c | 2010-11-11 13:51:21 +0000 | [diff] [blame] | 14 | echo "${usage}" 1>&2 |
15 | echo "Example: gcc \`MagickWand-config --cflags --cppflags\` -o wand wand.c \`MagickWand-config --ldflags --libs\`" 1>&2 | ||||
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 16 | exit 1 |
17 | fi | ||||
18 | |||||
19 | while test $# -gt 0; do | ||||
20 | case "$1" in | ||||
cristy | 549177c | 2010-11-11 13:51:21 +0000 | [diff] [blame] | 21 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 22 | *) optarg= ;; |
23 | esac | ||||
24 | case $1 in | ||||
25 | --prefix=*) | ||||
26 | prefix=$optarg | ||||
27 | ;; | ||||
28 | --prefix) | ||||
cristy | 549177c | 2010-11-11 13:51:21 +0000 | [diff] [blame] | 29 | echo $prefix |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 30 | ;; |
31 | --exec-prefix=*) | ||||
32 | exec_prefix=$optarg | ||||
33 | ;; | ||||
34 | --exec-prefix) | ||||
cristy | 549177c | 2010-11-11 13:51:21 +0000 | [diff] [blame] | 35 | echo $exec_prefix |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 36 | ;; |
37 | --version) | ||||
cristy | 549177c | 2010-11-11 13:51:21 +0000 | [diff] [blame] | 38 | echo '@PACKAGE_VERSION@ Q@QUANTUM_DEPTH@ @MAGICK_HDRI@' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 39 | ;; |
40 | --cflags) | ||||
cristy | 0c5e753 | 2011-10-22 12:59:02 +0000 | [diff] [blame] | 41 | pkg-config --cflags MagickWand |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 42 | ;; |
43 | --cxxflags) | ||||
cristy | 0c5e753 | 2011-10-22 12:59:02 +0000 | [diff] [blame] | 44 | pkg-config --cflags MagickWand |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 45 | ;; |
46 | --cppflags) | ||||
cristy | 0c5e753 | 2011-10-22 12:59:02 +0000 | [diff] [blame] | 47 | pkg-config --cflags MagickWand |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 48 | ;; |
49 | --ldflags) | ||||
cristy | 0c5e753 | 2011-10-22 12:59:02 +0000 | [diff] [blame] | 50 | pkg-config --libs MagickWand |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 51 | ;; |
52 | --libs) | ||||
cristy | 0c5e753 | 2011-10-22 12:59:02 +0000 | [diff] [blame] | 53 | pkg-config --libs MagickWand |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 54 | ;; |
55 | *) | ||||
56 | echo "${usage}" 1>&2 | ||||
57 | exit 1 | ||||
58 | ;; | ||||
59 | esac | ||||
60 | shift | ||||
61 | done | ||||
62 |