summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917>2014-04-02 23:14:25 +0000
committerfergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917>2014-04-02 23:14:25 +0000
commit05e157e9c2f27a793f79f38077c8e45d411a4edf (patch)
tree3f7117c25bf738377e31240060fb2924f29f2afa
parentf3b1400be9e1b63fadcda0b3f2493ff3693beaeb (diff)
downloaddistcc-05e157e9c2f27a793f79f38077c8e45d411a4edf.tar.gz
Apply patch for issue 139
<http://code.google.com/p/distcc/issues/detail?id=139>: add configure option --without-libiberty, to allow building distcc without GPL3 license encumbrance. git-svn-id: http://distcc.googlecode.com/svn/trunk@790 01de4be4-8c4a-0410-9132-4925637da917
-rw-r--r--configure.ac22
-rw-r--r--src/distcc.c6
2 files changed, 18 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 8b18122..feec478 100644
--- a/configure.ac
+++ b/configure.ac
@@ -359,17 +359,21 @@ else
POPT_INCLUDES=''
fi
-AC_CHECK_LIB([iberty], [expandargv],
- ,
- AC_MSG_ERROR([Cannot find libiberty]))
-AC_CHECK_HEADERS([libiberty.h libiberty/libiberty.h],
- [break])
-if (test "$ac_cv_header_libiberty_h" != yes) &&
- (test "$ac_cv_header_libiberty_libiberty_h" != yes); then
- AC_MSG_ERROR([Cannot find libiberty.h])
+AC_ARG_WITH(binutils,
+ AC_HELP_STRING([--without-libiberty], [build without libiberty (no @file support)]))
+
+if test x"$with_libiberty" != xno; then
+ AC_CHECK_LIB([iberty], [expandargv],
+ ,
+ AC_MSG_ERROR([Cannot find libiberty]))
+ AC_CHECK_HEADERS([libiberty.h libiberty/libiberty.h],
+ [break])
+ if (test "$ac_cv_header_libiberty_h" != yes) &&
+ (test "$ac_cv_header_libiberty_libiberty_h" != yes); then
+ AC_MSG_ERROR([Cannot find libiberty.h])
+ fi
fi
-
########################################################################
# Check for types
AC_TYPE_SIGNAL
diff --git a/src/distcc.c b/src/distcc.c
index b6db148..16d10a6 100644
--- a/src/distcc.c
+++ b/src/distcc.c
@@ -41,6 +41,7 @@
#include <errno.h>
#include <signal.h>
+#if HAVE_LIBIBERTY
#if defined (HAVE_LIBIBERTY_H)
#include <libiberty.h>
#elif defined (HAVE_LIBIBERTY_LIBIBERTY_H)
@@ -48,6 +49,7 @@
#else
#error Need libiberty.h
#endif
+#endif
#include "distcc.h"
#include "trace.h"
@@ -241,9 +243,11 @@ int main(int argc, char **argv)
compiler_name = (char *) dcc_find_basename(argv[0]);
+#if HAVE_LIBIBERTY
/* Expand @FILE arguments. */
expandargv(&argc, &argv);
-
+#endif
+
/* Ignore SIGPIPE; we consistently check error codes and will
* see the EPIPE. */
dcc_ignore_sigpipe(1);