Commit 57807fa1 authored by Gregg Mattinson's avatar Gregg Mattinson Committed by Alexandre Julliard

Added checks for __sparc__, __sun__ and @function.

parent 5fb46a49
......@@ -9506,6 +9506,71 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking whether @function is defined" >&5
echo $ECHO_N "checking whether @function is defined... $ECHO_C" >&6
if test "${ac_cv_at_function_is_defined+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_try_asm_link_saved_libs=$LIBS
LIBS="conftest_asm.s $LIBS"
cat > conftest_asm.s <<EOF
.globl _ac_test
.type _ac_test,@function
_ac_test:
.long 0
EOF
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_at_function_is_defined="yes"
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_at_function_is_defined="no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
rm -f conftest_asm.s
LIBS=$ac_try_asm_link_saved_libs
fi
echo "$as_me:$LINENO: result: $ac_cv_at_function_is_defined" >&5
echo "${ECHO_T}$ac_cv_at_function_is_defined" >&6
if test "$ac_cv_at_function_is_defined" = "yes"
then
cat >>confdefs.h <<\_ACEOF
#define AT_FUNCTION_IS_DEFINED 1
_ACEOF
fi
echo "$as_me:$LINENO: checking whether external symbols need an underscore prefix" >&5
echo $ECHO_N "checking whether external symbols need an underscore prefix... $ECHO_C" >&6
if test "${ac_cv_c_extern_prefix+set}" = set; then
......@@ -13347,6 +13412,74 @@ then
fi
case $host_cpu in
*sparc* )
echo "$as_me:$LINENO: checking whether we need to define __sparc__" >&5
echo $ECHO_N "checking whether we need to define __sparc__... $ECHO_C" >&6
if test "${ac_cv_cpp_def_sparc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#ifndef __sparc__
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
ac_cv_cpp_def_sparc="yes"
else
ac_cv_cpp_def_sparc="no"
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $ac_cv_cpp_def_sparc" >&5
echo "${ECHO_T}$ac_cv_cpp_def_sparc" >&6
;;
esac
if test "$ac_cv_cpp_def_sparc" = "yes"
then
CFLAGS="$CFLAGS -D__sparc__"
LINTFLAGS="$LINTFLAGS -D__sparc__"
fi
case $host_vendor in
*sun* )
echo "$as_me:$LINENO: checking whether we need to define __sun__" >&5
echo $ECHO_N "checking whether we need to define __sun__... $ECHO_C" >&6
if test "${ac_cv_cpp_def_sun+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#ifndef __sun__
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
ac_cv_cpp_def_sun="yes"
else
ac_cv_cpp_def_sun="no"
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $ac_cv_cpp_def_sun" >&5
echo "${ECHO_T}$ac_cv_cpp_def_sun" >&6
;;
esac
if test "$ac_cv_cpp_def_sun" = "yes"
then
CFLAGS="$CFLAGS -D__sun__"
LINTFLAGS="$LINTFLAGS -D__sun__"
fi
......
......@@ -657,6 +657,20 @@ then
AC_DEFINE(NEED_TYPE_IN_DEF, 1, [Define if .type asm directive must be inside a .def directive])
fi
dnl **** Check if @function is defined ****
AC_CACHE_CHECK([whether @function is defined], ac_cv_at_function_is_defined,
WINE_TRY_ASM_LINK(
[ .globl _ac_test
.type _ac_test,@function
_ac_test:
.long 0],,,
ac_cv_at_function_is_defined="yes",ac_cv_at_function_is_defined="no"))
if test "$ac_cv_at_function_is_defined" = "yes"
then
AC_DEFINE(AT_FUNCTION_IS_DEFINED, 1, [Define if @function is defined])
fi
dnl **** Check for underscore on external symbols ****
AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
......@@ -1212,6 +1226,40 @@ then
LINTFLAGS="$LINTFLAGS -D__i386__"
fi
dnl *** check for the need to define __sparc__
case $host_cpu in
*sparc* )
AC_CACHE_CHECK([whether we need to define __sparc__],ac_cv_cpp_def_sparc,
AC_EGREP_CPP(yes,[#ifndef __sparc__
yes
#endif],
ac_cv_cpp_def_sparc="yes", ac_cv_cpp_def_sparc="no"))
;;
esac
if test "$ac_cv_cpp_def_sparc" = "yes"
then
CFLAGS="$CFLAGS -D__sparc__"
LINTFLAGS="$LINTFLAGS -D__sparc__"
fi
dnl *** check for the need to define __sun__
case $host_vendor in
*sun* )
AC_CACHE_CHECK([whether we need to define __sun__],ac_cv_cpp_def_sun,
AC_EGREP_CPP(yes,[#ifndef __sun__
yes
#endif],
ac_cv_cpp_def_sun="yes", ac_cv_cpp_def_sun="no"))
;;
esac
if test "$ac_cv_cpp_def_sun" = "yes"
then
CFLAGS="$CFLAGS -D__sun__"
LINTFLAGS="$LINTFLAGS -D__sun__"
fi
dnl **** Generate output files ****
AH_TOP([#define __WINE_CONFIG_H])
......
......@@ -2,6 +2,9 @@
#define __WINE_CONFIG_H
/* Define if is defined */
#undef AT_FUNCTION_IS_DEFINED
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
......
......@@ -139,8 +139,10 @@ struct statfs;
#ifdef NEED_TYPE_IN_DEF
# define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"
#else
#elif defined(AT_FUNCTION_IS_DEFINED)
# define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",@function"
#else
# define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",2"
#endif
#ifdef __GNUC__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment