With this patch, CDE (autotools) builds and runs on fbsd 12 now.
fbsd11 should work too, but not yet tested.
You must use gmake - ie:
./configure MAKE=gmake
gmake
Seems all of the BSD's will need to use gmake for now.
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.
Also, restructure some of the dependencies in the lib/tt binaries. We
will link with libtt (which will include libtirpc as a dependency),
and XTOOLLIB - all the right X11 stuff without needing to add it to
every OS. Removed several uneeded OS specializations ("if LINUX",
etc) as a result.
This means that when linking against libtt, libtirpc should also
automatically be linked in if we determined that we are using tirpc.
This avoids having to link every program that uses libtt (almost all
of them) from having to have a $(TIRPCLIB) added to their link
commands.
cppfile.inc - don't set BUIT_SOURCES or CLEANFILES here as they
overwrite (or in case of the CLEANFILES +=...) ignore the settings.
Do those in the Makefile.am always.
We still need a better way to preprocess generic files. cppfile.inc
will only work for one file per Makefile...
Some files were trying to access the global includes directy in the
build area with things like #include <api/c/tt_c.h>, which is now
wrong. Se we fix all of those up. tt_c.h and tttk.h are now global,
so we no longer need to root around various build dirs to find them.
TT builds again.
Ok - so one of the steps in building CDE is an early phase called the
includes phase (make includes). At this point, all of the public
header files are exported to exports/include/Dt, DtI, ...
Then, the software is built using that include dir.
This of course does not work in autotools. Much of the software does
things like #include <Dt/something.h>, so in order for the build to
succeed, this behavior must be represented/replicated in some way.
It seems the usual way of dealing with this is to place all public
headers (and in some projects, ALL headers) into a toplevel include
directory.
We now do this for all public headers - they have been moved from
wherever they were and placed in the appropriate spot in includes/
This will break the Imake 'make includes' phase unless the Imakefiles
are fixed (remove the HEADERS = stuff, and the incdir defines). This
has not been done at this point since in reality, once autotools works
properly, there will be no need for the Imake stuff anymore, and I
intend to get rid of it.
This is just a warning for now - Imake builds in this tree will now
fail at the 'includes' stage.
This commit is only the migration. In upcoming commits, libtt will be
fixed so that the hack being used before to get around this problem is
removed as there will no longer be any need.
And then the autotools work continues...
Redo the way the main CDE libs are specified in configure.ac... The
current way could not work due to evaluation issues, and the fact that
variables like $srcdir and the like are only valid in Makefiles, not
configure.
Use @LIBNAME@ rather then $(LIBNAME) in Makefile.am files - this way
the location is always evaluated when it's run, not in configure -
which can't work for a variety of reasons.
Got some of the TT binaries to build.
Made a new include/cppfile.inc file that can be used to pre-process
files. The downside is that currently you can only pre-process one
file at a time per Makefile. Something more robust is needed, but at
least tt/bin/shell now builds. Will need to come up with a better way.
This should allow an autoregen and ./confiure to work. We only
generate Makefiles for lib/* and ./Makefile for now. We'll ad more as
we go along.
Make still fails as we need to figure out TT - tirpc lib, rpcgen,
etc. But it's a start!
With earlier versions of RPC and TIRPC it seems that svctcp_create()
calles listen() on the socket (as seen by debugger and strace).
Tooltalk expects this behavior.
However, with newer systems (ArchLinux 5/18+ and similar bleeding edge
versions of SuSE's equivalent: Tumbleweed), this behavior seems to
have changed.
ttsession goes into an infinite loop trying to accept() a connection
in the TIRPC library (via svc_getreqset()).
It appears listen() is no longer called on the socket when it is
created via svctcp_create(). The hack in this commit, always causes
listen() to be called on the socket, and seems to resolve the problem.
But it is a hack I think. I don't know if this is the correct
behavior of svctcp_create() or we were just lucky before.
There were a variety of potential 64b problems due to the complete
lack of prototype declarations. So, we add a file, isam_prototypes.h,
generated mostly by the 'cproto' tool.
We also fixed up some errors that having proper prototypes pointed
out, mainly in passing ints where pointers were expected and vice
versa. The iserase() function was supposed to accept a char *, but
was defined as only accepting a char. Fun stuff like that.