diff --git a/legacy/ecore/m4/ecore_check_options.m4 b/legacy/ecore/m4/ecore_check_options.m4 index 9c805e6924..257c63b531 100644 --- a/legacy/ecore/m4/ecore_check_options.m4 +++ b/legacy/ecore/m4/ecore_check_options.m4 @@ -191,18 +191,48 @@ AC_DEFUN([ECORE_CHECK_TSLIB], [ _ecore_want_tslib=$1 _ecore_have_tslib="no" -tslib_libs="" +TSLIB_LIBS="" +TSLIB_CFLAGS="" if test "x${_ecore_want_tslib}" = "xyes" -o "x${_ecore_want_tslib}" = "xauto" ; then - AC_CHECK_HEADER([tslib.h], - [ - AC_CHECK_LIB([ts], [ts_open], [tslib_libs="-lts", tslib_libs="-ltslib"]) - AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code]) - _ecore_have_ts="yes" - ]) + PKG_CHECK_MODULES(TSLIB, tslib-1.0, + [ + AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code]) + _ecore_have_ts="yes" + ], + [ + PKG_CHECK_MODULES(TSLIB, tslib, + [ + AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code]) + _ecore_have_ts="yes" + ], + [ + AC_CHECK_HEADER([tslib.h], + [ + AC_CHECK_LIB([ts], [ts_open], + [ + TSLIB_LIBS="-lts" + TSLIB_CFLAGS="" + AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code]) + _ecore_have_ts="yes" + , + AC_CHECK_LIB([tslib], [ts_open], + [ + TSLIB_LIBS="-ltslib" + TSLIB_CFLAGS="" + AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code]) + _ecore_have_ts="yes" + , + _ecore_have_ts="no" + ]) + ]) + ]) + ]) + ]) fi -AC_SUBST(tslib_libs) +AC_SUBST(TSLIB_LIBS) +AC_SUBST(TSLIB_CFLAGS) if test "x$_ecore_have_tslib" = "xyes" ; then m4_default([$2], [:])