im_guess_prefix(3)

im_guess_prefix3

Try to guess install directory

Usage

#include <vips/vips.h>

const char *im_guess_prefix( const char *argv0, const char *env_name )

const char *im_guess_libdir( const char *argv0, const char *env_name )

Overview

im_guess_prefix(3) tries to guess the install directory. You should pass in the value of argv[0] (the name your program was run as) as a clue to help it out, plus the name of the environment variable you let the user override your package install area with (eg. "VIPSHOME").

On success, im_guess_prefix(3) returns the prefix it discovered, and as a side effect, sets the environment variable (if it's not set).

im_guess_prefix(3) is useful for programs in the VIPS distribution and contrib which need to be able to find data files.

Don't free the return string!

im_guess_libdir(3) works exactly as im_guess_prefix(3) but, if vips has not been moved since configure, returns the libdir configure setting. If vips has been moved, it returns prefix/lib.

Return value

The function returns NULL on failure.

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1–4.0
  2. 5.0
  3. 6.0

From libvips-dev 7.20.7-1+b3 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.