-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathconfigure
executable file
·50 lines (43 loc) · 1.37 KB
/
configure
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
#!/bin/sh
# -*- mode: sh -*-
# Minimal configure script which writes out a Makefile.inc
# Copyright 2010, 2011 Colin Walters <walters@verbum.org>
# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
prefix=/usr
datarootdir=${datarootdir:-${prefix}/share}
blacklist=true
for arg; do
case "$arg" in
--prefix=*) prefix=${arg#*=};;
--bindir=*) bindir=${arg#*=};;
--sbindir=*) sbindir=${arg#*=};;
--libexecdir=*) libexecdir=${arg#*=};;
--datarootdir=*) datarootdir=${arg#*=};;
--datadir=*) datadir=${arg#*=};;
--sysconfdir=*) sysconfdir=${arg#*=};;
--libdir=*) libdir=${arg#*=};;
--mandir=*) mandir=${arg#*=};;
--disable-blacklist) blacklist=false;;
*) echo "Ignoring unknown option '$arg'";;
esac
shift
done
# Handle srcdir != builddir
srcdir=$(dirname $0)
if ! test -f Makefile; then
ln -s ${srcdir}/Makefile Makefile
fi
cat > Makefile.inc.tmp <<EOF
srcdir = ${srcdir}
prefix ?= ${prefix}
bindir ?= ${bindir:-${prefix}/bin}
sbindir ?= ${sbindir:-${prefix}/sbin}
libexecdir ?= ${libexecdir:-${prefix}/libexec}
datarootdir ?= ${datarootdir}
datadir ?= ${datadir:-${datarootdir}}
sysconfdir ?= ${sysconfdir:-${prefix}/etc}
libdir ?= ${libdir:-${prefix}/lib}
mandir ?= ${mandir:-${prefix}/share/man}
blacklist ?= ${blacklist}
EOF
mv Makefile.inc.tmp Makefile.inc