[perf] Check availability before including nonstandard headers

This commit is contained in:
Behdad Esfahbod 2007-04-30 19:20:56 -04:00
parent fbc8bf0503
commit 8ea48710dc
3 changed files with 11 additions and 1 deletions

View file

@ -608,6 +608,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], [

View file

@ -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;

View file

@ -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>