[cairo-commit] configure.in perf/cairo-perf.c perf/cairo-perf-diff-files.c

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Apr 30 16:20:42 PDT 2007


 configure.in                 |    4 ++++
 perf/cairo-perf-diff-files.c |    2 ++
 perf/cairo-perf.c            |    6 +++++-
 3 files changed, 11 insertions(+), 1 deletion(-)

New commits:
diff-tree 8ea48710dc933cd5dd52fb7d0c29eb8994a5d160 (from fbc8bf05033a652d26c1defa56d12183e4009870)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Apr 30 19:20:56 2007 -0400

    [perf] Check availability before including nonstandard headers

diff --git a/configure.in b/configure.in
index b2aa53f..ddeb635 100644
--- a/configure.in
+++ b/configure.in
@@ -609,6 +609,10 @@ AC_CHECK_HEADERS([sched.h], [
 ])
 
 dnl ===========================================================================
+dnl Checks for misc headers
+AC_CHECK_HEADERS([libgen.h])
+
+dnl ===========================================================================
 dnl check compiler flags
 AC_DEFUN([CAIRO_CC_TRY_FLAG], [
   AC_MSG_CHECKING([whether $CC supports $1])
diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index 2fd6229..6828375 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -38,7 +38,9 @@
 #include <ctype.h>
 #include <math.h>
 #include <assert.h>
+#ifdef HAVE_LIBGEN_H
 #include <libgen.h>
+#endif
 
 typedef struct _test_report {
     int id;
diff --git a/perf/cairo-perf.c b/perf/cairo-perf.c
index af06bb6..360f2dd 100644
--- a/perf/cairo-perf.c
+++ b/perf/cairo-perf.c
@@ -27,12 +27,16 @@
  */
 
 #include "cairo-perf.h"
-#include "config.h"
 
 /* For getopt */
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+
 /* For basename */
+#ifdef HAVE_LIBGEN_H
 #include <libgen.h>
+#endif
 
 #if HAVE_FCFINI
 #include <fontconfig/fontconfig.h>


More information about the cairo-commit mailing list