Mailinglist Archive: opensuse-buildservice (354 mails)

< Previous Next >
Re: [opensuse-buildservice] OT: How to get path out of autoconf into source
  • From: andreas.hanke@xxxxxxxxxxxxxx
  • Date: Thu, 15 Feb 2007 17:01:03 +0100
  • Message-id: <20070215160103.297950@xxxxxxx>

> in
> #define localstatedir @localstatedir@

Doesn't work! configure, if run without arguments, will replace it with ${prefix}/var.

rpm packagers (especially when using the %configure macro) never notice that because they run configure with the --localstatedir=/var argument (which forces it to get an absolute path), but it's wrong and will break for normal "./configure; make; make install" builds.

The correct way to do that is via the Write it like this:

AM_CPPFLAGS = -DLOCALSTATEDIR="\"$(localstatedir)\""

Please also read

and always verify that the package builds correctly even without rpm "specialties" like %configure.

Andreas Hanke
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN:
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >