[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Conditional AC_DEFINE with m4_define variable?
From: |
Jef Driesen |
Subject: |
Conditional AC_DEFINE with m4_define variable? |
Date: |
Sat, 22 Dec 2012 15:52:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Hi,
When I set a variable with:
m4_define([dc_version_suffix],[devel])
or leave it empty:
m4_define([dc_version_suffix],[])
And then try to conditionally call AC_DEFINE based on whether the
dc_version_suffix is set or not, this doesn't work:
AS_IF([test "x$dc_version_suffix" = "xdevel"], [
AC_DEFINE(ENABLE_PTY, [1], [Enable pseudo terminal support.])
])
However if I use m4_isset, then it does kind of work, except that the
USE_REVISION macro in the config.h is either defined, or not present at all.
m4_ifset([dc_version_suffix],[
AC_DEFINE(USE_REVISION, [1], [Use the revision number.])
])
Does anyone know how to implement this correctly?
Jef
- Conditional AC_DEFINE with m4_define variable?,
Jef Driesen <=