diff options
Diffstat (limited to 'am/proctitle.m4')
-rw-r--r-- | am/proctitle.m4 | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/am/proctitle.m4 b/am/proctitle.m4 index 9fff12f..73afd87 100644 --- a/am/proctitle.m4 +++ b/am/proctitle.m4 @@ -1,5 +1,5 @@ dnl This file is part of Mailfromd. -dnl Copyright (C) 2008-2020 Sergey Poznyakoff +dnl Copyright (C) 2008-2023 Sergey Poznyakoff dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -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 |