* fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
[gnulib.git] / m4 / unlink-busy.m4
1 #serial 9
2
3 dnl From J. David Anglin.
4
5 dnl HPUX and other systems can't unlink shared text that is being executed.
6
7 # Copyright (C) 2000, 2001, 2004, 2006 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.
11
12 AC_DEFUN([gl_FUNC_UNLINK_BUSY_TEXT],
13 [dnl
14   AC_CACHE_CHECK([whether a running program can be unlinked],
15     jm_cv_func_unlink_busy_text,
16     [
17       AC_RUN_IFELSE(
18         [AC_LANG_SOURCE(
19            [AC_INCLUDES_DEFAULT
20             int
21             main (argc, argv)
22               int argc;
23               char **argv;
24             {
25               return !argc || unlink (argv[0]) != 0;
26             }])],
27       jm_cv_func_unlink_busy_text=yes,
28       jm_cv_func_unlink_busy_text=no,
29       jm_cv_func_unlink_busy_text=no
30       )
31     ]
32   )
33
34   if test $jm_cv_func_unlink_busy_text = no; then
35     INSTALL=$ac_install_sh
36   fi
37 ])