3 dnl From J. David Anglin.
5 dnl HPUX and other systems can't unlink shared text that is being executed.
7 # Copyright (C) 2000-2001, 2004, 2007, 2009-2020 Free Software Foundation, Inc.
8 # This file is free software; the Free Software Foundation
9 # gives unlimited permission to copy and/or distribute it,
10 # with or without modifications, as long as this notice is preserved.
12 AC_DEFUN([gl_FUNC_UNLINK_BUSY_TEXT],
14 AC_CACHE_CHECK([whether a running program can be unlinked],
15 [gl_cv_func_unlink_busy_text],
22 main (int argc, char **argv)
27 else if (unlink (argv[0]) != 0)
31 [gl_cv_func_unlink_busy_text=yes],
32 [gl_cv_func_unlink_busy_text=no],
34 # Guess no on native Windows.
35 mingw*) gl_cv_func_unlink_busy_text="guessing no" ;;
36 *) gl_cv_func_unlink_busy_text="guessing no" ;;
43 case "$gl_cv_func_unlink_busy_text" in
44 *no) INSTALL=$ac_install_sh ;;