瀏覽代碼

Use autoconf's standard AC_PATH_XTRA macro

Samuel Thibault 14 年之前
父節點
當前提交
01456b03c5
共有 2 個文件被更改,包括 6 次插入4 次删除
  1. 2 3
      configure.ac
  2. 4 1
      examples/Makefile.am

+ 2 - 3
configure.ac

@@ -887,9 +887,8 @@ AC_MSG_CHECKING(whether OpenGL rendering is enabled)
 AC_SUBST(STARPU_OPENGL_RENDER, $enable_opengl_render)
 AC_MSG_RESULT($enable_opengl_render)
 
-have_x11=yes
-AC_CHECK_LIB(X11, XOpenDisplay,,[have_x11=no])
-if test x$have_x11 = xyes; then
+AC_PATH_XTRA
+if test x$x_includes != xNONE; then
 	AC_DEFINE(STARPU_HAVE_X11, [1], [enable X11])
 fi
 

+ 4 - 1
examples/Makefile.am

@@ -1,6 +1,6 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
-# Copyright (C) 2009, 2010  Université de Bordeaux 1
+# Copyright (C) 2009, 2010-2011  Université de Bordeaux 1
 # Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
 #
 # StarPU is free software; you can redistribute it and/or modify
@@ -676,3 +676,6 @@ examplebin_PROGRAMS +=				\
 
 mandelbrot_mandelbrot_SOURCES =			\
 	mandelbrot/mandelbrot.c
+
+mandelbrot_mandelbrot_CPPFLAGS = $(X_CFLAGS)
+mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS)