makefiles: Define libwine soversion from configure.

This commit is contained in:
Alexandre Julliard 2013-12-31 19:25:54 +01:00
parent 54300b2302
commit d822f32a4f
3 changed files with 70 additions and 85 deletions

76
configure vendored
View File

@ -3091,6 +3091,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
libwine_version="1.0"
# Check whether --enable-win16 was given. # Check whether --enable-win16 was given.
@ -7553,6 +7555,7 @@ distclean::
wine_binary="wine" wine_binary="wine"
test "x$enable_win64" != "xyes" || wine_binary="wine64" test "x$enable_win64" != "xyes" || wine_binary="wine64"
loader_programs="$wine_binary wine-installed" loader_programs="$wine_binary wine-installed"
libwine_soversion=`expr $libwine_version : '\([0-9]*\)\..*'`
LOADER_RULES=" LOADER_RULES="
install install-lib:: wine-installed install install-lib:: wine-installed
@ -7679,8 +7682,7 @@ fi
;; ;;
esac esac
wine_fn_ignore_file "libs/wine/libwine.dll" libwine_targets="libwine.dll libwine.a"
wine_fn_ignore_file "libs/wine/libwine.a"
LIBWINE_RULES=" LIBWINE_RULES="
all: libwine.dll libwine.a all: libwine.dll libwine.a
@ -7698,9 +7700,6 @@ install install-dev:: libwine.a
uninstall:: uninstall::
-cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.a libwine.dll -cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.a libwine.dll
clean::
\$(RM) libwine.dll
" "
;; ;;
@ -7876,31 +7875,28 @@ fi
fi fi
wine_fn_ignore_file "libs/wine/libwine*.dylib" libwine_targets="libwine.dylib libwine.$libwine_soversion.dylib libwine.$libwine_version.dylib"
LIBWINE_RULES=" LIBWINE_RULES="
all: libwine.dylib all: libwine.dylib
libwine.\$(VERSION).dylib: \$(OBJS) libwine.$libwine_version.dylib: \$(OBJS)
\$(CC) -dynamiclib -install_name @rpath/libwine.\$(SOVERSION).dylib -Wl,-rpath,@loader_path/ -compatibility_version \$(SOVERSION) -current_version \$(VERSION) \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@ \$(CC) -dynamiclib -install_name @rpath/libwine.$libwine_soversion.dylib -Wl,-rpath,@loader_path/ -compatibility_version $libwine_soversion -current_version $libwine_version \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@
libwine.\$(SOVERSION).dylib: libwine.\$(VERSION).dylib libwine.$libwine_soversion.dylib: libwine.$libwine_version.dylib
\$(RM) \$@ && \$(LN_S) libwine.\$(VERSION).dylib \$@ \$(RM) \$@ && \$(LN_S) libwine.$libwine_version.dylib \$@
libwine.dylib: libwine.\$(SOVERSION).dylib libwine.dylib: libwine.$libwine_soversion.dylib
\$(RM) \$@ && \$(LN_S) libwine.\$(SOVERSION).dylib \$@ \$(RM) \$@ && \$(LN_S) libwine.$libwine_soversion.dylib \$@
install install-lib:: libwine.\$(VERSION).dylib install install-lib:: libwine.$libwine_version.dylib
\$(INSTALL_PROGRAM) libwine.\$(VERSION).dylib \$(DESTDIR)\$(libdir)/libwine.\$(VERSION).dylib \$(INSTALL_PROGRAM) libwine.$libwine_version.dylib \$(DESTDIR)\$(libdir)/libwine.$libwine_version.dylib
cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.\$(SOVERSION).dylib && \$(LN_S) libwine.\$(VERSION).dylib libwine.\$(SOVERSION).dylib cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.$libwine_soversion.dylib && \$(LN_S) libwine.$libwine_version.dylib libwine.$libwine_soversion.dylib
install install-dev:: install install-dev::
cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.dylib && \$(LN_S) libwine.\$(VERSION).dylib libwine.dylib cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.dylib && \$(LN_S) libwine.$libwine_version.dylib libwine.dylib
uninstall:: uninstall::
-cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.dylib libwine.\$(VERSION).dylib libwine.\$(SOVERSION).dylib -cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.dylib libwine.$libwine_soversion.dylib libwine.$libwine_version.dylib
clean::
\$(RM) libwine.dylib libwine.\$(VERSION).dylib libwine.\$(SOVERSION).dylib
" "
@ -8057,7 +8053,7 @@ fi
;; ;;
esac esac
wine_fn_ignore_file "libs/wine/libwine.so" libwine_targets="libwine.so"
LIBWINE_RULES=" LIBWINE_RULES="
all: libwine.so all: libwine.so
@ -8069,9 +8065,6 @@ install install-lib:: libwine.so
uninstall:: uninstall::
\$(RM) \$(DESTDIR)\$(libdir)/libwine.so \$(RM) \$(DESTDIR)\$(libdir)/libwine.so
clean::
\$(RM) libwine.so
" "
@ -8135,7 +8128,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1" >&5
$as_echo "$ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1" >&6; } $as_echo "$ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1" >&6; }
if test $ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1 = yes; then : if test $ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1 = yes; then :
LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so.\$(SOVERSION)" LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so.$libwine_soversion"
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -shared -Wl,-h,confest.so.1" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -shared -Wl,-h,confest.so.1" >&5
$as_echo_n "checking whether the compiler supports -fPIC -shared -Wl,-h,confest.so.1... " >&6; } $as_echo_n "checking whether the compiler supports -fPIC -shared -Wl,-h,confest.so.1... " >&6; }
@ -8160,7 +8153,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1" >&5
$as_echo "$ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1" >&6; } $as_echo "$ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1" >&6; }
if test $ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1 = yes; then : if test $ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1 = yes; then :
LDSHARED="\$(CC) -shared -Wl,-h,libwine.so.\$(SOVERSION)" LDSHARED="\$(CC) -shared -Wl,-h,libwine.so.$libwine_soversion"
fi fi
fi fi
@ -8406,34 +8399,31 @@ fi
$as_echo "$ac_cv_c_dll_unixware" >&6; } $as_echo "$ac_cv_c_dll_unixware" >&6; }
if test "$ac_cv_c_dll_unixware" = "yes" if test "$ac_cv_c_dll_unixware" = "yes"
then then
LDSHARED="\$(CC) -Wl,-G,-h,libwine.so.\$(SOVERSION)" LDSHARED="\$(CC) -Wl,-G,-h,libwine.so.$libwine_soversion"
fi fi
fi fi
wine_fn_ignore_file "libs/wine/libwine.so*" libwine_targets="libwine.so libwine.so.$libwine_soversion libwine.so.$libwine_version"
LIBWINE_RULES=" LIBWINE_RULES="
all: libwine.so all: libwine.so
libwine.so.\$(VERSION): \$(OBJS) \$(srcdir)/wine.map libwine.so.$libwine_version: \$(OBJS) \$(srcdir)/wine.map
$LDSHARED \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@ $LDSHARED \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@
libwine.so.\$(SOVERSION): libwine.so.\$(VERSION) libwine.so.$libwine_soversion: libwine.so.$libwine_version
\$(RM) \$@ && \$(LN_S) libwine.so.\$(VERSION) \$@ \$(RM) \$@ && \$(LN_S) libwine.so.$libwine_version \$@
libwine.so: libwine.so.\$(SOVERSION) libwine.so: libwine.so.$libwine_soversion
\$(RM) \$@ && \$(LN_S) libwine.so.\$(SOVERSION) \$@ \$(RM) \$@ && \$(LN_S) libwine.so.$libwine_soversion \$@
install install-lib:: libwine.so.\$(VERSION) install install-lib:: libwine.so.$libwine_version
\$(INSTALL_PROGRAM) libwine.so.\$(VERSION) \$(DESTDIR)\$(libdir)/libwine.so.\$(VERSION) \$(INSTALL_PROGRAM) libwine.so.$libwine_version \$(DESTDIR)\$(libdir)/libwine.so.$libwine_version
cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so.\$(SOVERSION) && \$(LN_S) libwine.so.\$(VERSION) libwine.so.\$(SOVERSION) cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so.$libwine_soversion && \$(LN_S) libwine.so.$libwine_version libwine.so.$libwine_soversion
install install-dev:: install install-dev::
cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so && \$(LN_S) libwine.so.\$(VERSION) libwine.so cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so && \$(LN_S) libwine.so.$libwine_version libwine.so
uninstall:: uninstall::
-cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so libwine.so.\$(VERSION) libwine.so.\$(SOVERSION) -cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so libwine.so.$libwine_soversion libwine.so.$libwine_version
clean::
\$(RM) libwine.so.\$(SOVERSION) libwine.so.\$(VERSION)
" "
@ -8447,6 +8437,10 @@ wine-installed: main.o
;; ;;
esac esac
as_fn_append LIBWINE_RULES "
EXTRA_TARGETS = $libwine_targets
"
enable_wineqtdecoder=${enable_wineqtdecoder:-no} enable_wineqtdecoder=${enable_wineqtdecoder:-no}
enable_winemac_drv=${enable_winemac_drv:-no} enable_winemac_drv=${enable_winemac_drv:-no}

