Revision 14883,
1.3 KB
checked in by ghudson, 24 years ago
(diff) |
Redo script building in a way autoconf is happier with.
|
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=machtype.sh |
---|
32 | OS_SCRIPT=${srcdir}/machtype_$OS.sh |
---|
33 | INSTALLFLAGS="-m 555" |
---|
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_SCRIPT) |
---|
42 | AC_SUBST(OS_OBJS) |
---|
43 | AC_SUBST(INSTALLFLAGS) |
---|
44 | |
---|
45 | dnl Variables used to create script |
---|
46 | AC_SUBST(ATHENA_MAJOR_VERSION) |
---|
47 | AC_SUBST(ATHENA_MINOR_VERSION) |
---|
48 | AC_SUBST(ATHENA_SYS) |
---|
49 | AC_SUBST(ATHENA_SYS_COMPAT) |
---|
50 | |
---|
51 | dnl Variables used to compile from source |
---|
52 | AC_DEFINE_UNQUOTED(ATHMAJV, "$ATHENA_MAJOR_VERSION") |
---|
53 | AC_DEFINE_UNQUOTED(ATHMINV, "$ATHENA_MINOR_VERSION") |
---|
54 | AC_DEFINE_UNQUOTED(OSVERS, "`uname -r`") |
---|
55 | AC_DEFINE_UNQUOTED(OSNAME, "`uname -s`") |
---|
56 | AC_DEFINE_UNQUOTED(ATHSYS, "$ATHENA_SYS") |
---|
57 | AC_DEFINE_UNQUOTED(ATHSYSCOMPAT, "$ATHENA_SYS_COMPAT") |
---|
58 | |
---|
59 | AC_OUTPUT(Makefile) |
---|
Note: See
TracBrowser
for help on using the repository browser.