summaryrefslogtreecommitdiff
path: root/libgfortran/acinclude.m4
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-28 19:51:02 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-28 19:51:02 +0000
commit0a207fde24528c60297d015564b130a1a1c00a94 (patch)
treee17bf7f18101609827ebfd58ef895adaef0032b4 /libgfortran/acinclude.m4
parentc7f9ce23dfbeebb6fb3c6d9ffc1f355866067c4e (diff)
downloadgcc-0a207fde24528c60297d015564b130a1a1c00a94.tar.gz
libfortran/24991
* acinclude.m4 (LIBGFOR_CHECK_PRAGMA_WEAK): Rename to... (LIBGFOR_GTHREAD_WEAK): ... this. Define SUPPORTS_WEAK rather than HAVE_PRAGMA_WEAK. Define GTHREAD_USE_WEAK to 0 on hosts that shouldn't use weak in gthr.h. * configure.ac: Use LIBGFOR_GTHREAD_WEAK instead of LIBGFOR_CHECK_PRAGMA_WEAK. * config.h.in: Regenerated. * configure: Regenerated. * io/io.h (SUPPORTS_WEAK): Don't define here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107616 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/acinclude.m4')
-rw-r--r--libgfortran/acinclude.m412
1 files changed, 9 insertions, 3 deletions
diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4
index 9d06a8b84d4..3af0c0ea476 100644
--- a/libgfortran/acinclude.m4
+++ b/libgfortran/acinclude.m4
@@ -174,7 +174,7 @@ target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`])
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"
@@ -183,9 +183,15 @@ AC_DEFUN([LIBGFOR_CHECK_PRAGMA_WEAK], [
#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], [