Imported Upstream version 2.4.2
[platform/upstream/libtool.git] / tests / demo-nopic.test
1 #! /bin/sh
2 # demo-nopic.test - try configuring the ../demo subdirectory
3 #
4 #   Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
5 #   Written by Gary V. Vaughan, 2003
6 #
7 #   This file is part of GNU Libtool.
8 #
9 # GNU Libtool is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation; either version 2 of
12 # the License, or (at your option) any later version.
13 #
14 # GNU Libtool is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with GNU Libtool; see the file COPYING.  If not, a copy
21 # can be downloaded from  http://www.gnu.org/licenses/gpl.html,
22 # or obtained by writing to the Free Software Foundation, Inc.,
23 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 ####
25
26 . tests/defs || exit 1
27
28 case "$host" in
29 hppa*|x86_64*|s390*)
30         func_skip "$host doesn't like non-PIC shared libs"
31         ;;
32 *-solaris*|*-sunos*)
33         func_skip "libtool does not build non-PIC shared libs on $host"
34         ;;
35 esac
36
37 if test "$build" = "$host" && test -d "/etc/selinux"; then
38         _selinux=`getenforce 2>/dev/null || echo "Disabled"`
39         case "${_selinux}" in
40         *Enforcing)
41                 _sebool_allow_execmod=`getsebool allow_execmod 2>/dev/null`
42                 case "${_sebool_allow_execmod}" in
43                         *off)
44                                 func_skip "SELinux policy disallows"
45                                 ;;
46                 esac
47                 ;;
48         esac
49 fi
50
51 func_rmprefixdir
52 func_cd "tests/demo"
53 func_make_distclean
54 func_configure "--with-pic=no"
55
56 exit 0