[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optional GTK?
From: |
Ralf Wildenhues |
Subject: |
Re: Optional GTK? |
Date: |
Mon, 14 Sep 2009 07:13:38 +0200 |
User-agent: |
Mutt/1.5.20 (2009-08-09) |
* Patrick M. Rutkowski wrote on Mon, Sep 14, 2009 at 03:21:06AM CEST:
> If I were to run something like AM_PATH_GTK_2_0 in my configure.ac,
> which checks for the presence of GTK, what would I do if GTK wasn't
> found?
You'd use the ACTION-IF-NOT-FOUND argument of the AM_PATH_GTK_2_0 macro
to set a few things.
> A) Is it possible to get automake to just NOT COMPILE the gtk related
> *.c files based on the autoconf results?
Yes, for example, you'd use an Automake conditional (AM_CONDITIONAL),
say, WANT_GTK, and then in Makefile.am you write
foo_SOURCES = ...
if WANT_GTK
foo_SOURCES += gtk_source1.c ...
bin_PROGRAMS += bar
bar_SOURCES = ...
endif
> B) Do I take the gtk related *.c files and wrap them in big "#ifdef
> USE_GTK / #endif" wrappers?
That can be a choice too.
Hope that helps.
Cheers,
Ralf