File: configure.ac

package info (click to toggle)
userinfo 1.10a-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 548 kB
  • ctags: 167
  • sloc: sh: 3,181; ansic: 1,752; makefile: 50
file content (97 lines) | stat: -rw-r--r-- 2,875 bytes parent folder | download | duplicates (2)
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
93
94
95
96
97
dnl $Id: configure.ac,v 1.8 2002/10/30 15:01:31 bjk Exp $
dnl
dnl Process this file with autoconf to produce a configure script.
AC_INIT(userinfo, 1.10a, [Ben Kibbey <bjk@arbornet.org>])
AC_CONFIG_AUX_DIR(build)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([foreign])
AC_PROG_MAKE_SET
AM_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([src/ui.c])

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h limits.h paths.h shadow.h stdlib.h string.h \
		  sys/param.h unistd.h utmpx.h sys/syslimits.h \
		  lastlog.h libgen.h err.h])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM

dnl Checks for library functions.
AC_FUNC_GETGROUPS
AC_FUNC_LSTAT
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([getspnam memset munmap strchr strdup strerror setpassent \
		setgroupent strsep])

dnl proc filesystem support
AC_MSG_CHECKING(for /proc filesystem)
if test -e /proc/self -o -e /proc/curproc; then
    AC_MSG_RESULT(yes)
    HAVE_PROCFS=1
    AC_DEFINE(HAVE_PROCFS, 1, [Define if you have a /proc file system.])
else
    AC_MSG_RESULT(no)
fi   

case "$target_os" in
    *bsd*) 
        AC_CHECK_HEADERS(kvm.h, AC_DEFINE([BSD_KVM], 1, [Define for BSD KVM.]))
        AC_CHECK_LIB(kvm, kvm_openfiles)
	;;
    *linux*) 
	if test ! $HAVE_PROCFS; then
	    AC_MSG_WARN(no /proc filesystem found. PPID info will be unavailable)
	fi
	;;
    *darwin*)
        AC_CHECK_HEADERS(kvm.h)
        AC_CHECK_LIB(kvm, kvm_openfiles)
	LDFLAGS="-flat_namespace"
        ;;
    *)
        ;;
esac

dnl default alias file
alias_file="/etc/aliases"

AC_ARG_WITH(aliases, 
[  --with-aliases=FILE     location of mail aliases file (/etc/aliases)],
alias_file="$withval")

AC_MSG_CHECKING(for mail aliases file)
if test -f $alias_file; then
    AC_MSG_RESULT($alias_file)
else
    AC_MSG_RESULT($alias_file not found \(using it anyway\))
fi

AC_DEFINE_UNQUOTED([ALIAS_FILE], "$alias_file", [Location of mail alias file.])
AC_DEFINE([SYSLOG_PRIORITY], LOG_NOTICE, [Syslog() logging priority.])
AC_DEFINE([MOPT_ORDER_PASSWD], "lpugckidsm", [Default order of password options. Dont include any sub-options in the order.])
AC_DEFINE([MOPT_ORDER_MAIL], "zwroa", [Default order of mail options.])
AC_DEFINE([MOPT_ORDER_LOGIN], "Cbqeyxtn", [Default order of login options. Dont include any sub-options in the order.])
AC_DEFINE([DEFDELIM], ':', [Default field deliminator.])
AC_DEFINE([DEF_TIMEFORMAT], "%a %b %d %R %Y", [Default strftime() time format.])
AC_DEFINE([UNKNOWN], "!", [Unknown field string.])
AC_DEFINE([NONE], "-", [None or empty field string.])
AC_DEFINE([ON], "1", [On or yes field string.])
AC_DEFINE([OFF], "0", [Off or no field string.])

AM_WITH_DMALLOC

AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])
AC_OUTPUT