OSDN Git Service

* alias.c (init_alias_analysis): Remove simplification loop
[pf3gnuchains/gcc-fork.git] / libgfortran / acinclude.m4
index 9d06a8b..73d67e1 100644 (file)
@@ -1,3 +1,6 @@
+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;
@@ -138,11 +141,8 @@ AC_DEFUN([LIBGFOR_CHECK_ATTRIBUTE_ALIAS], [
   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,
@@ -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], [