File: configure.ac

package info (click to toggle)
libapache2-mod-auth-cas 1.0.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 568 kB
  • sloc: ansic: 1,812; makefile: 86
file content (76 lines) | stat: -rw-r--r-- 1,996 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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.65])
AC_INIT([mod_auth_cas], [1.0.9.1], [modauthcas@gmail.com])
AC_CONFIG_SRCDIR([src/mod_auth_cas.c])
AC_CONFIG_HEADERS([config.h])

m4_include([libcurl.m4])

# Checks for programs.
AC_PROG_CC

#### Locate APXS
## First, check --with-apxs
AC_MSG_NOTICE([Locating apxs])
AC_MSG_CHECKING([for --with-apxs])
AC_ARG_WITH(
	[apxs],
	[AS_HELP_STRING([--with-apxs],[/absolute/path/to/apxs])],
	[WITH_APXS=$with_apxs],
	[WITH_APXS=no]
)
AC_MSG_RESULT([$WITH_APXS])

if test -f "$WITH_APXS" && test -x "$WITH_APXS"
then
	APXS=$WITH_APXS
else
	AC_PATH_PROGS([APXS],[apxs apxs2])
fi

if test "$APXS"
then
	AC_MSG_NOTICE([apxs found at $APXS])
	AC_SUBST([APXS])
else
	AC_MSG_FAILURE([apxs not found])
fi

#### Done locating APXS

# Checks for libraries.
#### Find OpenSSL
AC_MSG_CHECKING([for --with-openssl])
AC_ARG_WITH(
	[openssl],
	[AS_HELP_STRING([--with-openssl],[/absolute/path/to/openssl-base])],
	[ LDFLAGS="$LDFLAGS -L$with_openssl/lib";
	  CFLAGS="$CFLAGS -I$with_openssl/include/";
	  LIBS="-lssl";
	  AC_MSG_RESULT([$with_openssl])
	],
	[AC_MSG_RESULT([no])]
)

AC_CHECK_LIB([crypto],[CRYPTO_new_ex_data], [], [AC_MSG_ERROR([OpenSSL libraries required])])
AC_CHECK_LIB([ssl],[SSL_library_init], [], [AC_MSG_ERROR([OpenSSL libraries required])])

AC_CHECK_HEADERS([openssl/crypto.h openssl/x509.h openssl/pem.h openssl/ssl.h openssl/err.h],[],[AC_MSG_ERROR([OpenSSL headers required])])

#### Check for libcurl
LIBCURL_CHECK_CONFIG([yes],[],[],[AC_MSG_ERROR([libcurl development files required])])

# Checks for header files.
AC_CHECK_HEADERS([netdb.h stddef.h sys/socket.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T

# Checks for library functions.
AC_CHECK_FUNCS([gethostbyname memset socket strcasecmp strchr strncasecmp strstr])

AC_CONFIG_FILES([Makefile
                 src/Makefile])
AC_OUTPUT