[CMake] Compatibility between cmake-based directives and autoconf-based directives
DRypl
dr at cml.fsv.cvut.cz
Tue Feb 5 06:45:14 EST 2013
Is there a way how to avoid problems with different declarations of
directives depending whether
using autoconf (for a library) and cmake (for my application using that
library). For example autoconf
declares "#define HAVE_UNISTD_H 1" while cmake declares "#define
HAVE_UNISTD_H".
Using #cmakedefine01 instead of #cmakedefine does not solve the problem
because statement
"#define HAVE_UNISTD_H 0" is apparently something else than "#undef
HAVE_UNISTD_H" (and the
library is using preprocessing checks as "#ifdef HAVE_UNISTD_H"). I also did
not find solution in autoconf.
Should the variable be defined using AC_DEFINE statement, I can use
AC_DEFINE(HAVE_UNISTD_H,,),
instead of simple AC_DEFINE(HAVE_UNISTD_H). This will produce "#define
HAVE_UNISTD_H" (which is compatible with #cmakedefine). The problem is
however, that autoconf configure script for the library relies on
AC_HEADER_STDC (thus not processing explicitly HAVE_UNISTD_H) without a
chance to choose
which version of AC_DEFINE to use.
Is there a way out?
Thanks for help.
Daniel Rypl
--
View this message in context: http://cmake.3232098.n2.nabble.com/Compatibility-between-cmake-based-directives-and-autoconf-based-directives-tp7583105.html
Sent from the CMake mailing list archive at Nabble.com.
More information about the CMake
mailing list