Skip to content

Error out of configure if wxwin.m4 was not found by aclocal - #241

Merged
jrincayc merged 1 commit into
jrincayc:masterfrom
benjaminpjones:fail-missing-wx
Aug 13, 2026
Merged

Error out of configure if wxwin.m4 was not found by aclocal#241
jrincayc merged 1 commit into
jrincayc:masterfrom
benjaminpjones:fail-missing-wx

Conversation

@benjaminpjones

@benjaminpjones benjaminpjones commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

#239

Background

If wxwin.m4 is not found at the autoreconf --install step, configure will silently fall back to the nographics build. It is relatively easy for wxwin.m4 to get missed by aclocal - in my case, the homebrew wx-widgets package stores wxwin.m4 outside the default aclocal search path.

Currently, we get an AC_MSG_NOTICE, but it is easy to miss given that there is a lot logged and reconf exits successfully.

Proposed change

Instead of silently degrading, error out with a message to the user with suggested fixes:

  • explicitly select nographics build (--disable-wx)
  • ensure wxWidgets installed
  • set ACLOCAL_PATH before running autoreconf

Tested

--enable-wx errors

$ ./configure --enable-wx
   ... output omitted for brevity ...
checking enable_wx... yes
configure: error: aclocal did not find wxwin.m4, so wxWidgets cannot be detected.
If wxWidgets is already installed, wxwin.m4 is outside aclocal's search path.
Re-run autoreconf with ACLOCAL_PATH set to the directory holding wxwin.m4.

Or configure with --disable-wx to build without graphics.

--disable-wx configures successfully

$ ./configure --disable-wx
   ... output omitted for brevity ...
checking enable_wx... no
   ... output omitted for brevity
$ echo $?
0

Specifically:

- You can still run with flag --disable-wx
- If --disable-wx is false or unset, and wx was not available, we
  now provide an error message instructing the user to properly install
  or select a non-wx build.

@jrincayc jrincayc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed and approve.

@jrincayc
jrincayc merged commit 1ce0ad7 into jrincayc:master Aug 13, 2026
1 check passed
@benjaminpjones
benjaminpjones deleted the fail-missing-wx branch August 13, 2026 02:11
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.

2 participants