delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2023/01/31/15:24:34

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
Date: Tue, 31 Jan 2023 15:05:01 -0500
Message-Id: <202301312005.30VK51Kq2435051@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: [geda-user] gl vs glx autodetect in pcb
Reply-To: geda-user AT delorie DOT com

in m4/ax_check_gl.m4 we test for glx:


m4_define([AX_CHECK_GL_GLX_PROGRAM],
          [AC_LANG_PROGRAM([[
# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
#   include <windows.h>
# endif
# ifdef HAVE_GL_GL_H
#   include <GL/gl.h>
# elif defined(HAVE_OPENGL_GL_H)
#   include <OpenGL/gl.h>
# else
#   error no gl.h
# endif]],
                           [[glXQueryVersion(0, 0, 0)]])])


This function is normally in glx.h, not gl.h, and will cause problems
when an upcoming Fedora switches to C99 rules and this causes an
"implicit declaration" error.  It seems like a trivial gl.h->glx.h fix.

There is an ax_check_glx.m4 that confirms the headers :
https://github.com/autoconf-archive/autoconf-archive/blob/master/m4/ax_check_glx.m4

BUT my question is, are we doing something "unusual" here to detect
something other than "glx exists"?  There's a test further down that
tries to avoid a GL that's based on X.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019