Hi Alon, >> AC_CHECK_LIB([selinux], [setcon], [SELINUX_LIBS="-lselinux"]) >> >> versus >> >> AC_CHECK_HEADER([selinux/selinux.h], [ >> AC_CHECK_LIB([selinux], [setcon], [SELINUX_LIBS="-lselinux"], >> [AC_MSG_RESULT([SELinux library not found.])] >> )], [AC_MSG_ERROR([SELinux headers not found.])] >> ) >> >> doesn't really qualify as "very complex" to me. > > This is untrue. > As most features needs custom CFLAGs as well, it looks like: > > old_CFLAGS="${CFLAGS}" > CFLAGS="${CFLAGS} ${SOME_CFLAGS}" > AC_CHECK_HEADER([...]) > CFLAGS="${old_CFLAGS}"
I can see where this would be necessary if you wanted to "search additional non-standard paths for the libraries and headers" (see my last email), but it wouldn't be necessary for the simple case, where you want to make sure that library and header are available and compilable with the flags the user provided. So it sounds as if we're actually somewhat in agreement! You don't want complex, automatic detection of non-standard situations and I agree wholeheartedly. But I _do_ want basic checking to achieve clear error messages at configuration time, not obscure build errors far later in the build process. Rule of thumb: If "make" fails due to missing or wrong dependencies, it's a bug in configure, because it didn't detect the problem beforehand. Cheers Fabian