The default SHELL isn't POSIX on some systems, such as Solaris. Use
the one Autoconf chooses instead of the default.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
When AC_PROG_CC detects GCC, Make.mk adds a bunch of flags to CFLAGS.
Works only for flags that any version of gcc in use accepts.
Instead, make configure add the flags that actually work to CFLAGS.
This will let us add flags that work only for some compilers.
The new autoconf macros are from autoconf-archive v2015.02.24.
Unfortunately, AX_APPEND_COMPILE_FLAGS doesn't work reliably for
-Wno-*: gcc complains about unknown -Wno-foo only when other
diagnostics are being produced. Test -Wfoo instead of -Wno-foo, and
rename to MY_APPEND_COMPILE_FLAGS.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Why upgrade? I'm not a lawyer, but here's my take on the differences
to version 2:
* Software patents: better protection against abuse of patents to
prevent users from exercising the rights under the GPL. I doubt
we'll get hit with a patent suit, but it's a good move just on
general principles.
* License compatibility: compatible with more free licenses, i.e. can
"steal" more free software for use in Empire. I don't expect to steal
much, but it's nice to have the option.
* Definition of "source code": modernization of some details for today's
networked world, to make it easier to distribute the software. Not
really relevant to us now, as we normally distribute full source code.
* Tivoization: this is about putting GPL-licensed software in hardware,
then make the hardware refuse to run modified software. "Neat" trick
to effectively deny its users their rights under the GPL. Abuse was
"pioneered" by TiVo (popular digital video recorders). GPLv3 forbids
it. Unlikely to become a problem for us.
* Internationalization: more careful wording, to harden the license
outside the US. The lawyers tell us it better be done that way.
* License violations: friendlier way to deal with license violations.
This has come out of past experience enforcing the GPL.
* Additional permissions: Probably not relevant to us.
Also include myself in the list of principal authors.
configure checked for library functions with LIBS instead of
LIBS_server, which could break detection of getaddrinfo() on systems
where LIB_SOCKET isn't empty.
GNUmakefile put @PTHREAD_LIBS@ only in LDLIBS, which breaks linking of
server and possibly client on systems where it is not empty.
Broken in commit 8b778634.
Make configure compute three sets of libraries: LIBS_client for the
client, LIBS_server for the server, and LIBS for the rest. This
replaces termlibs.
Unfortunately, LIBS doesn't work with Windows, because
src/lib/w32/posixio.c pulls in socket stuff. Temporary workaround:
use LIBS_server instead.
Detect .git instead of CVS. Use git-ls-files with git, else
$(srcdir)/sources.mk. info/findsubj.pl now gets the info files as
arguments rather than from sources.mk.
Remaking info subjects doesn't quite work, but it was broken similarly
before.
compiler command line. Don't bother to conditionalize code in .c
files that are only compiled when their thread package is used.
(_EMPTH_LWP, EMPTH_LWP, _EMPTH_POSIX, EMPTH_POSIX, _EMPTH_WIN32)
(EMPTH_W32): Identifiers beginning with an underscore and an uppercase
letter are reserved for any use. Rename.
and Autoconf macros that come with Automake. It supports multiple
separate builds of the same source tree, and updates dependencies
automatically. Targets info, html, install, install-html, uninstall
and dist are not yet implemented.
System configuration is now automatic. Previously, you had to choose
one of several canned system configurations, defined in Make.sysdefs.
Currently, system configuration always uses UCONTEXT for LWP, and
chooses LWP only if its requirements are met.
Feature configuration changed: instead of editing build.conf (further
processed by doconfig), you pass arguments to configure. Note that
build.conf settings that can be overridden in econfig have no
configure equivalent; just edit econfig instead.
Because generated headers complicate makefiles, fold gamesdef.h into
its users: path.c and ipglob.c become path.c.in and ipglob.c.in,
constants.c, vers.c, options.h simply hardcode defaults (most of them
are run-time configurable).
Call the client empire instead of emp_client. This matches what the
old standalone build did.