On Mon, 2013-09-09 at 09:52 +0200, Lukas Slebodnik wrote:
On (07/09/13 13:17), Simo Sorce wrote:
[..]
> AM_CHECK_PYTHON_HEADERS([],
> AC_MSG_ERROR([Could not find python headers]))
>+ AC_DEFINE_UNQUOTED(HAVE_PYTHON_BINDINGS, 1, [Build with python bindings])
I would prefer to have this line in the file conf_macros.m4
directly after the line
src/conf_macros.m4:333: AM_CONDITIONAL([BUILD_PYTHON_BINDINGS],
In this file, there is a lot of similar patterns
Ack, I looked for HAVE_PYTHON_BINDINGS but not hard enough evidently.
[..]
>+ { "libsss_debug.so", {
LIBPFX"libsss_debug.so", NULL } },
>+ { "libsss_sudo.so", { LIBPFX"libsss_sudo.so", NULL } },
add check for BUILD_SUDO
>+ { "libipa_hbac.so", { LIBPFX"libipa_hbac.so", NULL } },
>+ { "libsss_autofs.so", { LIBPFX"libsss_autofs.so", NULL } },
add check for BUILD_AUTOFS
Good catch, I saw the defainitions and then forgot to add guards for
these 2.
[..]
>+#ifdef BUILD_PYTHON_BINDINGS
You defined macro HAVE_PYTHON_BINDINGS, but BUILD_PYTHON_BINDINGS is used here.
This is a dead code.
Fixed
>+ { "pyhbac.so", { LIBPFX"pyhbac.so", NULL
} },
>+ { "pysss.so", { LIBPFX"pysss.so", NULL } },
>+ { "pysss_murmur.so", { LIBPFX"pysss_murmur.so", NULL } },
>+ { "pysss_nss_idmap.so", { LIBPFX"pysss_nss_idmap.so", NULL }
},
>+#endif
btw, BUILD_AUTOFS is used elsewhere in code.
src/tests/sysdb-tests.c:4707:#ifdef BUILD_AUTOFS
src/tests/sysdb-tests.c:4913:#endif /* BUILD_AUTOFS */
src/tests/sysdb-tests.c:5224:#ifdef BUILD_AUTOFS
So we can use either BUILD_PYTHON_BINDINGS, BUILD_KRB5_LOCATOR_PLUGIN
or we should file a ticket to be consistent.
I went back and forth a couple of times, then decided to settle on the
HAVE_ pattern as that is the customery definition you find in config.h
I think it make sense to open a separate bug to change BUILD_SUDO and
friends to HAVE_SUDO in config.h and in code ifdefs.
Attached new patch with fixes.
Simo.
--
Simo Sorce * Red Hat, Inc * New York