forked from vixie/cron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.configure
executable file
·85 lines (80 loc) · 1.64 KB
/
default.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/sh
SYSTEM=$(uname -s)
case "$SYSTEM" in
FreeBSD)
prefix=/usr/local
sysconfdir=/usr/local/etc
mandir=/usr/local/man
;;
Linux)
prefix=/usr
sysconfdir=/etc
mandir=$prefix/share/man
;;
Darwin)
prefix=/usr/local
sysconfdir=/usr/local/etc
mandir=/usr/local/share/man
if [ -z "$CPPFLAGS" ] ; then
export CPPFLAGS="-I/opt/local/include -I/opt/local/include/db48"
fi
if [ -z "$LDFLAGS" ] ; then
export LDFLAGS="-L/opt/local/lib -L/opt/local/lib/db48"
fi
;;
*)
prefix=/usr
sysconfdir=/etc
mandir=/usr/man
;;
esac
if [ ! -d m4 -a -f configure.ac -a -f Makefile.am ] ; then
mkdir -p m4
fi
if [ ! -f conf-release ] ; then
echo 1.1 > conf-release
fi
force=0
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
;;
*) optarg=
;;
esac
case "$1" in
--force)
force=1
;;
*)
echo "invalid option [$1]"
read key
exit 1
;;
esac
shift
done
if [ $force -eq 1 -o ! -f ./configure -o ! -f Makefile -o ! -f Makefile.in -o ! -f depcomp ] ; then
autoreconf -fiv
fi
if [ $force -eq 0 -a -f Makefile ] ; then
case "$SYSTEM" in
Darwin|FreeBSD)
if [ $(stat -f %m configure.ac) -le $(stat -f %m Makefile) ] ; then
echo "Already configured"
exit 0
fi
;;
*)
if [ $(stat --format %Y configure.ac) -le $(stat --format %Y Makefile) ] ; then
echo "Already configured"
exit 0
fi
;;
esac
fi
./configure --prefix=$prefix --mandir=$mandir \
--enable-crondir=$sysconfdir/indimail/cron \
--enable-spooldir=crontabs \
--enable-syscrondir=$sysconfdir/indimail/cron.d \
--enable-syscrontab=$sysconfdir/indimail/crontab