File: configure

package info (click to toggle)
chrony 1.14-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,480 kB
  • ctags: 2,091
  • sloc: ansic: 15,266; sh: 194; makefile: 113
file content (92 lines) | stat: -rwxr-xr-x 2,225 bytes parent folder | download
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
86
87
88
89
90
91
92
#!/bin/sh
#
# $Header: /cvs/src/chrony/configure,v 1.15 2000/07/15 21:20:06 richard Exp $
#
# =======================================================================
#
# chronyd/chronyc - Programs for keeping computer clocks accurate.
#
# Copyright (C) 1997-1999 Richard P. Curnow
# All rights reserved.
#
# For conditions of use, refer to the file LICENCE.
#
# =======================================================================



# This configure script determines the operating system type and version

OPERATINGSYSTEM=`uname -s`
VERSION=`uname -r`
MACHINE=`uname -m`

SYSTEM=${OPERATINGSYSTEM}-${MACHINE}

EXTRA_LIBS=""
EXTRA_CLI_LIBS=""
EXTRA_OBJECTS=""
EXTRA_DEFS=""
INSTALL_PREFIX=/usr/local
SYSDEFS=""

for option
do
    case "$option" in
    --prefix=* | --install_prefix=* )
	INSTALL_PREFIX=`echo $option | sed -e 's/[^=]*=//;'`
	;;
    * )
    echo "Unrecognized option : " $option
    esac
done

case $SYSTEM in
    SunOS-sun4* )
	case $VERSION in
	    4.* )
		EXTRA_OBJECTS="sys_sunos.o strerror.o"
		EXTRA_LIBS="-lkvm"
		SYSDEFS="-DSUNOS"
		echo "Configuring for SunOS (" $SYSTEM "version" $VERSION ")"
		;;
	    5.* )
		EXTRA_OBJECTS="sys_solaris.o"
		EXTRA_LIBS="-lsocket -lnsl -lkvm -lelf"
		EXTRA_CLI_LIBS="-lsocket -lnsl"
		SYSDEFS="-DSOLARIS"
		echo "Configuring for Solaris (" $SYSTEM "SunOS version" $VERSION ")"
		;;
	esac
    ;;
    Linux-* )
	EXTRA_OBJECTS="sys_linux.o wrap_adjtimex.o rtc_linux.o"
        SYSDEFS="-DLINUX"
	echo "Configuring for " $SYSTEM
    ;;
    BSD/386-i[3456]86 )
	# Antti Jrvinen <costello@iki.fi> reported that this system can
	# be supported with the SunOS 4.x driver files.
	EXTRA_OBJECTS="sys_sunos.o strerror.o"
	EXTRA_LIBS="-lkvm"
	SYSDEFS="-DSUNOS"
	echo "Configuring for BSD/386 (using SunOS driver)"
	;;
    CYGWIN32_NT-i[3456]86 )
	EXTRA_OBJECTS="sys_winnt.o"
	EXTRA_LIBS=""
	SYSDEFS="-DWINNT"
	echo "Configuring for Windows NT (Cygwin32)"
	;;
    * )
	echo "Sorry, I don't know how to build this software on your system."
	exit 1
    ;;
esac

sed -e "s%@EXTRA_OBJECTS@%${EXTRA_OBJECTS}%;\
	s%@EXTRA_LIBS@%${EXTRA_LIBS}%;\
	s%@SYSDEFS@%${SYSDEFS}%;\
	s%@EXTRA_CLI_LIBS@%${EXTRA_CLI_LIBS}%;\
	s%@INSTALL_PREFIX@%${INSTALL_PREFIX}%;"\
	< Makefile.in > Makefile