From: Simo Sorce Date: Sat, 15 Feb 2014 20:59:06 +0000 (-0500) Subject: Add initial configure scripts X-Git-Tag: v1.0.0~19 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mod_auth_gssapi.git;a=commitdiff_plain;h=4b6ed2bfeeb912272e57fe9365cb175fd06ed6b0;hp=4758b76d90376d6a861dde76f9bf48b420c87d67 Add initial configure scripts --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..a477e92 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Simo Sorce diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..519a900 --- /dev/null +++ b/COPYING @@ -0,0 +1,22 @@ +MOD_AUTH_GSSAPI + +Copyright (C) 2014 Red Hat, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..f8238b2 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,3 @@ +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = src diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..c31eceb --- /dev/null +++ b/README @@ -0,0 +1,3 @@ +This module has been built as a replacement for the aging mod_auth_kerb. +It's aim is to use only GSSAPI calls and be as much as possible agnostic +of the actual mechanism used. diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..e65a44a --- /dev/null +++ b/configure.ac @@ -0,0 +1,85 @@ +AC_PREREQ([2.69]) +AC_INIT([mod_auth_gssapi], [0.0.1], [simo@redhat.com]) +AC_CONFIG_SRCDIR([src/mod_auth_gssapi.c]) +AM_INIT_AUTOMAKE +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_PROG_CC + +AC_PROG_LIBTOOL +AC_SUBST(INCLTDL) +AC_SUBST(LIBLTDL) + +AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes]) + +AC_CHECK_HEADERS([stdint.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_HEADER_STDBOOL +AC_TYPE_SIZE_T +AC_TYPE_UINT32_T + +# Checks for library functions. +AC_CHECK_FUNCS([strcasecmp]) + +AC_ARG_WITH([apxs], + [AC_HELP_STRING([--with-apxs=PATH/NAME], [path to the apxs binary [[apxs]]])], + [AC_SUBST(APXS, $with_apxs)], + [AC_PATH_PROGS(APXS, [apxs2 apxs])]) +AS_IF([test "x${APXS}" != "x" -a -x "${APXS}"], + [AC_MSG_NOTICE([apxs found at $APXS]) + APXS_CPPFLAGS=`${APXS} -q CFLAGS` + AC_SUBST(APXS_CPPFLAGS) + APXS_LDFLAGS=`${APXS} -q LDFLAGS_SHLIB` + AC_SUBST(APXS_LDFLAGS) + APXS_LIBS=`${APXS} -q LIBS_SHLIB` + AC_SUBST(APXS_LIBS) + APXS_INCLUDES=-I`${APXS} -q INCLUDEDIR` + AC_SUBST(APXS_INCLUDES) + APXS_CPPFLAGS_SHLIB=`${APXS} -q CFLAGS_SHLIB` + AC_SUBST(APXS_CPPFLAGS_SHLIB) + APXS_LD_SHLIB=`${APXS} -q LD_SHLIB` + AC_SUBST(APXS_LD_SHLIB) + APXS_LIBEXECDIR=`${APXS} -q LIBEXECDIR` + AC_SUBST(APXS_LIBEXECDIR) + APXS_SYSCONFDIR=`${APXS} -q SYSCONFDIR` + AC_SUBST(APXS_SYSCONFDIR) + APXS_PREFIX=`${APXS} -q PREFIX` + AC_SUBST(APXS_PREFIX)], + [AC_MSG_FAILURE(["apxs not found. Use --with-apxs"])]) + +AC_ARG_WITH([apr], + [AC_HELP_STRING([--with-apr=PATH/NAME], [path to the apr binary [[apr]]])], + [AC_SUBST(APR, $with_apr)], + [AC_PATH_PROGS(APR, [apr-1-config])]) +AS_IF([test "x${APR}" != "x" -a -x "${APR}"], + [AC_MSG_NOTICE([apr found at $APR]) + APR_CPPFLAGS=`${APR} --cppflags` + AC_SUBST(APR_CPPFLAGS) + APR_INCLUDES=`${APR} --includes` + AC_SUBST(APR_INCLUDES) + APR_LDFLAGS=`${APR} --link-libtool --libs` + AC_SUBST(APR_LDFLAGS)], + [AC_MSG_FAILURE(["apr-1-config not found. Use --with-apr"])]) + +AC_CHECK_HEADERS([gssapi/gssapi.h],,[AC_MSG_ERROR([Could not find GSSAPI headers])]) +AC_PATH_PROG(KRB5_CONFIG, krb5-config, failed) +if test x$KRB5_CONFIG = xfailed; then + AC_MSG_ERROR([Could not find GSSAPI development libraries]) +else + GSSAPI_CFLAGS="`$KRB5_CONFIG --cflags gssapi`" + GSSAPI_LIBS="`$KRB5_CONFIG --libs gssapi`" +fi +AC_CHECK_LIB([gssapi_krb5], [gss_accept_sec_context], [], + [AC_MSG_ERROR([GSSAPI library check failed])]) +AC_CHECK_FUNCS(gss_acquire_cred_from) +AC_CHECK_FUNCS(gss_store_cred_into) + +AC_SUBST([GSSAPI_CFLAGS]) +AC_SUBST([GSSAPI_LIBS]) + +AC_CONFIG_FILES([Makefile src/Makefile]) + +AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..a725b52 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,25 @@ +MAG_CFLAGS = @APR_CPPFLAGS@ @APXS_CPPFLAGS@ @APXS_CPPFLAGS_SHLIB@ +MAG_INCLUDES = @INCLTDL@ @APR_INCLUDES@ @APXS_INCLUDES@ +MAG_LIBS = @LIBLTDL@ @APR_LDFLAGS@ @APXS_LDFLAGS@ @APXS_LIBS@ @APXS_LD_SHLIB@ +MAG_LIBEXECDIR = @APXS_LIBEXECDIR@ + +if HAVE_GCC + MAG_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \ + -Wcast-qual -Wcast-align -Wwrite-strings \ + -Werror-implicit-function-declaration \ + -fno-strict-aliasing +endif + +lib_LTLIBRARIES = mod_auth_gssapi.la + +mod_auth_gssapi_la_LDFLAGS = -module + +mod_auth_gssapi.la: mod_auth_gssapi.c + @APXS@ -c ${LIBS} -Wc,"${MAG_CFLAGS} ${MAG_INCLUDES}" -Wl,"${MAG_LIBS}" mod_auth_gssapi.c + +install: mod_auth_gssapi.la + if test ! -d ${MAG_LIBEXECDIR}; then mkdir -p ${MAG_LIBEXECDIR}; fi + @APXS@ -i -S LIBEXECDIR=${MAG_LIBEXECDIR} mod_auth_gssapi.la + +clean-local: + rm -f mod_auth_gssapi.slo mod_auth_gssapi.la mod_auth_gssapi.lo .libs