Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382149 - autotools.eclass does not evaluate AC_CONFIG_AUX_DIR from configure.ac
Summary: autotools.eclass does not evaluate AC_CONFIG_AUX_DIR from configure.ac
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-07 14:08 UTC by Erik Wallin
Modified: 2011-09-11 21:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Wallin 2011-09-07 14:08:36 UTC
autotools_get_subdirs and autotools_get_auxdir do no evaluate the arguments of AC_CONFIG_SUBDIRS and AC_CONFIG_AUX_DIR.

In net-misc/asterisk-1.8.6.0 AC_CONFIG_AUX_DIR (in configure.ac) is set to AC_CONFIG_AUX_DIR(`pwd`). The result is that a directory called `pwd` (literally) is created in the top level build directory.

That may or may not be a good/correct way of defining AC_CONFIG_AUX_DIR. I could imagine more reasonable examples, such as setting it to $tools/autotools, where $tools is defined elsewhere. autoconf would generate correct code in configure but the eclass would not create the directory correctly.

It probably won't break anything as it is, but I spent an hour trying to figure out what was wrong and if I should worry about it.

I'm not sure what the best way to fix this is, but something like an

eval echo "$result"

ought to produce the same thing as the configure script does.

Where result is what these functions output as they are written now.

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2011-09-11 21:00:26 UTC
"AC_CONFIG_AUX_DIR(`pwd`)" is invalid.  autotools itself shows this broken logic.  so autotools.eclass is fine.

simple example:
rm -rf d && mkdir d && cd d
touch NEWS README AUTHORS INSTALL ChangeLog COPYING Makefile.am
cat <<\EOF > configure.ac 
AC_INIT(d,1)
AC_CONFIG_AUX_DIR(`pwd`)
AM_INIT_AUTOMAKE
AC_OUTPUT(Makefile)
EOF
autoreconf -f -i

which shows the output:
configure.ac:3: installing ``pwd`/install-sh'
configure.ac:3: installing ``pwd`/missing'

and if you do `ls -l`:
drwxr-xr-x 2 vapier users  4096 Sep 11 16:59 `pwd`