From af5c3afa91cc29268c6754ea70f15cae30f22403 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 27 Jan 2014 10:12:12 -0400 Subject: compat: add canonicalize_file_name the POSIX 2008 behaviour of realpath is not available everywhere so we provide a simple wrapper function. We use (and provide) the gnu extension canonicalize_file_name to make it cleaner to test for the feature we need; otherwise we have to rely on realpath segfaulting if the second argument is null. --- configure | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 1d430b9c..09f4650c 100755 --- a/configure +++ b/configure @@ -556,6 +556,18 @@ EOF exit 1 fi +printf "Checking for canonicalize_file_name... " +if ${CC} -o compat/have_canonicalize_file_name "$srcdir"/compat/have_canonicalize_file_name.c > /dev/null 2>&1 +then + printf "Yes.\n" + have_canonicalize_file_name=1 +else + printf "No (will use our own instead).\n" + have_canonicalize_file_name=0 +fi +rm -f compat/have_canonicalize_file_name + + printf "Checking for getline... " if ${CC} -o compat/have_getline "$srcdir"/compat/have_getline.c > /dev/null 2>&1 then @@ -800,6 +812,10 @@ bash_completion_dir = ${BASHCOMPLETIONDIR:=\$(sysconfdir)/bash_completion.d} # The directory to which zsh completions files should be installed zsh_completion_dir = ${ZSHCOMLETIONDIR:=\$(prefix)/share/zsh/functions/Completion/Unix} +# Whether the getline function is available (if not, then notmuch will +# build its own version) +HAVE_CANONICALIZE_FILE_NAME = ${have_canonicalize_file_name} + # Whether the getline function is available (if not, then notmuch will # build its own version) HAVE_GETLINE = ${have_getline} -- cgit v1.2.3