configure: check for program_invocation_name
For portabiliy, check for program_invocation_name during configure and define HAVE_PROGRAM_INVOCATION_NAME accordingly. Use of this symbol is now enclosed with the appropriate #ifdef block. The symbol program_invocation_name is only used for error message handling using error(), so it's safe to omit this if it is not available.
This commit is contained in:
@@ -137,6 +137,14 @@ dnl else
|
||||
dnl ALL_LINGUAS="af am ar as be bg bn_IN bn ca cs cy da de el en_GB es et eu_ES fa fi fr gl gu he hi hr hu hy id is it ja ka kn ko ku lo lt lv mk ml mr ms my nb nl nn no nso or pa pl pt_BR pt ro ru si sk sl sq sr@Latn sr sv ta te th tr uk ur vi zh_CN zh_TW zu"
|
||||
dnl fi
|
||||
|
||||
AC_MSG_CHECKING(whether program_invocation_name is defined)
|
||||
AC_TRY_COMPILE([#include <errno.h>],
|
||||
[program_invocation_name = "test";],
|
||||
AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME, 1,
|
||||
[Define if program_invocation_name is defined])
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
AC_MSG_CHECKING(whether program_invocation_short_name is defined)
|
||||
AC_TRY_COMPILE([#include <errno.h>],
|
||||
[program_invocation_short_name = "test";],
|
||||
|
Reference in New Issue
Block a user