From 26dd936de1ffd4c51b9889b43372f502060107d5 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 18 Jun 2005 00:41:28 +0000 Subject: [PATCH] better x detect SVN revision: 15406 --- legacy/ecore/configure.in | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/legacy/ecore/configure.in b/legacy/ecore/configure.in index 24a64a3b12..a1495707c7 100644 --- a/legacy/ecore/configure.in +++ b/legacy/ecore/configure.in @@ -241,15 +241,22 @@ else fi if test "x$have_ecore_x" = "xyes"; then - AM_CONDITIONAL(BUILD_ECORE_X, true) - AC_DEFINE(BUILD_ECORE_X, 1, [Build Ecore_X Module]) - BUILD_ECORE_X=1 - x_dir="/usr/X11R6"; - x_includes=""; - x_cflags="-I"$x_dir"/include"; - x_libs="-L"$x_dir"/lib -lX11 -lXext"; - x_ldflags=" "$ecore_x_libs; - ecore_x_libs="-lecore_x"; + AC_PATH_XTRA + AC_CHECK_HEADER(X11/X.h, + [ + AM_CONDITIONAL(BUILD_ECORE_X, true) + AC_DEFINE(BUILD_ECORE_X, 1, [Build Ecore_X Module]) + BUILD_ECORE_X=1 + 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" + x_ldflags=" "$ecore_x_libs; + ecore_x_libs="-lecore_x"; + ],[ + AM_CONDITIONAL(BUILD_ECORE_X, false) + BUILD_ECORE_X=0 + ] + ) else AM_CONDITIONAL(BUILD_ECORE_X, false) BUILD_ECORE_X=0