AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])
AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])
VMAJ=v_maj
+VMIN=v_min
AC_SUBST([VMAJ])
+AC_SUBST([VMIN])
#### Additional options to configure
fi
## XCB
-have_ecore_x_xcb_define=""
-if test "${with_x11}" = "xcb" ; then
- have_ecore_x_xcb_define="-DHAVE_ECORE_X_XCB"
-fi
-AC_SUBST(have_ecore_x_xcb_define)
### Checks for header files
fi
AC_DEFINE([HAVE_ECORE_X_XLIB], [1], [Defined to 1 if Xlib is enabled.])
+ HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XLIB"
fi
## XCB
PKG_CHECK_MODULES([ECORE_X], [${requirements_pc_deps_ecore_x}])
EFL_CHECK_FUNCS([ECORE_X], [dlopen iconv])
+
+ HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XCB"
fi
requirements_libs_ecore_x="${requirements_libs_ecore_x} ${ECORE_X_LIBS}"
+AC_SUBST([HAVE_ECORE_X_BACKEND])
AC_SUBST([ECORE_X_CFLAGS])
AC_SUBST([ECORE_X_LIBS])
Version: @VERSION@
Libs: -L${libdir} -lecore_x
Libs.private: @requirements_libs_ecore_x@
-Cflags: -I${includedir}/ecore-@VMAJ@ @have_ecore_x_xcb_define@
+Cflags: -I${includedir}/ecore-@VMAJ@
installed_ecorexmainheadersdir = $(includedir)/ecore-@VMAJ@
dist_installed_ecorexmainheaders_DATA = \
lib/ecore_x/Ecore_X.h \
+lib/ecore_x/ecore_x_version.h \
lib/ecore_x/Ecore_X_Atoms.h \
lib/ecore_x/Ecore_X_Cursor.h
lib_ecore_x_libecore_x_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@
+MAINTAINERCLEANFILES += \
+$(top_builddir)/src/lib/ecore_x/ecore_x_version.h
+
+BUILT_SOURCES += \
+$(top_builddir)/src/lib/ecore_x/ecore_x_version.h
+
+$(top_builddir)/src/lib/ecore_x/ecore_x_version.h: $(top_srcdir)/src/lib/ecore_x/ecore_x_version.h.in $(top_builddir)/Makefile
+ $(SED) -e 's/[@]VMAJ[@]/$(VMAJ)/g;s/[@]VMIN[@]/$(VMIN)/g;s/[@]HAVE_ECORE_X_BACKEND[@]/$(HAVE_ECORE_X_BACKEND)/g' $< > $@
+
+
if HAVE_ECORE_X_XCB
MAINTAINERCLEANFILES += \
$(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table.h \
# endif // ifdef __GNUC__
#endif // ifdef _MSC_VER
+#include "ecore_x_version.h"
+
#include <sys/types.h>
/**
--- /dev/null
+#ifndef _ECORE_X_VERSION_H_
+#define _ECORE_X_VERSION_H_ 1
+
+#define ECORE_X_VERSION_MAJOR @VMAJ@
+#define ECORE_X_VERSION_MINOR @VMIN@
+
+typedef struct _Ecore_X_Version
+{
+ int major;
+ int minor;
+ int micro;
+ int revision;
+} Ecore_X_Version;
+
+EAPI extern Ecore_X_Version *ecore_x_version;
+
+#ifndef @HAVE_ECORE_X_BACKEND@
+#define @HAVE_ECORE_X_BACKEND@ 1
+#endif
+
+#endif
static xcb_generic_event_t *_ecore_xcb_event_buffered = NULL;
static Ecore_Idle_Enterer *_ecore_xcb_idle_enterer = NULL;
+static Ecore_X_Version _version = { VMAJ, VMIN, VMIC, VREV };
+EAPI Ecore_X_Version *elm_version = &_version;
+
/* external variables */
int _ecore_xcb_log_dom = -1;
Ecore_X_Display *_ecore_xcb_display = NULL;
#include "Ecore_X_Atoms.h"
#include "Ecore_Input.h"
+static Ecore_X_Version _version = { VMAJ, VMIN, VMIC, VREV };
+EAPI Ecore_X_Version *elm_version = &_version;
+
static Eina_Bool _ecore_x_fd_handler(void *data,
Ecore_Fd_Handler *fd_handler);
static Eina_Bool _ecore_x_fd_handler_buf(void *data,