Browse Source

[autobuild] remove mod_authn_gssapi dep on resolv

remove mod_authn_gssapi explicit dependency on -lresolv
This fixes build on FreeBSD when ./configure --with-krb5
(On systems that need libresolv, libkrb5 depends on libresolv)

Also remove obsolete hstrerror() references from build
personal/stbuehler/mod-csrf
Glenn Strauss 5 years ago
parent
commit
5feb2694f7
  1. 4
      SConstruct
  2. 3
      configure.ac
  3. 2
      src/CMakeLists.txt
  4. 2
      src/SConscript
  5. 1
      src/mod_authn_gssapi.c
  6. 1
      src/sys-socket.h

4
SConstruct

@ -228,7 +228,7 @@ if 1:
autoconf.env.Append( LIBSQLITE3 = '', LIBXML2 = '', LIBMYSQL = '', LIBZ = '',
LIBBZ2 = '', LIBCRYPT = '', LIBMEMCACHED = '', LIBFCGI = '', LIBPCRE = '',
LIBLDAP = '', LIBLBER = '', LIBLUA = '', LIBDL = '', LIBUUID = '',
LIBRESOLV = '', LIBKRB5 = '', LIBGSSAPI_KRB5 = '')
LIBKRB5 = '', LIBGSSAPI_KRB5 = '')
if env['with_fam']:
if autoconf.CheckLibWithHeader('fam', 'fam.h', 'C'):
@ -261,8 +261,6 @@ if 1:
if env['with_krb5']:
if autoconf.CheckLibWithHeader('krb5', 'krb5.h', 'C'):
autoconf.env.Append(CPPFLAGS = [ '-DHAVE_KRB5' ], LIBKRB5 = 'krb5')
if autoconf.CheckLibWithHeader('resolv', 'resolv.h', 'C'):
autoconf.env.Append(LIBRESOLV = 'resolv')
if autoconf.CheckLibWithHeader('gssapi_krb5', 'gssapi/gssapi_krb5.h', 'C'):
autoconf.env.Append(LIBGSSAPI_KRB5 = 'gssapi_krb5')

3
configure.ac

@ -281,7 +281,6 @@ fi
dnl openssl on solaris needs -lsocket -lnsl
AC_SEARCH_LIBS(socket,socket)
AC_SEARCH_LIBS(gethostbyname,nsl socket)
AC_SEARCH_LIBS(hstrerror,resolv)
dnl On Haiku accept() and friends are in libnetwork
AC_SEARCH_LIBS(accept,network)
@ -353,7 +352,7 @@ AC_ARG_WITH(krb5-libs,
if test "x$use_krb5" = "xyes"; then
AC_CHECK_LIB(gssapi_krb5, gss_acquire_cred, [
AC_CHECK_HEADERS([gssapi/gssapi_krb5.h],[
KRB5_LIB="-lresolv -lkrb5 -lgssapi_krb5"
KRB5_LIB="-lkrb5 -lgssapi_krb5"
AC_DEFINE(HAVE_KRB5, [1], [libgssapi_krb5])
])
])

2
src/CMakeLists.txt

@ -684,7 +684,7 @@ endif()
target_link_libraries(mod_authn_file ${L_MOD_AUTHN_FILE})
if(HAVE_KRB5)
set(L_MOD_AUTHN_GSSAPI ${L_MOD_AUTHN_GSSAPI} resolv krb5 gssapi_krb5)
set(L_MOD_AUTHN_GSSAPI ${L_MOD_AUTHN_GSSAPI} krb5 gssapi_krb5)
add_and_install_library(mod_authn_gssapi "mod_authn_gssapi.c")
target_link_libraries(mod_authn_gssapi ${L_MOD_AUTHN_GSSAPI})
endif()

2
src/SConscript

@ -104,7 +104,7 @@ modules = {
'mod_rewrite' : { 'src' : [ 'mod_rewrite.c' ], 'lib' : [ env['LIBPCRE'] ] },
'mod_auth' : { 'src' : [ 'mod_auth.c' ] },
'mod_authn_file' : { 'src' : [ 'mod_authn_file.c' ], 'lib' : [ env['LIBCRYPT'] ] },
'mod_authn_gssapi' : { 'src' : [ 'mod_authn_gssapi.c' ], 'lib' : [ env['LIBRESOLV'], env['LIBKRB5'], env['LIBGSSAPI_KRB5'] ] },
'mod_authn_gssapi' : { 'src' : [ 'mod_authn_gssapi.c' ], 'lib' : [ env['LIBKRB5'], env['LIBGSSAPI_KRB5'] ] },
'mod_authn_ldap' : { 'src' : [ 'mod_authn_ldap.c' ], 'lib' : [ env['LIBLDAP'], env['LIBLBER'] ] },
'mod_authn_mysql' : { 'src' : [ 'mod_authn_mysql.c' ], 'lib' : [ env['LIBCRYPT'], env['LIBMYSQL'] ] },
'mod_webdav' : { 'src' : [ 'mod_webdav.c' ], 'lib' : [ env['LIBXML2'], env['LIBSQLITE3'], env['LIBUUID'] ] },

1
src/mod_authn_gssapi.c

@ -24,7 +24,6 @@
#ifdef HAVE_KRB5
#include <resolv.h>
#include <krb5.h>
#include <gssapi.h>
#include <gssapi/gssapi_krb5.h>

1
src/sys-socket.h

@ -11,7 +11,6 @@
#define EALREADY WSAEALREADY
#define ECONNABORTED WSAECONNABORTED
#define ioctl ioctlsocket
#define hstrerror(x) ""
#else
#include <sys/socket.h>
#include <sys/ioctl.h>

Loading…
Cancel
Save