Where's GL? Hopefully wx-config will now tell us if we need to know.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2001-11-21 13:20:26 +00:00
parent 10916a4f7a
commit 62d0491bf6
3 changed files with 454 additions and 446 deletions

756
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -60,7 +60,7 @@ AC_DEFUN(WX_INCLUDE_PATH_EXIST,
if test $result = 0; then if test $result = 0; then
ac_path_to_include="" ac_path_to_include=""
else else
ac_path_to_include="-I$1" ac_path_to_include=" -I$1"
fi fi
]) ])
@@ -74,7 +74,7 @@ AC_DEFUN(WX_LINK_PATH_EXIST,
if test $result = 0; then if test $result = 0; then
ac_path_to_link="" ac_path_to_link=""
else else
ac_path_to_link="-L$1" ac_path_to_link=" -L$1"
fi fi
]) ])
@@ -2133,8 +2133,8 @@ equivalent variable and GTK+ is version 1.2.3 or above.
WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE) WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY) WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include" TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
AC_MSG_RESULT(found at $ac_find_libraries) AC_MSG_RESULT(found at $ac_find_libraries)
else else
dnl it might happen that we found headers in one of the standard dnl it might happen that we found headers in one of the standard
@@ -2165,7 +2165,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm) WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
if test "$ac_find_libraries" != "" ; then if test "$ac_find_libraries" != "" ; then
WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY) WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
xpm_link=" -lXpm" xpm_link=" -lXpm"
AC_DEFINE(wxHAVE_LIB_XPM) AC_DEFINE(wxHAVE_LIB_XPM)
AC_MSG_RESULT(found at $ac_find_libraries) AC_MSG_RESULT(found at $ac_find_libraries)
@@ -2312,25 +2312,42 @@ if test "$wxUSE_OPENGL" = "yes"; then
OPENGL_LIBS="-framework OpenGL -framework AGL" OPENGL_LIBS="-framework OpenGL -framework AGL"
else else
AC_CHECK_HEADER(GL/gl.h,
[
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],[GL])
if test "$ac_find_libraries" != "" ; then
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
LDFLAGS_GL="$LDFLAGS$ac_path_to_link"
OPENGL_LIBS="-lGL -lGLU"
else
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],[MesaGL])
if test "$ac_find_libraries" != "" ; then
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
LDFLAGS_GL="$LDFLAGS$ac_path_to_link"
OPENGL_LIBS="-lMesaGL -lMesaGLU"
fi
fi
])
dnl check for OpenGL libs availability first dnl check for OpenGL libs availability first
dnl -lGL requires -lm with soem OpenGL versions dnl -lGL requires -lm with soem OpenGL versions
AC_CHECK_HEADER(GL/gl.h, # AC_CHECK_HEADER(GL/gl.h,
[ # [
AC_CHECK_LIB(GL, glFlush, # AC_CHECK_LIB(GL, glFlush,
[ # [
OPENGL_LIBS="-lGL -lGLU" # OPENGL_LIBS="-lGL -lGLU"
], # ],
[ # [
AC_CHECK_LIB(MesaGL, glFlush, # AC_CHECK_LIB(MesaGL, glFlush,
[ # [
OPENGL_LIBS="-lMesaGL -lMesaGLU" # OPENGL_LIBS="-lMesaGL -lMesaGLU"
], # ],
[], # [],
[-lm]) # [-lm])
], # ],
[-lm]) # [-lm])
]) # ])
if test "x$OPENGL_LIBS" = "x"; then if test "x$OPENGL_LIBS" = "x"; then
dnl it should be an error and not a warning because OpenGL is not on dnl it should be an error and not a warning because OpenGL is not on
@@ -4774,6 +4791,7 @@ AC_SUBST(SAMPLES_SUBDIRS)
dnl additional libraries and linker settings dnl additional libraries and linker settings
AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS)
AC_SUBST(LDFLAGS_GL)
AC_SUBST(OPENGL_LIBS) AC_SUBST(OPENGL_LIBS)
AC_SUBST(DMALLOC_LIBS) AC_SUBST(DMALLOC_LIBS)
AC_SUBST(EXTRADEFS) AC_SUBST(EXTRADEFS)

View File

@@ -107,7 +107,7 @@ while test $# -gt 0; do
;; ;;
--gl-libs) --gl-libs)
echo @WXCONFIG_LIBS_GL@ echo @LDFLAGS_GL@ @WXCONFIG_LIBS_GL@
;; ;;
--cc) --cc)
echo $CC echo $CC