configure: Add rules for building libwine without soname on Android.

This commit is contained in:
Alexandre Julliard 2013-05-01 12:44:42 +02:00
parent 54244470f3
commit daa5116010
2 changed files with 256 additions and 0 deletions

212
configure vendored
View File

@ -6872,6 +6872,218 @@ clean::
;; ;;
linux-android*)
DLLFLAGS="$DLLFLAGS -fPIC"
DLLEXT=".so"
LDDLLFLAGS="-shared -Wl,-Bsymbolic"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -shared -Wl,-Bsymbolic,-z,defs" >&5
$as_echo_n "checking whether the compiler supports -fPIC -shared -Wl,-Bsymbolic,-z,defs... " >&6; }
if ${ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -fPIC -shared -Wl,-Bsymbolic,-z,defs"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs=yes
else
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs" >&5
$as_echo "$ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs" >&6; }
if test $ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs = yes; then :
LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini" >&5
$as_echo_n "checking whether the compiler supports -fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini... " >&6; }
if ${ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini=yes
else
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini" >&5
$as_echo "$ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini" >&6; }
if test $ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini = yes; then :
LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -Wl,--export-dynamic" >&5
$as_echo_n "checking whether the compiler supports -fPIC -Wl,--export-dynamic... " >&6; }
if ${ac_cv_cflags__fPIC__Wl___export_dynamic+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -fPIC -Wl,--export-dynamic"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_cflags__fPIC__Wl___export_dynamic=yes
else
ac_cv_cflags__fPIC__Wl___export_dynamic=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fPIC__Wl___export_dynamic" >&5
$as_echo "$ac_cv_cflags__fPIC__Wl___export_dynamic" >&6; }
if test $ac_cv_cflags__fPIC__Wl___export_dynamic = yes; then :
LDEXECFLAGS="-Wl,--export-dynamic"
fi
as_ac_var=`$as_echo "ac_cv_cflags_-fPIC -Wl,--rpath,\\$ORIGIN/../lib" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -Wl,--rpath,\$ORIGIN/../lib" >&5
$as_echo_n "checking whether the compiler supports -fPIC -Wl,--rpath,\$ORIGIN/../lib... " >&6; }
if eval \${$as_ac_var+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -fPIC -Wl,--rpath,\$ORIGIN/../lib"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval "$as_ac_var=yes"
else
eval "$as_ac_var=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
eval ac_res=\$$as_ac_var
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'};$as_echo "$as_val"'` = yes; then :
LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"
LDRPATH_LOCAL="-Wl,--rpath,\\\$\$ORIGIN/\$(top_builddir)/libs/wine"
else
as_ac_var=`$as_echo "ac_cv_cflags_-fPIC -Wl,-R,\\$ORIGIN/../lib" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fPIC -Wl,-R,\$ORIGIN/../lib" >&5
$as_echo_n "checking whether the compiler supports -fPIC -Wl,-R,\$ORIGIN/../lib... " >&6; }
if eval \${$as_ac_var+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -fPIC -Wl,-R,\$ORIGIN/../lib"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval "$as_ac_var=yes"
else
eval "$as_ac_var=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
eval ac_res=\$$as_ac_var
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'};$as_echo "$as_val"'` = yes; then :
LDRPATH_INSTALL="-Wl,-R,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"
LDRPATH_LOCAL="-Wl,-R,\\\$\$ORIGIN/\$(top_builddir)/libs/wine"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,--enable-new-dtags" >&5
$as_echo_n "checking whether the compiler supports -Wl,--enable-new-dtags... " >&6; }
if ${ac_cv_cflags__Wl___enable_new_dtags+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -Wl,--enable-new-dtags"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_cflags__Wl___enable_new_dtags=yes
else
ac_cv_cflags__Wl___enable_new_dtags=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl___enable_new_dtags" >&5
$as_echo "$ac_cv_cflags__Wl___enable_new_dtags" >&6; }
if test $ac_cv_cflags__Wl___enable_new_dtags = yes; then :
LDRPATH_INSTALL="$LDRPATH_INSTALL -Wl,--enable-new-dtags"
fi
case $host_cpu in
*i[3456789]86* | x86_64)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,--section-start,.interp=0x7bf00400" >&5
$as_echo_n "checking whether the compiler supports -Wl,--section-start,.interp=0x7bf00400... " >&6; }
if ${ac_cv_cflags__Wl___section_start__interp_0x7bf00400+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -Wl,--section-start,.interp=0x7bf00400"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_cflags__Wl___section_start__interp_0x7bf00400=yes
else
ac_cv_cflags__Wl___section_start__interp_0x7bf00400=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl___section_start__interp_0x7bf00400" >&5
$as_echo "$ac_cv_cflags__Wl___section_start__interp_0x7bf00400" >&6; }
if test $ac_cv_cflags__Wl___section_start__interp_0x7bf00400 = yes; then :
LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
fi
;;
esac
LIBWINE_RULES="
all: libwine.so
libwine.so: \$(OBJS) Makefile.in
\$(CC) -shared \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@
install install-lib:: libwine.so \$(DESTDIR)\$(libdir) dummy
\$(INSTALL_PROGRAM) libwine.so \$(DESTDIR)\$(libdir)/libwine.so
uninstall::
\$(RM) \$(DESTDIR)\$(libdir)/libwine.so
clean::
\$(RM) libwine.so version.c
"
;;
*) *)
DLLFLAGS="$DLLFLAGS -fPIC" DLLFLAGS="$DLLFLAGS -fPIC"
DLLEXT=".so" DLLEXT=".so"

View File

@ -878,6 +878,50 @@ clean::
"]) "])
;; ;;
linux-android*)
DLLFLAGS="$DLLFLAGS -fPIC"
DLLEXT=".so"
LDDLLFLAGS="-shared -Wl,-Bsymbolic"
WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-z,defs],
[LDDLLFLAGS="$LDDLLFLAGS,-z,defs"])
WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini],
[LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"])
WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
[AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])])
WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
[LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"
LDRPATH_LOCAL="-Wl,--rpath,\\\$\$ORIGIN/\$(top_builddir)/libs/wine"],
[WINE_TRY_CFLAGS([-fPIC -Wl,-R,\$ORIGIN/../lib],
[LDRPATH_INSTALL="-Wl,-R,\\\$\$ORIGIN/\`\$(RELPATH) \$(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"])
case $host_cpu in
*i[[3456789]]86* | x86_64)
WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
[LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"])
;;
esac
AC_SUBST(LIBWINE_RULES,["
all: libwine.so
libwine.so: \$(OBJS) Makefile.in
\$(CC) -shared \$(OBJS) \$(EXTRALIBS) \$(LDFLAGS) \$(LIBS) -o \$@
install install-lib:: libwine.so \$(DESTDIR)\$(libdir) dummy
\$(INSTALL_PROGRAM) libwine.so \$(DESTDIR)\$(libdir)/libwine.so
uninstall::
\$(RM) \$(DESTDIR)\$(libdir)/libwine.so
clean::
\$(RM) libwine.so version.c
"])
;;
*) *)
DLLFLAGS="$DLLFLAGS -fPIC" DLLFLAGS="$DLLFLAGS -fPIC"
DLLEXT=".so" DLLEXT=".so"