From 808c75233b97d84ee0a728a44073d8365912f33d Mon Sep 17 00:00:00 2001 From: "mandyke@gmail.com" Date: Mon, 3 Mar 2014 04:34:11 +0000 Subject: Identify location of libiberty.h git-svn-id: http://distcc.googlecode.com/svn/trunk@787 01de4be4-8c4a-0410-9132-4925637da917 --- configure.ac | 6 ++++++ src/distcc.c | 6 ++++++ 2 files changed, 12 insertions(+) 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 #include +#if defined (HAVE_LIBIBERTY_H) #include +#elif defined (HAVE_LIBIBERTY_LIBIBERTY_H) +#include +#else +#error Need libiberty.h +#endif #include "distcc.h" #include "trace.h" -- cgit v1.2.1