1#!/bin/sh -
2#
3# $Id$
4#
5# Check to make sure we can run DB 1.85 code.
6
7[ -f ../libdb.a ] || (cd .. && make libdb.a) || {
8	echo 'FAIL: unable to find or build libdb.a'
9	exit 1
10}
11
12# set -enable-compat185 when configure to get proper h files.
13# if compile on linux blade server, add -pthread on cc
14CINC=-I..
15[ `uname` = "Linux" ] && CINC="$CINC -pthread"
16
17if cc -g -Wall $CINC t.c ../libdb.a -o t; then
18	:
19else
20	echo "FAIL: unable to compile test program t.c"
21	exit 1
22fi
23
24if ./t; then
25	:
26else
27	echo "FAIL: test program failed"
28	exit 1
29fi
30
31# Clean up so the next test doesn't get confused.
32rm -rf *
33
34exit 0
35