[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How to omit files from AC_OUTPUT?
From: |
John W. Millaway |
Subject: |
RE: How to omit files from AC_OUTPUT? |
Date: |
Mon, 30 Apr 2001 16:22:01 -0700 (PDT) |
--- Tim Van Holder <address@hidden> wrote:
> > I have a list of 'test' directories containing Makefiles. I want to
> > omit two of those tests if GNU Bison is not found, because they
> > depend on GNU bison. How do I do this?
> >
> > AC_CHECK_PROG(BISON,bison,bison)
> >
> > dnl Below, I want the last two directories to be omitted.
> > dnl I could do it with two calls to AC_OUTPUT, wrapped in an
> > dnl if/else statement, but it would look really messy.
> > dnl Is there a way to build this list beforehand, then add to it
> > dnl only if bison is found?
> >
> > AC_OUTPUT(Makefile test-1/Makefile test-2/Makefile
> > test-bison1/Makefile test-bison2/Makefile)
> >
> In autoconf 2.13, you might get away with:
>
> if test x$ac_cv_prog_BISON = xbison; then
> extra_makefiles="test-bison1/Makefile test-bison2/Makefile"
> fi
> AC_OUTPUT(Makefile test-1/Makefile test-2/Makefile $extra_makefiles)
>
I'm sorry, I should have mentioned that my *actual* AC_OUTPUT list
is quite long. Each member is a directory that contains a specific
test to be performed. Some tests depend on "GNU bison", others
depend on libpthread, and others on both, etc..
I'd like a clean way to "add" a test to the list separately. This way,
other developers can add a new test directory and modify "configure.in"
in a straightforward manner.
I guess I don't understand what AC_OUTPUT does with its args. Can I embed
sh in the AC_OUTPUT arguments?
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/