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