Skip to content

Commit 4b6ed2b

Browse files
committed
Add initial configure scripts
1 parent 4758b76 commit 4b6ed2b

File tree

8 files changed

+139
-0
lines changed

8 files changed

+139
-0
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Simo Sorce <[email protected]>

COPYING

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MOD_AUTH_GSSAPI
2+
3+
Copyright (C) 2014 Red Hat, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a
6+
copy of this software and associated documentation files (the "Software"),
7+
to deal in the Software without restriction, including without limitation
8+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
9+
and/or sell copies of the Software, and to permit persons to whom the
10+
Software is furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21+
DEALINGS IN THE SOFTWARE.
22+

ChangeLog

Whitespace-only changes.

Makefile.am

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ACLOCAL_AMFLAGS = -I m4
2+
3+
SUBDIRS = src

NEWS

Whitespace-only changes.

README

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This module has been built as a replacement for the aging mod_auth_kerb.
2+
It's aim is to use only GSSAPI calls and be as much as possible agnostic
3+
of the actual mechanism used.

configure.ac

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
AC_PREREQ([2.69])
2+
AC_INIT([mod_auth_gssapi], [0.0.1], [[email protected]])
3+
AC_CONFIG_SRCDIR([src/mod_auth_gssapi.c])
4+
AM_INIT_AUTOMAKE
5+
AC_CONFIG_MACRO_DIR([m4])
6+
AC_CONFIG_HEADERS([config.h])
7+
8+
# Checks for programs.
9+
AC_PROG_CC
10+
11+
AC_PROG_LIBTOOL
12+
AC_SUBST(INCLTDL)
13+
AC_SUBST(LIBLTDL)
14+
15+
AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
16+
17+
AC_CHECK_HEADERS([stdint.h])
18+
19+
# Checks for typedefs, structures, and compiler characteristics.
20+
AC_CHECK_HEADER_STDBOOL
21+
AC_TYPE_SIZE_T
22+
AC_TYPE_UINT32_T
23+
24+
# Checks for library functions.
25+
AC_CHECK_FUNCS([strcasecmp])
26+
27+
AC_ARG_WITH([apxs],
28+
[AC_HELP_STRING([--with-apxs=PATH/NAME], [path to the apxs binary [[apxs]]])],
29+
[AC_SUBST(APXS, $with_apxs)],
30+
[AC_PATH_PROGS(APXS, [apxs2 apxs])])
31+
AS_IF([test "x${APXS}" != "x" -a -x "${APXS}"],
32+
[AC_MSG_NOTICE([apxs found at $APXS])
33+
APXS_CPPFLAGS=`${APXS} -q CFLAGS`
34+
AC_SUBST(APXS_CPPFLAGS)
35+
APXS_LDFLAGS=`${APXS} -q LDFLAGS_SHLIB`
36+
AC_SUBST(APXS_LDFLAGS)
37+
APXS_LIBS=`${APXS} -q LIBS_SHLIB`
38+
AC_SUBST(APXS_LIBS)
39+
APXS_INCLUDES=-I`${APXS} -q INCLUDEDIR`
40+
AC_SUBST(APXS_INCLUDES)
41+
APXS_CPPFLAGS_SHLIB=`${APXS} -q CFLAGS_SHLIB`
42+
AC_SUBST(APXS_CPPFLAGS_SHLIB)
43+
APXS_LD_SHLIB=`${APXS} -q LD_SHLIB`
44+
AC_SUBST(APXS_LD_SHLIB)
45+
APXS_LIBEXECDIR=`${APXS} -q LIBEXECDIR`
46+
AC_SUBST(APXS_LIBEXECDIR)
47+
APXS_SYSCONFDIR=`${APXS} -q SYSCONFDIR`
48+
AC_SUBST(APXS_SYSCONFDIR)
49+
APXS_PREFIX=`${APXS} -q PREFIX`
50+
AC_SUBST(APXS_PREFIX)],
51+
[AC_MSG_FAILURE(["apxs not found. Use --with-apxs"])])
52+
53+
AC_ARG_WITH([apr],
54+
[AC_HELP_STRING([--with-apr=PATH/NAME], [path to the apr binary [[apr]]])],
55+
[AC_SUBST(APR, $with_apr)],
56+
[AC_PATH_PROGS(APR, [apr-1-config])])
57+
AS_IF([test "x${APR}" != "x" -a -x "${APR}"],
58+
[AC_MSG_NOTICE([apr found at $APR])
59+
APR_CPPFLAGS=`${APR} --cppflags`
60+
AC_SUBST(APR_CPPFLAGS)
61+
APR_INCLUDES=`${APR} --includes`
62+
AC_SUBST(APR_INCLUDES)
63+
APR_LDFLAGS=`${APR} --link-libtool --libs`
64+
AC_SUBST(APR_LDFLAGS)],
65+
[AC_MSG_FAILURE(["apr-1-config not found. Use --with-apr"])])
66+
67+
AC_CHECK_HEADERS([gssapi/gssapi.h],,[AC_MSG_ERROR([Could not find GSSAPI headers])])
68+
AC_PATH_PROG(KRB5_CONFIG, krb5-config, failed)
69+
if test x$KRB5_CONFIG = xfailed; then
70+
AC_MSG_ERROR([Could not find GSSAPI development libraries])
71+
else
72+
GSSAPI_CFLAGS="`$KRB5_CONFIG --cflags gssapi`"
73+
GSSAPI_LIBS="`$KRB5_CONFIG --libs gssapi`"
74+
fi
75+
AC_CHECK_LIB([gssapi_krb5], [gss_accept_sec_context], [],
76+
[AC_MSG_ERROR([GSSAPI library check failed])])
77+
AC_CHECK_FUNCS(gss_acquire_cred_from)
78+
AC_CHECK_FUNCS(gss_store_cred_into)
79+
80+
AC_SUBST([GSSAPI_CFLAGS])
81+
AC_SUBST([GSSAPI_LIBS])
82+
83+
AC_CONFIG_FILES([Makefile src/Makefile])
84+
85+
AC_OUTPUT

