1#! /bin/sh
2# demo-nopic.test - try configuring the ../demo subdirectory
3
4# Test script header.
5need_prefix=no
6if test -z "$srcdir"; then
7  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
8  test "$srcdir" = "$0" && srcdir=.
9  test "${VERBOSE+set}" != "set" && VERBOSE=yes
10fi
11. $srcdir/defs || exit 1
12
13# This doesn't work on hppa
14case "$host" in
15hppa*|x86_64*|s390*)
16        echo "Not running on $host, it doesn't like non-PIC shared libs" 2>&1
17        exit 77
18	;;
19*-solaris*|*-sunos*)
20	echo "libtool does not build non-PIC shared libs on $host" 2>&1
21	exit 77
22	;;
23esac
24
25# Maybe we have a VPATH build, in which case, create a new subdir.
26test -d ../demo || mkdir ../demo
27
28# Change to our build directory.
29cd ../demo || exit 1
30
31# Possibly clean up the distribution.
32if test -f Makefile; then
33  echo "= Running $make distclean in ../demo"
34  $make distclean
35fi
36rm -f config.cache
37
38# Configure the demonstration.
39echo "= Configuring in ../demo (prefix=$prefix) with --without-pic"
40${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix --build=$host --with-pic=no || exit 1
41
42exit 0
43