diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-08-26 12:38:22 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-08-26 12:40:10 -0600 |
commit | 9686e8f5b65df96f983bd2062a2651137b19d730 (patch) | |
tree | a2da67b24d8c937e80075ae419781601bfe92e71 /configure.ac | |
parent | d70d039bf5a5ec8b487b8425743e7a82cab1bf95 (diff) | |
download | dimension-9686e8f5b65df96f983bd2062a2651137b19d730.tar.xz |
Use the AX_PTHREAD macro to detect pthread flags properly.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 9 insertions, 6 deletions
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]) |