-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
55 lines (42 loc) · 1.73 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.57])
AC_INIT([pam_lcmapsd], [0.1.0], [[email protected]])
AM_INIT_AUTOMAKE([1.6.3 foreign])
# Don't build static libs
LT_INIT([disable-static])
AC_COPYRIGHT([Copyright (c) 2012 Nikhef.
See LICENCE file for details
])
# Taken over from Linux-PAM-1.1.4 configure.ac
AC_ARG_ENABLE(securedir,
AS_HELP_STRING([--enable-securedir=DIR],[path to location of PAMs [default=$libdir/security]]),
SECUREDIR=$enableval, SECUREDIR=$libdir/security)
AC_SUBST(SECUREDIR)
# Allow custom location for the config file
AC_ARG_WITH([config],
[AC_HELP_STRING([--with-config=FILE],
[use specified FILE as config [default=$sysconfdir/security/pam_lcmapsd.conf]])],
[AS_IF([test "x$withval" = "xyes" -o "x$withval" = "xno" ],
[AC_MSG_FAILURE([Option --with-config needs a filename])],
[AS_IF([test "x`echo $withval|cut -c1`" != "x/" ],
[AC_MSG_FAILURE([Option --with-config needs an absolute filename])],
[AS_IF([test "x`echo "$withval"|grep '\.\.'`" != "x" ],
[AC_MSG_FAILURE([Option --with-config may not contain '..'])],
[CONFIG_FILE=$withval])
])
])
],
[CONFIG_FILE=$sysconfdir/security/pam_lcmapsd.conf])
# Print and subsitute the result.
AC_MSG_RESULT([CONFIG_FILE set to $CONFIG_FILE])
AC_SUBST(CONFIG_FILE)
AC_PROG_CC
AC_PROG_LIBTOOL
AC_CHECK_LIB([curl],[curl_easy_init])
AC_CHECK_LIB([json],[json_object_object_get])
AC_CHECK_LIB([pam], [pam_strerror])
AC_CHECK_HEADERS([curl/curl.h json/json.h security/pam_modules.h])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_HEADERS([pam_lcmapsd_config.h])
AC_OUTPUT