mirror of
https://github.com/containers/podman
synced 2024-10-20 09:13:46 +00:00
06d2d0c6ef
Allow build systems without standard cc to successfully run the dependency checking helper scripts from the Makefile. This supports custom compilers specified by the common CC environment variable, preprocessors given as CPP and additional preprocessor flags from CPPFLAGS. Additional flags from CFLAGS and LDFLAGS are considered for compiling/linking. Overall, this facilitates cross-compilation and similar setups. Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
16 lines
380 B
Bash
Executable file
16 lines
380 B
Bash
Executable file
#!/usr/bin/env bash
|
|
tmpdir="$PWD/tmp.$RANDOM"
|
|
mkdir -p "$tmpdir"
|
|
trap 'rm -fr "$tmpdir"' EXIT
|
|
${CC:-cc} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o "$tmpdir"/libdm_tag -x c - -ldevmapper > /dev/null 2> /dev/null << EOF
|
|
#include <libdevmapper.h>
|
|
int main() {
|
|
struct dm_task *task;
|
|
dm_task_deferred_remove(task);
|
|
return 0;
|
|
}
|
|
EOF
|
|
if test $? -ne 0 ; then
|
|
echo libdm_no_deferred_remove
|
|
fi
|