diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-03-20 15:33:37 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-03-20 15:33:37 +0100 |
commit | bfeac5ca8d9d5cf127bd6d52404266da6e04e952 (patch) | |
tree | 07f934ee4c61311b382d54d3f9c1456d1c1b9b42 | |
parent | 086e9ed2daaca207f4dc21a457c5e77c02c8a093 (diff) | |
download | sciteco-bfeac5ca8d9d5cf127bd6d52404266da6e04e952.tar.gz |
replace GNU readlink dependency with custom canonicalize() shell function
* some build environments (like XCode) do not have a GNU readlink by default
-rw-r--r-- | configure.ac | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 90dde43..8d8ec6e 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,14 @@ AC_CANONICAL_HOST scitecolibdir=$datadir/$PACKAGE/lib AC_SUBST(scitecolibdir) +# Auxiliary functions + +# expand $1 and print its absolute path +# similar to GNU readlink -e but portable +canonicalize() { + (eval cd $1 2>/dev/null && pwd -P) +} + # Checks for programs. LT_INIT AC_PROG_CXX @@ -34,11 +42,6 @@ if [[ x$DATE = x ]]; then AC_MSG_ERROR([Required tool date not found!]) fi -AC_CHECK_PROG(READLINK, readlink, readlink) -if [[ x$READLINK = x ]]; then - AC_MSG_ERROR([Required tool readlink not found!]) -fi - # not necessarily required (depends on --enable-html-manual) AC_CHECK_PROG(GROFF, groff, groff) @@ -97,9 +100,7 @@ AC_ARG_WITH(scintilla, AS_HELP_STRING([--with-scintilla=PATH], [Specify Scintilla's path [default=../scintilla]]), [SCINTILLA_PATH=$withval], [SCINTILLA_PATH=../scintilla]) -# eval necessary to perform necessary expansions that may not -# have been done by the calling shell -SCINTILLA_PATH=`eval $READLINK -e $SCINTILLA_PATH` +SCINTILLA_PATH=`canonicalize $SCINTILLA_PATH` AC_SUBST(SCINTILLA_PATH) CPPFLAGS="$CPPFLAGS -I$SCINTILLA_PATH/include -DSCI_LEXER" @@ -108,7 +109,7 @@ AC_ARG_WITH(scinterm, AS_HELP_STRING([--with-scinterm=PATH], [Specify Scinterm's path [default=SCINTILLA_PATH/scinterm]]), [SCINTERM_PATH=$withval], [SCINTERM_PATH=$SCINTILLA_PATH/scinterm]) -SCINTERM_PATH=`eval $READLINK -e $SCINTERM_PATH` +SCINTERM_PATH=`canonicalize $SCINTERM_PATH` AC_ARG_WITH(interface, AS_HELP_STRING([--with-interface=ncurses|pdcurses|gtk], |