glu32: No longer load the Unix libGLU.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4da1bca7c5
commit
ec55b1c271
|
@ -855,7 +855,6 @@ with_freetype
|
|||
with_gettext
|
||||
with_gettextpo
|
||||
with_gphoto
|
||||
with_glu
|
||||
with_gnutls
|
||||
with_gsm
|
||||
with_gssapi
|
||||
|
@ -2594,7 +2593,6 @@ Optional Packages:
|
|||
--without-gettext do not use gettext
|
||||
--with-gettextpo use the GetTextPO library to rebuild po files
|
||||
--without-gphoto do not use gphoto (Digital Camera support)
|
||||
--without-glu do not use the GLU library
|
||||
--without-gnutls do not use GnuTLS (schannel support)
|
||||
--without-gsm do not use libgsm (GSM 06.10 codec support)
|
||||
--without-gssapi do not use GSSAPI (Kerberos SSP support)
|
||||
|
@ -3989,12 +3987,6 @@ if test "${with_gphoto+set}" = set; then :
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --with-glu was given.
|
||||
if test "${with_glu+set}" = set; then :
|
||||
withval=$with_glu;
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-gnutls was given.
|
||||
if test "${with_gnutls+set}" = set; then :
|
||||
withval=$with_gnutls;
|
||||
|
@ -12563,74 +12555,6 @@ _ACEOF
|
|||
|
||||
OPENGL_LIBS="-lGL"
|
||||
fi
|
||||
if test "x$with_glu" != "xno"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lGLU" >&5
|
||||
$as_echo_n "checking for -lGLU... " >&6; }
|
||||
if ${ac_cv_lib_soname_GLU+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_soname_save_LIBS=$LIBS
|
||||
LIBS="-lGLU $OPENGL_LIBS $X_LIBS -lm $X_EXTRA_LIBS $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char gluLookAt ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return gluLookAt ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
case "$LIBEXT" in
|
||||
dll) ac_cv_lib_soname_GLU=`$ac_cv_path_LDD conftest.exe | grep "GLU" | sed -e "s/dll.*/dll/"';2,$d'` ;;
|
||||
dylib) ac_cv_lib_soname_GLU=`$OTOOL -L conftest$ac_exeext | grep "libGLU\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libGLU\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
||||
*) ac_cv_lib_soname_GLU=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libGLU\\.$LIBEXT" | sed -e "s/^.*\\[\\(libGLU\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
|
||||
if ${ac_cv_lib_soname_GLU:+false} :; then :
|
||||
ac_cv_lib_soname_GLU=`$LDD conftest$ac_exeext | grep "libGLU\\.$LIBEXT" | sed -e "s/^.*\(libGLU\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
|
||||
fi ;;
|
||||
esac
|
||||
else
|
||||
ac_cv_lib_soname_GLU=
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_soname_save_LIBS
|
||||
fi
|
||||
if ${ac_cv_lib_soname_GLU:+false} :; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
$as_echo "not found" >&6; }
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_GLU" >&5
|
||||
$as_echo "$ac_cv_lib_soname_GLU" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SONAME_LIBGLU "$ac_cv_lib_soname_GLU"
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
if test "x$ac_cv_lib_soname_GLU" = "x"; then :
|
||||
case "x$with_glu" in
|
||||
x) as_fn_append wine_notices "|libGLU ${notice_platform}development files not found, GLU won't be supported." ;;
|
||||
xno) ;;
|
||||
*) as_fn_error $? "libGLU ${notice_platform}development files not found, GLU won't be supported.
|
||||
This is an error since --with-glu was requested." "$LINENO" 5 ;;
|
||||
esac
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_osmesa" != "xno"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lOSMesa" >&5
|
||||
|
|
|
@ -49,7 +49,6 @@ AC_ARG_WITH(gettext, AS_HELP_STRING([--without-gettext],[do not use gettext]))
|
|||
AC_ARG_WITH(gettextpo, AS_HELP_STRING([--with-gettextpo],[use the GetTextPO library to rebuild po files]),
|
||||
[if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi])
|
||||
AC_ARG_WITH(gphoto, AS_HELP_STRING([--without-gphoto],[do not use gphoto (Digital Camera support)]))
|
||||
AC_ARG_WITH(glu, AS_HELP_STRING([--without-glu],[do not use the GLU library]))
|
||||
AC_ARG_WITH(gnutls, AS_HELP_STRING([--without-gnutls],[do not use GnuTLS (schannel support)]))
|
||||
AC_ARG_WITH(gsm, AS_HELP_STRING([--without-gsm],[do not use libgsm (GSM 06.10 codec support)]),
|
||||
[if test "x$withval" = "xno"; then ac_cv_header_gsm_h=no; ac_cv_header_gsm_gsm_h=no; fi])
|
||||
|
@ -1292,13 +1291,6 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
|
|||
fi],
|
||||
$X_LIBS -lm $X_EXTRA_LIBS -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib)],
|
||||
$X_LIBS -lm $X_EXTRA_LIBS)
|
||||
if test "x$with_glu" != "xno"
|
||||
then
|
||||
WINE_CHECK_SONAME(GLU,gluLookAt,,,[$OPENGL_LIBS $X_LIBS -lm $X_EXTRA_LIBS])
|
||||
WINE_NOTICE_WITH(glu,[test "x$ac_cv_lib_soname_GLU" = "x"],
|
||||
[libGLU ${notice_platform}development files not found, GLU won't be supported.])
|
||||
fi
|
||||
|
||||
if test "x$with_osmesa" != "xno"
|
||||
then
|
||||
WINE_CHECK_SONAME(OSMesa,OSMesaGetProcAddress,,,[$X_LIBS -lm $X_EXTRA_LIBS])
|
||||
|
|
110
dlls/glu32/glu.c
110
dlls/glu32/glu.c
|
@ -20,6 +20,7 @@
|
|||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
|
@ -91,51 +92,6 @@ static const struct { GLuint err; const char *str; } errors[] =
|
|||
{ GLU_NURBS_ERROR37, "duplicate point on piecewise linear trimming curve" },
|
||||
};
|
||||
|
||||
typedef void (*_GLUfuncptr)(void);
|
||||
|
||||
static void (*p_gluBeginCurve)( GLUnurbs* nurb );
|
||||
static void (*p_gluBeginSurface)( GLUnurbs* nurb );
|
||||
static void (*p_gluBeginTrim)( GLUnurbs* nurb );
|
||||
static void (*p_gluDeleteNurbsRenderer)( GLUnurbs* nurb );
|
||||
static void (*p_gluEndCurve)( GLUnurbs* nurb );
|
||||
static void (*p_gluEndSurface)( GLUnurbs* nurb );
|
||||
static void (*p_gluEndTrim)( GLUnurbs* nurb );
|
||||
static void (*p_gluGetNurbsProperty)( GLUnurbs* nurb, GLenum property, GLfloat* data );
|
||||
static void (*p_gluLoadSamplingMatrices)( GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view );
|
||||
static GLUnurbs* (*p_gluNewNurbsRenderer)(void);
|
||||
static void (*p_gluNurbsCallback)( GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc );
|
||||
static void (*p_gluNurbsCurve)( GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type );
|
||||
static void (*p_gluNurbsProperty)( GLUnurbs* nurb, GLenum property, GLfloat value );
|
||||
static void (*p_gluNurbsSurface)( GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type );
|
||||
static void (*p_gluPwlCurve)( GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type );
|
||||
|
||||
static void *libglu_handle;
|
||||
static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
static BOOL WINAPI load_libglu( INIT_ONCE *once, void *param, void **context )
|
||||
{
|
||||
#ifdef SONAME_LIBGLU
|
||||
if ((libglu_handle = dlopen( SONAME_LIBGLU, RTLD_NOW )))
|
||||
TRACE( "loaded %s\n", SONAME_LIBGLU );
|
||||
else
|
||||
ERR( "Failed to load %s: %s\n", SONAME_LIBGLU, dlerror() );
|
||||
#else
|
||||
ERR( "libGLU is needed but support was not included at build time\n" );
|
||||
#endif
|
||||
return libglu_handle != NULL;
|
||||
}
|
||||
|
||||
static void *load_glufunc( const char *name )
|
||||
{
|
||||
void *ret;
|
||||
|
||||
if (!InitOnceExecuteOnce( &init_once, load_libglu, NULL, NULL )) return NULL;
|
||||
if (!(ret = dlsym( libglu_handle, name ))) ERR( "Can't find %s\n", name );
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define LOAD_FUNCPTR(f) (p_##f || (p_##f = load_glufunc( #f )))
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* gluErrorString (GLU32.@)
|
||||
|
@ -173,8 +129,8 @@ const WCHAR * WINAPI wine_gluErrorUnicodeStringEXT( GLenum errCode )
|
|||
*/
|
||||
GLUnurbs * WINAPI wine_gluNewNurbsRenderer(void)
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluNewNurbsRenderer )) return NULL;
|
||||
return p_gluNewNurbsRenderer();
|
||||
ERR( "Nurbs renderer is not supported, please report\n" );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -182,8 +138,7 @@ GLUnurbs * WINAPI wine_gluNewNurbsRenderer(void)
|
|||
*/
|
||||
void WINAPI wine_gluDeleteNurbsRenderer( GLUnurbs *nobj )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluDeleteNurbsRenderer )) return;
|
||||
p_gluDeleteNurbsRenderer( nobj );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -192,8 +147,7 @@ void WINAPI wine_gluDeleteNurbsRenderer( GLUnurbs *nobj )
|
|||
void WINAPI wine_gluLoadSamplingMatrices( GLUnurbs *nobj, const GLfloat modelMatrix[16],
|
||||
const GLfloat projMatrix[16], const GLint viewport[4] )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluLoadSamplingMatrices )) return;
|
||||
p_gluLoadSamplingMatrices( nobj, modelMatrix, projMatrix, viewport );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -201,8 +155,7 @@ void WINAPI wine_gluLoadSamplingMatrices( GLUnurbs *nobj, const GLfloat modelMat
|
|||
*/
|
||||
void WINAPI wine_gluNurbsProperty( GLUnurbs *nobj, GLenum property, GLfloat value )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluNurbsProperty )) return;
|
||||
p_gluNurbsProperty( nobj, property, value );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -210,8 +163,7 @@ void WINAPI wine_gluNurbsProperty( GLUnurbs *nobj, GLenum property, GLfloat valu
|
|||
*/
|
||||
void WINAPI wine_gluGetNurbsProperty( GLUnurbs *nobj, GLenum property, GLfloat *value )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluGetNurbsProperty )) return;
|
||||
p_gluGetNurbsProperty( nobj, property, value );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -219,8 +171,7 @@ void WINAPI wine_gluGetNurbsProperty( GLUnurbs *nobj, GLenum property, GLfloat *
|
|||
*/
|
||||
void WINAPI wine_gluBeginCurve( GLUnurbs *nobj )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluBeginCurve )) return;
|
||||
p_gluBeginCurve( nobj );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -228,8 +179,7 @@ void WINAPI wine_gluBeginCurve( GLUnurbs *nobj )
|
|||
*/
|
||||
void WINAPI wine_gluEndCurve( GLUnurbs *nobj )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluEndCurve )) return;
|
||||
p_gluEndCurve( nobj );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -238,8 +188,7 @@ void WINAPI wine_gluEndCurve( GLUnurbs *nobj )
|
|||
void WINAPI wine_gluNurbsCurve( GLUnurbs *nobj, GLint nknots, GLfloat *knot,
|
||||
GLint stride, GLfloat *ctlarray, GLint order, GLenum type )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluNurbsCurve )) return;
|
||||
p_gluNurbsCurve( nobj, nknots, knot, stride, ctlarray, order, type );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -247,8 +196,7 @@ void WINAPI wine_gluNurbsCurve( GLUnurbs *nobj, GLint nknots, GLfloat *knot,
|
|||
*/
|
||||
void WINAPI wine_gluBeginSurface( GLUnurbs *nobj )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluBeginSurface )) return;
|
||||
p_gluBeginSurface( nobj );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -256,8 +204,7 @@ void WINAPI wine_gluBeginSurface( GLUnurbs *nobj )
|
|||
*/
|
||||
void WINAPI wine_gluEndSurface( GLUnurbs *nobj )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluEndSurface )) return;
|
||||
p_gluEndSurface( nobj );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -267,9 +214,7 @@ void WINAPI wine_gluNurbsSurface( GLUnurbs *nobj, GLint sknot_count, float *skno
|
|||
GLfloat *tknot, GLint s_stride, GLint t_stride, GLfloat *ctlarray,
|
||||
GLint sorder, GLint torder, GLenum type )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluNurbsSurface )) return;
|
||||
p_gluNurbsSurface( nobj, sknot_count, sknot, tknot_count, tknot,
|
||||
s_stride, t_stride, ctlarray, sorder, torder, type );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -277,8 +222,7 @@ void WINAPI wine_gluNurbsSurface( GLUnurbs *nobj, GLint sknot_count, float *skno
|
|||
*/
|
||||
void WINAPI wine_gluBeginTrim( GLUnurbs *nobj )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluBeginTrim )) return;
|
||||
p_gluBeginTrim( nobj );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -286,8 +230,7 @@ void WINAPI wine_gluBeginTrim( GLUnurbs *nobj )
|
|||
*/
|
||||
void WINAPI wine_gluEndTrim( GLUnurbs *nobj )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluEndTrim )) return;
|
||||
p_gluEndTrim( nobj );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -295,8 +238,7 @@ void WINAPI wine_gluEndTrim( GLUnurbs *nobj )
|
|||
*/
|
||||
void WINAPI wine_gluPwlCurve( GLUnurbs *nobj, GLint count, GLfloat *array, GLint stride, GLenum type )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluPwlCurve )) return;
|
||||
p_gluPwlCurve( nobj, count, array, stride, type );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -304,9 +246,7 @@ void WINAPI wine_gluPwlCurve( GLUnurbs *nobj, GLint count, GLfloat *array, GLint
|
|||
*/
|
||||
void WINAPI wine_gluNurbsCallback( GLUnurbs *nobj, GLenum which, void (CALLBACK *fn)(void) )
|
||||
{
|
||||
if (!LOAD_FUNCPTR( gluNurbsCallback )) return;
|
||||
/* FIXME: callback calling convention */
|
||||
p_gluNurbsCallback( nobj, which, (_GLUfuncptr)fn );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -339,3 +279,19 @@ GLboolean WINAPI wine_gluCheckExtension( const GLubyte *extName, const GLubyte *
|
|||
}
|
||||
return GLU_FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllMain
|
||||
*/
|
||||
BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, LPVOID reserved )
|
||||
{
|
||||
switch (reason)
|
||||
{
|
||||
case DLL_WINE_PREATTACH:
|
||||
return FALSE; /* prefer native version */
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls( instance );
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -1346,9 +1346,6 @@
|
|||
/* Define to the soname of the libGLESv2 library. */
|
||||
#undef SONAME_LIBGLESV2
|
||||
|
||||
/* Define to the soname of the libGLU library. */
|
||||
#undef SONAME_LIBGLU
|
||||
|
||||
/* Define to the soname of the libgnutls library. */
|
||||
#undef SONAME_LIBGNUTLS
|
||||
|
||||
|
|
Loading…
Reference in New Issue