summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-09 16:48:40 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-09 16:48:40 +0000
commit57090b2abbb9dea419c99c5ce33a48e07ec33725 (patch)
treec5f6dd8cf2883a413994f0be2c6fb5df2b2d0c3f /configure.ac
parentf0a7a2a75170043bb3c44e511cc3558dc585293c (diff)
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
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac46
1 files changed, 17 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac
index 775dcee..594d9e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2595,9 +2595,6 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_X], [ecore])
2595EFL_INTERNAL_DEPEND_PKG([ECORE_X], [eina]) 2595EFL_INTERNAL_DEPEND_PKG([ECORE_X], [eina])
2596 2596
2597## Xlib 2597## Xlib
2598if test "x${want_x11_xlib}" = "xyes" ; then
2599 AC_PATH_XTRA
2600fi
2601 2598
2602## XCB 2599## XCB
2603 2600
@@ -2643,21 +2640,6 @@ int h = MAXHOSTNAMELEN;
2643fi 2640fi
2644 2641
2645## Xlib 2642## Xlib
2646use_Xcursor="no"
2647if test "x${want_x11_xlib}" = "xyes" ; then
2648 CFLAGS_save="${CFLAGS}"
2649 CFLAGS="$x_cflags $x_includes"
2650 AC_CHECK_HEADER([X11/Xcursor/Xcursor.h],
2651 [use_Xcursor="yes"],
2652 [use_Xcursor="no"],
2653 [#include <X11/Xlib.h>])
2654 CFLAGS="$CFLAGS_save"
2655
2656 if test "${use_Xcursor}" = "no"; then
2657 AC_MSG_ERROR([Xcursor is missing])
2658 fi
2659fi
2660
2661if test "x${want_x11_xcb}" = "xyes" ; then 2643if test "x${want_x11_xcb}" = "xyes" ; then
2662 KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11 2644 KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11
2663 FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h" 2645 FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
@@ -2685,17 +2667,17 @@ fi
2685 2667
2686## Xlib 2668## Xlib
2687if test "x${want_x11_xlib}" = "xyes"; then 2669if test "x${want_x11_xlib}" = "xyes"; then
2688 AC_CHECK_LIB([Xcursor], 2670 EFL_FIND_X(ECORE_X_XLIB,
2689 [XcursorImageLoadCursor], 2671 [X11/Xlib.h X11/Xcursor/Xcursor.h],
2690 [ 2672 [X11 XOpenDisplay Xcursor XcursorImageLoadCursor],
2673 [
2691 use_Xcursor="yes" 2674 use_Xcursor="yes"
2692 AC_DEFINE([ECORE_XCURSOR], 1, [Build support for Xcursor]) 2675 AC_DEFINE([ECORE_XCURSOR], 1, [Build support for Xcursor])
2693 Xcursor_libs="-lXcursor" 2676 EFL_ADD_LIBS([ECORE_X], [$ECORE_X_XLIB_libs])
2694 ], 2677 EFL_ADD_CFLAGS([ECORE_X], [$ECORE_X_XLIB_cflags])
2695 [use_Xcursor="no"], 2678 ],[
2696 [$x_libs -lXrender]) 2679 AC_MSG_ERROR([Xcursor is missing])
2697 EFL_ADD_LIBS([ECORE_X], [${Xcursor_libs}]) 2680 ])
2698 EFL_ADD_CFLAGS([ECORE_X], [$x_cflags $x_includes])
2699fi 2681fi
2700 2682
2701if test "x${want_x11_xlib}" = "xyes" ; then 2683if test "x${want_x11_xlib}" = "xyes" ; then
@@ -2848,8 +2830,14 @@ AM_CONDITIONAL([BUILD_ECORE_IMF_SCIM], [test "x${have_ecore_imf_scim}" = "xyes"]
2848 2830
2849have_ecore_imf_xim="no" 2831have_ecore_imf_xim="no"
2850if test "x${want_xim}" = "xyes" && test "x${want_ecore_imf_xim}" = "xyes" ; then 2832if test "x${want_xim}" = "xyes" && test "x${want_ecore_imf_xim}" = "xyes" ; then
2851 have_ecore_imf_xim="yes" 2833
2852 AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method]) 2834 EFL_FIND_X(ecore_imf_xim,
2835 [X11/Xlib.h],
2836 [X11 XOpenIM],
2837 [
2838 have_ecore_imf_xim=yes
2839 AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method])
2840 ])
2853fi 2841fi
2854 2842
2855AM_CONDITIONAL([BUILD_ECORE_IMF_XIM], [test "x${have_ecore_imf_xim}" = "xyes"]) 2843AM_CONDITIONAL([BUILD_ECORE_IMF_XIM], [test "x${have_ecore_imf_xim}" = "xyes"])