summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2012-01-03 08:58:01 +0100
committerGuillem Jover <guillem@hadrons.org>2012-05-29 04:51:04 +0200
commit752997462a922402531c92b22dd7ab5af352f408 (patch)
tree065e9258786b9541627a3d16d6b976932fc2b0ff /configure.ac
parentd5d91869372f50d755cfa66803a52eece02dee43 (diff)
Base getprogname() on program_invocation_short_name presence instead of glibc
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0304f57..54da101 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,15 @@ AC_CHECK_DECL([F_CLOSEM],
#include <fcntl.h>])
# Checks for library functions.
+AC_MSG_CHECKING([for program_invocation_short_name])
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <errno.h>]],
+ [[const char *p = program_invocation_short_name;]])],
+ [AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
+ [Define to 1 if you have program_invocation_short_name])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+
AC_MSG_CHECKING([for __progname])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[]],