[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AM_CONDITIONAL
From: |
Richard Boulton |
Subject: |
Re: AM_CONDITIONAL |
Date: |
08 Dec 2001 13:05:57 +0000 |
On Thu, 2001-12-06 at 22:02, Francis Michel wrote:
> Hi all,
> I am trying to use the AM_CONDITIONAL macro in order to use that Macro in
> the makefile.am as follow in the configure.in
> AC_MSG_CHECKING(Dummy file selection)
> AC_ARG_ENABLE(dummyfile,
> [ --enable-dummyfile Use debug file],
> [case "${enableval}" in
> yes) debug=true ;;
> no) debug=false ;;
> *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
> esac],[debug=false])
> AM_CONDITIONAL(DEBUGSTRING test x$debug = xtrue)
You need a comma to separate the arguments:
AM_CONDITIONAL(DEBUGSTRING, test x$debug = xtrue)
> and in the makefile.am:
> if DEBUGSTRING
> libfoo_a_SOURCES = dummy.c file.h
> endif
> but the problem is that AUTOMAKE is generating empty codes like that in the
> makefile.in
> if DEBUGSTRING
> endif
> # Tell versions [3.59,3.63) of GNU make to not export all variables.
> # Otherwise a system limit (for SysV at least) may be exceeded.
> .NOEXPORT:
> I was expecting something like that:
> @DEBUGSTRING @
> Can you help me out there? Is that one of the best way to select different
> source code files depending on the input from the confifure script?
This is the correct approach.
--
Richard
- AM_CONDITIONAL, Francis Michel, 2001/12/06
- Re: AM_CONDITIONAL,
Richard Boulton <=