forked from enlightenment/efl
efl: improve X detection by Joel Klinghed.
* Split out ecore_imf_xim to do its own check * Fixed problem with xcb's makekeys, no rule for $(top_builddir)/src/utils/ecore/makekeys$(EXEEXT) exists so make used an implicit rule (ignoring any cflags of course) * Fixed gl_x11 engine to build with either Xlib or XCB (xcb flags were missing) * Added EFL_FIND_X and replace any used of AC_PATH_X{,TRA}. First looks for Xorg pkg-config files then if those arn't found it falls back to old AC_PATH_X. Also generalized common header and lib checks. Could probably use some polishing (the AC_CACHE_VAL cruft especially) but this is what I have time for tonight. Now X11 should be found on non-standard locations by means of xmkmf, --x-includes/--x-libraries and also pkg-config. SVN revision: 82475
This commit is contained in:
parent
f0a7a2a751
commit
57090b2abb
42
configure.ac
42
configure.ac
|
@ -2595,9 +2595,6 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_X], [ecore])
|
|||
EFL_INTERNAL_DEPEND_PKG([ECORE_X], [eina])
|
||||
|
||||
## Xlib
|
||||
if test "x${want_x11_xlib}" = "xyes" ; then
|
||||
AC_PATH_XTRA
|
||||
fi
|
||||
|
||||
## XCB
|
||||
|
||||
|
@ -2643,21 +2640,6 @@ int h = MAXHOSTNAMELEN;
|
|||
fi
|
||||
|
||||
## Xlib
|
||||
use_Xcursor="no"
|
||||
if test "x${want_x11_xlib}" = "xyes" ; then
|
||||
CFLAGS_save="${CFLAGS}"
|
||||
CFLAGS="$x_cflags $x_includes"
|
||||
AC_CHECK_HEADER([X11/Xcursor/Xcursor.h],
|
||||
[use_Xcursor="yes"],
|
||||
[use_Xcursor="no"],
|
||||
[#include <X11/Xlib.h>])
|
||||
CFLAGS="$CFLAGS_save"
|
||||
|
||||
if test "${use_Xcursor}" = "no"; then
|
||||
AC_MSG_ERROR([Xcursor is missing])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x${want_x11_xcb}" = "xyes" ; then
|
||||
KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11
|
||||
FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
|
||||
|
@ -2685,17 +2667,17 @@ fi
|
|||
|
||||
## Xlib
|
||||
if test "x${want_x11_xlib}" = "xyes"; then
|
||||
AC_CHECK_LIB([Xcursor],
|
||||
[XcursorImageLoadCursor],
|
||||
EFL_FIND_X(ECORE_X_XLIB,
|
||||
[X11/Xlib.h X11/Xcursor/Xcursor.h],
|
||||
[X11 XOpenDisplay Xcursor XcursorImageLoadCursor],
|
||||
[
|
||||
use_Xcursor="yes"
|
||||
AC_DEFINE([ECORE_XCURSOR], 1, [Build support for Xcursor])
|
||||
Xcursor_libs="-lXcursor"
|
||||
],
|
||||
[use_Xcursor="no"],
|
||||
[$x_libs -lXrender])
|
||||
EFL_ADD_LIBS([ECORE_X], [${Xcursor_libs}])
|
||||
EFL_ADD_CFLAGS([ECORE_X], [$x_cflags $x_includes])
|
||||
EFL_ADD_LIBS([ECORE_X], [$ECORE_X_XLIB_libs])
|
||||
EFL_ADD_CFLAGS([ECORE_X], [$ECORE_X_XLIB_cflags])
|
||||
],[
|
||||
AC_MSG_ERROR([Xcursor is missing])
|
||||
])
|
||||
fi
|
||||
|
||||
if test "x${want_x11_xlib}" = "xyes" ; then
|
||||
|
@ -2848,8 +2830,14 @@ AM_CONDITIONAL([BUILD_ECORE_IMF_SCIM], [test "x${have_ecore_imf_scim}" = "xyes"]
|
|||
|
||||
have_ecore_imf_xim="no"
|
||||
if test "x${want_xim}" = "xyes" && test "x${want_ecore_imf_xim}" = "xyes" ; then
|
||||
have_ecore_imf_xim="yes"
|
||||
|
||||
EFL_FIND_X(ecore_imf_xim,
|
||||
[X11/Xlib.h],
|
||||
[X11 XOpenIM],
|
||||
[
|
||||
have_ecore_imf_xim=yes
|
||||
AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method])
|
||||
])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([BUILD_ECORE_IMF_XIM], [test "x${have_ecore_imf_xim}" = "xyes"])
|
||||
|
|
|
@ -4,13 +4,15 @@ AC_DEFUN([ECORE_CHECK_X_EXTENSION],
|
|||
pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
|
||||
|
||||
SAVE_CFLAGS=$CFLAGS
|
||||
CFLAGS="$x_cflags ${x_includes:+-I${x_includes}}"
|
||||
CFLAGS="$CFLAGS $ECORE_X_XLIB_cflags"
|
||||
AC_CHECK_HEADER(X11/extensions/$2,
|
||||
[
|
||||
SAVE_LIBS=$LIBS
|
||||
LIBS="$LIBS $ECORE_X_XLIB_libs"
|
||||
AC_CHECK_LIB($3, $4,
|
||||
[AC_DEFINE(ECORE_[]UP, 1, [Build support for $1])],
|
||||
[AC_MSG_ERROR([Missing support for X extension: $1])],
|
||||
[$x_libs])
|
||||
[AC_MSG_ERROR([Missing support for X extension: $1])])
|
||||
LIBS=$SAVE_LIBS
|
||||
],
|
||||
[AC_MSG_ERROR([Missing X11/extensions/$2])],
|
||||
[ #include <X11/Xlib.h> ]
|
||||
|
|
|
@ -0,0 +1,193 @@
|
|||
# efl_find.x.m4 - Macros to locate X11. -*- Autoconf -*-
|
||||
# EFL_FIND_X(VARIABLE-PREFIX, [headers = "X11/Xlib.h"],
|
||||
# [libs-and-functions = "X11 XOpenDisplay"],
|
||||
# [action-if-found], [action-if-not-found])
|
||||
# checks for X11 using, in order:
|
||||
# 1) Xorg pkg-config files (using enviroment variables EFL_X11_CFLAGS
|
||||
# and EFL_X11_LIBS if set, but only if x11.pc exists)
|
||||
# 2) command line options: --x-includes=dir, --x-libraries=dir
|
||||
# assume there is an X11 in the given directories
|
||||
# 3) XMKMF environment variable if set
|
||||
# 4) xmkmf executable if found
|
||||
# 5) list of "standard" directories
|
||||
#
|
||||
# 2-5 is handled by A_PATH_X
|
||||
#
|
||||
# If a X11 is found, [action-if-success] is run and VARIABLE_cflags and
|
||||
# VARIABLE_libs and VARIABLE_libdirs are defined and substituted.
|
||||
# VARIABLE_libs will contain all of the libs listed in libs-and-functions.
|
||||
# VARIABLE_libdirs will contain all -Lpath:s found in VARIABLE_libs
|
||||
#
|
||||
# headers is a list of headers to look for. libs-and-functions is a list of
|
||||
# library and function pairs to look for.
|
||||
# Each lib and function is checked in pairs, example:
|
||||
# EFL_FIND_X([EVAS_X11], [X11/X.h], [X11 XCreateImage Xext XShmCreateImage])
|
||||
# will look for XCreateImage in X11 and XShmCreateImage in Xext and include
|
||||
# both -lX11 and -lXext in VARIABLE_libs
|
||||
#
|
||||
# action-if-found is only called if X11, all headers, all libraries and
|
||||
# all functions are found.
|
||||
# You can call EFL_FIND_X multiple times with different lists of headers, libs
|
||||
# and functions.
|
||||
|
||||
AC_DEFUN([EFL_FIND_X],
|
||||
[
|
||||
# Must print something as AC_CACHE_VAL writes (cached) if the value is cached
|
||||
AC_MSG_CHECKING([how to find X])
|
||||
efl_x11_need_result=1
|
||||
AC_CACHE_VAL(efl_cv_x11_cache,
|
||||
[
|
||||
# this is ugly and breaks that AC_CACHE_VAL may not have side effects
|
||||
# but I can't think of a better way right now
|
||||
efl_x11_need_result=0
|
||||
PKG_CHECK_EXISTS([x11],
|
||||
[
|
||||
AC_MSG_RESULT([use pkg-config])
|
||||
PKG_CHECK_MODULES([EFL_X11],[x11],
|
||||
[
|
||||
efl_cv_have_x11=yes
|
||||
efl_cv_x11_pkgconf=yes
|
||||
efl_cv_x11_cflags=$EFL_X11_CFLAGS
|
||||
efl_cv_x11_libs_pre=$EFL_X11_LIBS
|
||||
efl_cv_x11_libs_post=
|
||||
])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([use xmkmf])
|
||||
# Fallback to old AC_PATH_XTRA
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
if test "$no_x" = yes; then
|
||||
efl_cv_have_x11=no
|
||||
else
|
||||
efl_cv_have_x11=yes
|
||||
efl_cv_x11_pkgconf=no
|
||||
efl_cv_x11_cflags=$X_CFLAGS
|
||||
efl_cv_x11_libs_pre="$X_PRE_LIBS $X_LIBS"
|
||||
efl_cv_x11_libs_post=$X_EXTRA_LIBS
|
||||
fi
|
||||
])
|
||||
# Record where we found X for the cache.
|
||||
if test "x$efl_cv_have_x11" = "xno"; then
|
||||
efl_cv_x11_cache="efl_cv_have_x11=no"
|
||||
else
|
||||
efl_cv_x11_cache="efl_cv_have_x11=yes\
|
||||
efl_cv_x11_pkgconf='$efl_cv_x11_pkgconf'\
|
||||
efl_cv_x11_cflags='$efl_cv_x11_cflags'\
|
||||
efl_cv_x11_libs_pre='$efl_cv_x11_libs_pre'\
|
||||
efl_cv_x11_libs_post='$efl_cv_x11_libs_post'"
|
||||
fi
|
||||
])
|
||||
if test "x$efl_x11_need_result" = "x1"; then
|
||||
AC_MSG_RESULT([already found])
|
||||
fi
|
||||
eval "$efl_cv_x11_cache"
|
||||
|
||||
if test "x$efl_cv_have_x11" = "xyes"; then
|
||||
ELF_X11_CFLAGS_save="$CFLAGS"
|
||||
ELF_X11_CPPFLAGS_save="$CPPFLAGS"
|
||||
CFLAGS="$CFLAGS $efl_cv_x11_cflags"
|
||||
CPPFLAGS="$CPPFLAGS $efl_cv_x11_cflags"
|
||||
efl_x11_found_all=1
|
||||
for efl_x11_header in ifelse([$2], , "X11/Xlib.h", [$2]); do
|
||||
AC_CHECK_HEADER([$efl_x11_header],,[
|
||||
efl_x11_found_all=0
|
||||
break])
|
||||
done
|
||||
CPPFLAGS="$ELF_X11_CPPFLAGS_save"
|
||||
CFLAGS="$ELF_X11_CFLAGS_save"
|
||||
|
||||
if test "x$efl_x11_found_all" = "x1"; then
|
||||
EFL_X11_LIBS_save="$LIBS"
|
||||
if test "x$efl_cv_x11_pkgconf" = "xyes"; then
|
||||
efl_x11_modules="x11"
|
||||
efl_x11_lib=""
|
||||
for efl_x11_lib_function in ifelse([$3], , "X11 XOpenDisplay", [$3]); do
|
||||
if test -z "$efl_x11_lib"; then
|
||||
efl_x11_lib="$efl_x11_lib_function"
|
||||
case $efl_x11_lib in
|
||||
X11)
|
||||
;;
|
||||
Xss)
|
||||
efl_x11_modules="$efl_x11_modules xscrnsaver"
|
||||
;;
|
||||
*)
|
||||
efl_x11_lib=`echo $efl_x11_lib | tr '[A-Z]' '[a-z]'`
|
||||
efl_x11_modules="$efl_x11_modules $efl_x11_lib"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
efl_x11_lib=
|
||||
fi
|
||||
done
|
||||
|
||||
PKG_CHECK_EXISTS([$efl_x11_modules],
|
||||
[
|
||||
PKG_CHECK_MODULES([$1],[$efl_x11_modules],
|
||||
[
|
||||
efl_x11_cflags=$[]$1[]_CFLAGS
|
||||
efl_x11_libs=$[]$1[]_LIBS
|
||||
|
||||
LIBS="$LIBS $[]$1[]_LIBS"
|
||||
efl_x11_lib=""
|
||||
for efl_x11_lib_function in ifelse([$3], , "X11 XOpenDisplay", [$3]); do
|
||||
if test -z "$efl_x11_lib"; then
|
||||
efl_x11_lib="$efl_x11_lib_function"
|
||||
else
|
||||
# This is a ugly way of using AC_CHECK_FUNC with different
|
||||
# LIBS
|
||||
eval "unset ac_cv_func_$efl_x11_lib_function"
|
||||
AC_CHECK_FUNC([$efl_x11_lib_function],,
|
||||
[
|
||||
efl_x11_found_all=0
|
||||
break])
|
||||
efl_x11_lib=
|
||||
fi
|
||||
done
|
||||
])
|
||||
],[efl_x11_found_all=0])
|
||||
else
|
||||
LIBS="$LIBS $efl_cv_x11_libs_pre"
|
||||
efl_x11_libs="$efl_cv_x11_libs_pre"
|
||||
efl_x11_lib=""
|
||||
for efl_x11_lib_function in ifelse([$3], , "X11 XOpenDisplay", [$3]); do
|
||||
if test -z "$efl_x11_lib"; then
|
||||
efl_x11_lib="$efl_x11_lib_function"
|
||||
else
|
||||
AC_CHECK_LIB([$efl_x11_lib], [$efl_x11_lib_function],,[
|
||||
efl_x11_found_all=0
|
||||
break],["$efl_cv_x11_libs_post"])
|
||||
efl_x11_libs="$efl_x11_libs -l$efl_x11_lib"
|
||||
efl_x11_lib=
|
||||
fi
|
||||
done
|
||||
if test -n "$efl_cv_x11_libs_post"; then
|
||||
efl_x11_libs="$efl_x11_libs $efl_cv_x11_libs_post"
|
||||
fi
|
||||
fi
|
||||
LIBS="$EFL_X11_LIBS_save"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$efl_x11_found_all" = "x1"; then
|
||||
efl_x11_libdirs=""
|
||||
for efl_x11_option in "$efl_x11_libs"; do
|
||||
case $efl_x11_option in
|
||||
-L*)
|
||||
efl_x11_libdirs="$efl_x11_libdirs $efl_x11_option"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
AC_SUBST([$1][_cflags],[$efl_cv_x11_cflags])
|
||||
AC_SUBST([$1][_libs],[$efl_x11_libs])
|
||||
AC_SUBST([$1][_libdirs],[$efl_x11_libdirs])
|
||||
|
||||
ifelse([$4], , :, [$4])
|
||||
else
|
||||
ifelse([$5], , :, [$5])
|
||||
fi
|
||||
])
|
||||
|
|
@ -4,44 +4,16 @@ dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB(engine, simple, want_static[, ACTIO
|
|||
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB],
|
||||
[
|
||||
|
||||
have_dep="no"
|
||||
evas_engine_[]$1[]_cflags=""
|
||||
evas_engine_[]$1[]_libs=""
|
||||
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
AC_CHECK_HEADER([X11/X.h], [have_dep="yes"])
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
AC_CHECK_LIB([X11], [XCreateImage], [have_dep="yes"], [have_dep="no"])
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
AC_CHECK_LIB([Xext], [XShmCreateImage], [have_dep="yes"], [have_dep="no"])
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
if test "x$2" = "xyes" ; then
|
||||
x_libs="${x_libs} -lX11 -lXext"
|
||||
else
|
||||
x_dir=${x_dir:-/usr/X11R6}
|
||||
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
||||
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
|
||||
EFL_FIND_X(evas_engine_[]$1,
|
||||
[X11/X.h], [X11 XCreateImage Xext XShmCreateImage],
|
||||
[
|
||||
if test "x$3" = "xstatic"; then
|
||||
requirements_libs_evas="$evas_engine_[]$1[]_libs $requirements_libs_evas"
|
||||
fi
|
||||
evas_engine_[]$1[]_cflags="${x_cflags}"
|
||||
evas_engine_[]$1[]_libs="${x_libs}"
|
||||
fi
|
||||
|
||||
if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
|
||||
requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
|
||||
fi
|
||||
|
||||
AC_SUBST([evas_engine_$1_cflags])
|
||||
AC_SUBST([evas_engine_$1_libs])
|
||||
|
||||
AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
|
||||
|
||||
ifelse([$4], , :, [$4])
|
||||
],[
|
||||
ifelse([$5], , :, [$5])
|
||||
])
|
||||
])
|
||||
|
||||
dnl use: EVAS_CHECK_ENGINE_DEP_GL_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
|
@ -49,13 +21,16 @@ dnl use: EVAS_CHECK_ENGINE_DEP_GL_XLIB(engine, simple, want_static[, ACTION-IF-F
|
|||
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XLIB],
|
||||
[
|
||||
|
||||
evas_engine_[]$1[]_cflags=""
|
||||
evas_engine_[]$1[]_libs=""
|
||||
EFL_FIND_X(evas_engine_[]$1,
|
||||
[X11/Xlib.h X11/Xatom.h X11/Xutil.h X11/extensions/Xrender.h X11/Xresource.h],
|
||||
[X11 XCreateColormap Xrender XRenderCreatePicture],
|
||||
[
|
||||
CFLAGS_save="$CFLAGS"
|
||||
CFLAGS="$evas_engine_[]$1[]_cflags $CFLAGS"
|
||||
CPPFLAGS_save="$CPPFLAGS"
|
||||
CPPFLAGS="$evas_engine_[]$1[]_cflags $CPPFLAGS"
|
||||
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
AC_CHECK_HEADER([GL/gl.h],
|
||||
AC_CHECK_HEADER([GL/gl.h],
|
||||
[have_dep="yes"],
|
||||
[have_dep="no"],
|
||||
[
|
||||
|
@ -69,15 +44,15 @@ AC_CHECK_HEADER([GL/gl.h],
|
|||
#include <X11/Xresource.h>
|
||||
])
|
||||
|
||||
gl_pt_lib="";
|
||||
have_gl_pt="no"
|
||||
gl_pt_lib=""
|
||||
have_gl_pt="no"
|
||||
|
||||
AC_MSG_CHECKING([whether pthread_create() is supported])
|
||||
CFLAGS_save="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -pthread"
|
||||
LIBS_save="${LIBS}"
|
||||
LIBS="${LIBS} -pthread"
|
||||
AC_LINK_IFELSE(
|
||||
AC_MSG_CHECKING([whether pthread_create() is supported])
|
||||
CFLAGS_pt_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
LIBS_pt_save="$LIBS"
|
||||
LIBS="$LIBS -pthread"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <pthread.h>
|
||||
]],
|
||||
|
@ -86,49 +61,29 @@ pthread_create(NULL, NULL, NULL, NULL);
|
|||
]])],
|
||||
[have_gl_pt="yes"],
|
||||
[have_gl_pt="no"])
|
||||
CFLAGS=${CFLAGS_save}
|
||||
LIBS=${LIBS_save}
|
||||
AC_MSG_RESULT([${have_gl_pt}])
|
||||
CFLAGS=$CFLAGS_pt_save
|
||||
LIBS=$LIBS_pt_save
|
||||
AC_MSG_RESULT([$have_gl_pt])
|
||||
|
||||
if test "x$have_gl_pt" = "xyes" ; then
|
||||
if test "x$have_gl_pt" = "xyes" ; then
|
||||
gl_pt_lib=" -pthread"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
AC_CHECK_LIB([X11], [XCreateColormap], [have_dep="yes"], [have_dep="no"])
|
||||
fi
|
||||
if test "x$have_dep" = "xyes"; then
|
||||
LIBS_save="$LIBS"
|
||||
LIBS="$LIBS $evas_engine_[]$1[]_libs"
|
||||
AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], [-lm $gl_pt_lib])
|
||||
LIBS="$LIBS_save"
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
AC_CHECK_LIB([Xrender], [XRenderCreatePicture], [have_dep="yes"], [have_dep="no"])
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], [-lX11 -lXext -lXrender -lm $gl_pt_lib])
|
||||
fi
|
||||
|
||||
if test "x${gl_flavor_gles}" = "xyes" ; then
|
||||
if test "x${gl_flavor_gles}" = "xyes" ; then
|
||||
have_dep=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
if test "x$2" = "xyes" ; then
|
||||
x_libs="${x_libs} -lX11 -lXext -lXrender"
|
||||
if test "x$have_dep" = "xyes" ; then
|
||||
evas_engine_[]$1[]_libs="$evas_engine_[]$1[]_libs -lGL $gl_pt_lib"
|
||||
evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGL $gl_pt_lib"
|
||||
else
|
||||
x_dir=${x_dir:-/usr/X11R6}
|
||||
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
||||
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
|
||||
fi
|
||||
evas_engine_[]$1[]_cflags="-I/usr/include ${x_cflags}"
|
||||
evas_engine_[]$1[]_libs="${x_libs} -lGL $gl_pt_lib"
|
||||
evas_engine_gl_common_libs="-lGL $gl_pt_lib"
|
||||
else
|
||||
if test "x$2" = "xyes" ; then
|
||||
x_libs="${x_libs} -lX11 -lXext -lXrender"
|
||||
else
|
||||
x_dir=${x_dir:-/usr/X11R6}
|
||||
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
||||
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
|
||||
fi
|
||||
AC_CHECK_HEADER([GLES2/gl2.h],
|
||||
[have_egl="yes"],
|
||||
[have_egl="no"],
|
||||
|
@ -143,27 +98,28 @@ else
|
|||
#include <X11/Xresource.h>
|
||||
])
|
||||
if test "x${have_egl}" = "xyes" ; then
|
||||
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lm $gl_pt_lib)
|
||||
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lm $gl_pt_lib)
|
||||
if test "x${have_glesv2}" = "xyes" ; then
|
||||
evas_engine_[]$1[]_cflags="${x_cflags}"
|
||||
evas_engine_[]$1[]_libs="${x_libs} -lGLESv2 -lEGL -lm $gl_pt_lib"
|
||||
evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib"
|
||||
evas_engine_[]$1[]_libs="$evas_engine_[]$1[]_libs -lGLESv2 -lEGL -lm $gl_pt_lib"
|
||||
evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm $gl_pt_lib"
|
||||
have_dep="yes"
|
||||
AC_DEFINE(GL_GLES, 1, [GLSL runtime shader GLES2 support])
|
||||
gles_variety_sgx="yes"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
|
||||
requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS_save"
|
||||
CFLAGS="$CFLAGS_save"
|
||||
|
||||
AC_SUBST([evas_engine_$1_cflags])
|
||||
AC_SUBST([evas_engine_$1_libs])
|
||||
|
||||
AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
|
||||
if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
|
||||
requirements_libs_evas="$evas_engine_[]$1[]_libs $requirements_libs_evas"
|
||||
fi
|
||||
|
||||
AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
|
||||
],[
|
||||
ifelse([$5], , :, [$5])
|
||||
])
|
||||
])
|
||||
|
||||
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XCB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
|
@ -208,14 +164,15 @@ AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XCB],
|
|||
[
|
||||
|
||||
requirement=""
|
||||
have_dep="no"
|
||||
evas_engine_[]$1[]_cflags=""
|
||||
evas_engine_[]$1[]_libs=""
|
||||
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
AC_CHECK_HEADER([GL/gl.h],
|
||||
EFL_FIND_X(evas_engine_[]$1, [GL/gl.h],
|
||||
[X11 XCreateColormap Xrender XRenderCreatePicture],
|
||||
[
|
||||
CFLAGS_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $evas_engine_[]$1[]_cflags"
|
||||
CPPFLAGS_save="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $evas_engine_[]$1[]_cflags"
|
||||
AC_CHECK_HEADER([GL/glext.h],
|
||||
[have_dep="yes"],
|
||||
[have_dep="no"],
|
||||
[
|
||||
|
@ -223,16 +180,18 @@ AC_CHECK_HEADER([GL/gl.h],
|
|||
#include <GL/glext.h>
|
||||
#include <GL/glx.h>
|
||||
])
|
||||
CPPFLAGS=$CPPFLAGS_save
|
||||
CFLAGS=$CFLAGS_save
|
||||
|
||||
gl_pt_lib="";
|
||||
have_gl_pt="no"
|
||||
gl_pt_lib="";
|
||||
have_gl_pt="no"
|
||||
|
||||
AC_MSG_CHECKING([whether pthread_create() is supported])
|
||||
CFLAGS_save="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -pthread"
|
||||
LIBS_save="${LIBS}"
|
||||
LIBS="${LIBS} -pthread"
|
||||
AC_LINK_IFELSE(
|
||||
AC_MSG_CHECKING([whether pthread_create() is supported])
|
||||
CFLAGS_save="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -pthread"
|
||||
LIBS_save="${LIBS}"
|
||||
LIBS="${LIBS} -pthread"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <pthread.h>
|
||||
]],
|
||||
|
@ -241,25 +200,23 @@ pthread_create(NULL, NULL, NULL, NULL);
|
|||
]])],
|
||||
[have_gl_pt="yes"],
|
||||
[have_gl_pt="no"])
|
||||
CFLAGS=${CFLAGS_save}
|
||||
LIBS=${LIBS_save}
|
||||
AC_MSG_RESULT([${have_gl_pt}])
|
||||
CFLAGS=${CFLAGS_save}
|
||||
LIBS=${LIBS_save}
|
||||
AC_MSG_RESULT([${have_gl_pt}])
|
||||
|
||||
if test "x$have_gl_pt" = "xyes" ; then
|
||||
if test "x$have_gl_pt" = "xyes" ; then
|
||||
gl_pt_lib=" -pthread"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
AC_CHECK_LIB([X11], [XCreateColormap], [have_dep="yes"], [have_dep="no"])
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
AC_CHECK_LIB([Xrender], [XRenderCreatePicture], [have_dep="yes"], [have_dep="no"])
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], -lX11 -lXext -lXrender -lm $gl_pt_lib)
|
||||
fi
|
||||
if test "x$have_dep" = "xyes" ; then
|
||||
LIBS_save="$LIBS"
|
||||
LIBS="$LIBS $evas_engine_[]$1[]_libs"
|
||||
AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], [-lm $gl_pt_lib])
|
||||
LIBS="$LIBS_save"
|
||||
fi
|
||||
],[
|
||||
have_dep=no
|
||||
])
|
||||
|
||||
PKG_CHECK_EXISTS([x11-xcb xcb xcb-glx xcb-render xcb-renderutil],
|
||||
[
|
||||
|
@ -274,37 +231,22 @@ if test "x${have_dep}" = "xyes" ; then
|
|||
requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}"
|
||||
else
|
||||
PKG_CHECK_MODULES([XCB_GL], [${requirement}])
|
||||
evas_engine_[]$1[]_cflags="${XCB_CFLAGS}"
|
||||
evas_engine_[]$1[]_libs="${XCB_LIBS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
evas_engine_[]$1[]_cflags="${XCB_GL_CFLAGS}"
|
||||
evas_engine_[]$1[]_libs="${XCB_GL_LIBS}"
|
||||
|
||||
if test "x$gl_flavor_gles" = "xyes" ; then
|
||||
have_dep=no
|
||||
fi
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
if test "x$2" = "xyes" ; then
|
||||
x_libs="${x_libs} -lX11 -lXext -lXrender"
|
||||
else
|
||||
x_dir=${x_dir:-/usr/X11R6}
|
||||
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
||||
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
|
||||
fi
|
||||
evas_engine_[]$1[]_cflags="-I/usr/include ${XCB_GL_CFLAGS} ${x_cflags}"
|
||||
evas_engine_[]$1[]_libs="${XCB_GL_LIBS} ${x_libs} -lGL $gl_pt_lib"
|
||||
evas_engine_gl_common_libs="-lGL $gl_pt_lib"
|
||||
evas_engine_[]$1[]_cflags="$evas_engine_[]$1[]_cflags $XCB_GL_CFLAGS"
|
||||
evas_engine_[]$1[]_libs="$evas_engine_[]$1[]_libs $XCB_GL_LIBS -lGL $gl_pt_lib"
|
||||
evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGL $gl_pt_lib"
|
||||
else
|
||||
if test "x$2" = "xyes" ; then
|
||||
x_libs="${x_libs} -lX11 -lXext -lXrender"
|
||||
else
|
||||
x_dir=${x_dir:-/usr/X11R6}
|
||||
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
|
||||
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
|
||||
fi
|
||||
CFLAGS_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $evas_engine_[]$1[]_cflags"
|
||||
CPPFLAGS_save="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $evas_engine_[]$1[]_cflags"
|
||||
AC_CHECK_HEADER([GLES2/gl2.h],
|
||||
[have_egl="yes"],
|
||||
[have_egl="no"],
|
||||
|
@ -313,12 +255,16 @@ else
|
|||
#include <GLES2/gl2ext.h>
|
||||
#include <EGL/egl.h>
|
||||
])
|
||||
CPPFLAGS=$CPPFLAGS_save
|
||||
CFLAGS=$CFLAGS_save
|
||||
if test "x${have_egl}" = "xyes" ; then
|
||||
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lm $gl_pt_lib)
|
||||
LIBS_save="$LIBS"
|
||||
LIBS="$LIBS $evas_engine_[]$1[]_libs"
|
||||
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lm $gl_pt_lib)
|
||||
if test "x${have_glesv2}" = "xyes" ; then
|
||||
evas_engine_[]$1[]_cflags="${XCB_GL_CFLAGS} ${x_cflags}"
|
||||
evas_engine_[]$1[]_libs="${XCB_GL_LIBS} ${x_libs} -lGLESv2 -lEGL -lm $gl_pt_lib"
|
||||
evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib"
|
||||
evas_engine_[]$1[]_cflags="$evas_engine_[]$1[]_cflags $XCB_GL_CFLAGS"
|
||||
evas_engine_[]$1[]_libs="$evas_engine_[]$1[]_libs $XCB_GL_LIBS -lGLESv2 -lEGL -lm $gl_pt_lib"
|
||||
evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm $gl_pt_lib"
|
||||
have_dep="yes"
|
||||
AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
|
||||
gles_variety_sgx="yes"
|
||||
|
@ -332,9 +278,6 @@ if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
|
|||
requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}"
|
||||
fi
|
||||
|
||||
AC_SUBST([evas_engine_$1_cflags])
|
||||
AC_SUBST([evas_engine_$1_libs])
|
||||
|
||||
AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
|
||||
|
||||
])
|
||||
|
|
|
@ -159,6 +159,7 @@ modules_ecore_imf_xim_xim_la_CPPFLAGS = \
|
|||
-I$(top_builddir)/src/lib/ecore_x \
|
||||
-I$(top_srcdir)/src/lib/ecore_imf \
|
||||
@ECORE_IMF_CFLAGS@ \
|
||||
@ecore_imf_xim_cflags@ \
|
||||
@EFL_COV_CFLAGS@
|
||||
modules_ecore_imf_xim_xim_la_LIBADD = \
|
||||
lib/ecore_imf/libecore_imf.la \
|
||||
|
@ -166,6 +167,7 @@ lib/ecore_x/libecore_x.la \
|
|||
lib/ecore/libecore.la \
|
||||
lib/eo/libeo.la \
|
||||
lib/eina/libeina.la \
|
||||
@ecore_imf_xim_libs@ \
|
||||
@EFL_COV_LIBS@
|
||||
modules_ecore_imf_xim_xim_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
|
||||
modules_ecore_imf_xim_xim_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
|
|
|
@ -131,7 +131,7 @@ $(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table_h
|
|||
BUILT_SOURCES += \
|
||||
$(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table.h
|
||||
|
||||
$(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table.h: $(KEYSYMDEFS) $(top_builddir)/src/utils/ecore/makekeys$(EXEEXT)
|
||||
$(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table.h: $(KEYSYMDEFS) utils/ecore/makekeys$(EXEEXT)
|
||||
$(top_builddir)/src/utils/ecore/makekeys $(KEYSYMDEFS) > $(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table_h
|
||||
mv -f $(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table_h $(top_builddir)/src/lib/ecore_x/xcb/ecore_xcb_keysym_table.h
|
||||
endif
|
||||
|
@ -141,6 +141,7 @@ endif
|
|||
noinst_PROGRAMS += utils/ecore/makekeys
|
||||
|
||||
utils_ecore_makekeys_SOURCES = utils/ecore/makekeys.c
|
||||
utils_ecore_makekeys_CFLAGS = @ECORE_X_CFLAGS@
|
||||
|
||||
endif
|
||||
EXTRA_DIST += utils/ecore/mkks.sh
|
||||
|
|
|
@ -553,6 +553,9 @@ modules_evas_engines_gl_common_libevas_engine_gl_common_la_CPPFLAGS = \
|
|||
-I$(top_srcdir)/src/lib/evas/cserve2 \
|
||||
-DEFL_EVAS_BUILD \
|
||||
@EVAS_CFLAGS@
|
||||
if BUILD_ENGINE_GL_X11
|
||||
modules_evas_engines_gl_common_libevas_engine_gl_common_la_CPPFLAGS += @evas_engine_gl_xlib_cflags@ @evas_engine_gl_xcb_cflags@
|
||||
endif
|
||||
modules_evas_engines_gl_common_libevas_engine_gl_common_la_LIBADD = \
|
||||
lib/eet/libeet.la \
|
||||
lib/evas/libevas.la
|
||||
|
@ -653,9 +656,9 @@ if EVAS_STATIC_BUILD_GL_X11
|
|||
lib_evas_libevas_la_SOURCES += $(GL_X11_SOURCES)
|
||||
lib_evas_libevas_la_CPPFLAGS += \
|
||||
-I$(top_srcdir)/src/modules/evas/engines/gl_common \
|
||||
@evas_engine_gl_xlib_cflags@
|
||||
@evas_engine_gl_xlib_cflags@ @evas_engine_gl_xcb_cflags@
|
||||
lib_evas_libevas_la_LIBADD += \
|
||||
@evas_engine_gl_xlib_libs@
|
||||
@evas_engine_gl_xlib_libs@ @evas_engine_gl_xcb_libs@
|
||||
else
|
||||
engineglx11pkgdir = $(libdir)/evas/modules/engines/gl_x11/$(MODULE_ARCH)
|
||||
engineglx11pkg_LTLIBRARIES = modules/evas/engines/gl_x11/module.la
|
||||
|
@ -670,6 +673,7 @@ modules_evas_engines_gl_x11_module_la_CPPFLAGS = \
|
|||
-I$(top_srcdir)/src/lib/evas/cserve2 \
|
||||
-I$(top_srcdir)/src/modules/evas/engines/gl_common \
|
||||
@evas_engine_gl_xlib_cflags@ \
|
||||
@evas_engine_gl_xcb_cflags@ \
|
||||
@EVAS_CFLAGS@
|
||||
modules_evas_engines_gl_x11_module_la_LIBADD =
|
||||
if ! EVAS_STATIC_BUILD_GL_COMMON
|
||||
|
@ -679,7 +683,8 @@ endif
|
|||
modules_evas_engines_gl_x11_module_la_LIBADD += \
|
||||
lib/eet/libeet.la \
|
||||
lib/evas/libevas.la \
|
||||
@evas_engine_gl_xlib_libs@
|
||||
@evas_engine_gl_xlib_libs@ \
|
||||
@evas_engine_gl_xcb_libs@
|
||||
modules_evas_engines_gl_x11_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
|
||||
modules_evas_engines_gl_x11_module_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue