libvips/man/im_guess_prefix.3

39 lines
1.1 KiB
Groff
Raw Normal View History

2007-08-29 18:23:50 +02:00
.TH IM_VIPSHOME 3 "8 March 2001"
.SH NAME
im_guess_prefix, im_guess_libdir \- try to guess install directory
2007-08-29 18:23:50 +02:00
.SH SYNOPSIS
.B #include <vips/vips.h>
.B const char *im_guess_prefix( const char *argv0,
.B const char *env_name )
.B const char *im_guess_libdir( const char *argv0,
.B const char *env_name )
2007-08-29 18:23:50 +02:00
.SH DESCRIPTION
.B 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,
.B im_guess_prefix(3)
returns the prefix it discovered, and as a side effect, sets the environment
variable (if it's not set).
.B 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!
.B im_guess_libdir(3)
works exactly as
.B 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.
2007-08-29 18:23:50 +02:00
.SH RETURN VALUE
The function returns NULL on failure.