Skip to content

Build with a single configure script - #47

Merged
fingolfin merged 1 commit into
masterfrom
mh/single-configure
Sep 20, 2026
Merged

fingolfin merged 1 commit into
masterfrom
mh/single-configure

Conversation

@fingolfin

Copy link
Copy Markdown
Member

The top-level configure only located GAP; make then copied a second configure script from cnf/ into bin/<arch>, ran it there with the options of the first, and built with the Makefile that one generated.

This does all checks in the one configure.ac and lets the top-level Makefile compile src.x11/*.c into bin/<arch>, where xgap.sh expects the executable. cnf/ is gone, including config.guess, config.sub and install-sh, which no remaining check needs.

Consequences:

  • CC or an option containing a space (CC="gcc -std=gnu23" as set by autoconf 2.72, CFLAGS="-O0 -g") no longer breaks the build, as nothing is handed to a second configure. This makes Fix build when CC contains a space #46 unnecessary.
  • gcov records the sources as src.x11/*.c instead of ../../src.x11/*.c.
  • The Makefile needs GNU make. Every object depends on all headers and bitmaps, which is coarser than the generated dependency lists were.

Checked on macOS with autoconf 2.72 against a build of the old system: config.h is identical except for the macros of AC_PROG_CC_C_O and AC_C_CONST, which I dropped because the sources use neither; compiler and linker flags are identical apart from the source path. A second make does nothing, touching a header rebuilds all objects, make clean && make works, and the resulting binary opens a subgroup lattice under Xvfb. Not tested locally: Linux, GAP 4.11, building the manual with the updated doc/install.tex.

Assisted-by: Claude Code (Fable 5.1)

The top-level configure only located GAP; `make` then copied a second
configure script from cnf/ into bin/<arch>, ran it there with the
options of the first, and built with the Makefile it generated. The
hand-over lost the quoting of CC and of any option containing a
space, and compiling two levels below the sources made gcov record
them as ../../src.x11/*.c.

Do all checks in the one configure.ac, and let the top-level Makefile
compile src.x11/*.c into bin/<arch>, where xgap.sh expects the
executable. This makes cnf/ obsolete, including config.guess,
config.sub and install-sh, which no remaining check needs.

AC_PROG_CC_C_O and AC_C_CONST are gone as the sources use neither
result; config.h is otherwise unchanged, as are the compiler and
linker flags.

Assisted-by: Claude Code (Fable 5.1)
@fingolfin
fingolfin merged commit 9e60b6d into master Sep 20, 2026
4 checks passed
@fingolfin
fingolfin deleted the mh/single-configure branch September 20, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant