kconfig: simple and flexible cross-module dependencies

This patch adds new approach in managing cross-module dependencies.
Instead of selecting one config option by another or introducing new config
option for each dependency it uses pair of existing config options to choose
required cross-module glue code and stub functions in headers.

For example, there two tristate config options MODULE_A and MODULE_B.
Module-B wants to use some code from Module-A. Code of Module-A is available
from Module-B if MODULE_A=y or if MODULE_A=m and MODULE_B=m.

This patch allows to write this construction in makefile:

obj-$(CONFIG_MODULE_A) += module_a.o
obj-$(CONFIG_MODULE_B) += module_b.o
module_b-y += core_b.o
module_b-$(CONFIG_MODULE_A) += glue_a_b.o

After that glue_a_b will be linked into module_b.o iff module-A is available.

Also this patch adds into kconfig.h new macro IS_AVAILABELE().

IS_AVAILABLE(CONFIG_MODULE_A) evaluates to 1 if code of Module-A is available
from current context. In build-in code its works as alias for IS_BUILTIN(), and
in module as alias for IS_ENABLED().

As proof of concept: following patches uses this method to resolve dependence
of CONFIG_E1000E on CONFIG_PTP_1588_CLOCK. (patchset on top of current 3.9)

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
ptp: add stub function for ptp_clock_index()

After this patch function ptp_clock_index(struct ptp_clock *ptp) will return -1
if ptp is NULL or if CONFIG_PTP_1588_CLOCK isn't available.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Richard Cochran <richardcochran@gmail.com>
e1000e: make PTP clock optional

This patch removes from driver e1000e hard dependence on CONFIG_PTP_1588_CLOCK.
This is proof of concept for proposed method of resolving cross-module dependencies.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: e1000-devel@lists.sourceforge.net
Cc: netdev@vger.kernel.org