fi
-if test "$enable_pie" != "no"; then
+if test "$enable_pie" != "no" -a -n "$GCC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fPIE" >&5
$as_echo_n "checking whether C compiler accepts -fPIE... " >&6; }
if ${ax_cv_check_cflags___fPIE+:} false; then :
dnl Check for PIE executable support if using gcc.
dnl This test relies on AC_LANG_WERROR
dnl
-if test "$enable_pie" != "no"; then
+if test "$enable_pie" != "no" -a -n "$GCC"; then
AX_CHECK_COMPILE_FLAG([-fPIE], [
_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fPIE"