src/Makefile.am

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
MAG_CFLAGS = @APR_CPPFLAGS@ @APXS_CPPFLAGS@ @APXS_CPPFLAGS_SHLIB@
2+
MAG_INCLUDES = @INCLTDL@ @APR_INCLUDES@ @APXS_INCLUDES@
3+
MAG_LIBS = @LIBLTDL@ @APR_LDFLAGS@ @APXS_LDFLAGS@ @APXS_LIBS@ @APXS_LD_SHLIB@
4+
MAG_LIBEXECDIR = @APXS_LIBEXECDIR@
5+
6+
if HAVE_GCC
7+
MAG_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
8+
-Wcast-qual -Wcast-align -Wwrite-strings \
9+
-Werror-implicit-function-declaration \
10+
-fno-strict-aliasing
11+
endif
12+
13+
lib_LTLIBRARIES = mod_auth_gssapi.la
14+
15+
mod_auth_gssapi_la_LDFLAGS = -module
16+
17+
mod_auth_gssapi.la: mod_auth_gssapi.c
18+
@APXS@ -c ${LIBS} -Wc,"${MAG_CFLAGS} ${MAG_INCLUDES}" -Wl,"${MAG_LIBS}" mod_auth_gssapi.c
19+
20+
install: mod_auth_gssapi.la
21+
if test ! -d ${MAG_LIBEXECDIR}; then mkdir -p ${MAG_LIBEXECDIR}; fi
22+
@APXS@ -i -S LIBEXECDIR=${MAG_LIBEXECDIR} mod_auth_gssapi.la
23+
24+
clean-local:
25+
rm -f mod_auth_gssapi.slo mod_auth_gssapi.la mod_auth_gssapi.lo .libs

0 commit comments

Comments
 (0)