Update of /cvsroot/wxlua/wxLua/build/autoconf
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7944/build/autoconf
Modified Files:
aclocal.m4 configure.ac
Log Message:
added check for OpenGL libraries
Index: aclocal.m4
===================================================================
RCS file: /cvsroot/wxlua/wxLua/build/autoconf/aclocal.m4,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** aclocal.m4 24 Dec 2006 13:30:56 -0000 1.38
--- aclocal.m4 3 Jan 2007 23:10:02 -0000 1.39
***************
*** 1723,1725 ****
])
! m4_include([../../wxwin.m4])
--- 1723,1725 ----
])
! m4_include([wxwin.m4])
Index: configure.ac
===================================================================
RCS file: /cvsroot/wxlua/wxLua/build/autoconf/configure.ac,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** configure.ac 24 Dec 2006 13:30:56 -0000 1.38
--- configure.ac 3 Jan 2007 23:10:02 -0000 1.39
***************
*** 317,321 ****
# NOTE: autopackage HACK: do an "export NO_WXLUAEDIT_CHECK=1" symbol
# to get rid of this check which fails for some reason when building the AP
! if [[ "$USE_WXLUAEDITAPP" = "1" && -z "$NO_WXLUAEDIT_CHECK" ]]; then
minversion="1.2.4"
--- 317,321 ----
# NOTE: autopackage HACK: do an "export NO_WXLUAEDIT_CHECK=1" symbol
# to get rid of this check which fails for some reason when building the AP
! if [[[ "$USE_WXLUAEDITAPP" = "1" && -z "$NO_WXLUAEDIT_CHECK" ]]]; then
minversion="1.2.4"
***************
*** 345,348 ****
--- 345,409 ----
+ dnl ---------------------------------------------------------------------------
+ dnl WX_CHECK_FOR_GL(
+ dnl [action if found],
+ dnl [action if not found])
+ dnl ---------------------------------------------------------------------------
+ AC_DEFUN([WX_CHECK_FOR_GL],
+ [
+ dnl save original flags into support variables
+ AM_SAVE_COREVAR()
+
+ dnl add to the compilation & link flags the wxWidgets flags
+ dnl
+ dnl NOTE: this is very important since the test program
+ dnl we will compile needs to be linked against wx
+ dnl and the configure script will use these *FLAGS
+ dnl variables and it cannot be told to use other flags.
+ dnl
+ dnl NOTE2: we don't want to put into *FLAGS variables the
+ dnl WX_* variable values since the Makefile.in for
+ dnl a wxpresets-based application already merges
+ dnl the *FLAGS contents with WX_* vars
+ dnl
+ dnl NOTE3: the CXXFLAGS are merged with CPPFLAGS and
+ dnl thus we don't need to add the WX_CPPFLAGS to both
+ CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
+ CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
+
+ dnl before WX_LIBS we want the lib of STC
+ OLD_WXLIBS=$WX_LIBS
+ AM_PREPEND_WXLIKE_LIB([gl])
+ LIBS="$LIBS $WX_LIBS"
+
+ dnl check for this component presence
+ AC_MSG_CHECKING([if wxWidgets OpenGL bindings are available])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([#include <wx/glcanvas.h>],
+ [wxGLContext dummy(NULL);])
+ ],
+ [WXGL_PRESENCE=1], [WXGL_PRESENCE=0])
+
+ if test "$WXGL_PRESENCE" = "1"; then
+ AC_MSG_RESULT([yes])
+ $1
+ else
+ AC_MSG_RESULT([no])
+ $2
+ fi
+
+ dnl restore the original flags
+ WX_LIBS=$OLD_WXLIBS
+ AM_RESTORE_COREVAR()
+ ])
+
+ WX_CHECK_FOR_GL
+ if test "$WXGL_PRESENCE" = "1"; then
+ # let's add OpenGL binding library to the libraries to link
+ # so that if the user wants to use wxLua bindings to wxOpenGL he
+ # won't have linking errors
+ AM_PREPEND_WXLIKE_LIB([gl])
+ fi
+
|