source: trunk/athena/bin/machtype/configure.in @ 14883

Revision 14883, 1.3 KB checked in by ghudson, 24 years ago (diff)
Redo script building in a way autoconf is happier with.
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(machtype.c)
3
4test -z "$lbindir" && lbindir='${bindir}'
5AC_SUBST(lbindir)
6
7AC_PROG_CC
8AC_PROG_INSTALL
9
10AC_CANONICAL_HOST
11case $host_os in
12solaris*)
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        ;;
17irix*)
18        OS=irix
19        ;;
20linux*)
21        OS=linux
22        ;;
23netbsd*)
24        OS=netbsd
25        ;;
26esac
27
28AC_MSG_CHECKING(if machtype is a script)
29if 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"
34else
35        AC_MSG_RESULT(no)
36        TARGET=machtype
37        OS_OBJS=machtype_$OS.o
38        INSTALLFLAGS="-m 2555 -o root -g sys"
39fi
40AC_SUBST(TARGET)
41AC_SUBST(OS_SCRIPT)
42AC_SUBST(OS_OBJS)
43AC_SUBST(INSTALLFLAGS)
44
45dnl Variables used to create script
46AC_SUBST(ATHENA_MAJOR_VERSION)
47AC_SUBST(ATHENA_MINOR_VERSION)
48AC_SUBST(ATHENA_SYS)
49AC_SUBST(ATHENA_SYS_COMPAT)
50
51dnl Variables used to compile from source
52AC_DEFINE_UNQUOTED(ATHMAJV, "$ATHENA_MAJOR_VERSION")
53AC_DEFINE_UNQUOTED(ATHMINV, "$ATHENA_MINOR_VERSION")
54AC_DEFINE_UNQUOTED(OSVERS, "`uname -r`")
55AC_DEFINE_UNQUOTED(OSNAME, "`uname -s`")
56AC_DEFINE_UNQUOTED(ATHSYS, "$ATHENA_SYS")
57AC_DEFINE_UNQUOTED(ATHSYSCOMPAT, "$ATHENA_SYS_COMPAT")
58
59AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.