• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2#
3# Copyright (C) 2001, 2005 Free Software Foundation, Inc.
4# Written by Bruno Haible <bruno@clisp.org>, 2001.
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program.  If not, see <https://www.gnu.org/licenses/>.
18
19# Test whether the current package is a GNOME package.
20
21# NLS nuisances: Letter ranges are different in the Estonian locale.
22LC_ALL=C
23
24while true; do
25  configfiles=
26  if test -f configure.in; then
27    configfiles="$configfiles configure.in"
28  fi
29  if test -f configure.ac; then
30    configfiles="$configfiles configure.ac"
31  fi
32  if test -n "$configfiles"; then
33    if grep '^GNOME_' $configfiles >/dev/null 2>&1 ; then
34      exit 0
35    fi
36    exit 1
37  fi
38  dir=`basename \`pwd\``
39  case "$dir" in
40    i18n)
41      # This directory name, used in GNU make, is not the top level directory.
42      ;;
43    *[A-Za-z]*[0-9]*)
44      # Reached the top level directory.
45      exit 1
46  esac
47  # Go to parent directory
48  last=`/bin/pwd`
49  cd ..
50  curr=`/bin/pwd`
51  if test "$last" = "$curr"; then
52    # Oops, didn't find the top level directory.
53    exit 1
54  fi
55done
56