#!/bin/sh # # Configure options script for re-calling ImageMagick compilation # options required to use the ImageMagick library. # # Concept derived from gtk-config in the Gtk package except that Autoconf-style # configuration information is presented instead so that it may be used more # effictively in configure scripts. # prefix=/im prefix_set=no exec_prefix=${prefix} exec_prefix_set=no usage="\ Usage: Magick-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--cppflags] [--ldflags] [--libs]" if test $# -eq 0; then echo "${usage}" 1>&2 exit 1 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg prefix_set=yes if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo $prefix ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo $exec_prefix ;; --version) echo 4.2.9 ;; --cflags) echo '-O' ;; --cppflags) if test $prefix_set = yes then echo "-I$prefix/include "'-I/im/include' else echo '-I/im/include' fi ;; --ldflags) if test $exec_prefix_set = yes || test $prefix_set = yes then echo "-L$exec_prefix/lib "'-L/im/lib' else echo '-L/im/lib' fi ;; --libs) echo '-L/im/lib -lMagick -ltiff -ljpeg -lpng -lbz2 -lz -lm' ;; *) echo "${usage}" 1>&2 exit 1 ;; esac shift done