On Thu, 8 Jul 2010, Stefano Sabatini wrote:

No, this will not work, because I need LDFLAGS to be defined during
configuration, ...

in that case you'll have to save CFLAGS, LDFLAGS, etc. and temporarily add
values based on $srcdir to be used during configure tests, and later restore
these flags and add values based on ${abs_srcdir} (unexpanded) to be used in
Makefile.

I would, however, use other means to define these flags for Makefile, e.g.,
specify
   if <whatever>; then
      xxxFLAGS='-I${abs_srcdir}/win32/pthread'
   fi
   AC_SUBST([xxxFLAGS])
in configure and use that variable in Makefile.

BTW: required flags as determined by configure should not go to CFLAGS,
because the user is entitled to use 'make CFLAGS=some_flags some_target'.
Using Automake they would typically go to AM_CFLAGS.

Regards
Peter Breitenlohner <[email protected]>

_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to