From: hno <> Date: Sat, 4 Sep 2004 03:30:18 +0000 (+0000) Subject: Bug #981: sasl_auth doesn't compile with SASL2 X-Git-Tag: SQUID_3_0_PRE4~1062 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2adff9547fd826f665a11b1f7776c70d489d99f7;p=thirdparty%2Fsquid.git Bug #981: sasl_auth doesn't compile with SASL2 --- diff --git a/configure.in b/configure.in index 5e0c9c1ce7..006297c874 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.358 2004/08/30 05:12:29 robertc Exp $ +dnl $Id: configure.in,v 1.359 2004/09/03 21:30:18 hno Exp $ dnl dnl dnl @@ -13,7 +13,7 @@ AC_CONFIG_SRCDIR([src/main.cc]) AC_CONFIG_AUX_DIR(cfgaux) AM_INIT_AUTOMAKE(squid, 3.0-PRE3-CVS) AM_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.358 $)dnl +AC_REVISION($Revision: 1.359 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -1141,7 +1141,11 @@ AC_ARG_ENABLE(basic-auth-helpers, if test -n "$BASIC_AUTH_HELPERS"; then for helper in $BASIC_AUTH_HELPERS; do if test -d $srcdir/helpers/basic_auth/$helper; then - : + case $helper in + SASL) + require_sasl=yes + ;; + esac else echo "ERROR: Basic auth helper $helper does not exists" exit 1 @@ -1313,6 +1317,24 @@ AC_ARG_WITH(samba-sources, ]) AC_SUBST(SAMBASOURCES) +dnl Check for Cyrus SASL +if test "$require_sasl" = "yes"; then + AC_CHECK_HEADERS(sasl/sasl.h sasl.h) + if test "$ac_cv_header_sasl_sasl_h" = "yes"; then + echo "using SASL2" + LIBSASL="-lsasl2" + else + if test "$ac_cv_header_sasl_h" = "yes"; then + echo "using SASL" + LIBSASL="-lsasl" + else + echo "ERROR: Neither SASL nor SASL2 found" + exit 1 + fi + fi + AC_SUBST(LIBSASL) +fi + dnl Disable "unlinkd" code AC_ARG_ENABLE(unlinkd, [ --disable-unlinkd Do not use unlinkd], diff --git a/helpers/basic_auth/SASL/Makefile.am b/helpers/basic_auth/SASL/Makefile.am index f06274a063..4908a0fb4f 100644 --- a/helpers/basic_auth/SASL/Makefile.am +++ b/helpers/basic_auth/SASL/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid SASL authentication helper # -# $Id: Makefile.am,v 1.4 2003/01/23 00:35:37 robertc Exp $ +# $Id: Makefile.am,v 1.5 2004/09/03 21:30:18 hno Exp $ # # Uncomment and customize the following to suit your needs: # @@ -9,5 +9,5 @@ INCLUDES = -I$(top_srcdir)/include libexec_PROGRAMS = sasl_auth -LDADD = -L$(top_builddir)/lib -lmiscutil -lsasl $(XTRA_LIBS) +LDADD = -L$(top_builddir)/lib -lmiscutil $(LIBSASL) $(XTRA_LIBS) EXTRA_DIST = squid_sasl_auth squid_sasl_auth.conf diff --git a/helpers/basic_auth/SASL/Makefile.in b/helpers/basic_auth/SASL/Makefile.in index 6371e0a070..2f171d5188 100644 --- a/helpers/basic_auth/SASL/Makefile.in +++ b/helpers/basic_auth/SASL/Makefile.in @@ -1,7 +1,6 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. -# @configure_input@ +# Makefile.in generated automatically by automake 1.5 from Makefile.am. -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,124 +16,89 @@ # # Makefile for the Squid SASL authentication helper # -# $Id: Makefile.in,v 1.42 2004/08/30 03:28:48 robertc Exp $ +# $Id: Makefile.in,v 1.43 2004/09/03 21:30:18 hno Exp $ # # Uncomment and customize the following to suit your needs: # +SHELL = @SHELL@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) +transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +host_alias = @host_alias@ host_triplet = @host@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AR_R = @AR_R@ AUTH_LIBS = @AUTH_LIBS@ AUTH_MODULES = @AUTH_MODULES@ AUTH_OBJS = @AUTH_OBJS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASIC_AUTH_HELPERS = @BASIC_AUTH_HELPERS@ CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ CGIEXT = @CGIEXT@ CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ CRYPTLIB = @CRYPTLIB@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIGEST_AUTH_HELPERS = @DIGEST_AUTH_HELPERS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ENABLE_ARP_ACL_FALSE = @ENABLE_ARP_ACL_FALSE@ -ENABLE_ARP_ACL_TRUE = @ENABLE_ARP_ACL_TRUE@ -ENABLE_HTCP_FALSE = @ENABLE_HTCP_FALSE@ -ENABLE_HTCP_TRUE = @ENABLE_HTCP_TRUE@ -ENABLE_IDENT_FALSE = @ENABLE_IDENT_FALSE@ -ENABLE_IDENT_TRUE = @ENABLE_IDENT_TRUE@ -ENABLE_PINGER_FALSE = @ENABLE_PINGER_FALSE@ -ENABLE_PINGER_TRUE = @ENABLE_PINGER_TRUE@ -ENABLE_SSL_FALSE = @ENABLE_SSL_FALSE@ -ENABLE_SSL_TRUE = @ENABLE_SSL_TRUE@ -ENABLE_UNLINKD_FALSE = @ENABLE_UNLINKD_FALSE@ -ENABLE_UNLINKD_TRUE = @ENABLE_UNLINKD_TRUE@ -ENABLE_WIN32SPECIFIC_FALSE = @ENABLE_WIN32SPECIFIC_FALSE@ -ENABLE_WIN32SPECIFIC_TRUE = @ENABLE_WIN32SPECIFIC_TRUE@ -ENABLE_XPROF_STATS_FALSE = @ENABLE_XPROF_STATS_FALSE@ -ENABLE_XPROF_STATS_TRUE = @ENABLE_XPROF_STATS_TRUE@ -EPOLL_LIBS = @EPOLL_LIBS@ ERR_DEFAULT_LANGUAGE = @ERR_DEFAULT_LANGUAGE@ ERR_LANGUAGES = @ERR_LANGUAGES@ EXEEXT = @EXEEXT@ EXTERNAL_ACL_HELPERS = @EXTERNAL_ACL_HELPERS@ FALSE = @FALSE@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ LIBDLMALLOC = @LIBDLMALLOC@ -LIBOBJS = @LIBOBJS@ LIBREGEX = @LIBREGEX@ -LIBS = @LIBS@ +LIBSASL = @LIBSASL@ LIB_MALLOC = @LIB_MALLOC@ LN = @LN@ LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -MAKE_LEAKFINDER_FALSE = @MAKE_LEAKFINDER_FALSE@ -MAKE_LEAKFINDER_TRUE = @MAKE_LEAKFINDER_TRUE@ MKDIR = @MKDIR@ MV = @MV@ -NEED_OWN_MD5_FALSE = @NEED_OWN_MD5_FALSE@ -NEED_OWN_MD5_TRUE = @NEED_OWN_MD5_TRUE@ -NEED_OWN_SNPRINTF_FALSE = @NEED_OWN_SNPRINTF_FALSE@ -NEED_OWN_SNPRINTF_TRUE = @NEED_OWN_SNPRINTF_TRUE@ NTLM_AUTH_HELPERS = @NTLM_AUTH_HELPERS@ OBJEXT = @OBJEXT@ -OPT_DEFAULT_HOSTS = @OPT_DEFAULT_HOSTS@ PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ +PKGCONFIG = @PKGCONFIG@ RANLIB = @RANLIB@ REGEXLIB = @REGEXLIB@ REPL_LIBS = @REPL_LIBS@ @@ -142,81 +106,28 @@ REPL_OBJS = @REPL_OBJS@ REPL_POLICIES = @REPL_POLICIES@ RM = @RM@ SAMBASOURCES = @SAMBASOURCES@ -SET_MAKE = @SET_MAKE@ SH = @SH@ -SHELL = @SHELL@ SNMPLIB = @SNMPLIB@ -SQUID_CFLAGS = @SQUID_CFLAGS@ -SQUID_CXXFLAGS = @SQUID_CXXFLAGS@ SSLLIB = @SSLLIB@ STORE_LIBS = @STORE_LIBS@ -STORE_LINKOBJS = @STORE_LINKOBJS@ +STORE_MODULES = @STORE_MODULES@ STORE_MODULE_SUBDIRS = @STORE_MODULE_SUBDIRS@ STORE_OBJS = @STORE_OBJS@ -STORE_PROGRAMS = @STORE_PROGRAMS@ -STRIP = @STRIP@ TRUE = @TRUE@ -USE_DELAY_POOLS_FALSE = @USE_DELAY_POOLS_FALSE@ -USE_DELAY_POOLS_TRUE = @USE_DELAY_POOLS_TRUE@ -USE_DNSSERVER_FALSE = @USE_DNSSERVER_FALSE@ -USE_DNSSERVER_TRUE = @USE_DNSSERVER_TRUE@ -USE_EPOLL_FALSE = @USE_EPOLL_FALSE@ -USE_EPOLL_TRUE = @USE_EPOLL_TRUE@ -USE_ESI_FALSE = @USE_ESI_FALSE@ -USE_ESI_TRUE = @USE_ESI_TRUE@ -USE_SNMP_FALSE = @USE_SNMP_FALSE@ -USE_SNMP_TRUE = @USE_SNMP_TRUE@ VERSION = @VERSION@ XTRA_LIBS = @XTRA_LIBS@ XTRA_OBJS = @XTRA_OBJS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ -am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ makesnmplib = @makesnmplib@ -mandir = @mandir@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ INCLUDES = -I$(top_srcdir)/include libexec_PROGRAMS = sasl_auth -LDADD = -L$(top_builddir)/lib -lmiscutil -lsasl $(XTRA_LIBS) +LDADD = -L$(top_builddir)/lib -lmiscutil $(LIBSASL) $(XTRA_LIBS) EXTRA_DIST = squid_sasl_auth squid_sasl_auth.conf subdir = helpers/basic_auth/SASL -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/cfgaux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = @@ -229,16 +140,20 @@ sasl_auth_LDADD = $(LDADD) sasl_auth_DEPENDENCIES = sasl_auth_LDFLAGS = +DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/cfgaux/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/sasl_auth.Po +@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/sasl_auth.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +CFLAGS = @CFLAGS@ DIST_SOURCES = sasl_auth.c -DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am +DIST_COMMON = README Makefile.am Makefile.in SOURCES = sasl_auth.c all: all-am @@ -249,8 +164,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configu cd $(top_srcdir) && \ $(AUTOMAKE) --foreign helpers/basic_auth/SASL/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) -libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libexecdir) @@ -258,16 +174,16 @@ install-libexecPROGRAMS: $(libexec_PROGRAMS) p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) $$p $(DESTDIR)$(libexecdir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) $$p $(DESTDIR)$(libexecdir)/$$f || exit 1; \ + f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$f"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/$$f; \ else :; fi; \ done uninstall-libexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(libexec_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(libexecdir)/$$f"; \ rm -f $(DESTDIR)$(libexecdir)/$$f; \ done @@ -284,110 +200,72 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sasl_auth.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sasl_auth.Po@am__quote@ + +distclean-depend: + -rm -rf $(DEPDIR) .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< +@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` +@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(COMPILE) -c `cygpath -w $<` +CCDEPMODE = @CCDEPMODE@ uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - mkid -fID $$unique + mkid -fID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ + here=`CDPATH=: && cd $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../../.. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + @for file in $(DISTFILES); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ + $(mkinstalldirs) "$(distdir)/$$dir"; \ fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -pR $$d/$$file $(distdir) \ + || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ @@ -400,6 +278,7 @@ all-am: Makefile $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libexecdir) + install: install-am install-exec: install-exec-am install-data: install-data-am @@ -411,7 +290,6 @@ install-am: all-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -419,7 +297,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -429,10 +307,9 @@ clean: clean-am clean-am: clean-generic clean-libexecPROGRAMS mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags + +distclean-am: clean-am distclean-compile distclean-depend \ + distclean-generic distclean-tags dvi: dvi-am @@ -453,33 +330,24 @@ install-man: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile + maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - uninstall-am: uninstall-info-am uninstall-libexecPROGRAMS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libexecPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am info \ - info-am install install-am install-data install-data-am \ - install-exec install-exec-am install-info install-info-am \ - install-libexecPROGRAMS install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ +.PHONY: GTAGS all all-am check check-am clean clean-generic \ + clean-libexecPROGRAMS distclean distclean-compile \ + distclean-depend distclean-generic distclean-tags distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-libexecPROGRAMS install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic tags uninstall \ uninstall-am uninstall-info-am uninstall-libexecPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/helpers/basic_auth/SASL/sasl_auth.c b/helpers/basic_auth/SASL/sasl_auth.c index f7ddea1fee..33ff7d6cc9 100644 --- a/helpers/basic_auth/SASL/sasl_auth.c +++ b/helpers/basic_auth/SASL/sasl_auth.c @@ -1,5 +1,5 @@ /* - * $Id: sasl_auth.c,v 1.5 2003/01/23 00:35:38 robertc Exp $ + * $Id: sasl_auth.c,v 1.6 2004/09/03 21:30:18 hno Exp $ * * SASL authenticator module for Squid. * Copyright (C) 2002 Ian Castle @@ -23,9 +23,9 @@ * This program authenticates users against using cyrus-sasl * * Compile this program with: gcc -Wall -o sasl_auth sasl_auth.c -lsasl + * or with SASL2: gcc -Wall -o sasl_auth sasl_auth.c -lsasl2 * */ -#include #include #include #include @@ -33,6 +33,12 @@ #include "util.h" +#ifdef HAVE_SASL_SASL_H +#include +#else +#include +#endif + #define APP_NAME_SASL "squid_sasl_auth" int @@ -40,7 +46,9 @@ main() { char line[8192]; char *username, *password; +#if SASL_VERSION_MAJOR < 2 const char *errstr; +#endif int rc; sasl_conn_t *conn = NULL; @@ -56,7 +64,11 @@ main() return 1; } + #if SASL_VERSION_MAJOR < 2 rc = sasl_server_new( APP_NAME_SASL, NULL, NULL, NULL, 0, &conn ); + #else + rc = sasl_server_new( APP_NAME_SASL, NULL, NULL, NULL, NULL, NULL, 0, &conn ); + #endif if ( rc != SASL_OK ) { fprintf( stderr, "error %d %s\n", rc, sasl_errstring(rc, NULL, NULL )); @@ -84,15 +96,21 @@ main() rfc1738_unescape(username); rfc1738_unescape(password); + #if SASL_VERSION_MAJOR < 2 rc = sasl_checkpass(conn, username, strlen(username), password, strlen(password), &errstr); + #else + rc = sasl_checkpass(conn, username, strlen(username), password, strlen(password)); + #endif if ( rc != SASL_OK ) { + #if SASL_VERSION_MAJOR < 2 if ( errstr ) { fprintf( stderr, "errstr %s\n", errstr ); } if ( rc != SASL_BADAUTH ) { fprintf( stderr, "error %d %s\n", rc, sasl_errstring(rc, NULL, NULL )); } + #endif fprintf( stdout, "ERR\n" ); } else {