if ecore lacks both X and FB support, disable the test
authorvapier <vapier>
Thu, 20 Oct 2005 05:05:52 +0000 (05:05 +0000)
committervapier <vapier@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 20 Oct 2005 05:05:52 +0000 (05:05 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/emotion@17696 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.in
src/bin/emotion_test_main.c

index a590c34..eb15424 100644 (file)
@@ -123,6 +123,7 @@ AC_PATH_GENERIC(ecore, 0.9.9,
   [ ],
   [ AC_MSG_ERROR(Ecore isn't installed)]
 )
+AC_CHECK_HEADERS(Ecore_X.h Ecore_Fb.h)
 
 AC_PATH_GENERIC(embryo, 0.9.1,
   [ ],
index 2ddd35c..0338032 100644 (file)
@@ -1,3 +1,10 @@
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#if defined(HAVE_ECORE_X_H) || defined(HAVE_ECORE_FB_H)
+
 #include <Evas.h>
 #include <Ecore.h>
 #ifndef FB_ONLY
 
 #include "Emotion.h"
 
-#include "config.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
 typedef struct _Frame_Data Frame_Data;
 
 struct _Frame_Data
@@ -867,3 +868,10 @@ main(int argc, char **argv)
    return 0;
 }
 
+#else
+int main()
+{
+       puts("Could not find Ecore_X.h or Ecore_Fb.h so test is disabled");
+       return 0;
+}
+#endif