]> git.sesse.net Git - vlc/commitdiff
ASCII Art: initialize Xlib
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 15 Jul 2010 16:26:43 +0000 (19:26 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 15 Jul 2010 16:29:04 +0000 (19:29 +0300)
Don't ask me why, but libaa depends on Xlib.

configure.ac
modules/video_output/aa.c

index 7eace73e9ec2d8052ba30105f92250fc27dd3693..4dbf6e238b2d262ec8a06389f31f077481bbec8c 100644 (file)
@@ -3623,6 +3623,9 @@ then
   then
     VLC_ADD_PLUGIN([aa])
     VLC_ADD_LIBS([aa],[-laa])
+    if test "${SYS}" != "mingw32"; then
+      VLC_ADD_LIBS([aa],[${X_LIBS} ${X_PRE_LIBS} -lX11])
+    fi
   fi
 fi
 
index 5c446284ec5e0505d755ac7f72289190814cbe3d..7c9fb21bbc685c9acba3349868ee8d5505539f31 100644 (file)
 #include <assert.h>
 #include <aalib.h>
 
+#ifndef WIN32
+# ifdef X_DISPLAY_MISSING
+#  error Xlib required due to XInitThreads
+# endif
+# include <vlc_xlib.h>
+#endif
+
 /* TODO
  * - what about RGB palette ?
  */
@@ -83,6 +90,11 @@ static int Open(vlc_object_t *object)
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys;
 
+#ifndef WIN32
+    if (!vlc_xlib_init (object))
+        return VLC_EGENERIC;
+#endif
+
     /* Allocate structure */
     vd->sys = sys = calloc(1, sizeof(*sys));
     if (!sys)