From 9686e8f5b65df96f983bd2062a2651137b19d730 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 26 Aug 2011 12:38:22 -0600 Subject: Use the AX_PTHREAD macro to detect pthread flags properly. --- configure.ac | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index cf8881a..0c8008b 100644 --- a/configure.ac +++ b/configure.ac @@ -22,8 +22,8 @@ AC_INIT(Dimension, 0.0, tavianator@tavianator.com, dimension, AM_INIT_AUTOMAKE([parallel-tests color-tests std-options]) AM_SILENT_RULES([yes]) -dnl Use C99 mode with GNU extensions -CFLAGS="-std=gnu99 -D_REENTRANT $CFLAGS" +dnl Use C99 mode with GNU extensions by default +CFLAGS="-std=gnu99 $CFLAGS" dnl Programs AC_PROG_CC @@ -43,7 +43,7 @@ AC_ARG_ENABLE([png], [Enable PNG canvas export [default=yes]])], [], [enable_png=yes]) -AM_CONDITIONAL([PNG], [test "$enable_png" != "no"]) +AM_CONDITIONAL([PNG], [test "$enable_png" = "yes"]) dnl OpenGL canvas export AC_ARG_ENABLE([gl], @@ -51,7 +51,7 @@ AC_ARG_ENABLE([gl], [Enable OpenGL canvas export [default=yes]])], [], [enable_gl=yes]) -AM_CONDITIONAL([GL], [test "$enable_gl" != "no"]) +AM_CONDITIONAL([GL], [test "$enable_gl" = "yes"]) dnl Built-in profiling support AC_ARG_ENABLE([profile], @@ -77,6 +77,9 @@ AC_SUBST(libsandglass_LIBS) dnl Platform feature tests +m4_include(ax_pthread.m4) +AX_PTHREAD(, [AC_MSG_ERROR([pthread support not detected])]) + AC_MSG_CHECKING([for sched_getaffinity()]) AC_LINK_IFELSE([ AC_LANG_PROGRAM( @@ -168,8 +171,8 @@ AC_COMPILE_IFELSE([ AC_MSG_RESULT([no])] ) -AC_CHECK_HEADER([GL/glx.h], [enable_glx=yes], [enable_glx=no]) -AM_CONDITIONAL([GLX], [test "$enable_glx" != "no"]) +AC_CHECK_HEADER([GL/glx.h], [have_glx=yes], [have_glx=no]) +AM_CONDITIONAL([GLX], [test "$enable_gl" = "yes" -a "$have_glx" = "yes"]) dnl Generate Makefiles AC_CONFIG_MACRO_DIR([m4]) -- cgit v1.2.3