Ensure gtkutil.h derives HAVE_GTK3 from GTK_MAJOR_VERSION when missing so GTK3/GTK4 builds select the correct typedefs and declarations in Windows builds that include gtkutil.h directly.

Link libX11 on non-Windows builds regardless of GTK2/GTK3 to satisfy the X11 symbols used in gtkutil.c, fixing the GTK2 linker failure.
This commit is contained in:
2026-02-05 08:14:59 -07:00
parent 0dd25cb631
commit 9e9a0be80d
2 changed files with 14 additions and 4 deletions

View File

@@ -26,6 +26,14 @@
typedef void (*filereqcallback) (void *, char *file);
#ifndef HAVE_GTK3
#if GTK_MAJOR_VERSION >= 3
#define HAVE_GTK3 1
#else
#define HAVE_GTK3 0
#endif
#endif
#if HAVE_GTK3
typedef enum
{