Installation dirs in code

2006-12-12 Thread Brendon Costa
Hi all, I was wondering if there exists a kindof standard way to obtain final installation directory information within code being compiled when using autotools? E.g. I have a program that requires a configuration file that will usually go into the ${prefix}/etc as given by $sysconfdir. So t

Re: Installation dirs in code

2006-12-12 Thread Yevgen Muntyan
Brendon Costa wrote: Hi all, I was wondering if there exists a kindof standard way to obtain final installation directory information within code being compiled when using autotools? E.g. I have a program that requires a configuration file that will usually go into the ${prefix}/etc as giv

Re: Installation dirs in code

2006-12-12 Thread Brian Dessent
Brendon Costa wrote: > I have a program that requires a configuration file that will usually go > into the ${prefix}/etc as given by $sysconfdir. So this program needs to > know where it is going to find this installed configuration file. I was > initially going to export the evaluated value of $s

Re: Installation dirs in code

2006-12-12 Thread Brendon Costa
Brian Dessent wrote: Instead of using an absolute path, you can use a relative path, which makes the binary relocatable. For Win32, this means you can avoid completely the hassle of converting between native and posix-emulated (aka MSYS/Cygwin) paths. It also means the user can install your pa

Re: Installation dirs in code

2006-12-12 Thread Brian Dessent
Brendon Costa wrote: > However all these methods of obtaining the directory information seems > to fall down for libraries. Huh? Did you read the same email by Bruce Haible that I did? Because it doesn't fall down at all. On Win32 GetModuleFilename works just fine to tell you the DLL name, and

Re: Installation dirs in code

2006-12-12 Thread Brendon Costa
Brian Dessent wrote: Brendon Costa wrote: However all these methods of obtaining the directory information seems to fall down for libraries. Huh? Did you read the same email by Bruce Haible that I did? Because it doesn't fall down at all. On Win32 GetModuleFilename works just fine