Skip to content

Commit 45f200c

Browse files
committed
build-sys: Do NOT check user specified tmpdir via --enable-tmpdir=<TMPDIR> if exists when cross compiling
Signed-off-by: leleliu008 <[email protected]>
1 parent 988b890 commit 45f200c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

configure.ac

+10-4
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,17 @@ elif test -d "c:/"; then
442442
else
443443
tmpdir="/tmp"
444444
fi
445-
if test -d $tmpdir ; then
446-
AC_MSG_RESULT($tmpdir)
447-
AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir")
445+
446+
if test "$cross_compiling" = yes ; then
447+
AC_MSG_RESULT($tmpdir)
448+
AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir")
448449
else
449-
AC_MSG_ERROR($tmpdir does not exist)
450+
if test -d $tmpdir ; then
451+
AC_MSG_RESULT($tmpdir)
452+
AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir")
453+
else
454+
AC_MSG_ERROR($tmpdir does not exist)
455+
fi
450456
fi
451457

452458
# Test for case-insensitive filenames

0 commit comments

Comments
 (0)