configure: check if realpath program exists

Summary: If realpath program does not exist, then readlink program can be used.

Test Plan:
Execute configure and check the log "checking for realpath".
If realpath program does not exist, then "checking for readlink" log is also printed.

Reviewers: woohyun, lauromoura, devilhorns

Reviewed By: lauromoura

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6470
This commit is contained in:
Jaehyun Cho 2018-06-29 14:43:03 +09:00
parent 5599f2f70c
commit 9386e2dd77
1 changed files with 9 additions and 1 deletions

View File

@ -1453,7 +1453,15 @@ AC_SUBST([CUSTOM_EXPORTS_MONO_DL_MONO])
# Eos file/library mapping
# Unescaped sed pattern: sed -n 's/src\/lib\/\([a-z0-9_]*\)\/[a-z\/]*\/\([a-z0-9\._]*\)/\2,\1/pg'
_configure_path=`realpath $0`
AC_CHECK_PROG([have_realpath], [realpath], [yes], [no])
if test "x${have_realpath}" = "xyes" ; then
_configure_path=`realpath $0`
else
AC_CHECK_PROG([have_readlink], [readlink], [yes], [no])
if test "x${have_readlink}" = "xyes" ; then
_configure_path=`readlink -f $0`
fi
fi
efl_mono_top_srcdir=`dirname ${_configure_path}`
EFL_MONO_LIBRARY_MAP=`find ${efl_mono_top_srcdir}/src/lib/ -iname "*\.eo" | sed -n 's/.*\/src\/lib\/\(@<:@a-z0-9_@:>@*\)@<:@\/a-z@:>@*\/\(@<:@a-z0-9\._@:>@*\)/\2,\1/pg'`