diff options
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/distcc.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 04e48b2..8c57daa 100644 --- a/configure.ac +++ b/configure.ac @@ -359,6 +359,12 @@ 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]) +fi ######################################################################## diff --git a/src/distcc.c b/src/distcc.c index 812e4ad..b6db148 100644 --- a/src/distcc.c +++ b/src/distcc.c @@ -41,7 +41,13 @@ #include <errno.h> #include <signal.h> +#if defined (HAVE_LIBIBERTY_H) #include <libiberty.h> +#elif defined (HAVE_LIBIBERTY_LIBIBERTY_H) +#include <libiberty/libiberty.h> +#else +#error Need libiberty.h +#endif #include "distcc.h" #include "trace.h" |