File: configure.in

package info (click to toggle)
p3nfs 5.3-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 596 kB
  • ctags: 825
  • sloc: ansic: 7,434; makefile: 126; sh: 40
file content (70 lines) | stat: -rw-r--r-- 1,823 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
AC_REVISION($ Revision: 0.1 $)dnl revision of this configure.in script

AC_INIT(nfsd/mp_pfs_ops.c)
cache_file=/dev/null
AC_CONFIG_HEADER(include/config.h)

dnl checks for programs
VERSION=`sed -n -e 's/#define[        ]*VERSION[      ]*"\([^"]*\)"/\1/p' < include/version.h`
AC_MSG_RESULT(this is p3nfs version $VERSION)
AC_SUBST(VERSION)
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_CPP

CFLAGS="-O"
test "$GCC" = yes && CFLAGS="-O2 -Wall"
AC_PATH_PROG(CC_PATH, $CC)
test "$CC_PATH" = /opt/SUNWspro/bin/cc && CFLAGS="-xO2 -v"

dnl checking for aix
AC_MSG_CHECKING(for AIX)
if test "`uname -s`" = AIX ; then
  AC_MSG_RESULT(yes)
  AC_CHECK_LIB(bsd, hostname)
  EXTRA_OBJS=mount_aix.o
else
  AC_MSG_RESULT(no)
fi
AC_SUBST(EXTRA_OBJS)

dnl checks for libraries
dnl these three are for solaris
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, gethostbyname)
ac_save_LDFLAGS=$LDFLAGS; LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
AC_CHECK_LIB(rpcsoc, svcudp_create,,LDFLAGS=$ac_save_LDFLAGS)

dnl checks for some files
AC_MSG_CHECKING(for mount table)
for i in /etc/mnttab /etc/mtab; do
  if test -f $i ; then
    MTAB=$i
    AC_MSG_RESULT($i)
    break
  fi
done
test -z "$MTAB" && AC_MSG_ERROR(mtab not found... Try harder.)
AC_SUBST(MTAB)

AC_MSG_CHECKING(for default serial line)
for i in /dev/tty0p0 /dev/tty00 /dev/ttyS0 /dev/term/a /dev/ttya /dev/tty0 /dev/ttyf1 ; do
  if test -c $i ; then
    DDEV=$i
    AC_MSG_RESULT($i)
    break
  fi
done
test -z "$DDEV" && AC_MSG_ERROR(serial device not found... Try harder.)
AC_SUBST(DDEV)

dnl checks for header files
AC_CHECK_HEADERS(sys/ioctl.h sys/errno.h sys/ttold.h stdlib.h)

dnl checks for typedefs
dnl checks for structures
dnl checks for compiler characteristics
dnl checks for library functions
dnl checks for system services

AC_OUTPUT(Makefile nfsd/Makefile include/defs.h)