Commit 5a95cfbd authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Export the shared library extension instead of hardcoding .so.

parent 65abe18a
......@@ -14124,6 +14124,12 @@ MAIN_BINARY="wine-pthread"
esac
cat >>confdefs.h <<_ACEOF
#define SONAME_EXT ".$LIBEXT"
_ACEOF
if test "$LIBEXT" = "so" -o "$LIBEXT" = "dylib"
then
# Extract the first word of "ldd", so it can be a program name with args.
......
......@@ -1094,6 +1094,8 @@ esac
dnl **** Get the soname for libraries that we load dynamically ****
AC_DEFINE_UNQUOTED(SONAME_EXT,[".$LIBEXT"],[Define to the file extension of shared libraries.])
if test "$LIBEXT" = "so" -o "$LIBEXT" = "dylib"
then
WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
......
......@@ -46,7 +46,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(capi);
#ifdef HAVE_CAPI4LINUX
#ifndef SONAME_LIBCAPI20
#define SONAME_LIBCAPI20 "libcapi20.so"
#define SONAME_LIBCAPI20 "libcapi20" SONAME_EXT
#endif
static unsigned (*pcapi20_register)(unsigned, unsigned, unsigned, unsigned *) = NULL;
......
......@@ -129,7 +129,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(font);
#endif
#ifndef SONAME_LIBFREETYPE
#define SONAME_LIBFREETYPE "libfreetype.so"
#define SONAME_LIBFREETYPE "libfreetype" SONAME_EXT
#endif
#ifndef HAVE_FT_TRUETYPEENGINETYPE
......@@ -196,7 +196,7 @@ MAKE_FUNCPTR(FcPatternDestroy);
MAKE_FUNCPTR(FcPatternGetBool);
MAKE_FUNCPTR(FcPatternGetString);
#ifndef SONAME_LIBFONTCONFIG
#define SONAME_LIBFONTCONFIG "libfontconfig.so"
#define SONAME_LIBFONTCONFIG "libfontconfig" SONAME_EXT
#endif
#endif
......
......@@ -47,7 +47,7 @@
# include <jpeglib.h>
# undef UINT16
# ifndef SONAME_LIBJPEG
# define SONAME_LIBJPEG "libjpeg.so"
# define SONAME_LIBJPEG "libjpeg" SONAME_EXT
# endif
#endif
......
......@@ -78,7 +78,7 @@
#undef jpeg_boolean
#undef UINT16
#ifndef SONAME_LIBJPEG
#define SONAME_LIBJPEG "libjpeg.so"
#define SONAME_LIBJPEG "libjpeg" SONAME_EXT
#endif
#endif
......
......@@ -676,13 +676,6 @@ void WINAPI wine_glGetIntegerv( GLenum pname, GLint* params )
}
/* No need to load any other libraries as according to the ABI, libGL should be self-sufficient and
include all dependencies
*/
#ifndef SONAME_LIBGL
#define SONAME_LIBGL "libGL.so"
#endif
/* This is for brain-dead applications that use OpenGL functions before even
creating a rendering context.... */
static BOOL process_attach(void)
......
......@@ -37,7 +37,7 @@ HINSTANCE SANE_instance;
#ifdef HAVE_SANE
#ifndef SONAME_LIBSANE
#define SONAME_LIBSANE "libsane.so"
#define SONAME_LIBSANE "libsane" SONAME_EXT
#endif
static void *libsane_handle;
......
......@@ -40,7 +40,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(jack);
#ifdef HAVE_JACK_JACK_H
#ifndef SONAME_LIBJACK
#define SONAME_LIBJACK "libjack.so"
#define SONAME_LIBJACK "libjack" SONAME_EXT
#endif
void *jackhandle = NULL;
......
......@@ -46,7 +46,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
#ifndef SONAME_LIBCUPS
#define SONAME_LIBCUPS "libcups.so"
#define SONAME_LIBCUPS "libcups" SONAME_EXT
#endif
#ifdef HAVE_CUPS_CUPS_H
......
......@@ -84,7 +84,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
FT_LOAD_LINEAR_DESIGN )
#ifndef SONAME_LIBFREETYPE
#define SONAME_LIBFREETYPE "libfreetype.so"
#define SONAME_LIBFREETYPE "libfreetype" SONAME_EXT
#endif
static void *ft_handle = NULL;
......
......@@ -28,7 +28,7 @@
#ifdef HAVE_X11_XCURSOR_XCURSOR_H
# include <X11/Xcursor/Xcursor.h>
# ifndef SONAME_LIBXCURSOR
# define SONAME_LIBXCURSOR "libXcursor.so"
# define SONAME_LIBXCURSOR "libXcursor" SONAME_EXT
# endif
static void *xcursor_handle;
# define MAKE_FUNCPTR(f) static typeof(f) * p##f
......
......@@ -202,7 +202,7 @@ static void dump_PIXELFORMATDESCRIPTOR(const PIXELFORMATDESCRIPTOR *ppfd) {
include all dependencies
*/
#ifndef SONAME_LIBGL
#define SONAME_LIBGL "libGL.so"
#define SONAME_LIBGL "libGL" SONAME_EXT
#endif
#define PUSH1(attribs,att) do { attribs[nAttribs++] = (att); } while (0)
......
......@@ -240,7 +240,7 @@ static INT gNumCursors;
#ifndef SONAME_LIBXI
#define SONAME_LIBXI "libXi.so"
#define SONAME_LIBXI "libXi" SONAME_EXT
#endif
/* XInput stuff */
......
......@@ -44,16 +44,16 @@ static void *xrandr_handle;
/* some default values just in case */
#ifndef SONAME_LIBX11
#define SONAME_LIBX11 "libX11.so"
#define SONAME_LIBX11 "libX11" SONAME_EXT
#endif
#ifndef SONAME_LIBXEXT
#define SONAME_LIBXEXT "libXext.so"
#define SONAME_LIBXEXT "libXext" SONAME_EXT
#endif
#ifndef SONAME_LIBXRENDER
#define SONAME_LIBXRENDER "libXrender.so"
#define SONAME_LIBXRENDER "libXrender" SONAME_EXT
#endif
#ifndef SONAME_LIBXRANDR
#define SONAME_LIBXRANDR "libXrandr.so"
#define SONAME_LIBXRANDR "libXrandr" SONAME_EXT
#endif
#define MAKE_FUNCPTR(f) static typeof(f) * p##f;
......
......@@ -100,13 +100,13 @@ static int antialias = 1;
/* some default values just in case */
#ifndef SONAME_LIBX11
#define SONAME_LIBX11 "libX11.so"
#define SONAME_LIBX11 "libX11" SONAME_EXT
#endif
#ifndef SONAME_LIBXEXT
#define SONAME_LIBXEXT "libXext.so"
#define SONAME_LIBXEXT "libXext" SONAME_EXT
#endif
#ifndef SONAME_LIBXRENDER
#define SONAME_LIBXRENDER "libXrender.so"
#define SONAME_LIBXRENDER "libXrender" SONAME_EXT
#endif
static void *xrender_handle;
......
......@@ -73,10 +73,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet);
#include <openssl/err.h>
#ifndef SONAME_LIBSSL
#define SONAME_LIBSSL "libssl.so"
#define SONAME_LIBSSL "libssl" SONAME_EXT
#endif
#ifndef SONAME_LIBCRYPTO
#define SONAME_LIBCRYPTO "libcrypto.so"
#define SONAME_LIBCRYPTO "libcrypto" SONAME_EXT
#endif
static void *OpenSSL_ssl_handle;
......
......@@ -39,7 +39,7 @@
#ifdef HAVE_CUPS_CUPS_H
# include <cups/cups.h>
# ifndef SONAME_LIBCUPS
# define SONAME_LIBCUPS "libcups.so"
# define SONAME_LIBCUPS "libcups" SONAME_EXT
# endif
#endif
......
......@@ -969,6 +969,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to the file extension of shared libraries. */
#undef SONAME_EXT
/* Define to the soname of the libcapi20 library. */
#undef SONAME_LIBCAPI20
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment