| 41 |
fi |
fi |
| 42 |
|
|
| 43 |
# If PCRE has been built in a directory other than the source directory, and |
# If PCRE has been built in a directory other than the source directory, and |
| 44 |
# this test is being run from "make check" as usual, then $(srcdir) will be |
# this test is being run from "make check" as usual, then $srcdir will be |
| 45 |
# set. If not, set it to the current directory. We then arrange to run the |
# set. If not, set it to the current or parent directory, whichever one |
| 46 |
# pcregrep command in the source directory so that the file names that appear |
# contains the test data. We then arrange to run the pcregrep command in the |
| 47 |
# in the output are always the same. |
# source directory so that the file names that appear in the output are always |
| 48 |
|
# the same. |
| 49 |
|
|
| 50 |
if [ -z "$srcdir" -o ! -d "$srcdir/testdata" ] ; then |
if [ -z "$srcdir" -o ! -d "$srcdir/testdata" ] ; then |
| 51 |
srcdir=. |
if [ -d "./testdata" ] ; then |
| 52 |
|
srcdir=. |
| 53 |
|
elif [ -d "../testdata" ] ; then |
| 54 |
|
srcdir=.. |
| 55 |
|
else |
| 56 |
|
echo "Cannot find the testdata directory" |
| 57 |
|
exit 1 |
| 58 |
|
fi |
| 59 |
fi |
fi |
| 60 |
|
|
| 61 |
# Check for the availability of UTF-8 support |
# Check for the availability of UTF-8 support |