Debian Codegraph @

configure

raw
1 #!/bin/sh
2 # -*- mode: sh -*-
3 # Minimal configure script which writes out a Makefile.inc
4 # Copyright 2010, 2011 Colin Walters <[email protected]>
5 # Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
6
7 prefix=/usr
8 blacklist=true
9
10 for arg; do
11 case "$arg" in
12 --prefix=*) prefix=${arg#*=};;
13 --bindir=*) bindir=${arg#*=};;
14 --sbindir=*) sbindir=${arg#*=};;
15 --libexecdir=*) libexecdir=${arg#*=};;
16 --datadir=*) datadir=${arg#*=};;
17 --sysconfdir=*) sysconfdir=${arg#*=};;
18 --libdir=*) libdir=${arg#*=};;
19 --mandir=*) mandir=${arg#*=};;
20 --disable-blacklist) blacklist=false;;
21 *) echo "Ignoring unknown option '$arg'";;
22 esac
23 shift
24 done
25
26 # Handle srcdir != builddir
27 srcdir=$(dirname $0)
28 if ! test -f Makefile; then
29 ln -s ${srcdir}/Makefile Makefile
30 fi
31
32 cat > Makefile.inc.tmp <<EOF
33 srcdir = ${srcdir}
34
35 prefix ?= ${prefix}
36 bindir ?= ${bindir:-${prefix}/bin}
37 sbindir ?= ${sbindir:-${prefix}/sbin}
38 libexecdir ?= ${libexecdir:-${prefix}/libexec}
39 datadir ?= ${datadir:-${prefix}/share}
40 sysconfdir ?= ${sysconfdir:-${prefix}/etc}
41 libdir ?= ${libdir:-${prefix}/lib}
42 mandir ?= ${mandir:-${prefix}/share/man}
43
44 blacklist ?= ${blacklist}
45
46 EOF
47 mv Makefile.inc.tmp Makefile.inc