autoconf
[Top][All Lists]
Advanced

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

configure rebuild rule not passing on -I to aclocal


From: Warren Young
Subject: configure rebuild rule not passing on -I to aclocal
Date: Thu, 28 Feb 2013 10:22:10 -0700
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3

My bootstrap script conditionally adds a -I flag to the aclocal command on Mac platforms when it sees that we've installed the Homebrew version of gettext (for AM_ICONV) since for reasons I forget, it works better for us than the the platform one. The logic looks like this:

    if [ -d /usr/local/Cellar/gettext ]
    then
        ald=`echo /usr/local/Cellar/gettext/*/share/aclocal`
        export ACLOCAL_FLAGS="-I $ald"
    fi

    aclocal -I config $ACLOCAL_FLAGS &&  ....

This works fine *until* one of the automatic rebuild rules gets triggered. You see it try to run aclocal like this:

    .... && aclocal -I config -I config

One of the '-I config's comes from my AC_CONFIG_MACRO_DIR([config]) directive in configure.ac. I don't know if it's just repeating that or getting another '-I config' from somewhere else.

More to the point, I don't see how to get it to pass on the -I flag my bootstrap script gave to the initial run of aclocal. Shouldn't Autoconf pick up on the exported ACLOCAL_FLAGS variable and append its value here?

A bit of Googling suggests I might be able to fix this with the AC_CONFIG_MACRO_DIRS (plural) form, but it appears to be undocumented.

I've been able to "fix" this by adding "AM_MAINTAINER_MODE" in configure.ac to disable the automatic rebuild rules, but that feels like a dirty hack. I like what the default rebuild rules try to do; I don't want to disable them. I just need to figure out how to make them pass on flags I've already told the Autotools about once before. :)



reply via email to

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