jpayne@68: #!/bin/sh jpayne@68: # jpayne@68: # Copyright (C) 2001, 2005 Free Software Foundation, Inc. jpayne@68: # Written by Bruno Haible , 2001. jpayne@68: # jpayne@68: # This program is free software: you can redistribute it and/or modify jpayne@68: # it under the terms of the GNU General Public License as published by jpayne@68: # the Free Software Foundation; either version 3 of the License, or jpayne@68: # (at your option) any later version. jpayne@68: # jpayne@68: # This program is distributed in the hope that it will be useful, jpayne@68: # but WITHOUT ANY WARRANTY; without even the implied warranty of jpayne@68: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jpayne@68: # GNU General Public License for more details. jpayne@68: # jpayne@68: # You should have received a copy of the GNU General Public License jpayne@68: # along with this program. If not, see . jpayne@68: jpayne@68: # Test whether the current package is a KDE package. jpayne@68: jpayne@68: # NLS nuisances: Letter ranges are different in the Estonian locale. jpayne@68: LC_ALL=C jpayne@68: jpayne@68: while true; do jpayne@68: configfiles= jpayne@68: if test -f configure.in; then jpayne@68: configfiles="$configfiles configure.in" jpayne@68: fi jpayne@68: if test -f configure.ac; then jpayne@68: configfiles="$configfiles configure.ac" jpayne@68: fi jpayne@68: if test -n "$configfiles"; then jpayne@68: if grep '^KDE_' $configfiles >/dev/null 2>&1 || \ jpayne@68: grep '^AC_PATH_KDE' $configfiles >/dev/null 2>&1 || \ jpayne@68: grep '^AM_KDE_WITH_NLS' $configfiles >/dev/null 2>&1 ; then jpayne@68: exit 0 jpayne@68: fi jpayne@68: exit 1 jpayne@68: fi jpayne@68: dir=`basename \`pwd\`` jpayne@68: case "$dir" in jpayne@68: i18n) jpayne@68: # This directory name, used in GNU make, is not the top level directory. jpayne@68: ;; jpayne@68: *[A-Za-z]*[0-9]*) jpayne@68: # Reached the top level directory. jpayne@68: exit 1 jpayne@68: esac jpayne@68: # Go to parent directory jpayne@68: last=`/bin/pwd` jpayne@68: cd .. jpayne@68: curr=`/bin/pwd` jpayne@68: if test "$last" = "$curr"; then jpayne@68: # Oops, didn't find the top level directory. jpayne@68: exit 1 jpayne@68: fi jpayne@68: done