summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac20
1 files changed, 13 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 4a7979510..ae19de81a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -375,13 +375,19 @@ no:no)
esac
-AC_MSG_CHECKING(whether program_invocation_short_name is defined)
-AC_TRY_COMPILE([#include <argp.h>],
- [program_invocation_short_name = "test";],
- AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1,
- [Define if program_invocation_short_name is defined])
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+AC_MSG_CHECKING([whether program_invocation_short_name is defined])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <argp.h>
+]], [[
+ program_invocation_short_name = "test";
+]])], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
+ [Define if program_invocation_short_name is defined])
+], [
+ AC_MSG_RESULT([no])
+])
+
AC_MSG_CHECKING([whether __progname is defined])
AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;],