netgen/ng/Togl2.1/aclocal.m4

81 lines
1.8 KiB
Plaintext
Raw Normal View History

2016-02-08 19:53:16 +05:00
#
# Include the TEA standard macro set
#
builtin(include,tclconfig/tcl.m4)
#
# Add here whatever m4 macros you want to define for your package
#
#------------------------------------------------------------------------
# TOGL_ENABLE_STUBS --
#
2018-01-08 20:45:53 +05:00
# Specify if stubs should be used.
2016-02-08 19:53:16 +05:00
#
# Arguments:
# none
#
# Results:
#
# Adds the following arguments to configure:
# --enable-stubs
#
#------------------------------------------------------------------------
AC_DEFUN(TOGL_ENABLE_STUBS, [
AC_MSG_CHECKING([whether to link with stubs library])
AC_ARG_ENABLE(stubs,
[ --enable-stubs build and link with stub libraries (--enable-stubs)],
[tcl_ok=$enableval], [tcl_ok=yes])
if test "${enable_stubs+set}" = set; then
enableval="$enable_stubs"
tcl_ok=$enableval
else
tcl_ok=yes
fi
if test "$tcl_ok" = "yes" ; then
AC_MSG_RESULT([stubs])
USE_STUBS=1
else
AC_MSG_RESULT([no stubs])
USE_STUBS=0
fi
])
#------------------------------------------------------------------------
# TOGL_UNDEF_GET_PROC_ADDRESS --
#
2022-09-07 04:43:32 +05:00
# Does defining GLX_GLXEXT_LEGACY interfere with including GL/glxext.h?
2016-02-08 19:53:16 +05:00
#
# Arguments:
# none
#
# Results:
#
# defines TOGL_UNDEF_GET_PROC_ADDRESS
#
#------------------------------------------------------------------------
AC_DEFUN(TOGL_UNDEF_GET_PROC_ADDRESS, [
2022-09-07 04:43:32 +05:00
AC_MSG_CHECKING([if GLX_GLXEXT_LEGACY interferes with including GL/glxext.h])
2016-02-08 19:53:16 +05:00
AC_LANG_PUSH(C)
ac_save_CFLAGS=$CFLAGS
CFLAGS=$TK_XINCLUDES
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[
#define GLX_GLXEXT_LEGACY
#include <GL/glx.h>
#undef GLX_VERSION_1_3
#undef GLX_VERSION_1_4
#include <GL/glxext.h>
int main() { return 0; }
]])],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes])
AC_DEFINE(UNDEF_GET_PROC_ADDRESS, 1)])
CFLAGS=$ac_save_CFLAGS
AC_LANG_POP()
])