... and move the PROG_CC and PROG_CXX checks toward the beginning.
Without the move the compiler search arguments are ignored. We search
for 'cc gcc clang' and 'c++ g++ clang++', in that order for CC and CXX
respectively.
This means there should be no need to override the CC
and CXX variables on the configure command line for BSD systems.
On OpenBSD for example, cc links to clang. On Linux, cc links to
gcc. You can still override these if you like with CC=... and
CXX=... on the configure command line.
gmake (MAKE=gmake) still needs to be used on the BSD's though.
With these and previous changes, CDE builds, installs, and runs
correctly on OpenBSD 6.5 now.
With this commit, CDE can install and run now. There are still some
programs/ that are not yet built:
dthelp dtksh dtappbuilder dtdocbook dtinfo nsgmls ttsnoop
and of course documentation (doc/). But this is a great start. For
the first time, things build, install, AND run correctly :)
Use a common make include file to do most of the work and set the
appropriate LANG from localized/templates/ . This should simplify it
quite a bit and reduce duplication.
Also we were not even installing them, so now we are.
Certain programs like dtlogin and tt_type_comp need access to the
system's cpp command to process certain files at runtime. tradcpp is
not installed on most systems, and is intended for use as a imake-cpp
replacement which is all we are using it for. We still need an
honest cpp for the CDE components to use.
Now, we look in various places for a 'cpp' command and set CPP_COMMAND
to it's value. This way tt_type_comp and other CDE programs can do
required processing at runtime.
There is a problem with CPP_PROGRAM - using $CPP or $GENCPP (tradcpp)
always fails in tt_type_comp with the error:
"nclude ", line 8: syntax error
If I define it to /lib/cpp (previous hardcoded value) then it seems to
work fine. Only the dtinfo and dtinfo_start ptypes use #include, and
therefore show this error. Needs investigation.
These use the 'merge' utility which hardcodes temp files and the like
- it cannot be run with other instances without generating bogus
errors and occasionally coredumping. :(
There are still some issues here - specifically with the C
dtbuilder/dtcodegen catalogs. They may be broken due to dtbuilder not
being built yet.
Also, once dtinfo can be built, the msgs and app-defaults for it
should be re-enabled.
I also see gencat coredumping in localization/ while doing a multicore
(-jX) make. Regular single core builds seem to work fine.
One-off error:
Old buffer length was 6 for one character (3 * 1 + 3)
We need one more byte par character in the buffer for
the hex representation of it.
+0 '"'
+1 '\\'
+2 'x'
+3 'f'
+4 'c'
+5 '"'
+6 0x0 << overflow
tcl combined with RCHECK will abort because memory blocks
are allocated contiguously and we overwrite the magic marker
of the next block.