summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac11
-rw-r--r--pc/ecore-x.pc.in2
-rw-r--r--src/Makefile_Ecore_X.am11
-rw-r--r--src/lib/ecore_x/Ecore_X.h2
-rw-r--r--src/lib/ecore_x/ecore_x_version.h.in21
-rw-r--r--src/lib/ecore_x/xcb/ecore_xcb.c3
-rw-r--r--src/lib/ecore_x/xlib/ecore_x.c3
7 files changed, 47 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index aa8cec21c6..bf1ef6120c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,9 @@ AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])
45AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version]) 45AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])
46AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison]) 46AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])
47VMAJ=v_maj 47VMAJ=v_maj
48VMIN=v_min
48AC_SUBST([VMAJ]) 49AC_SUBST([VMAJ])
50AC_SUBST([VMIN])
49 51
50 52
51#### Additional options to configure 53#### Additional options to configure
@@ -2637,11 +2639,6 @@ if test "x${want_x11_xlib}" = "xyes" ; then
2637fi 2639fi
2638 2640
2639## XCB 2641## XCB
2640have_ecore_x_xcb_define=""
2641if test "${with_x11}" = "xcb" ; then
2642 have_ecore_x_xcb_define="-DHAVE_ECORE_X_XCB"
2643fi
2644AC_SUBST(have_ecore_x_xcb_define)
2645 2642
2646### Checks for header files 2643### Checks for header files
2647 2644
@@ -2760,6 +2757,7 @@ if test "x${want_x11_xlib}" = "xyes" ; then
2760 fi 2757 fi
2761 2758
2762 AC_DEFINE([HAVE_ECORE_X_XLIB], [1], [Defined to 1 if Xlib is enabled.]) 2759 AC_DEFINE([HAVE_ECORE_X_XLIB], [1], [Defined to 1 if Xlib is enabled.])
2760 HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XLIB"
2763fi 2761fi
2764 2762
2765## XCB 2763## XCB
@@ -2799,10 +2797,13 @@ dnl AC_DEFINE([ECORE_XCB_DRI], [1], [Build support for XCB dri])
2799 2797
2800 PKG_CHECK_MODULES([ECORE_X], [${requirements_pc_deps_ecore_x}]) 2798 PKG_CHECK_MODULES([ECORE_X], [${requirements_pc_deps_ecore_x}])
2801 EFL_CHECK_FUNCS([ECORE_X], [dlopen iconv]) 2799 EFL_CHECK_FUNCS([ECORE_X], [dlopen iconv])
2800
2801 HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XCB"
2802fi 2802fi
2803 2803
2804requirements_libs_ecore_x="${requirements_libs_ecore_x} ${ECORE_X_LIBS}" 2804requirements_libs_ecore_x="${requirements_libs_ecore_x} ${ECORE_X_LIBS}"
2805 2805
2806AC_SUBST([HAVE_ECORE_X_BACKEND])
2806AC_SUBST([ECORE_X_CFLAGS]) 2807AC_SUBST([ECORE_X_CFLAGS])
2807AC_SUBST([ECORE_X_LIBS]) 2808AC_SUBST([ECORE_X_LIBS])
2808 2809
diff --git a/pc/ecore-x.pc.in b/pc/ecore-x.pc.in
index ec7fae7916..aa4abc5cd4 100644
--- a/pc/ecore-x.pc.in
+++ b/pc/ecore-x.pc.in
@@ -9,4 +9,4 @@ Requires.private: @requirements_pc_ecore_x@
9Version: @VERSION@ 9Version: @VERSION@
10Libs: -L${libdir} -lecore_x 10Libs: -L${libdir} -lecore_x
11Libs.private: @requirements_libs_ecore_x@ 11Libs.private: @requirements_libs_ecore_x@
12Cflags: -I${includedir}/ecore-@VMAJ@ @have_ecore_x_xcb_define@ 12Cflags: -I${includedir}/ecore-@VMAJ@
diff --git a/src/Makefile_Ecore_X.am b/src/Makefile_Ecore_X.am
index 4562e86062..eaff7f5606 100644
--- a/src/Makefile_Ecore_X.am
+++ b/src/Makefile_Ecore_X.am
@@ -6,6 +6,7 @@ lib_LTLIBRARIES += lib/ecore_x/libecore_x.la
6installed_ecorexmainheadersdir = $(includedir)/ecore-@VMAJ@ 6installed_ecorexmainheadersdir = $(includedir)/ecore-@VMAJ@
7dist_installed_ecorexmainheaders_DATA = \ 7dist_installed_ecorexmainheaders_DATA = \
8lib/ecore_x/Ecore_X.h \ 8lib/ecore_x/Ecore_X.h \
9lib/ecore_x/ecore_x_version.h \
9lib/ecore_x/Ecore_X_Atoms.h \ 10lib/ecore_x/Ecore_X_Atoms.h \
10lib/ecore_x/Ecore_X_Cursor.h 11lib/ecore_x/Ecore_X_Cursor.h
11 12
@@ -119,6 +120,16 @@ lib/eina/libeina.la \
119 120
120lib_ecore_x_libecore_x_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@ 121lib_ecore_x_libecore_x_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@
121 122
123MAINTAINERCLEANFILES += \
124$(top_builddir)/src/lib/ecore_x/ecore_x_version.h
125
126BUILT_SOURCES += \
127$(top_builddir)/src/lib/ecore_x/ecore_x_version.h
128
129$(top_builddir)/src/lib/ecore_x/ecore_x_version.h: $(top_srcdir)/src/lib/ecore_x/ecore_x_version.h.in $(top_builddir)/Makefile
130 $(SED) -e 's/[@]VMAJ[@]/$(VMAJ)/g;s/[@]VMIN[@]/$(VMIN)/g;s/[@]HAVE_ECORE_X_BACKEND[@]/$(HAVE_ECORE_X_BACKEND)/g' $< > $@
131
132
122if HAVE_ECORE_X_XCB 133if HAVE_ECORE_X_XCB
123MAINTAINERCLEANFILES += \ 134MAINTAINERCLEANFILES += \
124$(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table.h \ 135$(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table.h \
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index a072103cc6..4764c996f4 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -25,6 +25,8 @@
25# endif // ifdef __GNUC__ 25# endif // ifdef __GNUC__
26#endif // ifdef _MSC_VER 26#endif // ifdef _MSC_VER
27 27
28#include "ecore_x_version.h"
29
28#include <sys/types.h> 30#include <sys/types.h>
29 31
30/** 32/**
diff --git a/src/lib/ecore_x/ecore_x_version.h.in b/src/lib/ecore_x/ecore_x_version.h.in
new file mode 100644
index 0000000000..24de5f86fd
--- /dev/null
+++ b/src/lib/ecore_x/ecore_x_version.h.in
@@ -0,0 +1,21 @@
1#ifndef _ECORE_X_VERSION_H_
2#define _ECORE_X_VERSION_H_ 1
3
4#define ECORE_X_VERSION_MAJOR @VMAJ@
5#define ECORE_X_VERSION_MINOR @VMIN@
6
7typedef struct _Ecore_X_Version
8{
9 int major;
10 int minor;
11 int micro;
12 int revision;
13} Ecore_X_Version;
14
15EAPI extern Ecore_X_Version *ecore_x_version;
16
17#ifndef @HAVE_ECORE_X_BACKEND@
18#define @HAVE_ECORE_X_BACKEND@ 1
19#endif
20
21#endif
diff --git a/src/lib/ecore_x/xcb/ecore_xcb.c b/src/lib/ecore_x/xcb/ecore_xcb.c
index 2f1e1a2601..62bd7d445d 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb.c
@@ -15,6 +15,9 @@ static Ecore_Fd_Handler *_ecore_xcb_fd_handler = NULL;
15static xcb_generic_event_t *_ecore_xcb_event_buffered = NULL; 15static xcb_generic_event_t *_ecore_xcb_event_buffered = NULL;
16static Ecore_Idle_Enterer *_ecore_xcb_idle_enterer = NULL; 16static Ecore_Idle_Enterer *_ecore_xcb_idle_enterer = NULL;
17 17
18static Ecore_X_Version _version = { VMAJ, VMIN, VMIC, VREV };
19EAPI Ecore_X_Version *elm_version = &_version;
20
18/* external variables */ 21/* external variables */
19int _ecore_xcb_log_dom = -1; 22int _ecore_xcb_log_dom = -1;
20Ecore_X_Display *_ecore_xcb_display = NULL; 23Ecore_X_Display *_ecore_xcb_display = NULL;
diff --git a/src/lib/ecore_x/xlib/ecore_x.c b/src/lib/ecore_x/xlib/ecore_x.c
index d9b81bc0f8..051145de76 100644
--- a/src/lib/ecore_x/xlib/ecore_x.c
+++ b/src/lib/ecore_x/xlib/ecore_x.c
@@ -45,6 +45,9 @@ void *alloca (size_t);
45#include "Ecore_X_Atoms.h" 45#include "Ecore_X_Atoms.h"
46#include "Ecore_Input.h" 46#include "Ecore_Input.h"
47 47
48static Ecore_X_Version _version = { VMAJ, VMIN, VMIC, VREV };
49EAPI Ecore_X_Version *elm_version = &_version;
50
48static Eina_Bool _ecore_x_fd_handler(void *data, 51static Eina_Bool _ecore_x_fd_handler(void *data,
49 Ecore_Fd_Handler *fd_handler); 52 Ecore_Fd_Handler *fd_handler);
50static Eina_Bool _ecore_x_fd_handler_buf(void *data, 53static Eina_Bool _ecore_x_fd_handler_buf(void *data,