The good news is that there is no big mystery. One the include path is added, the build should be successful.
It appears that the QT include path was not added to QT_CPPFLAGS, or QT_CPPFLAGS was not included in CPPFLAGS.
Please send me the configure script you’re using. Perhaps it got mangled some how.
Ben
I did change a couple of values to make it work, and I was not exactly sure about the changes I made except that it avoided the errors.
export JAVA_HOME="$(/usr/libexec/java_home -v 11)"
Notice the -v 11, my system didn't have 9 and I couldn't find it so it kept giving me errors.
The other change I did was:
PREFIX="/usr/local/$(whoami)/octave"
../configure \
instead of:
PREFIX="/usr/local/$(whoami)/octave"
../sources/configure \
Again, couldn't find the directory so I corrected(?) it.
I'm attaching the script as you asked.