[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditional compiling?
From: |
Ralf Corsepius |
Subject: |
Re: Conditional compiling? |
Date: |
Wed, 21 Dec 2005 08:43:00 +0100 |
On Wed, 2005-12-21 at 09:12 +0200, Daniel Pekelharing wrote:
> Hi all,
>
> I have some parts of my app which I want to be optional, so if the user
> doesn't have library x then just compile without some features.
>
> I figure with single isolated calls I should just surround them with
> #ifdef statements, but I have also a couple of entire c files dedicated
> to them...
> Should I just #ifdef the entire c file?
That's one possibility.
> Or is there someway I can tell autoconf to just ignore them?
No, because autoconf isn't involved into compilation, that would be your
makefiles, i.e. you will have to find a way inside of your makefiles if
using pure autoconf.
In case you are using automake, adding AM_CONDITIONAL inside of your
configure.ac and using them inside of your Makefile.am's probably is
what you are looking for.
Ralf