uti: Don't compile syscall_intercept related stuff when not specified with configure option
Change-Id: I9be8cb9b3fcae78d33a33b057c43caee23a81fc1
This commit is contained in:
89
configure
vendored
89
configure
vendored
@@ -628,6 +628,7 @@ IHK_RELEASE_DATE
|
||||
DCFA_VERSION
|
||||
MCKERNEL_VERSION
|
||||
IHK_VERSION
|
||||
WITH_SYSCALL_INTERCEPT
|
||||
ENABLE_QLMPI
|
||||
ENABLE_RUSAGE
|
||||
ENABLE_MCOVERLAYFS
|
||||
@@ -3529,6 +3530,7 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-syscall_intercept was given.
|
||||
if test "${with_syscall_intercept+set}" = set; then :
|
||||
withval=$with_syscall_intercept; case "$withval" in #(
|
||||
@@ -3640,6 +3642,81 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
if test -n "${with_syscall_intercept}" || test -n "${with_syscall_intercept_include}" || test -n "${with_syscall_intercept_lib}"; then :
|
||||
WITH_SYSCALL_INTERCEPT=yes
|
||||
else
|
||||
WITH_SYSCALL_INTERCEPT=no
|
||||
fi
|
||||
|
||||
|
||||
if test "x$WITH_SYSCALL_INTERCEPT" == "xno" ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syscall_no_intercept in -lsyscall_intercept" >&5
|
||||
$as_echo_n "checking for syscall_no_intercept in -lsyscall_intercept... " >&6; }
|
||||
if ${ac_cv_lib_syscall_intercept_syscall_no_intercept+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lsyscall_intercept -lcapstone -ldl $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char syscall_no_intercept ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return syscall_no_intercept ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_syscall_intercept_syscall_no_intercept=yes
|
||||
else
|
||||
ac_cv_lib_syscall_intercept_syscall_no_intercept=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_syscall_intercept_syscall_no_intercept" >&5
|
||||
$as_echo "$ac_cv_lib_syscall_intercept_syscall_no_intercept" >&6; }
|
||||
if test "x$ac_cv_lib_syscall_intercept_syscall_no_intercept" = xyes; then :
|
||||
syscall_intercept_lib_found=yes
|
||||
else
|
||||
syscall_intercept_lib_found=no
|
||||
fi
|
||||
|
||||
if test "x$syscall_intercept_lib_found" != "xyes"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: libsyscall_intercept.so not found" >&5
|
||||
$as_echo "$as_me: libsyscall_intercept.so not found" >&6;}
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "libsyscall_intercept_hook_point.h" "ac_cv_header_libsyscall_intercept_hook_point_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_libsyscall_intercept_hook_point_h" = xyes; then :
|
||||
syscall_intercept_header_found=yes
|
||||
else
|
||||
syscall_intercept_header_found=no
|
||||
fi
|
||||
|
||||
|
||||
if test "x$syscall_intercept_header_found" != "xyes"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: libsyscall_intercept_hook_point.h not found" >&5
|
||||
$as_echo "$as_me: libsyscall_intercept_hook_point.h not found" >&6;}
|
||||
fi
|
||||
|
||||
if test "x$syscall_intercept_lib_found" == "xyes" && test "x$syscall_intercept_header_found" == "xyes"; then :
|
||||
WITH_SYSCALL_INTERCEPT=yes
|
||||
else
|
||||
WITH_SYSCALL_INTERCEPT=no
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-kernelsrc was given.
|
||||
@@ -4722,6 +4799,17 @@ else
|
||||
$as_echo "$as_me: perf is disabled" >&6;}
|
||||
fi
|
||||
|
||||
if test "x$WITH_SYSCALL_INTERCEPT" = "xyes" ; then
|
||||
|
||||
$as_echo "#define WITH_SYSCALL_INTERCEPT 1" >>confdefs.h
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: syscall_intercept library is linked" >&5
|
||||
$as_echo "$as_me: syscall_intercept library is linked" >&6;}
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: syscall_intercept library isn't linked" >&5
|
||||
$as_echo "$as_me: syscall_intercept library isn't linked" >&6;}
|
||||
fi
|
||||
|
||||
if test "x$MCKERNEL_INCDIR" != "x" ; then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -4792,6 +4880,7 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
Reference in New Issue
Block a user