aclocal.m4: Allow nesting WINE_TRY_SHLIB_FLAGS.

Signed-off-by: Evgeny Litvinenko <evgeny.v.litvinenko@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Evgeny Litvinenko 2019-09-05 23:55:49 +03:00 committed by Alexandre Julliard
parent ec716e9ebd
commit 11b8bbc7b9
2 changed files with 21 additions and 7 deletions

10
aclocal.m4 vendored
View file

@ -178,10 +178,14 @@ dnl
dnl Usage: WINE_TRY_SHLIB_FLAGS(flags,[action-if-yes,[action-if-no]])
dnl
AC_DEFUN([WINE_TRY_SHLIB_FLAGS],
[ac_wine_try_cflags_saved=$CFLAGS
[AS_VAR_PUSHDEF([ac_var], ac_cv_cflags_[[$1]])dnl
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS $1"
AC_LINK_IFELSE([AC_LANG_SOURCE([void myfunc() {}])],[$2],[$3])
CFLAGS=$ac_wine_try_cflags_saved])
AC_LINK_IFELSE([AC_LANG_SOURCE([[void myfunc() {}]])],
[AS_VAR_SET(ac_var,yes)], [AS_VAR_SET(ac_var,no)])
CFLAGS=$ac_wine_try_cflags_saved
AS_VAR_IF([ac_var],[yes], [$2], [$3])dnl
AS_VAR_POPDEF([ac_var])])
dnl **** Check whether we need to define a symbol on the compiler command line ****
dnl

18
configure vendored
View file

@ -9318,13 +9318,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
void myfunc() {}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_c_dll_gnuelf="yes"
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic=yes
else
ac_cv_c_dll_gnuelf="no"
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
if test "x$ac_cv_cflags__fPIC__shared__Wl__Bsymbolic" = xyes; then :
ac_cv_c_dll_gnuelf="yes"
else
ac_cv_c_dll_gnuelf="no"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_dll_gnuelf" >&5
$as_echo "$ac_cv_c_dll_gnuelf" >&6; }
@ -9667,13 +9672,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
void myfunc() {}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_c_dll_unixware="yes"
ac_cv_cflags__fPIC__Wl__G__h_conftest_so_1_0__B_symbolic=yes
else
ac_cv_c_dll_unixware="no"
ac_cv_cflags__fPIC__Wl__G__h_conftest_so_1_0__B_symbolic=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
if test "x$ac_cv_cflags__fPIC__Wl__G__h_conftest_so_1_0__B_symbolic" = xyes; then :
ac_cv_c_dll_unixware="yes"
else
ac_cv_c_dll_unixware="no"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_dll_unixware" >&5
$as_echo "$ac_cv_c_dll_unixware" >&6; }