File: configure.ac

package info (click to toggle)
yp-tools 3.3-5.1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 2,720 kB
  • sloc: sh: 12,020; ansic: 8,970; makefile: 85; sed: 16
file content (103 lines) | stat: -rw-r--r-- 3,400 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
98
99
100
101
102
103
dnl Process this file with autoconf to produce a configure script.
AC_INIT(yp-tools, 3.3, kukuk@linux-nis.org)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/ypcat.c])
AM_CONFIG_HEADER(config.h)
AC_PREFIX_DEFAULT(/usr)

AC_SUBST(PACKAGE)
AC_SUBST(VERSION)

dnl Change libexec to lib/yp
if test ${libexecdir} = '${exec_prefix}/libexec'
then
  libexecdir='${exec_prefix}/lib/yp'
fi

dnl Should we install domainname ? default yes
AC_ARG_ENABLE(domainname,
        [  --disable-domainname    Don't install domainname [default=yes]],
              INSTALL_DOMAINNAME=$enableval, INSTALL_DOMAINNAME=yes)
if test "$INSTALL_DOMAINNAME" = "no"
then
   DOMAINNAME=
   MAN_DOMAINNAME=
else
   DOMAINNAME=domainname
   MAN_DOMAINNAME="domainname.8 nisdomainname.8 ypdomainname.8"
fi
AC_SUBST(DOMAINNAME)
AC_SUBST(MAN_DOMAINNAME)

dnl Should we use the CRACKLIB ? default no
AC_ARG_ENABLE(cracklib,
        [  --enable-cracklib       Use the cracklib for yppasswd [default=no]],
        USE_CRACKLIB=1
        AC_DEFINE(USE_CRACKLIB,1,[Define if you want to use libcrack to check the new passwords]))

dnl Should we do extra checks even if we use the CRACKLIB ? default no
AC_ARG_ENABLE(cracklib-strict,
        [  --enable-cracklib-strict Do some extra tests before accepting [default=no]],
        USE_CRACKLIB=1;
        USE_CRACKLIB_STRICT=1;
        AC_DEFINE(USE_CRACKLIB,1,[Define if you want to use libcrack to check the new passwords])
        AC_DEFINE(USE_CRACKLIB_STRICT,1,[Define if you want to use some extra checks besides the cracklib]))

dnl Should passwd be used instead of yppasswd ? Default is no.
AC_ARG_ENABLE(call-passwd,
        [  --enable-call-passwd  yppasswd calls passwd, chfn or chsh [default=no]],
	YPPASSWD_IS_DEPRECATED=1
        AC_DEFINE(YPPASSWD_IS_DEPRECATED,1,[Define if yppasswd is deprecated and passwd should be used instead]))


dnl Checks for programs.
AC_PROG_CC
AC_GNU_SOURCE
AM_PROG_CC_C_O
dnl If we're using gcc, we want warning flags
dnl test -n "$GCC" && WARNFLAGS="-Wall"
test -n "$GCC" && WARNFLAGS="-W -Wall -Wbad-function-cast -Wcast-align -Winline -Wnested-externs -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Werror"
AC_SUBST(WARNFLAGS)
AC_PROG_CPP
AC_ISC_POSIX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_LIBTOOL
LT_INIT

if test "${YPPASSWD_IS_DEPRECATED}" = "1"; then
  AC_PATH_PROG([PASSWD_PROG], [passwd], [/usr/bin/passwd])
  AC_PATH_PROG([CHFN_PROG], [chfn], [/usr/bin/chfn])
  AC_PATH_PROG([CHSH_PROG], [chsh], [/usr/bin/chsh])
fi

dnl Checks for libraries.
PKG_CHECK_MODULES([TIRPC], [libtirpc])
AC_CHECK_LIB(crypt,crypt,LIBCRYPT="-lcrypt",LIBCRYPT="")
AC_SUBST(LIBCRYPT)

dnl Check for libcrack
if test "${USE_CRACKLIB}" = "1"; then
  AC_CHECK_LIB(crack, FascistCheck, LIBCRACK="-lcrack",LIBCRACK="")
  AC_SUBST(LIBCRACK)
fi

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(getopt.h rpc/clnt_soc.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

dnl AC_REPLACE_FUNCS(ypbinderr_string)

dnl internationalization macros
AM_GNU_GETTEXT_VERSION([0.19.2])
AM_GNU_GETTEXT([external])

AC_OUTPUT([Makefile lib/Makefile src/Makefile man/Makefile
	   etc/Makefile po/Makefile.in nss_nis6/Makefile libnis.pc
	   man/domainname.8 man/nicknames.5 man/yp_dump_binding.8
	   man/ypcat.1 man/ypmatch.1 man/yppasswd.1 man/yppoll.8
	   man/ypset.8 man/yptest.8 man/ypwhich.1])