Makefiles: Fix function availability checks
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 18 Nov 2016 19:52:31 +0000 (11:52 -0800)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 20 Nov 2016 13:39:15 +0000 (14:39 +0100)
commit4ad67a00582bed4115c79ea31010b3d7e1c3cd0e
treebc1f54fa6c10f4f5a9a4bb6434347c6073347201
parente8afbdba34261bca1db45cb1e16fc8d657724c73
Makefiles: Fix function availability checks

The current implementation of the code that checks for function
presence is not correct because it checks for a prefix match only.
Introduce a function that checks for the exact function name.
Additionally, report whether or not the function has been found.
An example of the output produced by this function if 'make' is
run:

Checking for dm_task_no_flush in /usr/include/libdevmapper.h ... yes
Checking for dm_task_set_cookie in /usr/include/libdevmapper.h ... yes
Checking for udev_monitor_set_receive_buffer_size in /usr/include/libudev.h ... yes
Checking for dm_task_deferred_remove in /usr/include/libdevmapper.h ... yes

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Makefile.inc
kpartx/Makefile
libmultipath/Makefile