Signed-off-by: Evgeny Litvinenko evgeny.v.litvinenko@gmail.com --- configure.ac | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+)
diff --git a/configure.ac b/configure.ac index b39b6b2c90..aec9c135bf 100644 --- a/configure.ac +++ b/configure.ac @@ -940,6 +940,60 @@ case $host_os in fi ;;
+ solaris*) + DLLFLAGS="$DLLFLAGS -fPIC" + LDDLLFLAGS="-shared -fPIC" + + WINE_TRY_CFLAGS([-fPIC -Wl,-pie], [LDEXECFLAGS="-Wl,-pie"]) + + AC_CACHE_CHECK([for linker flags to build shared library], ac_cv_c_dll_ld_opts, + [WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-G,-B,symbolic], + [ac_cv_c_dll_ld_opts="-Wl,-G,-B,symbolic"], + [WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-shared,-Bsymbolic], + [ac_cv_c_dll_ld_opts="-Wl,-shared,-Bsymbolic"], + [ac_cv_c_dll_ld_opts=""])])]) + + AC_CACHE_CHECK([for linker flags to record a shared object name], ac_cv_c_dll_ld_soname, + [WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-soname,confest.so.1], + [ac_cv_c_dll_ld_soname="-Wl,-soname,libwine.so.$libwine_soversion"], + [WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-h,confest.so.1], + [ac_cv_c_dll_ld_soname="-Wl,-h,libwine.so.$libwine_soversion"], + [ac_cv_c_dll_ld_soname=""])])]) + + echo '{ global: *; };' >conftest.map + AC_CACHE_CHECK([for linker flags to use mapfile], ac_cv_c_dll_ld_map, + [WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,--version-script=conftest.map], + [ac_cv_c_dll_ld_map="-Wl,--version-script=$(srcdir)/wine.map"], + [WINE_TRY_SHLIB_FLAGS([$LDDLLFLAGS -Wl,-M,conftest.map], + [ac_cv_c_dll_ld_map="-Wl,-M,$(srcdir)/wine.map"], + [ac_cv_c_dll_ld_map=""])])]) + rm -f conftest.map + + AC_SUBST(LIBWINE_LDFLAGS,"$LDDLLFLAGS $ac_cv_c_dll_ld_opts $ac_cv_c_dll_ld_soname $ac_cv_c_dll_ld_map") + + WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000" + + WINE_TRY_CFLAGS([-Wl,--export-dynamic], [WINELOADER_LDFLAGS="-Wl,--export-dynamic"]) + + WINE_TRY_CFLAGS([-Wl,--rpath,$ORIGIN/../lib], + [LDRPATH_INSTALL="-Wl,--rpath,\$$ORIGIN/`$(MAKEDEP) -R ${bindir} ${libdir}`" + LDRPATH_LOCAL="-Wl,--rpath,\$$ORIGIN/$(top_builddir)/libs/wine"], + [WINE_TRY_CFLAGS([-Wl,-R,$ORIGIN/../lib], + [LDRPATH_INSTALL="-Wl,-R,\$$ORIGIN/`$(MAKEDEP) -R ${bindir} ${libdir}`" + LDRPATH_LOCAL="-Wl,-R,\$$ORIGIN/$(top_builddir)/libs/wine"])]) + + WINE_TRY_CFLAGS([-Wl,--enable-new-dtags], + [LDRPATH_INSTALL="$LDRPATH_INSTALL -Wl,--enable-new-dtags"]) + + WINE_TRY_CFLAGS([-Wl,-z,max-page-size=0x1000], + [WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-z,max-page-size=0x1000"]) + + AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so.$libwine_version") + AC_SUBST(LIBWINE_DEPENDS,"wine.map") + TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion" + TOP_INSTALL_DEV="$TOP_INSTALL_DEV libs/wine/libwine.so" + ;; + *) case $host_cpu in *i[[3456789]]86*)