-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure.ac
58 lines (43 loc) · 1.62 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([libnss-sqlite], [0.1])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([utils.h])
AC_CONFIG_HEADER([config.h])
AC_PREFIX_DEFAULT([])
AC_ARG_WITH(passwd-db,
AC_HELP_STRING([--with-passwd-db],
[Specify users' db location, defaults to /var/db/passwd.sqlite]),
AC_DEFINE_UNQUOTED([NSS_SQLITE_PASSWD_DB], ["$withval"], [Users' database]),
AC_DEFINE([NSS_SQLITE_PASSWD_DB], ["/var/db/passwd.sqlite"], [Users' database]))
AC_ARG_WITH(shadow-db,
AC_HELP_STRING([--with-shadow-db],
[Specify shadow db location (containing users' passwords), defaults
to /var/db/shadow.sqlite]),
AC_DEFINE_UNQUOTED([NSS_SQLITE_SHADOW_DB], ["$withval"], [Shadow database]),
AC_DEFINE([NSS_SQLITE_SHADOW_DB], ["/var/db/shadow.sqlite"], [Shadow database]))
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],
[Enable debug statements using syslog]),
AC_DEFINE([DEBUG], [], [Enable debugging])
CFLAGS="$CFLAGS -g")
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for libraries.
AC_CHECK_LIB([sqlite3], [sqlite3_open])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([errno.h grp.h malloc.h nss.h pthread.h pwd.h shadow.h sqlite3.h string.h syslog.h unistd.h],
[], AC_MSG_ERROR([Missing headers]))
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([strdup])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT