Skip to content

Commit b8ed76c

Browse files
committed
Modify Unix ./configure script stat invocation to support busybox-style systems.
`./configure` will now formally probe which `stat` parameter to use, and in addition to `--format=` (GNU) and `-f` (BSD) also try `-c` (busybox). Should fix issue #400.
1 parent 3cdbaee commit b8ed76c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

changes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Reported via GitHub:
130130
-lboost_system with Boost 1.66)
131131
- #342 ("AX_FIX_INCORRECT_PATH is broken", configure script failing to
132132
properly handle `.` directory in `C_INCLUDE_PATH` or `CPLUS_INCLUDE_PATH`)
133+
- #400 ("Building on postmarketOS on PinePhone")
133134
- #403 ("povray 3.7.0.8 does not build on macOS 11.0 Big Sur").
134135

135136
Reported via the Newsgroups:

unix/configure.ac

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,16 @@ echo "trying stat --format='%u,%g' ." >>config.log
217217
if stat --format='%u,%g' . >>config.log 2>>config.log && test x`stat --format=Foo .` = x"Foo"; then
218218
stat_format="--format="
219219
else
220-
echo "trying stat --f '%u,%g' ." >>config.log
220+
echo "trying stat -f '%u,%g' ." >>config.log
221221
if stat -f '%u,%g' . >>config.log 2>>config.log && test x`stat -f Foo .` = x"Foo"; then
222222
stat_format="-f "
223223
else
224-
AC_MSG_FAILURE([stat command does not behave as required])
224+
echo "trying stat -c'%u,%g' ." >>config.log
225+
if stat -c '%u,%g' . >>config.log 2>>config.log && test x`stat -c Foo .` = x"Foo"; then
226+
stat_format="-c "
227+
else
228+
AC_MSG_FAILURE([stat command does not behave as required])
229+
fi
225230
fi
226231
fi
227232
AC_MSG_RESULT([$stat_format])

0 commit comments

Comments
 (0)