summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authornicm <nicm>2011-01-10 22:12:31 +0000
committernicm <nicm>2011-01-10 22:12:31 +0000
commit3e41ec0a5fd1e1d73c5ec7f11d326bc4a8679ec7 (patch)
treec95f571c9374a5a66d3323fb066fd73bf9ed527c /configure.ac
parent791e0845d481d6d94741901ff3f46afa061d3721 (diff)
downloadtmux-old-3e41ec0a5fd1e1d73c5ec7f11d326bc4a8679ec7.tar.gz
tmux-old-3e41ec0a5fd1e1d73c5ec7f11d326bc4a8679ec7.tar.bz2
tmux-old-3e41ec0a5fd1e1d73c5ec7f11d326bc4a8679ec7.zip
Better __progname check.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index dc34ffbc..c21c14c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.11 2011/01/10 22:00:47 nicm Exp $
+# $Id: configure.ac,v 1.12 2011/01/10 22:12:31 nicm Exp $
# Miscellaneous autofoo bullshit.
AC_INIT(tmux, 1.5)
@@ -282,10 +282,16 @@ fi
# Look for __progname.
AC_MSG_CHECKING(for __progname)
-AC_COMPILE_IFELSE(
+AC_LINK_IFELSE(
[
+ #include <stdio.h>
+ #include <stdlib.h>
extern char *__progname;
- int main(void) { const char *cp = __progname; }
+ int main(void) {
+ const char *cp = __progname;
+ printf("%s\n", cp);
+ exit(0);
+ }
],
[AC_DEFINE(HAVE___PROGNAME) AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no)