diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2023-10-28 21:32:31 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2023-10-28 21:32:31 +0300 |
commit | 014e64192bef7619ac4d4fc2200395661a60e02d (patch) | |
tree | ff58a23097416c75f5f402da59a07d1ca14c8c27 /am/proctitle.m4 | |
parent | c7ccd22853fa6115aade72dfefa02846c5acc515 (diff) | |
download | pies-master.tar.gz pies-master.tar.bz2 |
Diffstat (limited to 'am/proctitle.m4')
-rw-r--r-- | am/proctitle.m4 | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/am/proctitle.m4 b/am/proctitle.m4 index 3035efd..73afd87 100644 --- a/am/proctitle.m4 +++ b/am/proctitle.m4 @@ -23,12 +23,12 @@ AC_DEFUN([MF_PROCTITLE],[ #define MF_PROCTITLE_PSTAT 3 #define MF_PROCTITLE_PSSTRINGS 4 ]) - AC_SUBST(MF_PROCTITLE_LIBS) + AC_SUBST([MF_PROCTITLE_LIBS]) - AC_TRY_LINK([extern char *__progname, *__progname_full;], - [__progname = "foo"; __progname_full = "foo bar";], - [AC_DEFINE(HAVE___PROGNAME, 1, - [Define to 1 if libc has __progname])]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[extern char *__progname, *__progname_full;]], + [[__progname = "foo"; __progname_full = "foo bar";]])], + [AC_DEFINE(HAVE___PROGNAME, 1, [Define to 1 if libc has __progname])]) mf_proctitle_type=no AC_CHECK_FUNC(setproctitle, @@ -44,9 +44,10 @@ AC_DEFUN([MF_PROCTITLE],[ [mf_proctitle_type=MF_PROCTITLE_PSTAT], [mf_proctitle_type=MF_PROCTITLE_REWRITE_ARGV])]) if test "$mf_proctitle_type" = no; then - AC_TRY_COMPILE([#include <machine/vmparam.h> - #include <sys/exec.h>], - [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include <machine/vmparam.h> + #include <sys/exec.h>]], + [[ #include <sys/types.h> #include <sys/proc.h> #include <vm/pmap.h> @@ -54,11 +55,12 @@ AC_DEFUN([MF_PROCTITLE],[ #include <machine/vmparam.h> #include <sys/exec.h> +int main() { int i = PS_STRINGS; } -], +]])], [mf_proctitle_type=MF_PROCTITLE_PSSTRINGS]) if test "$mf_proctitle_type" = no; then |