DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (31ec81b5d7bb)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
#!/bin/sh

# Default srcdir to this directory
srcdir=

for option; do
  case "$option" in
  -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case "$option" in
  --srcdir=*) srcdir="$optarg";;
  esac
done

if test -z "$CXX"; then
  CXX=`which clang++`
fi

echo -n "checking for llvm-config... "

if test -z "$LLVMCONFIG"; then
  LLVMCONFIG=`which llvm-config`
fi

if test -z "$LLVMCONFIG"; then
  LLVMCONFIG=`dirname $CXX`/llvm-config
fi

if test ! -x "$LLVMCONFIG"; then
  echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2
  exit 1
fi

echo "$LLVMCONFIG"

LLVMCXXFLAGS=`$LLVMCONFIG --cxxflags`
LLVMLDFLAGS=`$LLVMCONFIG --ldflags`
CXXFLAGS="$CXXFLAGS $LLVMCXXFLAGS -fno-rtti -fno-exceptions"
LDFLAGS="$LDFLAGS $LLVMLDFLAGS"

cat $srcdir/Makefile.in | sed \
  -e "s%@CXX@%$CXX%" \
  -e "s%@CXXFLAGS@%$CXXFLAGS%" \
  -e "s%@LDFLAGS@%$LDFLAGS%" \
  -e "s%@srcdir@%$srcdir%" \
  > Makefile