+m4_include(../config/acx.m4)
+m4_include(../config/no-executables.m4)
+
dnl Check:
dnl * If we have gettimeofday;
dnl * If we have struct timezone for use in calling it;
AC_CACHE_CHECK([whether the target supports symbol aliases],
have_attribute_alias, [
AC_TRY_LINK([
-#define ULP STR1(__USER_LABEL_PREFIX__)
-#define STR1(x) STR2(x)
-#define STR2(x) #x
void foo(void) { }
-extern void bar(void) __attribute__((alias(ULP "foo")));],
+extern void bar(void) __attribute__((alias("foo")));],
[bar();], have_attribute_alias=yes, have_attribute_alias=no)])
if test $have_attribute_alias = yes; then
AC_DEFINE(HAVE_ATTRIBUTE_ALIAS, 1,
fi])
dnl Check for pragma weak.
-AC_DEFUN([LIBGFOR_CHECK_PRAGMA_WEAK], [
+AC_DEFUN([LIBGFOR_GTHREAD_WEAK], [
AC_CACHE_CHECK([whether pragma weak works],
have_pragma_weak, [
gfor_save_CFLAGS="$CFLAGS"
#pragma weak foo], [if (foo) foo ();],
have_pragma_weak=yes, have_pragma_weak=no)])
if test $have_pragma_weak = yes; then
- AC_DEFINE(HAVE_PRAGMA_WEAK, 1,
+ AC_DEFINE(SUPPORTS_WEAK, 1,
[Define to 1 if the target supports #pragma weak])
- fi])
+ fi
+ case "$host" in
+ *-*-darwin* | *-*-hpux* | *-*-cygwin*)
+ AC_DEFINE(GTHREAD_USE_WEAK, 0,
+ [Define to 0 if the target shouldn't use #pragma weak])
+ ;;
+ esac])
dnl Check whether target can unlink a file still open.
AC_DEFUN([LIBGFOR_CHECK_UNLINK_OPEN_FILE], [