From: Vadim Zeitlin Date: Sat, 12 Apr 2003 01:11:49 +0000 (+0000) Subject: don't suppose that libs GL and GLU arei n the same directory (bug 699289) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/021fde89a62e668c52520954b4b281ba3c2b3307?ds=inline don't suppose that libs GL and GLU arei n the same directory (bug 699289) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure.in b/configure.in index 220d2dff1f..91fb2775e9 100644 --- a/configure.in +++ b/configure.in @@ -2775,21 +2775,37 @@ if test "$wxUSE_OPENGL" = "yes"; then else AC_CHECK_HEADER(GL/gl.h, [ + found_gl=0 + AC_MSG_CHECKING([for -lGL]) - WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],[GL]) + WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],GL) if test "$ac_find_libraries" != "" ; then WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS]) - if test "$ac_path_to_link" = " -L/usr/lib" ; then - LDFLAGS_GL="$LDFLAGS" - else - LDFLAGS_GL="$LDFLAGS$ac_path_to_link" + if test "$ac_path_to_link" != " -L/usr/lib" ; then + LDFLAGS_GL="$ac_path_to_link" fi - OPENGL_LIBS="-lGL -lGLU" - AC_MSG_RESULT([yes]) - else + + dnl don't suppose that libGL and libGLU are always in the + dnl same directory -- this is not true for some common + dnl distributions + WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],GLU) + if test "$ac_find_libraries" != "" ; then + WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS]) + if test "$ac_path_to_link" != " -L/usr/lib" -a \ + "$ac_path_to_link" != "$LDFLAGS_GL"; then + LDFLAGS_GL="$LDFLAGS_GL$ac_path_to_link" + fi + + found_gl=1 + OPENGL_LIBS="-lGL -lGLU" + AC_MSG_RESULT([yes]) + fi + fi + + if "$found_gl" != 1; then AC_MSG_RESULT([no]) AC_MSG_CHECKING([for -lMesaGL]) - WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],[MesaGL]) + 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"