re PR libfortran/51119 (MATMUL slow for large matrices)
[platform/upstream/gcc.git] / libgfortran / configure
index a4951bf..c052027 100755 (executable)
@@ -641,6 +641,8 @@ RANLIB
 AR
 AS
 SECTION_FLAGS
+LIBGFOR_MINIMAL_FALSE
+LIBGFOR_MINIMAL_TRUE
 LIBGFOR_USE_SYMVER_SUN_FALSE
 LIBGFOR_USE_SYMVER_SUN_TRUE
 LIBGFOR_USE_SYMVER_GNU_FALSE
@@ -774,7 +776,6 @@ with_gnu_ld
 enable_libtool_lock
 enable_largefile
 enable_libquadmath_support
-with_system_libunwind
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1433,7 +1434,6 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
-  --with-system-libunwind use installed libunwind
 
 Some influential environment variables:
   CC          C compiler command
@@ -2549,6 +2549,7 @@ as_fn_append ac_header_list " fptrap.h"
 as_fn_append ac_header_list " fpxcp.h"
 as_fn_append ac_header_list " pwd.h"
 as_fn_append ac_header_list " complex.h"
+as_fn_append ac_header_list " xlocale.h"
 as_fn_append ac_func_list " getrusage"
 as_fn_append ac_func_list " times"
 as_fn_append ac_func_list " mkstemp"
@@ -2568,16 +2569,8 @@ as_fn_append ac_func_list " ttyname"
 as_fn_append ac_func_list " alarm"
 as_fn_append ac_func_list " access"
 as_fn_append ac_func_list " fork"
-as_fn_append ac_func_list " execl"
-as_fn_append ac_func_list " wait"
 as_fn_append ac_func_list " setmode"
-as_fn_append ac_func_list " execve"
-as_fn_append ac_func_list " pipe"
-as_fn_append ac_func_list " dup2"
-as_fn_append ac_func_list " close"
 as_fn_append ac_func_list " fcntl"
-as_fn_append ac_func_list " strcasestr"
-as_fn_append ac_func_list " getrlimit"
 as_fn_append ac_func_list " gettimeofday"
 as_fn_append ac_func_list " stat"
 as_fn_append ac_func_list " fstat"
@@ -2591,10 +2584,8 @@ as_fn_append ac_func_list " gmtime_r"
 as_fn_append ac_func_list " getpwuid_r"
 as_fn_append ac_func_list " ttyname_r"
 as_fn_append ac_func_list " clock_gettime"
-as_fn_append ac_func_list " readlink"
 as_fn_append ac_func_list " getgid"
 as_fn_append ac_func_list " getpid"
-as_fn_append ac_func_list " getppid"
 as_fn_append ac_func_list " getuid"
 as_fn_append ac_func_list " geteuid"
 as_fn_append ac_func_list " umask"
@@ -2604,6 +2595,10 @@ as_fn_append ac_func_list " __secure_getenv"
 as_fn_append ac_func_list " mkostemp"
 as_fn_append ac_func_list " strnlen"
 as_fn_append ac_func_list " strndup"
+as_fn_append ac_func_list " newlocale"
+as_fn_append ac_func_list " freelocale"
+as_fn_append ac_func_list " uselocale"
+as_fn_append ac_func_list " strerror_l"
 as_fn_append ac_header_list " math.h"
 # Check that the precious variables saved in the cache have kept the same
 # value.
@@ -5777,7 +5772,7 @@ if test "x$GCC" = "xyes"; then
   ## We like to use C11 and C99 routines when available.  This makes
   ## sure that
   ## __STDC_VERSION__ is set such that libc includes make them available.
-  AM_CFLAGS="-std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -Werror=implicit-function-declaration"
+  AM_CFLAGS="-std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -Werror=implicit-function-declaration -Werror=vla"
   ## Compile the following tests with the same system header contents
   ## that we'll encounter when compiling our own source files.
   CFLAGS="-std=gnu11 $CFLAGS"
@@ -5889,6 +5884,25 @@ else
 fi
 
 
+# For GPU offloading, not everything in libfortran can be supported.
+# Currently, the only target that has this problem is nvptx.  The
+# following is a (partial) list of features that are unsupportable on
+# this particular target:
+# * Constructors
+# * alloca
+# * C library support for I/O, with printf as the one notable exception
+# * C library support for other features such as signal, environment
+#   variables, time functions
+
+ if test "x${target_cpu}" = xnvptx; then
+  LIBGFOR_MINIMAL_TRUE=
+  LIBGFOR_MINIMAL_FALSE='#'
+else
+  LIBGFOR_MINIMAL_TRUE='#'
+  LIBGFOR_MINIMAL_FALSE=
+fi
+
+
 # Figure out whether the compiler supports "-ffunction-sections -fdata-sections",
 # similarly to how libstdc++ does it
 ac_test_CFLAGS="${CFLAGS+set}"
