File: configure

package info (click to toggle)
dcmtk 3.5.4-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 23,784 kB
  • ctags: 22,942
  • sloc: cpp: 165,761; ansic: 46,396; sh: 3,808; perl: 3,465; makefile: 3,097
file content (56 lines) | stat: -rwxr-xr-x 1,123 bytes parent folder | download | duplicates (52)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#! /bin/sh

parentdir=`pwd`
thisdir=$parentdir

# The following test constructs relative path from the module
# directory to the configuration directory. If you know this path
# you can substitute this with
# configdir=<relative_path>
# It is very important that the configdir path is relative.

configdir="configdir"

while test $parentdir != "/" -a $configdir = "configdir"; do
	if test -d $parentdir/config ; then
		configdir=$parentdir/config
	else
		parentdir=`echo $parentdir | sed 's/\/[^\/]*$//'`
	fi
done

if test $configdir = "configdir" ; then
	echo "Cannot find configure directory"
	exit 1
fi

if test $# != 0;  then
	case $1 in
	-a)
		shift
		cd $configdir
		echo "running configure in config-directory"
		./configure $*
		cd $thisdir
		echo "running configure for this module"
		sh $configdir/confmod --srcdir=. $* 
		;;
	-c)
		shift
		cd $configdir
		echo "running configure in config-directory"
		./configure $*
		;;
	*)
		echo "running configure for this module"
		sh $configdir/confmod --srcdir=. $* 
		;;
	esac
else
	echo "running configure for this module"
	sh $configdir/confmod --srcdir=. $*
fi