Add WX_FIND_LIB() function to simplify testing for libraries in configure.
No real changes in behaviour but the new WX_FIND_LIB() function can now be used to test for any library. Closes #13375. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
69
configure.in
69
configure.in
@@ -3772,18 +3772,17 @@ USE_XINERAMA=0
|
||||
if test "$wxUSE_DISPLAY" = "yes"; then
|
||||
dnl Xinerama is used for wxGTK1/wxX11/wxMotif only
|
||||
if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_X11" = 1 -o "$wxUSE_GTK1" = 1; then
|
||||
AC_MSG_CHECKING([for Xinerama])
|
||||
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xinerama)
|
||||
WX_FIND_LIB([$SEARCH_LIB], Xinerama, XineramaQueryScreens)
|
||||
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="$LDFLAGS $ac_path_to_link"
|
||||
if test "$ac_find_libraries" != "std" ; then
|
||||
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
|
||||
if test "$ac_path_to_link" != " -L/usr/lib" ; then
|
||||
LDFLAGS="$LDFLAGS $ac_path_to_link"
|
||||
fi
|
||||
fi
|
||||
USE_XINERAMA=1
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXinerama"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([Xinerama not found; disabling wxDisplay])
|
||||
wxUSE_DISPLAY="no"
|
||||
fi
|
||||
@@ -3796,10 +3795,8 @@ fi
|
||||
if test "$wxUSE_DISPLAY" = "yes"; then
|
||||
dnl wxGTK2 needs Xxf86vm as well as Xinerama-using ports from above
|
||||
if test "$USE_XINERAMA" = 1 -o "$wxUSE_GTK" = 1; then
|
||||
AC_MSG_CHECKING([for Xxf86vm extension])
|
||||
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xxf86vm)
|
||||
WX_FIND_LIB([$SEARCH_LIB], Xxf86vm, XF86VidModeQueryExtension)
|
||||
if test "$ac_find_libraries" != "" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_CHECK_HEADERS([X11/extensions/xf86vmode.h],
|
||||
[
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXxf86vm"
|
||||
@@ -3810,8 +3807,6 @@ if test "$wxUSE_DISPLAY" = "yes"; then
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3821,17 +3816,16 @@ dnl X11 session management
|
||||
dnl ---------------------------------------------------------------------------
|
||||
if test "$wxUSE_DETECT_SM" = "yes"; then
|
||||
if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1; then
|
||||
AC_MSG_CHECKING([for -lSM - X11 session management])
|
||||
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],SM)
|
||||
WX_FIND_LIB([$SEARCH_LIB], SM, SmcOpenConnection)
|
||||
if test "$ac_find_libraries" != "" ; then
|
||||
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
|
||||
if test "$ac_path_to_link" != " -L/usr/lib" ; then
|
||||
if test "$ac_find_libraries" != "std" ; then
|
||||
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
|
||||
if test "$ac_path_to_link" != " -L/usr/lib" ; then
|
||||
LDFLAGS="$LDFLAGS $ac_path_to_link"
|
||||
fi
|
||||
fi
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lSM"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([libSM not found; disabling session management detection])
|
||||
wxUSE_DETECT_SM="no"
|
||||
fi
|
||||
@@ -3872,48 +3866,43 @@ if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then
|
||||
AC_CHECK_HEADER(GL/glu.h, [
|
||||
found_gl=0
|
||||
|
||||
AC_MSG_CHECKING([for -lGL])
|
||||
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB /opt/graphics/OpenGL/lib],GL)
|
||||
WX_FIND_LIB([$SEARCH_LIB /opt/graphics/OpenGL/lib], GL, glBegin)
|
||||
if test "$ac_find_libraries" != "" ; then
|
||||
AC_MSG_RESULT([found in $ac_find_libraries])
|
||||
|
||||
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
|
||||
if test "$ac_path_to_link" != " -L/usr/lib" ; then
|
||||
if test "$ac_find_libraries" != "std" ; then
|
||||
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
|
||||
if test "$ac_path_to_link" != " -L/usr/lib" ; then
|
||||
LDFLAGS_GL="$ac_path_to_link"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl don't suppose that libGL and libGLU are always in the
|
||||
dnl same directory -- this is not true for some common
|
||||
dnl distributions
|
||||
AC_MSG_CHECKING([for -lGLU])
|
||||
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],GLU)
|
||||
WX_FIND_LIB([$SEARCH_LIB], GLU, gluBeginCurve)
|
||||
if test "$ac_find_libraries" != "" ; then
|
||||
if test "$ac_find_libraries" != "std" ; 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"
|
||||
"$ac_path_to_link" != "$LDFLAGS_GL" ; then
|
||||
LDFLAGS_GL="$LDFLAGS_GL$ac_path_to_link"
|
||||
fi
|
||||
fi
|
||||
|
||||
found_gl=1
|
||||
OPENGL_LIBS="-lGL -lGLU"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
if test "$found_gl" != 1; then
|
||||
AC_MSG_CHECKING([for -lMesaGL])
|
||||
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],MesaGL)
|
||||
WX_FIND_LIB([$SEARCH_LIB], MesaGL, glEnable)
|
||||
if test "$ac_find_libraries" != "" ; then
|
||||
if test "$ac_find_libraries" != "std" ; then
|
||||
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
|
||||
LDFLAGS_GL="$LDFLAGS$ac_path_to_link"
|
||||
OPENGL_LIBS="-lMesaGL -lMesaGLU"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
if test "$ac_path_to_link" != " -L/usr/lib" ; then
|
||||
LDFLAGS_GL="$LDFLAGS_GL$ac_path_to_link"
|
||||
fi
|
||||
fi
|
||||
OPENGL_LIBS="-lMesaGL -lMesaGLU"
|
||||
fi
|
||||
fi
|
||||
],, [ ])
|
||||
|
Reference in New Issue
Block a user