View File

@ -11,6 +11,8 @@ AC_CONFIG_SRCDIR(server/atom.c)
AC_CONFIG_HEADERS(include/config.h) AC_CONFIG_HEADERS(include/config.h)
AC_CONFIG_AUX_DIR(tools) AC_CONFIG_AUX_DIR(tools)
libwine_version="1.0"
dnl autoconf versions before 2.63b don't have AS_VAR_APPEND or AS_VAR_IF dnl autoconf versions before 2.63b don't have AS_VAR_APPEND or AS_VAR_IF
m4_ifdef([AS_VAR_APPEND],,[as_fn_append () { eval $[1]=\$$[1]\$[2]; } m4_ifdef([AS_VAR_APPEND],,[as_fn_append () { eval $[1]=\$$[1]\$[2]; }
AC_DEFUN([AS_VAR_APPEND],[as_fn_append $1 $2])])dnl AC_DEFUN([AS_VAR_APPEND],[as_fn_append $1 $2])])dnl
@ -687,6 +689,7 @@ WINE_CONFIG_HELPERS
wine_binary="wine" wine_binary="wine"
test "x$enable_win64" != "xyes" || wine_binary="wine64" test "x$enable_win64" != "xyes" || wine_binary="wine64"
loader_programs="$wine_binary wine-installed" loader_programs="$wine_binary wine-installed"
libwine_soversion=`expr $libwine_version : '\([[0-9]]*\)\..*'`
AC_SUBST(LOADER_RULES,[" AC_SUBST(LOADER_RULES,["
install install-lib:: wine-installed install install-lib:: wine-installed
@ -723,8 +726,7 @@ case $host_os in
AC_SUBST(SOCKETLIBS,"-L\$(top_builddir)/dlls/ws2_32 -lws2_32") ;; AC_SUBST(SOCKETLIBS,"-L\$(top_builddir)/dlls/ws2_32 -lws2_32") ;;
esac esac
WINE_IGNORE_FILE("libs/wine/libwine.dll") libwine_targets="libwine.dll libwine.a"
WINE_IGNORE_FILE("libs/wine/libwine.a")
AC_SUBST(LIBWINE_RULES,[" AC_SUBST(LIBWINE_RULES,["
all: libwine.dll libwine.a all: libwine.dll libwine.a
@ -742,9 +744,6 @@ install install-dev:: libwine.a
uninstall:: uninstall::
-cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.a libwine.dll -cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.a libwine.dll
clean::
\$(RM) libwine.dll
"]) "])
;; ;;
@ -852,31 +851,28 @@ clean::
AC_MSG_RESULT([[cross-compiling, assuming yes]])) AC_MSG_RESULT([[cross-compiling, assuming yes]]))
fi fi
WINE_IGNORE_FILE("libs/wine/libwine*.dylib") libwine_targets="libwine.dylib libwine.$libwine_soversion.dylib libwine.$libwine_version.dylib"
AC_SUBST(LIBWINE_RULES,[" AC_SUBST(LIBWINE_RULES,["
all: libwine.dylib all: libwine.dylib
libwine.\$(VERSION).dylib: \$(OBJS) libwine.$libwine_version.dylib: \$(OBJS)
\$(CC) -dynamiclib -install_name @rpath/libwine.\$(SOVERSION).dylib -Wl,-rpath,@loader_path/ -compatibility_version \$(SOVERSION) -current_version \$(VERSION) \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@ \$(CC) -dynamiclib -install_name @rpath/libwine.$libwine_soversion.dylib -Wl,-rpath,@loader_path/ -compatibility_version $libwine_soversion -current_version $libwine_version \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@
libwine.\$(SOVERSION).dylib: libwine.\$(VERSION).dylib libwine.$libwine_soversion.dylib: libwine.$libwine_version.dylib
\$(RM) \$@ && \$(LN_S) libwine.\$(VERSION).dylib \$@ \$(RM) \$@ && \$(LN_S) libwine.$libwine_version.dylib \$@
libwine.dylib: libwine.\$(SOVERSION).dylib libwine.dylib: libwine.$libwine_soversion.dylib
\$(RM) \$@ && \$(LN_S) libwine.\$(SOVERSION).dylib \$@ \$(RM) \$@ && \$(LN_S) libwine.$libwine_soversion.dylib \$@
install install-lib:: libwine.\$(VERSION).dylib install install-lib:: libwine.$libwine_version.dylib
\$(INSTALL_PROGRAM) libwine.\$(VERSION).dylib \$(DESTDIR)\$(libdir)/libwine.\$(VERSION).dylib \$(INSTALL_PROGRAM) libwine.$libwine_version.dylib \$(DESTDIR)\$(libdir)/libwine.$libwine_version.dylib
cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.\$(SOVERSION).dylib && \$(LN_S) libwine.\$(VERSION).dylib libwine.\$(SOVERSION).dylib cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.$libwine_soversion.dylib && \$(LN_S) libwine.$libwine_version.dylib libwine.$libwine_soversion.dylib
install install-dev:: install install-dev::
cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.dylib && \$(LN_S) libwine.\$(VERSION).dylib libwine.dylib cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.dylib && \$(LN_S) libwine.$libwine_version.dylib libwine.dylib
uninstall:: uninstall::
-cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.dylib libwine.\$(VERSION).dylib libwine.\$(SOVERSION).dylib -cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.dylib libwine.$libwine_soversion.dylib libwine.$libwine_version.dylib
clean::
\$(RM) libwine.dylib libwine.\$(VERSION).dylib libwine.\$(SOVERSION).dylib
"]) "])
AS_VAR_APPEND([LOADER_RULES],[" AS_VAR_APPEND([LOADER_RULES],["
@ -912,7 +908,7 @@ wine-installed: main.o wine_info.plist
;; ;;
esac esac
WINE_IGNORE_FILE("libs/wine/libwine.so") libwine_targets="libwine.so"
AC_SUBST(LIBWINE_RULES,[" AC_SUBST(LIBWINE_RULES,["
all: libwine.so all: libwine.so
@ -924,9 +920,6 @@ install install-lib:: libwine.so
uninstall:: uninstall::
\$(RM) \$(DESTDIR)\$(libdir)/libwine.so \$(RM) \$(DESTDIR)\$(libdir)/libwine.so
clean::
\$(RM) libwine.so
"]) "])
AS_VAR_APPEND([LOADER_RULES],[" AS_VAR_APPEND([LOADER_RULES],["
@ -948,9 +941,9 @@ wine-installed: main.o
then then
LDSHARED="\$(CC) -shared" LDSHARED="\$(CC) -shared"
WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,confest.so.1], WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,confest.so.1],
[LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so.\$(SOVERSION)"], [LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so.$libwine_soversion"],
[WINE_TRY_CFLAGS([-fPIC -shared -Wl,-h,confest.so.1], [WINE_TRY_CFLAGS([-fPIC -shared -Wl,-h,confest.so.1],
[LDSHARED="\$(CC) -shared -Wl,-h,libwine.so.\$(SOVERSION)"])]) [LDSHARED="\$(CC) -shared -Wl,-h,libwine.so.$libwine_soversion"])])
echo '{ global: *; };' >conftest.map echo '{ global: *; };' >conftest.map
WINE_TRY_CFLAGS([-fPIC -shared -Wl,--version-script=conftest.map], WINE_TRY_CFLAGS([-fPIC -shared -Wl,--version-script=conftest.map],
@ -992,34 +985,31 @@ wine-installed: main.o
ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")]) ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")])
if test "$ac_cv_c_dll_unixware" = "yes" if test "$ac_cv_c_dll_unixware" = "yes"
then then
LDSHARED="\$(CC) -Wl,-G,-h,libwine.so.\$(SOVERSION)" LDSHARED="\$(CC) -Wl,-G,-h,libwine.so.$libwine_soversion"
fi fi
fi fi
WINE_IGNORE_FILE("libs/wine/libwine.so*") libwine_targets="libwine.so libwine.so.$libwine_soversion libwine.so.$libwine_version"
AC_SUBST(LIBWINE_RULES,[" AC_SUBST(LIBWINE_RULES,["
all: libwine.so all: libwine.so
libwine.so.\$(VERSION): \$(OBJS) \$(srcdir)/wine.map libwine.so.$libwine_version: \$(OBJS) \$(srcdir)/wine.map
$LDSHARED \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@ $LDSHARED \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@
libwine.so.\$(SOVERSION): libwine.so.\$(VERSION) libwine.so.$libwine_soversion: libwine.so.$libwine_version
\$(RM) \$@ && \$(LN_S) libwine.so.\$(VERSION) \$@ \$(RM) \$@ && \$(LN_S) libwine.so.$libwine_version \$@
libwine.so: libwine.so.\$(SOVERSION) libwine.so: libwine.so.$libwine_soversion
\$(RM) \$@ && \$(LN_S) libwine.so.\$(SOVERSION) \$@ \$(RM) \$@ && \$(LN_S) libwine.so.$libwine_soversion \$@
install install-lib:: libwine.so.\$(VERSION) install install-lib:: libwine.so.$libwine_version
\$(INSTALL_PROGRAM) libwine.so.\$(VERSION) \$(DESTDIR)\$(libdir)/libwine.so.\$(VERSION) \$(INSTALL_PROGRAM) libwine.so.$libwine_version \$(DESTDIR)\$(libdir)/libwine.so.$libwine_version
cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so.\$(SOVERSION) && \$(LN_S) libwine.so.\$(VERSION) libwine.so.\$(SOVERSION) cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so.$libwine_soversion && \$(LN_S) libwine.so.$libwine_version libwine.so.$libwine_soversion
install install-dev:: install install-dev::
cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so && \$(LN_S) libwine.so.\$(VERSION) libwine.so cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so && \$(LN_S) libwine.so.$libwine_version libwine.so
uninstall:: uninstall::
-cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so libwine.so.\$(VERSION) libwine.so.\$(SOVERSION) -cd \$(DESTDIR)\$(libdir) && \$(RM) libwine.so libwine.so.$libwine_soversion libwine.so.$libwine_version
clean::
\$(RM) libwine.so.\$(SOVERSION) libwine.so.\$(VERSION)
"]) "])
AS_VAR_APPEND([LOADER_RULES],[" AS_VAR_APPEND([LOADER_RULES],["
@ -1032,6 +1022,10 @@ wine-installed: main.o
;; ;;
esac esac
AS_VAR_APPEND([LIBWINE_RULES],["
EXTRA_TARGETS = $libwine_targets
"])
enable_wineqtdecoder=${enable_wineqtdecoder:-no} enable_wineqtdecoder=${enable_wineqtdecoder:-no}
enable_winemac_drv=${enable_winemac_drv:-no} enable_winemac_drv=${enable_winemac_drv:-no}

View File

@ -10,9 +10,6 @@ EXTRADEFS = -DWINE_UNICODE_API="" \
-DBIN_TO_DATADIR=\"`$(MAKEDEP) -R $(bindir) $(datadir)/wine`\" -DBIN_TO_DATADIR=\"`$(MAKEDEP) -R $(bindir) $(datadir)/wine`\"
STATICLIB = libwine_static.a STATICLIB = libwine_static.a
VERSION = 1.0
SOVERSION = 1
C_SRCS = \ C_SRCS = \
c_037.c \ c_037.c \
c_10000.c \ c_10000.c \