configure: Move cache handling into the WINE_TRY_CFLAGS macro.
This commit is contained in:
parent
d75cc5aad5
commit
182d150aa9
|
@ -65,11 +65,18 @@ dnl **** Check if we can link an empty program with special CFLAGS ****
|
||||||
dnl
|
dnl
|
||||||
dnl Usage: WINE_TRY_CFLAGS(flags,[action-if-yes,[action-if-no]])
|
dnl Usage: WINE_TRY_CFLAGS(flags,[action-if-yes,[action-if-no]])
|
||||||
dnl
|
dnl
|
||||||
|
dnl The default action-if-yes is to append the flags to EXTRACFLAGS.
|
||||||
|
dnl
|
||||||
AC_DEFUN([WINE_TRY_CFLAGS],
|
AC_DEFUN([WINE_TRY_CFLAGS],
|
||||||
|
[AS_VAR_PUSHDEF([ac_var], ac_cv_cflags_[[$1]])dnl
|
||||||
|
AC_CACHE_CHECK([whether the compiler supports $1], ac_var,
|
||||||
[ac_wine_try_cflags_saved=$CFLAGS
|
[ac_wine_try_cflags_saved=$CFLAGS
|
||||||
CFLAGS="$CFLAGS $1"
|
CFLAGS="$CFLAGS $1"
|
||||||
AC_TRY_LINK([],[],[$2],[$3])
|
AC_TRY_LINK([],[], [AS_VAR_SET(ac_var,yes)], [AS_VAR_SET(ac_var,no)])
|
||||||
CFLAGS=$ac_wine_try_cflags_saved])
|
CFLAGS=$ac_wine_try_cflags_saved])
|
||||||
|
AS_IF([test AS_VAR_GET(ac_var) = yes],
|
||||||
|
[m4_default([$2], [EXTRACFLAGS="$EXTRACFLAGS $1"])], [$3])dnl
|
||||||
|
AS_VAR_POPDEF([ac_var])])
|
||||||
|
|
||||||
dnl **** Check if we can link an empty shared lib (no main) with special CFLAGS ****
|
dnl **** Check if we can link an empty shared lib (no main) with special CFLAGS ****
|
||||||
dnl
|
dnl
|
||||||
|
|
|
@ -14386,9 +14386,10 @@ echo "${ECHO_T}$ac_cv_c_gcc_strength_bug" >&6; }
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
|
EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking for gcc -fshort-wchar support" >&5
|
|
||||||
echo $ECHO_N "checking for gcc -fshort-wchar support... $ECHO_C" >&6; }
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -fshort-wchar" >&5
|
||||||
if test "${ac_cv_c_gcc_fshort_wchar+set}" = set; then
|
echo $ECHO_N "checking whether the compiler supports -fshort-wchar... $ECHO_C" >&6; }
|
||||||
|
if test "${ac_cv_cflags__fshort_wchar+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -14442,32 +14443,31 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_gcc_fshort_wchar="yes"
|
ac_cv_cflags__fshort_wchar=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_gcc_fshort_wchar="no"
|
ac_cv_cflags__fshort_wchar=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_gcc_fshort_wchar" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__fshort_wchar" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_gcc_fshort_wchar" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__fshort_wchar" >&6; }
|
||||||
if test "$ac_cv_c_gcc_fshort_wchar" = "yes"
|
if test $ac_cv_cflags__fshort_wchar = yes; then
|
||||||
then
|
|
||||||
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define CC_FLAG_SHORT_WCHAR "-fshort-wchar"
|
#define CC_FLAG_SHORT_WCHAR "-fshort-wchar"
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking for gcc -fno-strict-aliasing support" >&5
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -fno-strict-aliasing" >&5
|
||||||
echo $ECHO_N "checking for gcc -fno-strict-aliasing support... $ECHO_C" >&6; }
|
echo $ECHO_N "checking whether the compiler supports -fno-strict-aliasing... $ECHO_C" >&6; }
|
||||||
if test "${ac_cv_c_gcc_no_strict_aliasing+set}" = set; then
|
if test "${ac_cv_cflags__fno_strict_aliasing+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -14521,28 +14521,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_gcc_no_strict_aliasing="yes"
|
ac_cv_cflags__fno_strict_aliasing=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_gcc_no_strict_aliasing="no"
|
ac_cv_cflags__fno_strict_aliasing=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_gcc_no_strict_aliasing" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__fno_strict_aliasing" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_gcc_no_strict_aliasing" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__fno_strict_aliasing" >&6; }
|
||||||
if test "$ac_cv_c_gcc_no_strict_aliasing" = "yes"
|
if test $ac_cv_cflags__fno_strict_aliasing = yes; then
|
||||||
then
|
EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking for gcc -gstabs+ support" >&5
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -gstabs+" >&5
|
||||||
echo $ECHO_N "checking for gcc -gstabs+ support... $ECHO_C" >&6; }
|
echo $ECHO_N "checking whether the compiler supports -gstabs+... $ECHO_C" >&6; }
|
||||||
if test "${ac_cv_c_gcc_gstabs+set}" = set; then
|
if test "${ac_cv_cflags__gstabsp+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -14596,28 +14595,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_gcc_gstabs="yes"
|
ac_cv_cflags__gstabsp=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_gcc_gstabs="no"
|
ac_cv_cflags__gstabsp=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_gcc_gstabs" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__gstabsp" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_gcc_gstabs" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__gstabsp" >&6; }
|
||||||
if test "$ac_cv_c_gcc_gstabs" = "yes"
|
if test $ac_cv_cflags__gstabsp = yes; then
|
||||||
then
|
EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking for gcc -Wdeclaration-after-statement support" >&5
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -Wdeclaration-after-statement" >&5
|
||||||
echo $ECHO_N "checking for gcc -Wdeclaration-after-statement support... $ECHO_C" >&6; }
|
echo $ECHO_N "checking whether the compiler supports -Wdeclaration-after-statement... $ECHO_C" >&6; }
|
||||||
if test "${ac_cv_c_gcc_decl_after_statement+set}" = set; then
|
if test "${ac_cv_cflags__Wdeclaration_after_statement+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -14671,28 +14669,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_gcc_decl_after_statement="yes"
|
ac_cv_cflags__Wdeclaration_after_statement=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_gcc_decl_after_statement="no"
|
ac_cv_cflags__Wdeclaration_after_statement=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_gcc_decl_after_statement" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__Wdeclaration_after_statement" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_gcc_decl_after_statement" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__Wdeclaration_after_statement" >&6; }
|
||||||
if test "$ac_cv_c_gcc_decl_after_statement" = "yes"
|
if test $ac_cv_cflags__Wdeclaration_after_statement = yes; then
|
||||||
then
|
EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking for gcc -Wwrite-strings support" >&5
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -Wwrite-strings" >&5
|
||||||
echo $ECHO_N "checking for gcc -Wwrite-strings support... $ECHO_C" >&6; }
|
echo $ECHO_N "checking whether the compiler supports -Wwrite-strings... $ECHO_C" >&6; }
|
||||||
if test "${ac_cv_c_gcc_write_strings+set}" = set; then
|
if test "${ac_cv_cflags__Wwrite_strings+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -14746,24 +14743,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_gcc_write_strings="yes"
|
ac_cv_cflags__Wwrite_strings=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_gcc_write_strings="no"
|
ac_cv_cflags__Wwrite_strings=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_gcc_write_strings" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__Wwrite_strings" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_gcc_write_strings" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__Wwrite_strings" >&6; }
|
||||||
if test "$ac_cv_c_gcc_write_strings" = "yes"
|
if test $ac_cv_cflags__Wwrite_strings = yes; then
|
||||||
then
|
EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings"
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings"
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -Wpointer-arith -Werror"
|
CFLAGS="$CFLAGS -Wpointer-arith -Werror"
|
||||||
|
@ -15519,9 +15516,9 @@ echo "${ECHO_T}$ac_cv_c_dll_gnuelf" >&6; }
|
||||||
then
|
then
|
||||||
LDSHARED="\$(CC) -shared"
|
LDSHARED="\$(CC) -shared"
|
||||||
LDDLLFLAGS="-shared -Wl,-Bsymbolic"
|
LDDLLFLAGS="-shared -Wl,-Bsymbolic"
|
||||||
{ echo "$as_me:$LINENO: checking whether the linker accepts soname" >&5
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -fPIC -shared -Wl,-soname,confest.so.1" >&5
|
||||||
echo $ECHO_N "checking whether the linker accepts soname... $ECHO_C" >&6; }
|
echo $ECHO_N "checking whether the compiler supports -fPIC -shared -Wl,-soname,confest.so.1... $ECHO_C" >&6; }
|
||||||
if test "${ac_cv_c_sonames+set}" = set; then
|
if test "${ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -15575,27 +15572,26 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_sonames="yes"
|
ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_sonames="no"
|
ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_sonames" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_sonames" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1" >&6; }
|
||||||
if test "$ac_cv_c_sonames" = "yes"
|
if test $ac_cv_cflags__fPIC__shared__Wl__soname_confest_so_1 = yes; then
|
||||||
then
|
LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
|
||||||
LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
|
else
|
||||||
else
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -fPIC -shared -Wl,-h,confest.so.1" >&5
|
||||||
{ echo "$as_me:$LINENO: checking check to see if -h soname is an alternate" >&5
|
echo $ECHO_N "checking whether the compiler supports -fPIC -shared -Wl,-h,confest.so.1... $ECHO_C" >&6; }
|
||||||
echo $ECHO_N "checking check to see if -h soname is an alternate... $ECHO_C" >&6; }
|
if test "${ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1+set}" = set; then
|
||||||
if test "${ac_cv_c_h_sonames+set}" = set; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -15649,29 +15645,30 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_h_sonames="yes"
|
ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_h_sonames="no"
|
ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_h_sonames" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_h_sonames" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1" >&6; }
|
||||||
if test "$ac_cv_c_h_sonames" = "yes"
|
if test $ac_cv_cflags__fPIC__shared__Wl__h_confest_so_1 = yes; then
|
||||||
then
|
LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-h,%)"
|
||||||
LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-h,%)"
|
fi
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking whether the linker accepts -z defs" >&5
|
fi
|
||||||
echo $ECHO_N "checking whether the linker accepts -z defs... $ECHO_C" >&6; }
|
|
||||||
if test "${ac_cv_c_dll_zdefs+set}" = set; then
|
|
||||||
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -fPIC -shared -Wl,-Bsymbolic,-z,defs" >&5
|
||||||
|
echo $ECHO_N "checking whether the compiler supports -fPIC -shared -Wl,-Bsymbolic,-z,defs... $ECHO_C" >&6; }
|
||||||
|
if test "${ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -15725,28 +15722,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_dll_zdefs="yes"
|
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_dll_zdefs="no"
|
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_dll_zdefs" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_dll_zdefs" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs" >&6; }
|
||||||
if test "$ac_cv_c_dll_zdefs" = "yes"
|
if test $ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__z_defs = yes; then
|
||||||
then
|
LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
|
||||||
LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking whether the linker accepts -init and -fini" >&5
|
|
||||||
echo $ECHO_N "checking whether the linker accepts -init and -fini... $ECHO_C" >&6; }
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini" >&5
|
||||||
if test "${ac_cv_c_dll_init_fini+set}" = set; then
|
echo $ECHO_N "checking whether the compiler supports -fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini... $ECHO_C" >&6; }
|
||||||
|
if test "${ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -15800,32 +15797,32 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_dll_init_fini="yes"
|
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_dll_init_fini="no"
|
ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_dll_init_fini" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_dll_init_fini" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini" >&6; }
|
||||||
if test "$ac_cv_c_dll_init_fini" = "yes"
|
if test $ac_cv_cflags__fPIC__shared__Wl__Bsymbolic__init___wine_spec_init__fini___wine_spec_fini = yes; then
|
||||||
then
|
LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
|
||||||
LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking whether the linker accepts version scripts" >&5
|
|
||||||
echo $ECHO_N "checking whether the linker accepts version scripts... $ECHO_C" >&6; }
|
echo '{ global: *; };' >conftest.map
|
||||||
if test "${ac_cv_c_ld_version_scripts+set}" = set; then
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -fPIC -shared -Wl,--version-script=conftest.map" >&5
|
||||||
|
echo $ECHO_N "checking whether the compiler supports -fPIC -shared -Wl,--version-script=conftest.map... $ECHO_C" >&6; }
|
||||||
|
if test "${ac_cv_cflags__fPIC__shared__Wl___version_script_conftest_map+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
echo '{ global: *; };' >conftest.map
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS -fPIC -shared -Wl,--version-script=conftest.map"
|
CFLAGS="$CFLAGS -fPIC -shared -Wl,--version-script=conftest.map"
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
/* confdefs.h. */
|
/* confdefs.h. */
|
||||||
|
@ -15876,29 +15873,29 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_ld_version_scripts="yes"
|
ac_cv_cflags__fPIC__shared__Wl___version_script_conftest_map=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_ld_version_scripts="no"
|
ac_cv_cflags__fPIC__shared__Wl___version_script_conftest_map=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
rm -f conftest.map
|
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_ld_version_scripts" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__fPIC__shared__Wl___version_script_conftest_map" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_ld_version_scripts" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__fPIC__shared__Wl___version_script_conftest_map" >&6; }
|
||||||
if test "$ac_cv_c_ld_version_scripts" = "yes"
|
if test $ac_cv_cflags__fPIC__shared__Wl___version_script_conftest_map = yes; then
|
||||||
then
|
LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)"
|
||||||
LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)"
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking whether the linker accepts --export-dynamic" >&5
|
rm -f conftest.map
|
||||||
echo $ECHO_N "checking whether the linker accepts --export-dynamic... $ECHO_C" >&6; }
|
|
||||||
if test "${ac_cv_c_export_dynamic+set}" = set; then
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -fPIC -Wl,--export-dynamic" >&5
|
||||||
|
echo $ECHO_N "checking whether the compiler supports -fPIC -Wl,--export-dynamic... $ECHO_C" >&6; }
|
||||||
|
if test "${ac_cv_cflags__fPIC__Wl___export_dynamic+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -15952,29 +15949,30 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_c_export_dynamic="yes"
|
ac_cv_cflags__fPIC__Wl___export_dynamic=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_c_export_dynamic="no"
|
ac_cv_cflags__fPIC__Wl___export_dynamic=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_export_dynamic" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__fPIC__Wl___export_dynamic" >&5
|
||||||
echo "${ECHO_T}$ac_cv_c_export_dynamic" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__fPIC__Wl___export_dynamic" >&6; }
|
||||||
if test "$ac_cv_c_export_dynamic" = "yes"
|
if test $ac_cv_cflags__fPIC__Wl___export_dynamic = yes; then
|
||||||
then
|
LDEXECFLAGS="-Wl,--export-dynamic"
|
||||||
LDEXECFLAGS="-Wl,--export-dynamic"
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking whether the linker accepts --rpath" >&5
|
|
||||||
echo $ECHO_N "checking whether the linker accepts --rpath... $ECHO_C" >&6; }
|
as_ac_var=`echo "ac_cv_cflags_-fPIC -Wl,--rpath,\$ORIGIN/../lib" | $as_tr_sh`
|
||||||
if test "${ac_cv_ld_rpath+set}" = set; then
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -fPIC -Wl,--rpath,\$ORIGIN/../lib" >&5
|
||||||
|
echo $ECHO_N "checking whether the compiler supports -fPIC -Wl,--rpath,\$ORIGIN/../lib... $ECHO_C" >&6; }
|
||||||
|
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -16028,31 +16026,32 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_ld_rpath="yes"
|
eval "$as_ac_var=yes"
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_ld_rpath="no"
|
eval "$as_ac_var=no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_ld_rpath" >&5
|
ac_res=`eval echo '${'$as_ac_var'}'`
|
||||||
echo "${ECHO_T}$ac_cv_ld_rpath" >&6; }
|
{ echo "$as_me:$LINENO: result: $ac_res" >&5
|
||||||
if test "$ac_cv_ld_rpath" = "yes"
|
echo "${ECHO_T}$ac_res" >&6; }
|
||||||
then
|
if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||||
LDEXERPATH="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"
|
LDEXERPATH="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
*i[3456789]86* | x86_64)
|
*i[3456789]86* | x86_64)
|
||||||
{ echo "$as_me:$LINENO: checking whether we can relocate the executable to 0x7bf00000" >&5
|
{ echo "$as_me:$LINENO: checking whether the compiler supports -Wl,--section-start,.interp=0x7bf00400" >&5
|
||||||
echo $ECHO_N "checking whether we can relocate the executable to 0x7bf00000... $ECHO_C" >&6; }
|
echo $ECHO_N "checking whether the compiler supports -Wl,--section-start,.interp=0x7bf00400... $ECHO_C" >&6; }
|
||||||
if test "${ac_cv_ld_reloc_exec+set}" = set; then
|
if test "${ac_cv_cflags__Wl___section_start__interp_0x7bf00400+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
ac_wine_try_cflags_saved=$CFLAGS
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
@ -16106,24 +16105,24 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
ac_cv_ld_reloc_exec="yes"
|
ac_cv_cflags__Wl___section_start__interp_0x7bf00400=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_ld_reloc_exec="no"
|
ac_cv_cflags__Wl___section_start__interp_0x7bf00400=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
CFLAGS=$ac_wine_try_cflags_saved
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
fi
|
fi
|
||||||
{ echo "$as_me:$LINENO: result: $ac_cv_ld_reloc_exec" >&5
|
{ echo "$as_me:$LINENO: result: $ac_cv_cflags__Wl___section_start__interp_0x7bf00400" >&5
|
||||||
echo "${ECHO_T}$ac_cv_ld_reloc_exec" >&6; }
|
echo "${ECHO_T}$ac_cv_cflags__Wl___section_start__interp_0x7bf00400" >&6; }
|
||||||
if test "$ac_cv_ld_reloc_exec" = "yes"
|
if test $ac_cv_cflags__Wl___section_start__interp_0x7bf00400 = yes; then
|
||||||
then
|
LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
|
||||||
LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
|
fi
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
124
configure.ac
124
configure.ac
|
@ -915,47 +915,15 @@ int main(void) {
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
|
EXTRACFLAGS="$EXTRACFLAGS -fno-strength-reduce"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Check for -fshort-wchar
|
dnl Check for some compiler flags
|
||||||
AC_CACHE_CHECK([for gcc -fshort-wchar support], ac_cv_c_gcc_fshort_wchar,
|
|
||||||
[WINE_TRY_CFLAGS([-fshort-wchar],
|
|
||||||
ac_cv_c_gcc_fshort_wchar="yes",ac_cv_c_gcc_fshort_wchar="no")])
|
|
||||||
if test "$ac_cv_c_gcc_fshort_wchar" = "yes"
|
|
||||||
then
|
|
||||||
AC_DEFINE(CC_FLAG_SHORT_WCHAR, "-fshort-wchar", [Specifies the compiler flag that forces a short wchar_t])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Check for -fno-strict-aliasing
|
WINE_TRY_CFLAGS([-fshort-wchar],
|
||||||
AC_CACHE_CHECK([for gcc -fno-strict-aliasing support], ac_cv_c_gcc_no_strict_aliasing,
|
[AC_DEFINE(CC_FLAG_SHORT_WCHAR, "-fshort-wchar",
|
||||||
[WINE_TRY_CFLAGS([-fno-strict-aliasing],
|
[Specifies the compiler flag that forces a short wchar_t])])
|
||||||
ac_cv_c_gcc_no_strict_aliasing="yes",ac_cv_c_gcc_no_strict_aliasing="no")])
|
WINE_TRY_CFLAGS([-fno-strict-aliasing])
|
||||||
if test "$ac_cv_c_gcc_no_strict_aliasing" = "yes"
|
WINE_TRY_CFLAGS([-gstabs+])
|
||||||
then
|
WINE_TRY_CFLAGS([-Wdeclaration-after-statement])
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
|
WINE_TRY_CFLAGS([-Wwrite-strings])
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Check for -gstabs+ option
|
|
||||||
AC_CACHE_CHECK([for gcc -gstabs+ support], ac_cv_c_gcc_gstabs,
|
|
||||||
[WINE_TRY_CFLAGS([-gstabs+],ac_cv_c_gcc_gstabs="yes", ac_cv_c_gcc_gstabs="no")])
|
|
||||||
if test "$ac_cv_c_gcc_gstabs" = "yes"
|
|
||||||
then
|
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -gstabs+"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Check for -Wdeclaration-after-statement option
|
|
||||||
AC_CACHE_CHECK([for gcc -Wdeclaration-after-statement support], ac_cv_c_gcc_decl_after_statement,
|
|
||||||
[WINE_TRY_CFLAGS([-Wdeclaration-after-statement],ac_cv_c_gcc_decl_after_statement="yes", ac_cv_c_gcc_decl_after_statement="no")])
|
|
||||||
if test "$ac_cv_c_gcc_decl_after_statement" = "yes"
|
|
||||||
then
|
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -Wdeclaration-after-statement"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Check for -Wwrite-strings
|
|
||||||
AC_CACHE_CHECK([for gcc -Wwrite-strings support], ac_cv_c_gcc_write_strings,
|
|
||||||
[WINE_TRY_CFLAGS([-Wwrite-strings],ac_cv_c_gcc_write_strings="yes", ac_cv_c_gcc_write_strings="no")])
|
|
||||||
if test "$ac_cv_c_gcc_write_strings" = "yes"
|
|
||||||
then
|
|
||||||
EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Check for noisy string.h
|
dnl Check for noisy string.h
|
||||||
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
@ -1079,73 +1047,31 @@ case $host_os in
|
||||||
then
|
then
|
||||||
LDSHARED="\$(CC) -shared"
|
LDSHARED="\$(CC) -shared"
|
||||||
LDDLLFLAGS="-shared -Wl,-Bsymbolic"
|
LDDLLFLAGS="-shared -Wl,-Bsymbolic"
|
||||||
AC_CACHE_CHECK([whether the linker accepts soname], ac_cv_c_sonames,
|
WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,confest.so.1],
|
||||||
[WINE_TRY_CFLAGS([-fPIC -shared -Wl,-soname,confest.so.1],
|
[LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"],
|
||||||
ac_cv_c_sonames="yes",ac_cv_c_sonames="no")])
|
[WINE_TRY_CFLAGS([-fPIC -shared -Wl,-h,confest.so.1],
|
||||||
if test "$ac_cv_c_sonames" = "yes"
|
[LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-h,%)"])])
|
||||||
then
|
|
||||||
LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-soname,%)"
|
|
||||||
else
|
|
||||||
AC_CACHE_CHECK([check to see if -h soname is an alternate], ac_cv_c_h_sonames,
|
|
||||||
[WINE_TRY_CFLAGS([-fPIC -shared -Wl,-h,confest.so.1],
|
|
||||||
ac_cv_c_h_sonames="yes",ac_cv_c_h_sonames="no")])
|
|
||||||
if test "$ac_cv_c_h_sonames" = "yes"
|
|
||||||
then
|
|
||||||
LDSHARED="\$(CC) -shared \$(SONAME:%=-Wl,-h,%)"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether the linker accepts -z defs], ac_cv_c_dll_zdefs,
|
WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-z,defs], [LDDLLFLAGS="$LDDLLFLAGS,-z,defs"])
|
||||||
[WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-z,defs],
|
|
||||||
ac_cv_c_dll_zdefs="yes",ac_cv_c_dll_zdefs="no")])
|
|
||||||
if test "$ac_cv_c_dll_zdefs" = "yes"
|
|
||||||
then
|
|
||||||
LDDLLFLAGS="$LDDLLFLAGS,-z,defs"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether the linker accepts -init and -fini], ac_cv_c_dll_init_fini,
|
WINE_TRY_CFLAGS([-fPIC -shared -Wl,-Bsymbolic,-init,__wine_spec_init,-fini,__wine_spec_fini],
|
||||||
[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"])
|
||||||
ac_cv_c_dll_init_fini="yes",ac_cv_c_dll_init_fini="no")])
|
|
||||||
if test "$ac_cv_c_dll_init_fini" = "yes"
|
|
||||||
then
|
|
||||||
LDDLLFLAGS="$LDDLLFLAGS,-init,__wine_spec_init,-fini,__wine_spec_fini"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether the linker accepts version scripts], ac_cv_c_ld_version_scripts,
|
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],
|
[LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)"])
|
||||||
ac_cv_c_ld_version_scripts="yes",ac_cv_c_ld_version_scripts="no")
|
rm -f conftest.map
|
||||||
rm -f conftest.map])
|
|
||||||
if test "$ac_cv_c_ld_version_scripts" = "yes"
|
|
||||||
then
|
|
||||||
LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether the linker accepts --export-dynamic], ac_cv_c_export_dynamic,
|
WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
|
||||||
[WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
|
[AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])])
|
||||||
ac_cv_c_export_dynamic="yes",ac_cv_c_export_dynamic="no")])
|
|
||||||
if test "$ac_cv_c_export_dynamic" = "yes"
|
|
||||||
then
|
|
||||||
AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether the linker accepts --rpath], ac_cv_ld_rpath,
|
WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
|
||||||
[WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
|
[AC_SUBST(LDEXERPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"])])
|
||||||
ac_cv_ld_rpath="yes",ac_cv_ld_rpath="no")])
|
|
||||||
if test "$ac_cv_ld_rpath" = "yes"
|
|
||||||
then
|
|
||||||
AC_SUBST(LDEXERPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"])
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
*i[[3456789]]86* | x86_64)
|
*i[[3456789]]86* | x86_64)
|
||||||
AC_CACHE_CHECK([whether we can relocate the executable to 0x7bf00000], ac_cv_ld_reloc_exec,
|
WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
|
||||||
[WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
|
[LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"])
|
||||||
ac_cv_ld_reloc_exec="yes", ac_cv_ld_reloc_exec="no")])
|
|
||||||
if test "$ac_cv_ld_reloc_exec" = "yes"
|
|
||||||
then
|
|
||||||
LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue