Only check for .interp when we have objcopy

On Mac OS, where we don't have objcopy, ./configure logs:

checking for objcopy... no
checking for .interp value to use... ./configure: line 22174: conftest.interp: No such file or directory

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
This commit is contained in:
Ruben Kerkhof 2019-01-22 18:39:47 +01:00
parent 29d46e4bb6
commit 1b68b1cdd3

View file

@ -817,7 +817,8 @@ fi
AM_CONDITIONAL([GIT_VERSION], [test "x$with_pkg_git_version" = "xyes"]) AM_CONDITIONAL([GIT_VERSION], [test "x$with_pkg_git_version" = "xyes"])
AC_CHECK_TOOL([OBJCOPY], [objcopy], [:]) AC_CHECK_TOOL([OBJCOPY], [objcopy], [:])
AC_CACHE_CHECK([for .interp value to use], [frr_cv_interp], [ if test "x${OBJCOPY}" != "x:"; then
AC_CACHE_CHECK([for .interp value to use], [frr_cv_interp], [
frr_cv_interp="" frr_cv_interp=""
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], [ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], [
if $OBJCOPY -j.interp -Obinary conftest conftest.interp; then if $OBJCOPY -j.interp -Obinary conftest conftest.interp; then
@ -825,7 +826,8 @@ AC_CACHE_CHECK([for .interp value to use], [frr_cv_interp], [
fi fi
test -f conftest.interp && rm conftest.interp test -f conftest.interp && rm conftest.interp
]) ])
]) ])
fi
if test -n "$frr_cv_interp"; then if test -n "$frr_cv_interp"; then
AC_DEFINE_UNQUOTED([INTERP], ["$frr_cv_interp"], [.interp value]) AC_DEFINE_UNQUOTED([INTERP], ["$frr_cv_interp"], [.interp value])
fi fi