@@ -8810,7 +8824,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
        10.0,*86*-darwin8*|10.0,*-darwin[91]*)
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[012]*)
+       10.[012][,.]*)
          _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
        10.*)
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -10112,7 +10126,7 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
         && test "$tmp_diet" = no
       then
-       tmp_addflag=
+       tmp_addflag=' $pic_flag'
        tmp_sharedflag='-shared'
        case $cc_basename,$host_cpu in
         pgcc*)                         # Portland Group C compiler
@@ -10294,7 +10308,7 @@ _LT_EOF
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
          export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
        else
-         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
        fi
        aix_use_runtimelinking=no
 
@@ -12349,7 +12363,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12352 "configure"
+#line 12366 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12455,7 +12469,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12458 "configure"
+#line 12472 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13961,7 +13975,7 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
         && test "$tmp_diet" = no
       then
-       tmp_addflag=
+       tmp_addflag=' $pic_flag'
        tmp_sharedflag='-shared'
        case $cc_basename,$host_cpu in
         pgcc*)                         # Portland Group C compiler
@@ -14143,7 +14157,7 @@ _LT_EOF
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
          export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
        else
-         export_symbols_cmds_FC='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         export_symbols_cmds_FC='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
        fi
        aix_use_runtimelinking=no
 
@@ -16018,6 +16032,8 @@ done
 
 
 
+
+
 inttype_headers=`echo inttypes.h sys/inttypes.h  | sed -e 's/,/ /g'`
 
 acx_cv_header_stdint=stddef.h
@@ -16452,8 +16468,15 @@ _ACEOF
 fi
 
 
+case "${host}--x${with_newlib}" in
+  mips*--xyes)
+    hardwire_newlib=1;;
+  nvptx*--xyes)
+    hardwire_newlib=1;;
+esac
+
 # Check for library functions.
-if test "x${with_newlib}" = "xyes"; then
+if test "${hardwire_newlib:-0}" -eq 1; then
    # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
    # may not work correctly, because the compiler may not be able to
    # link executables.
@@ -16467,9 +16490,6 @@ $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
 $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
 
 
-$as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h
-
-
 $as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
 
 
@@ -16609,18 +16629,6 @@ done
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
 fi
 
 # Check strerror_r, cannot be above as versions with two and three arguments exist
@@ -20855,54 +20863,6 @@ _ACEOF
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for powl" >&5
-$as_echo_n "checking for powl... " >&6; }
-if test "${gcc_cv_math_func_powl+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
-int (*ptr)() = (int (*)())powl;
-
-int
-main ()
-{
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_math_func_powl=yes
-else
-  gcc_cv_math_func_powl=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_powl" >&5
-$as_echo "$gcc_cv_math_func_powl" >&6; }
-  if test $gcc_cv_math_func_powl = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_POWL 1
-_ACEOF
-
-  fi
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpowf" >&5
 $as_echo_n "checking for cpowf... " >&6; }
 if test "${gcc_cv_math_func_cpowf+set}" = set; then :
@@ -23303,54 +23263,6 @@ _ACEOF
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for erfl" >&5
-$as_echo_n "checking for erfl... " >&6; }
-if test "${gcc_cv_math_func_erfl+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
-int (*ptr)() = (int (*)())erfl;
-
-int
-main ()
-{
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_math_func_erfl=yes
-else
-  gcc_cv_math_func_erfl=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_erfl" >&5
-$as_echo "$gcc_cv_math_func_erfl" >&6; }
-  if test $gcc_cv_math_func_erfl = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ERFL 1
-_ACEOF
-
-  fi
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for erfcf" >&5
 $as_echo_n "checking for erfcf... " >&6; }
 if test "${gcc_cv_math_func_erfcf+set}" = set; then :
@@ -23591,54 +23503,6 @@ _ACEOF
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for j0l" >&5
-$as_echo_n "checking for j0l... " >&6; }
-if test "${gcc_cv_math_func_j0l+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
-int (*ptr)() = (int (*)())j0l;
-
-int
-main ()
-{
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_math_func_j0l=yes
-else
-  gcc_cv_math_func_j0l=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_j0l" >&5
-$as_echo "$gcc_cv_math_func_j0l" >&6; }
-  if test $gcc_cv_math_func_j0l = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_J0L 1
-_ACEOF
-
-  fi
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for j1f" >&5
 $as_echo_n "checking for j1f... " >&6; }
 if test "${gcc_cv_math_func_j1f+set}" = set; then :
