summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-02-14 08:28:26 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:00 -0400
commit547be3056d652726699a2a4fcd656495c3a53c07 (patch)
tree77cf37e87700cca8b99e7beab79763eb2035e81f /configure.in
parent8fd5f4ee57f146d8486c39becced0a75ee622d31 (diff)
downloadfork-ledger-547be3056d652726699a2a4fcd656495c3a53c07.tar.gz
fork-ledger-547be3056d652726699a2a4fcd656495c3a53c07.tar.bz2
fork-ledger-547be3056d652726699a2a4fcd656495c3a53c07.zip
*** empty log message ***
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 0e2e84aa..9071c99a 100644
--- a/configure.in
+++ b/configure.in
@@ -14,6 +14,45 @@ AC_PROG_RANLIB
#AC_PROG_LIBTOOL
#AM_PROG_LIBTOOL
+# check if UNIX pipes are available
+AC_CACHE_CHECK(
+ [if pipes can be used],
+ [pipes_avail],
+ [AC_LANG_PUSH(C++)
+ AC_TRY_LINK(
+ [#include <sys/types.h>
+ #include <sys/wait.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>],
+ [int status, pfd[2];
+ status = pipe(pfd);
+ status = fork();
+ if (status < 0) {
+ ;
+ } else if (status == 0) {
+ char *arg0;
+
+ status = dup2(pfd[0], STDIN_FILENO);
+
+ close(pfd[1]);
+ close(pfd[0]);
+
+ execlp("", arg0, (char *)0);
+ perror("execl");
+ exit(1);
+ } else {
+ close(pfd[0]);
+ }],
+ [pipes_avail=true],
+ [pipes_avail=false])
+ AC_LANG_POP])
+
+if [test x$pipes_avail = xtrue ]; then
+ AC_DEFINE([HAVE_UNIX_PIPES], [1], [Whether UNIX pipes are available])
+fi
+
# check for gmp
AC_CACHE_CHECK(
[if libgmp is available],