Hello,

To setup paths we need to known if a program (texi2any) is called
in-source/in-build or from the installation directory.  Is there a way
to detect if a C program is called in-source/in-build or after
installation?  For Perl we use mainly a trick that in-source scripts
have .pl and do not have configure values substituted (ie '@datadir@' is
still '@' .'datadir@') while installed scripts have configure values
substituted.  We also can also use an environment variable to be able to
call the scripts with configure values substituted in-build/in-source,
which I will implement in C, but I would prefer to also have something
like the .pl trick, there is much less risks of mixing up the two
programs.

The C program has always the configure values available, as it always
need to include config.h and the variables passed with -D are always set
too.

I tried to search on the www, but did not find anything relevant.

Any idea?  Any example of how it is done in other projects?

-- 
Pat

Reply via email to