@@ -23735,54 +23599,6 @@ _ACEOF
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for j1l" >&5
-$as_echo_n "checking for j1l... " >&6; }
-if test "${gcc_cv_math_func_j1l+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
-int (*ptr)() = (int (*)())j1l;
-
-int
-main ()
-{
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_math_func_j1l=yes
-else
-  gcc_cv_math_func_j1l=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_j1l" >&5
-$as_echo "$gcc_cv_math_func_j1l" >&6; }
-  if test $gcc_cv_math_func_j1l = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_J1L 1
-_ACEOF
-
-  fi
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jnf" >&5
 $as_echo_n "checking for jnf... " >&6; }
 if test "${gcc_cv_math_func_jnf+set}" = set; then :
@@ -24023,54 +23839,6 @@ _ACEOF
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for y0l" >&5
-$as_echo_n "checking for y0l... " >&6; }
-if test "${gcc_cv_math_func_y0l+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
-int (*ptr)() = (int (*)())y0l;
-
-int
-main ()
-{
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_math_func_y0l=yes
-else
-  gcc_cv_math_func_y0l=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_y0l" >&5
-$as_echo "$gcc_cv_math_func_y0l" >&6; }
-  if test $gcc_cv_math_func_y0l = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_Y0L 1
-_ACEOF
-
-  fi
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for y1f" >&5
 $as_echo_n "checking for y1f... " >&6; }
 if test "${gcc_cv_math_func_y1f+set}" = set; then :
@@ -24167,54 +23935,6 @@ _ACEOF
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for y1l" >&5
-$as_echo_n "checking for y1l... " >&6; }
-if test "${gcc_cv_math_func_y1l+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
-int (*ptr)() = (int (*)())y1l;
-
-int
-main ()
-{
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_math_func_y1l=yes
-else
-  gcc_cv_math_func_y1l=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_y1l" >&5
-$as_echo "$gcc_cv_math_func_y1l" >&6; }
-  if test $gcc_cv_math_func_y1l = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_Y1L 1
-_ACEOF
-
-  fi
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ynf" >&5
 $as_echo_n "checking for ynf... " >&6; }
 if test "${gcc_cv_math_func_ynf+set}" = set; then :
@@ -24455,54 +24175,6 @@ _ACEOF
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgammal" >&5
-$as_echo_n "checking for tgammal... " >&6; }
-if test "${gcc_cv_math_func_tgammal+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
-int (*ptr)() = (int (*)())tgammal;
-
-int
-main ()
-{
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_math_func_tgammal=yes
-else
-  gcc_cv_math_func_tgammal=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_tgammal" >&5
-$as_echo "$gcc_cv_math_func_tgammal" >&6; }
-  if test $gcc_cv_math_func_tgammal = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_TGAMMAL 1
-_ACEOF
-
-  fi
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgamma" >&5
 $as_echo_n "checking for lgamma... " >&6; }
 if test "${gcc_cv_math_func_lgamma+set}" = set; then :
@@ -24597,54 +24269,6 @@ _ACEOF
   fi
 
 
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgammal" >&5
-$as_echo_n "checking for lgammal... " >&6; }
-if test "${gcc_cv_math_func_lgammal+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
-int (*ptr)() = (int (*)())lgammal;
-
-int
-main ()
-{
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_math_func_lgammal=yes
-else
-  gcc_cv_math_func_lgammal=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_lgammal" >&5
-$as_echo "$gcc_cv_math_func_lgammal" >&6; }
-  if test $gcc_cv_math_func_lgammal = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LGAMMAL 1
-_ACEOF
-
-  fi
-
-
 # Check for GFORTRAN_C99_1.1 funcs
 
 
@@ -26046,7 +25670,9 @@ $as_echo "#define HAVE_FPSETMASK 1" >>confdefs.h
   fi
 
 ac_fn_c_check_type "$LINENO" "fp_except" "ac_cv_type_fp_except" "
+#ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
+#endif
 #include <math.h>
 
 "
@@ -26059,7 +25685,9 @@ _ACEOF
 
 fi
 ac_fn_c_check_type "$LINENO" "fp_except_t" "ac_cv_type_fp_except_t" "
+#ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
+#endif
 #include <math.h>
 
 "
@@ -26073,7 +25701,9 @@ _ACEOF
 fi
 
 ac_fn_c_check_type "$LINENO" "fp_rnd" "ac_cv_type_fp_rnd" "
+#ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
+#endif
 #include <math.h>
 
 "
@@ -26086,7 +25716,9 @@ _ACEOF
 
 fi
 ac_fn_c_check_type "$LINENO" "fp_rnd_t" "ac_cv_type_fp_rnd_t" "
+#ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
+#endif
 #include <math.h>
 
 "
@@ -26245,41 +25877,6 @@ $as_echo "#define HAVE_ATTRIBUTE_VISIBILITY 1" >>confdefs.h
 
   fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports dllexport" >&5
-$as_echo_n "checking whether the target supports dllexport... " >&6; }
-if test "${libgfor_cv_have_attribute_dllexport+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -Werror"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-void __attribute__((dllexport)) foo(void) { }
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  libgfor_cv_have_attribute_dllexport=yes
-else
-  libgfor_cv_have_attribute_dllexport=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS="$save_CFLAGS"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have_attribute_dllexport" >&5
-$as_echo "$libgfor_cv_have_attribute_dllexport" >&6; }
-  if test $libgfor_cv_have_attribute_dllexport = yes; then
-
-$as_echo "#define HAVE_ATTRIBUTE_DLLEXPORT 1" >>confdefs.h
-
-  fi
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports symbol aliases" >&5
 $as_echo_n "checking whether the target supports symbol aliases... " >&6; }
 if test "${libgfor_cv_have_attribute_alias+set}" = set; then :
@@ -26397,13 +25994,56 @@ $as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h
 
   fi
   case "$host" in
-    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
+    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
 
 $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
 
       ;;
   esac
 
+# Check out weakref support.
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports weakref" >&5
+$as_echo_n "checking whether the target supports weakref... " >&6; }
+if test "${libgfor_cv_have_weakref+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Wunknown-pragmas -Werror"
+  if test x$gcc_no_link = xyes; then
+  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+static int mytoto (int) __attribute__((__weakref__("toto")));
+
+int
+main ()
+{
+return (mytoto != 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  libgfor_cv_have_weakref=yes
+else
+  libgfor_cv_have_weakref=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  CFLAGS="$save_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have_weakref" >&5
+$as_echo "$libgfor_cv_have_weakref" >&6; }
+  if test $libgfor_cv_have_weakref = yes; then
+
+$as_echo "#define SUPPORTS_WEAKREF 1" >>confdefs.h
+
+  fi
+
 # Various other checks on target
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target can unlink an open file" >&5
@@ -26534,44 +26174,6 @@ $as_echo "#define HAVE_CRLF 1" >>confdefs.h
 
 fi
 
-# Check whether we have _Unwind_GetIPInfo for backtrace
-
-
-# Check whether --with-system-libunwind was given.
-if test "${with_system_libunwind+set}" = set; then :
-  withval=$with_system_libunwind;
-fi
-
-  # If system-libunwind was not specifically set, pick a default setting.
-  if test x$with_system_libunwind = x; then
-    case ${target} in
-      ia64-*-hpux*) with_system_libunwind=yes ;;
-      *) with_system_libunwind=no ;;
-    esac
-  fi
-  # Based on system-libunwind and target, do we have ipinfo?
-  if  test x$with_system_libunwind = xyes; then
-    case ${target} in
-      ia64-*-*) have_unwind_getipinfo=no ;;
-      *) have_unwind_getipinfo=yes ;;
-    esac
-  else
-    # Darwin before version 9 does not have _Unwind_GetIPInfo.
-
-    case ${target} in
-      *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
-      *) have_unwind_getipinfo=yes ;;
-    esac
-
-  fi
-
-  if test x$have_unwind_getipinfo = xyes; then
-
-$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
-
-  fi
-
-
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -26793,6 +26395,10 @@ if test -z "${LIBGFOR_USE_SYMVER_SUN_TRUE}" && test -z "${LIBGFOR_USE_SYMVER_SUN
   as_fn_error "conditional \"LIBGFOR_USE_SYMVER_SUN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${LIBGFOR_MINIMAL_TRUE}" && test -z "${LIBGFOR_MINIMAL_FALSE}"; then
+  as_fn_error "conditional \"LIBGFOR_MINIMAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${LIBGFOR_BUILD_QUAD_TRUE}" && test -z "${LIBGFOR_BUILD_QUAD_FALSE}"; then
   as_fn_error "conditional \"LIBGFOR_BUILD_QUAD\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -27399,7 +27005,6 @@ CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 CC="$CC"
 CXX="$CXX"
 GFORTRAN="$GFORTRAN"
-GCJ="$GCJ"
 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"