Warn if add-symbol-file does not provide any symbols
[deliverable/binutils-gdb.git] / gdb / gnulib / configure
index 5fd52d45ac97c3f74bb8b2fe22280e0c0742ad3c..340c622cb399829fe60529d1c9ec7e07d33b1168 100644 (file)
@@ -3525,7 +3525,7 @@ gl_func_list="$gl_func_list mbsinit"
 gl_func_list="$gl_func_list mbrtowc"
 gl_header_list="$gl_header_list sys/mman.h"
 gl_func_list="$gl_func_list mprotect"
-gl_func_list="$gl_func_list mkstemp"
+gl_func_list="$gl_func_list mkostemp"
 gl_func_list="$gl_func_list openat"
 gl_func_list="$gl_func_list link"
 gl_func_list="$gl_func_list secure_getenv"
@@ -5841,7 +5841,8 @@ fi
   # Code from module mempcpy:
   # Code from module memrchr:
   # Code from module mkdir:
-  # Code from module mkstemp:
+  # Code from module mkdtemp:
+  # Code from module mkostemp:
   # Code from module msvc-inval:
   # Code from module msvc-nothrow:
   # Code from module multiarch:
@@ -17696,10 +17697,22 @@ else
   # Arrange for deletion of the temporary directory this test creates.
      ac_clean_files="$ac_clean_files confdir3"
           if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-       aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
-       *) gl_cv_func_getcwd_path_max=no;;
+  # Cross-compilation guesses:
+     case "$host_os" in
+       aix*) # On AIX, it has the AIX bug.
+         gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
+       gnu*) # On Hurd, it is 'yes'.
+         gl_cv_func_getcwd_path_max=yes ;;
+       linux* | kfreebsd*)
+         # On older Linux+glibc it's 'no, but it is partly working',
+         # on newer Linux+glibc it's 'yes'.
+         # On Linux+musl libc, it's 'no, but it is partly working'.
+         # On kFreeBSD+glibc, it's 'no, but it is partly working'.
+         gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
+       *) # If we don't know, assume the worst.
+         gl_cv_func_getcwd_path_max=no ;;
      esac
+
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -21879,93 +21892,67 @@ $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
   fi
 
 
+  for ac_func in mkdtemp
+do :
+  ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
+if test "x$ac_cv_func_mkdtemp" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MKDTEMP 1
+_ACEOF
 
+fi
+done
 
-  :
+  if test $ac_cv_func_mkdtemp = no; then
+    HAVE_MKDTEMP=0
+  fi
 
+  if test $HAVE_MKDTEMP = 0; then
 
 
 
 
-  if test $ac_cv_func_mkstemp = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
-$as_echo_n "checking for working mkstemp... " >&6; }
-if ${gl_cv_func_working_mkstemp+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-        mkdir conftest.mkstemp
-        if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-                     # Guess yes on glibc systems.
-             *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
-                     # If we don't know, assume the worst.
-             *)      gl_cv_func_working_mkstemp="guessing no" ;;
-           esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-int result = 0;
-              int i;
-              off_t large = (off_t) 4294967295u;
-              if (large < 0)
-                large = 2147483647;
-              umask (0);
-              for (i = 0; i < 70; i++)
-                {
-                  char templ[] = "conftest.mkstemp/coXXXXXX";
-                  int (*mkstemp_function) (char *) = mkstemp;
-                  int fd = mkstemp_function (templ);
-                  if (fd < 0)
-                    result |= 1;
-                  else
-                    {
-                      struct stat st;
-                      if (lseek (fd, large, SEEK_SET) != large)
-                        result |= 2;
-                      if (fstat (fd, &st) < 0)
-                        result |= 4;
-                      else if (st.st_mode & 0077)
-                        result |= 8;
-                      if (close (fd))
-                        result |= 16;
-                    }
-                }
-              return result;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_working_mkstemp=yes
-else
-  gl_cv_func_working_mkstemp=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-        rm -rf conftest.mkstemp
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
-$as_echo "$gl_cv_func_working_mkstemp" >&6; }
-    case "$gl_cv_func_working_mkstemp" in
-      *yes) ;;
-      *)
-        REPLACE_MKSTEMP=1
-        ;;
-    esac
-  else
-    HAVE_MKSTEMP=0
+  gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
+
+    :
+
+  fi
+
+
+
+
+
+          GNULIB_MKDTEMP=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  if test $ac_cv_func_mkostemp != yes; then
+    HAVE_MKOSTEMP=0
   fi
 
-  if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
+  if test $HAVE_MKOSTEMP = 0; then
 
 
 
@@ -21974,23 +21961,30 @@ $as_echo "$gl_cv_func_working_mkstemp" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
 
 
 
   fi
 
 
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_MKOSTEMP 1
+_ACEOF
+
+
+
+
 
 
 
-          GNULIB_MKSTEMP=1
+          GNULIB_MKOSTEMP=1
 
 
 
 
 
-$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
+$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
 
 
 
This page took 0.031265 seconds and 4 git commands to generate.