File: configure.ac

package info (click to toggle)
base-passwd 3.6.8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 516 kB
  • sloc: ansic: 1,216; sh: 115; makefile: 60
file content (53 lines) | stat: -rw-r--r-- 1,749 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
dnl Initialize the autoconf process
AC_INIT([base-passwd],
	m4_esyscmd_s([head -n1 debian/changelog | sed -n 's/.*(\(.*\)).*/\1/p']))
AC_CONFIG_SRCDIR([update-passwd.c])
AC_CONFIG_HEADERS([config.h])
AC_PREFIX_DEFAULT([/usr])
AM_INIT_AUTOMAKE([-Wall foreign])

dnl Let's see if all programs we need are installed
AC_PROG_CC
AC_PROG_INSTALL
AC_SYS_LARGEFILE

dnl Scan for things we need
AC_CHECK_FUNCS([putgrent])

dnl Check for SELinux
AC_MSG_CHECKING([whether to enable SELinux support])
AC_ARG_ENABLE([selinux],
  [AS_HELP_STRING([--disable-selinux], [disable support for SELinux])],
  [],
  [enable_selinux=yes])
AC_MSG_RESULT($enable_selinux)
AS_IF([test "x$enable_selinux" != xno],
  [AC_CHECK_LIB([selinux], [is_selinux_enabled], [],
    [AC_MSG_ERROR(
      [SELinux support not available (use --disable-selinux to disable)])])])

dnl Check for debconf
AC_MSG_CHECKING([whether to enable debconf support])
AC_ARG_ENABLE([debconf],
  [AS_HELP_STRING([--disable-debconf], [disable support for debconf])],
  [],
  [enable_debconf=yes])
AC_MSG_RESULT($enable_debconf)
AS_IF([test "x$enable_debconf" != xno],
  [AC_CHECK_LIB([debconfclient], [debconfclient_new], [],
    [AC_MSG_ERROR(
      [debconf support not available (use --disable-debconf to disable)])])
   AC_DEFINE([HAVE_DEBCONF], [1], [Define if you have libdebconfclient])])

dnl Check whether to build the documentation 
AC_MSG_CHECKING([whether to build the documentation])
AC_ARG_ENABLE([docs],
  [AC_HELP_STRING([--disable-docs], [do not build and install documentation])],
  [],
  [enable_docs=yes])
AC_MSG_RESULT($enable_docs)
AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes)

dnl Finally output everything
AC_CONFIG_FILES([Makefile doc/Makefile man/Makefile])
AC_OUTPUT