]> git.sesse.net Git - vlc/commitdiff
forward port [18125]
authorRafaël Carré <funman@videolan.org>
Sun, 3 Dec 2006 14:06:06 +0000 (14:06 +0000)
committerRafaël Carré <funman@videolan.org>
Sun, 3 Dec 2006 14:06:06 +0000 (14:06 +0000)
Compile glx plugin only if all required headers are present

configure.ac

index 6ec7ef6eec33981669ea18cd1caebceb4230d21f..695ead4d777832aec9b82cf3014b798e3be630bd 100644 (file)
@@ -3667,11 +3667,16 @@ if test "${enable_glx}" != "no" &&
   (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
    test "${enable_glx}" = "yes"); then
   CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
-  AC_CHECK_HEADERS(X11/Xlib.h GL/glu.h GL/glx.h, [
+  AC_CHECK_HEADERS(X11/Xlib.h GL/glu.h GL/glx.h)
+  AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
+    [[#if !defined(HAVE_X11_XLIB_H) || !defined(HAVE_GL_GLU_H) || !defined(HAVE_GL_GLX_H)
+    choke me
+    #endif]]),
+    [
       VLC_ADD_PLUGINS([glx])
       VLC_ADD_LDFLAGS([glx],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lGL -lGLU])
       VLC_ADD_CPPFLAGS([glx],[${X_CFLAGS}])
-   ],[AC_MSG_ERROR([Please install GL development package. Alternatively you can also configure with --disable-glx.])])
+    ],[AC_MSG_ERROR([Please install GL development package. Alternatively you can also configure with --disable-glx.])])
   CPPFLAGS="${CPPFLAGS_save}"
 fi