[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

$abs_srcdir expansion

From: Stefano Sabatini
Subject: $abs_srcdir expansion
Date: Thu, 8 Jul 2010 17:49:56 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi all,

$ autoconf --version
autoconf (GNU Autoconf) 2.65

I'm using the $abs_srcdir var in an m4 file included by,
and I'm observing that $abs_srcdir is expanded to the empty string, in
both Linux and MinGW. I wonder if this is the right behavior,
according to the manual:

 -- Variable: srcdir
     The name of the directory that contains the source code for that

 -- Variable: abs_srcdir
     Absolute name of `srcdir'.

This is the snippet from the included m4 file:

if test "$sac_cv_cc_environment" = mingw32 ; then
CFLAGS="$CFLAGS -I${abs_srcdir}/win32/pthread -DWINVER=0x0501 \
        -mms-bitfields \
        -pipe -mno-cygwin -mwindows -mconsole -Wall -g -O0"
LDFLAGS="$LDFLAGS -Wl,--enable-auto-image-base"
LIBS="-L${abs_srcdir}/win32/pthread -lpthreadVC2 -lws2_32 \

I need an absolute path, otherwise the build will fail later, BTW
$srcdir is correctly expanded to "." (I'm launching configure from the
top source dir).

Then I tried to explicitely define $abs_srcdir this way:
abs_srcdir=`(cd $srcdir && pwd)`
CFLAGS="$CFLAGS -I${abs_srcdir}/win32/pthread -DWINVER=0x0501 \ ...

and now it is apparently working fine.

See also:

Can you say why $abs_srcdir is not correctly expanded, and can you
suggest which is the right way to fix this issue?

TIA, regards.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]