[poppler] problems with pkg-config and BSD

Vincent Torri vtorri at univ-evry.fr
Tue Mar 21 03:43:40 PST 2006


hello,

a friend wants to install a lib that relies on poppler. But he uses a 
FreeBSD, and it seems that pkg-config has big problems on BSD.

Could you please add a small config script like glib-config ? I've 
attached an example for poppler. I think that it works.

thank you

Vincent
-------------- next part --------------
#!/bin/sh

prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no

usage="\
Usage: poppler-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"

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
      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 @VERSION@
      ;;
    --cflags)
      if test @includedir@ != /usr/include ; then
        includes=-I at includedir@/poppler
      fi
      echo $includes
      ;;
    --libs)
      libdirs=-L at libdir@ -lpoppler
      echo $libdirs
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

exit 0


More information about the poppler mailing list