File: config

package info (click to toggle)
daemon 0.6.4-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, squeeze, stretch, wheezy
  • size: 2,600 kB
  • ctags: 2,389
  • sloc: ansic: 28,824; sh: 3,036; perl: 594; makefile: 304
file content (83 lines) | stat: -rwxr-xr-x 1,914 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
#
# daemon - http://libslack.org/daemon/
#
# Copyright (C) 1999-2010 raf <raf@raf.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# or visit http://www.gnu.org/copyleft/gpl.html
#

# 20100612 raf <raf@raf.org>

die() { echo "$0: $@" >&2; exit 1; }

case "`uname -a`" in
	Linux*)
		echo "Configuring for linux"
		conf/linux
		;;

	GNU/kFreeBSD*)
		echo "Configuring for kfreebsd"
		conf/kfreebsd
		;;

	FreeBSD*)
		echo "Configuring for freebsd"
		conf/freebsd
		;;

	NetBSD*)
		echo "Configuring for netbsd"
		conf/netbsd
		;;

	OpenBSD*)
		echo "Configuring for openbsd"
		conf/openbsd
		;;

	SunOS*)
		cc=""
		solaris="solaris10"
		[ "x`uname -r`" = "x5.8" ] && solaris="solaris8"
		[ "x`uname -r`" = "x5.6" ] && solaris="solaris6"
		if [ "`uname -m`" = sun4u ]
		then
			[ "x`which gcc 2>&-`" != "x" ] && cc="gcc"
			[ "x`which cc 2>&-`"  != "x" ] && cc="cc"
		else
			[ "x`which cc 2>&-`"  != "x" ] && cc="cc"
			[ "x`which gcc 2>&-`" != "x" ] && cc="gcc"
		fi
		[ "$cc" = "" ] && die "Failed to find a compiler"
		echo "Configuring for $solaris (with $cc)"
		conf/$solaris-$cc
		;;

	Darwin*)
		echo "Configuring for macosx"
		conf/macosx
		;;

	*)
		die "Unknown platform: please configure manually"
		;;
esac

exit 0

# vi:set ts=4 sw=4: