Russell Shaw asked:
> What "make" variable can i utilize that has a value
> dependent on whether the package is installed or not?

If you need this distinction only in the tests, you can use the
Makefile.am variable TESTS_ENVIRONMENT to set an environment variable.
Like this: In tests/Makefile.am

  TESTS_ENVIRONMENT = MY_LIB_DIR=\"$(top_builddir)/src/libdir\"

and in your code:

  my_lib_dir = getenv ("MY_LIB_DIR");
  if (my_lib_dir == NULL || my_lib_dir[0] == '\0')
    my_lib_dir = LIBDIR;

If your program is also being used uninstalled, other than for the tests,
a wrapper script, like Ralf Wildenhues suggested, is the easiest solution.

Bruno


Reply via email to