Revision 14823,
1.2 KB
checked in by ghudson, 25 years ago
(diff) |
Do appropriate substitutions in Linux machtype script.
|
Line | |
---|
1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | AC_INIT(machtype.c) |
---|
3 | |
---|
4 | test -z "$lbindir" && lbindir='${bindir}' |
---|
5 | AC_SUBST(lbindir) |
---|
6 | |
---|
7 | AC_PROG_CC |
---|
8 | AC_PROG_INSTALL |
---|
9 | |
---|
10 | AC_CANONICAL_HOST |
---|
11 | case $host_os in |
---|
12 | solaris*) |
---|
13 | OS=solaris |
---|
14 | AC_CHECK_FUNC(kvm_read, :, AC_CHECK_LIB(kvm, kvm_read)) |
---|
15 | AC_CHECK_FUNC(read_vtoc, :, AC_CHECK_LIB(adm, read_vtoc)) |
---|
16 | ;; |
---|
17 | irix*) |
---|
18 | OS=irix |
---|
19 | ;; |
---|
20 | linux*) |
---|
21 | OS=linux |
---|
22 | ;; |
---|
23 | netbsd*) |
---|
24 | OS=netbsd |
---|
25 | ;; |
---|
26 | esac |
---|
27 | |
---|
28 | AC_MSG_CHECKING(if machtype is a script) |
---|
29 | if test -r ${srcdir}/machtype_$OS.sh; then |
---|
30 | AC_MSG_RESULT(yes) |
---|
31 | TARGET=${srcdir}/machtype.sh |
---|
32 | INSTALLFLAGS="-m 555" |
---|
33 | script=true |
---|
34 | else |
---|
35 | AC_MSG_RESULT(no) |
---|
36 | TARGET=machtype |
---|
37 | OS_OBJS=machtype_$OS.o |
---|
38 | INSTALLFLAGS="-m 2555 -o root -g sys" |
---|
39 | fi |
---|
40 | AC_SUBST(TARGET) |
---|
41 | AC_SUBST(OS_OBJS) |
---|
42 | AC_SUBST(INSTALLFLAGS) |
---|
43 | |
---|
44 | if test true = "$script"; then |
---|
45 | AC_SUBST(ATHENA_MAJOR_VERSION) |
---|
46 | AC_SUBST(ATHENA_MINOR_VERSION) |
---|
47 | AC_SUBST(ATHENA_SYS) |
---|
48 | AC_SUBST(ATHENA_SYS_COMPAT) |
---|
49 | AC_OUTPUT(Makefile machtype.sh:machtype_$OS.sh) |
---|
50 | else |
---|
51 | AC_DEFINE_UNQUOTED(ATHMAJV, "$ATHENA_MAJOR_VERSION") |
---|
52 | AC_DEFINE_UNQUOTED(ATHMINV, "$ATHENA_MINOR_VERSION") |
---|
53 | AC_DEFINE_UNQUOTED(OSVERS, "`uname -r`") |
---|
54 | AC_DEFINE_UNQUOTED(OSNAME, "`uname -s`") |
---|
55 | AC_DEFINE_UNQUOTED(ATHSYS, "$ATHENA_SYS") |
---|
56 | AC_DEFINE_UNQUOTED(ATHSYSCOMPAT, "$ATHENA_SYS_COMPAT") |
---|
57 | AC_OUTPUT(Makefile) |
---|
58 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.