Remove rlm_smb module.
authorMatthew Newton <mcn4@leicester.ac.uk>
Wed, 21 Nov 2012 21:00:26 +0000 (21:00 +0000)
committerMatthew Newton <mcn4@leicester.ac.uk>
Wed, 21 Nov 2012 21:00:26 +0000 (21:00 +0000)
It wouldn't build (lack of md4.c) and likely hasn't been used in years.
Equivalent method now involves mschap / ntlm_auth and Samba.

29 files changed:
doc/ChangeLog
src/modules/rlm_smb/.gitignore [deleted file]
src/modules/rlm_smb/Makefile.in [deleted file]
src/modules/rlm_smb/README [deleted file]
src/modules/rlm_smb/all.mk.in [deleted file]
src/modules/rlm_smb/byteorder.h [deleted file]
src/modules/rlm_smb/config.h.in [deleted file]
src/modules/rlm_smb/configure [deleted file]
src/modules/rlm_smb/configure.in [deleted file]
src/modules/rlm_smb/rfcnb-common.h [deleted file]
src/modules/rlm_smb/rfcnb-error.h [deleted file]
src/modules/rlm_smb/rfcnb-io.c [deleted file]
src/modules/rlm_smb/rfcnb-io.h [deleted file]
src/modules/rlm_smb/rfcnb-priv.h [deleted file]
src/modules/rlm_smb/rfcnb-util.c [deleted file]
src/modules/rlm_smb/rfcnb-util.h [deleted file]
src/modules/rlm_smb/rfcnb.h [deleted file]
src/modules/rlm_smb/rlm_smb.c [deleted file]
src/modules/rlm_smb/session.c [deleted file]
src/modules/rlm_smb/smbdes.c [deleted file]
src/modules/rlm_smb/smbencrypt.c [deleted file]
src/modules/rlm_smb/smblib-common.h [deleted file]
src/modules/rlm_smb/smblib-priv.h [deleted file]
src/modules/rlm_smb/smblib-util.c [deleted file]
src/modules/rlm_smb/smblib.c [deleted file]
src/modules/rlm_smb/smblib.h [deleted file]
src/modules/rlm_smb/std-includes.h [deleted file]
src/modules/rlm_smb/valid.c [deleted file]
src/modules/rlm_smb/valid.h [deleted file]

index 90b3ef9..096da34 100644 (file)
@@ -40,3 +40,4 @@ FreeRADIUS 3.0.0 Mon 01 Jan 8:00:00 CEST 2010, urgency=medium
        Bug fixes
        * All known bug fixes from 2.1.x are included.
        * Removed "addport" functionality.
+       * Removed "rlm_smb" module.
diff --git a/src/modules/rlm_smb/.gitignore b/src/modules/rlm_smb/.gitignore
deleted file mode 100644 (file)
index 120115f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-all.mk
diff --git a/src/modules/rlm_smb/Makefile.in b/src/modules/rlm_smb/Makefile.in
deleted file mode 100644 (file)
index 00be156..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# $Id$
-#
-
-# Edit this by hand if you want it to build.
-TARGET     = 
-SRCS       = rlm_smb.c rfcnb-io.c rfcnb-util.c rlm_smb.c session.c \
-       smbdes.c smbencrypt.c smblib.c smblib-util.c valid.c
-HEADERS    = byteorder.h rfcnb-common.h rfcnb-error.h rfcnb.h rfcnb-io.h \
-               rfcnb-priv.h rfcnb-util.h smblib-common.h smblib.h \
-               smblib-priv.h std-includes.h valid.h
-
-RLM_LIBS   = @smb_ldflags@
-RLM_CFLAGS = @smb_cflags@
-
-include ../rules.mak
-
-$(LT_OBJS): $(HEADERS)
diff --git a/src/modules/rlm_smb/README b/src/modules/rlm_smb/README
deleted file mode 100644 (file)
index 978961a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-  Other than the make file and rlm_smb.c, these source code in this
-directory was taken from pam_smb, version 1.1.6, located at:
-
-http://www.csn.ul.ie/~airlied/pam_smb/
-
-  If there are ANY discrepancies between these files and pam_smb, then
-pam_smb SHOULD be taken to be the definitive source code.
-
-rfcnb-util.c has been modified to use FreeRADIUS's ip_getaddr function
-which does both inet_addr and gethostbyname{,_r} and returns just the
-uint32_t or INADDR_ANY on failure.
diff --git a/src/modules/rlm_smb/all.mk.in b/src/modules/rlm_smb/all.mk.in
deleted file mode 100644 (file)
index f443e3d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-TARGETNAME     := @targetname@
-
-ifneq "$(TARGETNAME)" ""
-TARGET         := $(TARGETNAME).a
-endif
-
-SOURCES                := $(TARGETNAME).c rfcnb-io.c rfcnb-util.c session.c \
-       smbdes.c smbencrypt.c smblib.c smblib-util.c valid.c
-
-SRC_CFLAGS     := @smb_cflags@
-TGT_LDLIBS     := @smb_ldflags@
diff --git a/src/modules/rlm_smb/byteorder.h b/src/modules/rlm_smb/byteorder.h
deleted file mode 100644 (file)
index 5700c29..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-   Unix SMB/Netbios implementation.
-   Version 1.9.
-   SMB Byte handling
-   Copyright (C) Andrew Tridgell 1992-1995
-   Copyright 2006 The FreeRADIUS server project
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/*
-   This file implements macros for machine independent short and
-   int manipulation
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(byteorder_h, "$Id$")
-
-#undef CAREFUL_ALIGNMENT
-
-/* we know that the 386 can handle misalignment and has the "right"
-   byteorder */
-#ifdef __i386__
-#define CAREFUL_ALIGNMENT 0
-#endif
-
-#ifndef CAREFUL_ALIGNMENT
-#define CAREFUL_ALIGNMENT 1
-#endif
-
-#define CVAL(buf,pos) (((unsigned char *)(buf))[pos])
-#define PVAL(buf,pos) ((unsigned)CVAL(buf,pos))
-#define SCVAL(buf,pos,val) (CVAL(buf,pos) = (val))
-
-
-#if CAREFUL_ALIGNMENT
-#define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
-#define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)
-#define SSVALX(buf,pos,val) (CVAL(buf,pos)=(val)&0xFF,CVAL(buf,pos+1)=(val)>>8)
-#define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
-#define SVALS(buf,pos) ((int16)SVAL(buf,pos))
-#define IVALS(buf,pos) ((int32)IVAL(buf,pos))
-#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val)))
-#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32)(val)))
-#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
-#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val)))
-#else
-/* this handles things for architectures like the 386 that can handle
-   alignment errors */
-/*
-   WARNING: This section is dependent on the length of int16 and int32
-   being correct
-*/
-#define SVAL(buf,pos) (*(uint16 *)((char *)(buf) + (pos)))
-#define IVAL(buf,pos) (*(uint32 *)((char *)(buf) + (pos)))
-#define SVALS(buf,pos) (*(int16 *)((char *)(buf) + (pos)))
-#define IVALS(buf,pos) (*(int32 *)((char *)(buf) + (pos)))
-#define SSVAL(buf,pos,val) SVAL(buf,pos)=((uint16)(val))
-#define SIVAL(buf,pos,val) IVAL(buf,pos)=((uint32)(val))
-#define SSVALS(buf,pos,val) SVALS(buf,pos)=((int16)(val))
-#define SIVALS(buf,pos,val) IVALS(buf,pos)=((int32)(val))
-#endif
-
-
-/* now the reverse routines - these are used in nmb packets (mostly) */
-#define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))
-#define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16)))
-
-#define RSVAL(buf,pos) SREV(SVAL(buf,pos))
-#define RIVAL(buf,pos) IREV(IVAL(buf,pos))
-#define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val))
-#define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val))
diff --git a/src/modules/rlm_smb/config.h.in b/src/modules/rlm_smb/config.h.in
deleted file mode 100644 (file)
index 72ff765..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#undef HAVE_CTYPE_H
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#undef HAVE_NETINET_TCP_H
-
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/signal.h> header file. */
-#undef HAVE_SYS_SIGNAL_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-#undef HAVE_SYS_UIO_H
-
-/* Define to 1 if you have the <sys/vfs.h> header file. */
-#undef HAVE_SYS_VFS_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
diff --git a/src/modules/rlm_smb/configure b/src/modules/rlm_smb/configure
deleted file mode 100755 (executable)
index f2032ba..0000000
+++ /dev/null
@@ -1,5808 +0,0 @@
-#! /bin/sh
-# From configure.in Revision.
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.
-#
-#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-       expr "X$arg" : "X\\(.*\\)$as_nl";
-       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# Use a proper internal environment variable to ensure we don't fall
-  # into an infinite loop, continuously re-executing ourselves.
-  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
-    _as_can_reexec=no; export _as_can_reexec;
-    # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
-  fi
-  # We don't want this to propagate to other subprocesses.
-          { _as_can_reexec=; unset _as_can_reexec;}
-if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-"
-  as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
-  exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1
-test -x / || exit 1"
-  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
-  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
-  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  as_found=:
-  case $as_dir in #(
-        /*)
-          for as_base in sh bash ksh sh5; do
-            # Try only shells that exist, to save several forks.
-            as_shell=$as_dir/$as_base
-            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  CONFIG_SHELL=$as_shell as_have_required=yes
-                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  break 2
-fi
-fi
-          done;;
-       esac
-  as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
-      if test "x$CONFIG_SHELL" != x; then :
-  export CONFIG_SHELL
-             # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-exit 255
-fi
-
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
-  else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
-  fi
-  exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
-  as_lineno_1=$LINENO as_lineno_1a=$LINENO
-  as_lineno_2=$LINENO as_lineno_2a=$LINENO
-  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
-  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
-  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
-  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
-  # already done that, so ensure we don't try to do so again and fall
-  # in an infinite loop.  This has already happened in practice.
-  _as_can_reexec=no; export _as_can_reexec
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='        ';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
-
-ac_unique_file="rlm_smb.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-targetname
-smb_ldflags
-smb_cflags
-EGREP
-GREP
-CPP
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-with_rlm_smb_lib_dir
-with_rlm_smb_include_dir
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *=)   ac_optarg= ;;
-  *)    ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-        ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-        ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-        ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-        ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
-    esac
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
-               datadir sysconfdir sharedstatedir localstatedir includedir \
-               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_myself" : 'X\(//\)[^/]' \| \
-        X"$as_myself" : 'X\(//\)$' \| \
-        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
-       pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking ...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
-  cat <<\_ACEOF
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-rlm-smb-lib-dir=DIR       Directory for samba library files
-  --with-rlm-smb-include-dir=DIR   Directory for samba include files
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to the package provider.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.69
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval \${$3+:} false; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-       $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
-  done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
-    2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      as_fn_append ac_configure_args " '$ac_arg'"
-      ;;
-    esac
-  done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-       "s/'\''/'\''\\\\'\'''\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
-      echo
-      for ac_var in $ac_subst_files
-      do
-       eval ac_val=\$$ac_var
-       case $ac_val in
-       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-       esac
-       $as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file" \
-      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special files
-  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
-  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-       # differences in whitespace do not lead to failure.
-       ac_old_val_w=`echo x $ac_old_val`
-       ac_new_val_w=`echo x $ac_new_val`
-       if test "$ac_old_val_w" != "$ac_new_val_w"; then
-         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-         ac_cache_corrupted=:
-       else
-         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-         eval $ac_var=\$ac_old_val
-       fi
-       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_config_headers="$ac_config_headers config.h"
-
-
-
-
-if test x$with_rlm_smb != xno; then
-
-       ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-       ;;
-    [ab].out )
-       # We found the default executable, but exeext='' is most
-       # certainly right.
-       break;;
-    *.* )
-       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-       then :; else
-          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       fi
-       # We set ac_cv_exeext here because the later test for it is not
-       # safe: cross compilers may not add the suffix if given an `-o'
-       # argument, so we may need to know it at that point already.
-       # Even if this section looks crufty: it has the advantage of
-       # actually working.
-       break;;
-    * )
-       break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-         break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-       cross_compiling=yes
-    else
-       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-        CFLAGS="-g"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-       ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-               rlm_smb_lib_dir=
-
-# Check whether --with-rlm-smb-lib-dir was given.
-if test "${with_rlm_smb_lib_dir+set}" = set; then :
-  withval=$with_rlm_smb_lib_dir;  case "$withval" in
-           no)
-               as_fn_error $? "Need rlm-smb-lib-dir" "$LINENO" 5
-               ;;
-           yes)
-               ;;
-           *)
-               rlm_smb_lib_dir="$withval"
-               ;;
-         esac
-
-fi
-
-
-               rlm_smb_inc_dir=
-
-# Check whether --with-rlm-smb-include-dir was given.
-if test "${with_rlm_smb_include_dir+set}" = set; then :
-  withval=$with_rlm_smb_include_dir;  case "$withval" in
-           no)
-               as_fn_error $? "Need rlm-smb-include-dir" "$LINENO" 5
-               ;;
-           yes)
-               ;;
-           *)
-               rlm_smb_include_dir="$withval"
-               ;;
-         esac
-
-fi
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                 inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in arpa/inet.h \
-                       dirent.h \
-                       sys/vfs.h \
-                       netinet/in.h \
-                       netinet/tcp.h \
-                       sys/uio.h \
-                       sys/signal.h \
-                       sys/socket.h \
-                       unistd.h \
-                       ctype.h \
-                       netdb.h \
-                       signal.h \
-
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-       targetname=rlm_smb
-       smb_cflags="-I."
-else
-       targetname=
-       echo \*\*\* module rlm_smb is disabled.
-fi
-
-if test x"$fail" != x""; then
-       if test x"${enable_strict_dependencies}" = x"yes"; then
-               as_fn_error $? "set --without-rlm_smb to disable it explicitly." "$LINENO" 5
-       else
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently not building rlm_smb." >&5
-$as_echo "$as_me: WARNING: silently not building rlm_smb." >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FAILURE: rlm_smb requires: $fail." >&5
-$as_echo "$as_me: WARNING: FAILURE: rlm_smb requires: $fail." >&2;};
-               targetname=""
-       fi
-fi
-
-
-
-
-
-  unset ac_cv_env_LIBS_set
-  unset ac_cv_env_LIBS_value
-
-  ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes: double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    if test "x$cache_file" != "x/dev/null"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-      if test ! -f "$cache_file" || test -h "$cache_file"; then
-       cat confcache >"$cache_file"
-      else
-        case $cache_file in #(
-        */* | ?:*)
-         mv -f confcache "$cache_file"$$ &&
-         mv -f "$cache_file"$$ "$cache_file" ;; #(
-        *)
-         mv -f confcache "$cache_file" ;;
-       esac
-      fi
-    fi
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-       expr "X$arg" : "X\\(.*\\)$as_nl";
-       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='        ';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-      --config     print configuration, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-      --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to the package provider."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.69,
-  with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=?*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  --*=)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    '') as_fn_error $? "missing file argument" ;;
-    esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
-  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
-  *) as_fn_append ac_config_targets " $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp= ac_tmp=
-  trap 'exit_status=$?
-  : "${ac_tmp:=$tmp}"
-  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
-  trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = "\a"
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
-  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
-h
-s///
-s/^/:/
-s/[     ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[  ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[      ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_tt"; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[    ]*#[    ]*define[       ][      ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = "\a"
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #undef with comments.  This is necessary, for example,
-    # in the case of _POSIX_SOURCE, which is predefined and required
-    # on some systems where configure will not decide to define it.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$ac_tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-        # (if the path is not absolute).  The absolute path cannot be DOS-style,
-        # because $ac_f cannot contain `:'.
-        test -f "$ac_f" ||
-          case $ac_f in
-          [\\/$]*) false;;
-          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-          esac ||
-          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-       `' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$ac_tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_file" : 'X\(//\)[^/]' \| \
-        X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
-  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
-      "$ac_tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&2;}
-
-  rm -f "$ac_tmp/stdin"
-  case $ac_file in
-  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
-  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
-  esac \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
-    } >"$ac_tmp/config.h" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f "$ac_file"
-      mv "$ac_tmp/config.h" "$ac_file" \
-       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error $? "could not create -" "$LINENO" 5
-  fi
- ;;
-
-
-  esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-ac_config_files="$ac_config_files all.mk"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes: double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    if test "x$cache_file" != "x/dev/null"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-      if test ! -f "$cache_file" || test -h "$cache_file"; then
-       cat confcache >"$cache_file"
-      else
-        case $cache_file in #(
-        */* | ?:*)
-         mv -f confcache "$cache_file"$$ &&
-         mv -f "$cache_file"$$ "$cache_file" ;; #(
-        *)
-         mv -f confcache "$cache_file" ;;
-       esac
-      fi
-    fi
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-       expr "X$arg" : "X\\(.*\\)$as_nl";
-       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='        ';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-      --config     print configuration, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-      --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to the package provider."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.69,
-  with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=?*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  --*=)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    '') as_fn_error $? "missing file argument" ;;
-    esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
-  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
-  *) as_fn_append ac_config_targets " $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "all.mk") CONFIG_FILES="$CONFIG_FILES all.mk" ;;
-
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp= ac_tmp=
-  trap 'exit_status=$?
-  : "${ac_tmp:=$tmp}"
-  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
-  trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = "\a"
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
-  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
-h
-s///
-s/^/:/
-s/[     ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[  ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[      ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_tt"; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[    ]*#[    ]*define[       ][      ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = "\a"
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #undef with comments.  This is necessary, for example,
-    # in the case of _POSIX_SOURCE, which is predefined and required
-    # on some systems where configure will not decide to define it.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$ac_tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-        # (if the path is not absolute).  The absolute path cannot be DOS-style,
-        # because $ac_f cannot contain `:'.
-        test -f "$ac_f" ||
-          case $ac_f in
-          [\\/$]*) false;;
-          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-          esac ||
-          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-       `' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$ac_tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_file" : 'X\(//\)[^/]' \| \
-        X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
-  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
-      "$ac_tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&2;}
-
-  rm -f "$ac_tmp/stdin"
-  case $ac_file in
-  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
-  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
-  esac \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
-    } >"$ac_tmp/config.h" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f "$ac_file"
-      mv "$ac_tmp/config.h" "$ac_file" \
-       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error $? "could not create -" "$LINENO" 5
-  fi
- ;;
-
-
-  esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
diff --git a/src/modules/rlm_smb/configure.in b/src/modules/rlm_smb/configure.in
deleted file mode 100644 (file)
index 887cd92..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-AC_PREREQ([2.53])
-AC_INIT(rlm_smb.c)
-AC_CONFIG_HEADER(config.h)
-AC_REVISION($Revision$)
-AC_DEFUN(modname,[rlm_smb])
-
-if test x$with_[]modname != xno; then
-
-       AC_PROG_CC
-       AC_PROG_CPP
-
-       dnl extra argument: --with-rlm-smb-lib-dir
-       rlm_smb_lib_dir=
-       AC_ARG_WITH(rlm-smb-lib-dir,
-       [  --with-rlm-smb-lib-dir=DIR       Directory for samba library files []],
-       [ case "$withval" in
-           no)
-               AC_MSG_ERROR(Need rlm-smb-lib-dir)
-               ;;
-           yes)
-               ;;
-           *)
-               rlm_smb_lib_dir="$withval"
-               ;;
-         esac ]
-       )
-
-       dnl extra argument: --with-rlm-smb-include-dir
-       rlm_smb_inc_dir=
-       AC_ARG_WITH(rlm-smb-include-dir,
-       [  --with-rlm-smb-include-dir=DIR   Directory for samba include files []],
-       [ case "$withval" in
-           no)
-               AC_MSG_ERROR(Need rlm-smb-include-dir)
-               ;;
-           yes)
-               ;;
-           *)
-               rlm_smb_include_dir="$withval"
-               ;;
-         esac ]
-       )
-
-       AC_CHECK_HEADERS(arpa/inet.h \
-                       dirent.h \
-                       sys/vfs.h \
-                       netinet/in.h \
-                       netinet/tcp.h \
-                       sys/uio.h \
-                       sys/signal.h \
-                       sys/socket.h \
-                       unistd.h \
-                       ctype.h \
-                       netdb.h \
-                       signal.h \
-                       )
-
-       targetname=modname
-       smb_cflags="-I."
-else
-       targetname=
-       echo \*\*\* module modname is disabled.
-fi
-
-if test x"$fail" != x""; then
-       if test x"${enable_strict_dependencies}" = x"yes"; then
-               AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
-       else
-               AC_MSG_WARN([silently not building ]modname[.])
-               AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
-               targetname=""
-       fi
-fi
-
-AC_SUBST(smb_cflags)
-AC_SUBST(smb_ldflags)
-AC_SUBST(targetname)
-AC_OUTPUT(Makefile)
-AC_OUTPUT(all.mk)
diff --git a/src/modules/rlm_smb/rfcnb-common.h b/src/modules/rlm_smb/rfcnb-common.h
deleted file mode 100644 (file)
index c3213a3..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
-   Version 1.0
-   RFCNB Common Structures etc Defines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(rfcnb_common_h, "$Id$")
-
-/* A data structure we need */
-
-typedef struct RFCNB_Pkt {
-
-  char * data;                 /* The data in this portion */
-  int len;
-  struct RFCNB_Pkt *next;
-
-} RFCNB_Pkt;
-
-
diff --git a/src/modules/rlm_smb/rfcnb-error.h b/src/modules/rlm_smb/rfcnb-error.h
deleted file mode 100644 (file)
index 6db9c43..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
-   Version 1.0
-   RFCNB Error Response Defines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(rfcnb_error_h, "$Id$")
-
-/* Error responses */
-
-#define RFCNBE_Bad -1          /* Bad response */
-#define RFCNBE_OK 0
-
-/* these should follow the spec ... is there one ?*/
-
-#define RFCNBE_NoSpace 1       /* Could not allocate space for a struct */
-#define RFCNBE_BadName 2       /* Could not translate a name            */
-#define RFCNBE_BadRead 3       /* Read sys call failed                  */
-#define RFCNBE_BadWrite 4      /* Write Sys call failed                 */
-#define RFCNBE_ProtErr 5       /* Protocol Error                        */
-#define RFCNBE_ConGone 6       /* Connection dropped                    */
-#define RFCNBE_BadHandle 7     /* Handle passed was bad                 */
-#define RFCNBE_BadSocket 8     /* Problems creating socket              */
-#define RFCNBE_ConnectFailed 9 /* Connect failed                        */
-#define RFCNBE_CallRejNLOCN 10 /* Call rejected, not listening on CN    */
-#define RFCNBE_CallRejNLFCN 11 /* Call rejected, not listening for CN   */
-#define RFCNBE_CallRejCNNP  12 /* Call rejected, called name not present */
-#define RFCNBE_CallRejInfRes 13/* Call rejetced, name ok, no resources   */
-#define RFCNBE_CallRejUnSpec 14/* Call rejected, unspecified error      */
-#define RFCNBE_BadParam      15/* Bad parameters passed ...             */
-#define RFCNBE_Timeout       16/* IO Timed out                          */
-
-/* Text strings for the error responses                                 */
-
-static const char *RFCNB_Error_Strings[] = {
-
-  "RFCNBE_OK: Routine completed successfully.",
-  "RFCNBE_NoSpace: No space available for a malloc call.",
-  "RFCNBE_BadName: NetBIOS name could not be translated to IP address.",
-  "RFCNBE_BadRead: Read system call returned an error. Check errno.",
-  "RFCNBE_BadWrite: Write system call returned an error. Check errno.",
-  "RFCNBE_ProtErr: A protocol error has occurred.",
-  "RFCNBE_ConGone: Connection dropped during a read or write system call.",
-  "RFCNBE_BadHandle: Bad connection handle passed.",
-  "RFCNBE_BadSocket: Problems creating socket.",
-  "RFCNBE_ConnectFailed: Connection failed. See errno.",
-  "RFCNBE_CallRejNLOCN: Call rejected. Not listening on called name.",
-  "RFCNBE_CallRejNLFCN: Call rejected. Not listening for called name.",
-  "RFCNBE_CallRejCNNP: Call rejected. Called name not present.",
-  "RFCNBE_CallRejInfRes: Call rejected. Name present, but insufficient resources.",
-  "RFCNBE_CallRejUnSpec: Call rejected. Unspecified error.",
-  "RFCNBE_BadParam: Bad parameters passed to a routine.",
-  "RFCNBE_Timeout: IO Operation timed out ..."
-
-};
-
-
-
diff --git a/src/modules/rlm_smb/rfcnb-io.c b/src/modules/rlm_smb/rfcnb-io.c
deleted file mode 100644 (file)
index da904a4..0000000
+++ /dev/null
@@ -1,414 +0,0 @@
-/* UNIX RFCNB (RFC1001/RFC1002) NEtBIOS implementation
-
-   Version 1.0
-   RFCNB IO Routines ...
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-/* #include <features.h> */
-#include "std-includes.h"
-#include "rfcnb-priv.h"
-#include "rfcnb-util.h"
-#include "rfcnb-io.h"
-
-#ifdef HAVE_SYS_UIO_H
-#include <sys/uio.h>
-#endif
-
-#ifdef HAVE_SYS_SIGNAL_H
-#include <sys/signal.h>
-#endif
-
-#include <string.h>
-
-int RFCNB_Timeout = 0;    /* Timeout in seconds ... */
-
-static void rfcnb_alarm(int sig)
-{
-  fprintf(stderr, "IO Timed out ...\n");
-}
-
-/* Set timeout value and setup signal handling */
-
-int RFCNB_Set_Timeout(int seconds)
-{
-  /* If we are on a Bezerkeley system, use sigvec, else sigaction */
-#ifndef SA_RESTART
-  struct sigvec invec, outvec;
-#else
-  struct sigaction inact, outact;
-#endif
-
-  RFCNB_Timeout = seconds;
-
-  if (RFCNB_Timeout > 0) { /* Set up handler to ignore but not restart */
-
-#ifndef SA_RESTART
-    invec.sv_handler = (void (*)())rfcnb_alarm;
-    invec.sv_mask = 0;
-    invec.sv_flags = SV_INTERRUPT;
-
-    if (sigvec(SIGALRM, &invec, &outvec)  < 0)
-      return(-1);
-#else
-    inact.sa_handler = (void (*)())rfcnb_alarm;
-    sigemptyset(&inact.sa_mask);
-    inact.sa_flags = 0;    /* Don't restart */
-
-    if (sigaction(SIGALRM, &inact, &outact) < 0)
-      return(-1);
-
-#endif
-
-  }
-
-  return(0);
-
-}
-
-/* Discard the rest of an incoming packet as we do not have space for it
-   in the buffer we allocated or were passed ...                         */
-
-static int RFCNB_Discard_Rest(struct RFCNB_Con *con, int len)
-{ char temp[100];   /* Read into here */
-  int rest, this_read, bytes_read;
-
-  /* len is the amount we should read */
-
-#ifdef RFCNB_DEBUG
-  fprintf(stderr, "Discard_Rest called to discard: %i\n", len);
-#endif
-
-  rest = len;
-
-  while (rest > 0) {
-
-    this_read = (rest > sizeof(temp)?sizeof(temp):rest);
-
-    bytes_read = read(con -> fd, temp, this_read);
-
-    if (bytes_read <= 0) { /* Error so return */
-
-      if (bytes_read < 0)
-       RFCNB_errno = RFCNBE_BadRead;
-      else
-       RFCNB_errno = RFCNBE_ConGone;
-
-      RFCNB_saved_errno = errno;
-      return(RFCNBE_Bad);
-
-    }
-
-    rest = rest - bytes_read;
-
-  }
-
-  return(0);
-
-}
-
-
-/* Send an RFCNB packet to the connection.
-
-   We just send each of the blocks linked together ...
-
-   If we can, try to send it as one iovec ...
-
-*/
-
-int RFCNB_Put_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len)
-{ int len_sent, tot_sent, this_len;
-  struct RFCNB_Pkt *pkt_ptr;
-  char *this_data;
-  int i;
-  struct iovec io_list[10];          /* We should never have more      */
-                                     /* If we do, this will blow up ...*/
-
-  /* Try to send the data ... We only send as many bytes as len claims */
-  /* We should try to stuff it into an IOVEC and send as one write     */
-
-
-  pkt_ptr = pkt;
-  len_sent =  tot_sent = 0;             /* Nothing sent so far */
-  i = 0;
-
-  while ((pkt_ptr != NULL) & (i < 10)) {  /* Watch that magic number! */
-
-    this_len = pkt_ptr -> len;
-    this_data = pkt_ptr -> data;
-    if ((tot_sent + this_len) > len)
-      this_len = len - tot_sent;        /* Adjust so we don't send too much */
-
-    /* Now plug into the iovec ... */
-
-    io_list[i].iov_len = this_len;
-    io_list[i].iov_base = this_data;
-    i++;
-
-    tot_sent += this_len;
-
-    if (tot_sent == len) break;   /* Let's not send too much */
-
-    pkt_ptr = pkt_ptr -> next;
-
-  }
-
-#ifdef RFCNB_DEBUG
-  fprintf(stderr, "Frags = %i, tot_sent = %i\n", i, tot_sent);
-#endif
-
-  /* Set up an alarm if timeouts are set ... */
-
-  if (RFCNB_Timeout > 0)
-    alarm(RFCNB_Timeout);
-
-  if ((len_sent = writev(con -> fd, io_list, i)) < 0) { /* An error */
-
-    con -> rfc_errno = errno;
-    if (errno == EINTR)  /* We were interrupted ... */
-      RFCNB_errno = RFCNBE_Timeout;
-    else
-      RFCNB_errno = RFCNBE_BadWrite;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-
-  }
-
-  if (len_sent < tot_sent) { /* Less than we wanted */
-    if (errno == EINTR)      /* We were interrupted */
-      RFCNB_errno = RFCNBE_Timeout;
-    else
-      RFCNB_errno = RFCNBE_BadWrite;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-  }
-
-  if (RFCNB_Timeout > 0)
-    alarm(0);                /* Reset that sucker */
-
-#ifdef RFCNB_DEBUG
-
-  fprintf(stderr, "Len sent = %i ...\n", len_sent);
-  RFCNB_Print_Pkt(stderr, "sent", pkt, len_sent); /* Print what send ... */
-
-#endif
-
-  return(len_sent);
-
-}
-
-/* Read an RFCNB packet off the connection.
-
-   We read the first 4 bytes, that tells us the length, then read the
-   rest. We should implement a timeout, but we don't just yet
-
-*/
-
-
-int RFCNB_Get_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len)
-
-{ int read_len, pkt_len;
-  char hdr[RFCNB_Pkt_Hdr_Len];      /* Local space for the header */
-  struct RFCNB_Pkt *pkt_frag;
-  int more, this_time, offset, frag_len, this_len;
-  BOOL seen_keep_alive = TRUE;
-
-  /* Read that header straight into the buffer */
-
-  if (len < RFCNB_Pkt_Hdr_Len) { /* What a bozo */
-
-#ifdef RFCNB_DEBUG
-    fprintf(stderr, "Trying to read less than a packet:");
-    perror("");
-#endif
-    RFCNB_errno = RFCNBE_BadParam;
-    return(RFCNBE_Bad);
-
-  }
-
-  /* We discard keep alives here ... */
-
-  if (RFCNB_Timeout > 0)
-    alarm(RFCNB_Timeout);
-
-  while (seen_keep_alive) {
-
-    if ((read_len = read(con -> fd, hdr, sizeof(hdr))) < 0) { /* Problems */
-#ifdef RFCNB_DEBUG
-      fprintf(stderr, "Reading the packet, we got:");
-      perror("");
-#endif
-      if (errno == EINTR)
-       RFCNB_errno = RFCNBE_Timeout;
-      else
-       RFCNB_errno = RFCNBE_BadRead;
-      RFCNB_saved_errno = errno;
-      return(RFCNBE_Bad);
-
-    }
-
-    /* Now we check out what we got */
-
-    if (read_len == 0) { /* Connection closed, send back eof?  */
-
-#ifdef RFCNB_DEBUG
-      fprintf(stderr, "Connection closed reading\n");
-#endif
-
-      if (errno == EINTR)
-       RFCNB_errno = RFCNBE_Timeout;
-      else
-       RFCNB_errno = RFCNBE_ConGone;
-      RFCNB_saved_errno = errno;
-      return(RFCNBE_Bad);
-
-    }
-
-    if (RFCNB_Pkt_Type(hdr) == RFCNB_SESSION_KEEP_ALIVE) {
-
-#ifdef RFCNB_DEBUG
-      fprintf(stderr, "RFCNB KEEP ALIVE received\n");
-#endif
-
-    }
-    else {
-      seen_keep_alive = FALSE;
-    }
-
-  }
-
-  /* What if we got less than or equal to a hdr size in bytes? */
-
-  if (read_len < sizeof(hdr)) { /* We got a small packet */
-
-    /* Now we need to copy the hdr portion we got into the supplied packet */
-
-    memcpy(pkt -> data, hdr, read_len);  /*Copy data */
-
-#ifdef RFCNB_DEBUG
-    RFCNB_Print_Pkt(stderr, "rcvd", pkt, read_len);
-#endif
-
-    return(read_len);
-
-  }
-
-  /* Now, if we got at least a hdr size, alloc space for rest, if we need it */
-
-  pkt_len = RFCNB_Pkt_Len(hdr);
-
-#ifdef RFCNB_DEBUG
-  fprintf(stderr, "Reading Pkt: Length = %i\n", pkt_len);
-#endif
-
-  /* Now copy in the hdr */
-
-  memcpy(pkt -> data, hdr, sizeof(hdr));
-
-  /* Get the rest of the packet ... first figure out how big our buf is? */
-  /* And make sure that we handle the fragments properly ... Sure should */
-  /* use an iovec ...                                                    */
-
-  if (len < pkt_len)            /* Only get as much as we have space for */
-    more = len - RFCNB_Pkt_Hdr_Len;
-  else
-    more = pkt_len;
-
-  this_time = 0;
-
-  /* We read for each fragment ... */
-
-  if (pkt -> len == read_len){     /* If this frag was exact size */
-    pkt_frag = pkt -> next;        /* Stick next lot in next frag */
-    offset = 0;                    /* then we start at 0 in next  */
-  }
-  else {
-    pkt_frag = pkt;                /* Otherwise use rest of this frag */
-    offset = RFCNB_Pkt_Hdr_Len;    /* Otherwise skip the header       */
-  }
-
-  frag_len = pkt_frag -> len;
-
-  if (more <= frag_len)     /* If len left to get less than frag space */
-    this_len = more;        /* Get the rest ...                        */
-  else
-    this_len = frag_len - offset;
-
-  while (more > 0) {
-
-    if ((this_time = read(con -> fd, (pkt_frag -> data) + offset, this_len)) <= 0) { /* Problems */
-
-      if (errno == EINTR) {
-
-       RFCNB_errno = RFCNB_Timeout;
-
-      }
-      else {
-       if (this_time < 0)
-         RFCNB_errno = RFCNBE_BadRead;
-       else
-         RFCNB_errno = RFCNBE_ConGone;
-      }
-
-      RFCNB_saved_errno = errno;
-      return(RFCNBE_Bad);
-
-    }
-
-#ifdef RFCNB_DEBUG
-    fprintf(stderr, "Frag_Len = %i, this_time = %i, this_len = %i, more = %i\n", frag_len,
-                    this_time, this_len, more);
-#endif
-
-    read_len = read_len + this_time;  /* How much have we read ... */
-
-    /* Now set up the next part */
-
-    if (pkt_frag -> next == NULL) break;       /* That's it here */
-
-    pkt_frag = pkt_frag -> next;
-    this_len = pkt_frag -> len;
-    offset = 0;
-
-    more = more - this_time;
-
-  }
-
-#ifdef RFCNB_DEBUG
-  fprintf(stderr,"Pkt Len = %i, read_len = %i\n", pkt_len, read_len);
-  RFCNB_Print_Pkt(stderr, "rcvd", pkt, read_len + sizeof(hdr));
-#endif
-
-  if (read_len < (pkt_len + sizeof(hdr))) {  /* Discard the rest */
-
-    return(RFCNB_Discard_Rest(con, (pkt_len + sizeof(hdr)) - read_len));
-
-  }
-
-  if (RFCNB_Timeout > 0)
-    alarm(0);                /* Reset that sucker */
-
-  return(read_len + sizeof(RFCNB_Hdr));
-}
diff --git a/src/modules/rlm_smb/rfcnb-io.h b/src/modules/rlm_smb/rfcnb-io.h
deleted file mode 100644 (file)
index 5f8963a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
-   Version 1.0
-   RFCNB IO Routines Defines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(rfcnb_io_h, "$Id$")
-
-int RFCNB_Put_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len);
-
-int RFCNB_Get_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len);
diff --git a/src/modules/rlm_smb/rfcnb-priv.h b/src/modules/rlm_smb/rfcnb-priv.h
deleted file mode 100644 (file)
index 02c071d..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
-   Version 1.0
-   RFCNB Defines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(rfcnb_priv_h, "$Id$")
-
-/* Defines we need */
-
-typedef unsigned short uint16;
-
-#define GLOBAL extern
-
-#include "rfcnb-error.h"
-#include "rfcnb-common.h"
-#include "byteorder.h"
-
-#ifdef RFCNB_PORT
-#define RFCNB_Default_Port RFCNB_PORT
-#else
-#define RFCNB_Default_Port 139
-#endif
-
-#define RFCNB_MAX_STATS 1
-
-/* Protocol defines we need */
-
-#define RFCNB_SESSION_MESSAGE 0
-#define RFCNB_SESSION_REQUEST 0x81
-#define RFCNB_SESSION_ACK 0x82
-#define RFCNB_SESSION_REJ 0x83
-#define RFCNB_SESSION_RETARGET 0x84
-#define RFCNB_SESSION_KEEP_ALIVE 0x85
-
-/* Structures      */
-
-typedef struct redirect_addr * redirect_ptr;
-
-struct redirect_addr {
-
-  struct in_addr ip_addr;
-  int port;
-  redirect_ptr next;
-
-};
-
-typedef struct RFCNB_Con {
-
-  int fd;                     /* File descripter for TCP/IP connection */
-  int rfc_errno;                  /* last error                            */
-  int timeout;               /* How many milli-secs before IO times out */
-  int redirects;             /* How many times we were redirected     */
-  struct redirect_addr *redirect_list;  /* First is first address */
-  struct redirect_addr *last_addr;
-
-} RFCNB_Con;
-
-typedef char RFCNB_Hdr[4]; /* The header is 4 bytes long with  */
-                                    /* char[0] as the type, char[1] the */
-                                   /* flags, and char[2..3] the length */
-
-/* Macros to extract things from the header. These are for portability
-   between architecture types where we are worried about byte order     */
-
-#define RFCNB_Pkt_Hdr_Len        4
-#define RFCNB_Pkt_Sess_Len       72
-#define RFCNB_Pkt_Retarg_Len     10
-#define RFCNB_Pkt_Nack_Len       5
-#define RFCNB_Pkt_Type_Offset    0
-#define RFCNB_Pkt_Flags_Offset   1
-#define RFCNB_Pkt_Len_Offset     2   /* Length is 2 bytes plus a flag bit */
-#define RFCNB_Pkt_N1Len_Offset   4
-#define RFCNB_Pkt_Called_Offset  5
-#define RFCNB_Pkt_N2Len_Offset   38
-#define RFCNB_Pkt_Calling_Offset 39
-#define RFCNB_Pkt_Error_Offset   4
-#define RFCNB_Pkt_IP_Offset      4
-#define RFCNB_Pkt_Port_Offset    8
-
-/* The next macro isolates the length of a packet, including the bit in the
-   flags                                                                   */
-
-#define RFCNB_Pkt_Len(p)  (PVAL(p, 3) | (PVAL(p, 2) << 8) |     \
-                          ((PVAL(p, RFCNB_Pkt_Flags_Offset) & 0x01) << 16))
-
-#define RFCNB_Put_Pkt_Len(p, v) (p[1] = ((v >> 16) & 1)); \
-                               (p[2] = ((v >> 8) & 0xFF)); \
-                               (p[3] = (v & 0xFF));
-
-#define RFCNB_Pkt_Type(p) (CVAL(p, RFCNB_Pkt_Type_Offset))
-
-/*typedef struct RFCNB_Hdr {
-
-  unsigned char type;
-  unsigned char flags;
-  int16 len;
-
-  } RFCNB_Hdr;
-
-typedef struct RFCNB_Sess_Pkt {
-    unsigned char type;
-    unsigned char flags;
-    int16 length;
-    unsigned char n1_len;
-    char called_name[33];
-    unsigned char n2_len;
-    char calling_name[33];
-  } RFCNB_Sess_Pkt;
-
-
-typedef struct RFCNB_Nack_Pkt {
-
-  struct RFCNB_Hdr hdr;
-  unsigned char error;
-
-  } RFCNB_Nack_Pkt;
-
-typedef struct RFCNB_Retarget_Pkt {
-
-  struct RFCNB_Hdr hdr;
-  int dest_ip;
-  unsigned char port;
-
-  } RFCNB_Redir_Pkt; */
-
-/* Static variables */
-
-/* Only declare this if not defined */
-
-#ifndef RFCNB_ERRNO
-extern int RFCNB_errno;
-extern int RFCNB_saved_errno;    /* Save this from point of error */
-#endif
diff --git a/src/modules/rlm_smb/rfcnb-util.c b/src/modules/rlm_smb/rfcnb-util.c
deleted file mode 100644 (file)
index 100c463..0000000
+++ /dev/null
@@ -1,512 +0,0 @@
-/* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
-   Version 1.0
-   RFCNB Utility Routines ...
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-#include <string.h>
-
-#include <freeradius-devel/libradius.h>
-#include "std-includes.h"
-#include "rfcnb-priv.h"
-#include "rfcnb-util.h"
-#include "rfcnb-io.h"
-
-extern void (*Prot_Print_Routine)(); /* Pointer to protocol print routine */
-
-/* Convert name and pad to 16 chars as needed */
-/* Name 1 is a C string with null termination, name 2 may not be */
-/* If SysName is true, then put a <00> on end, else space>       */
-
-void RFCNB_CvtPad_Name(char *name1, char *name2)
-
-{ char c, c1, c2;
-  int i, len;
-
-  len = strlen(name1);
-
-  for (i = 0; i < 16; i++) {
-
-    if (i >= len) {
-
-     c1 = 'C'; c2 = 'A'; /* CA is a space */
-
-    } else {
-
-      c = name1[i];
-      c1 = (char)((int)c/16 + (int)'A');
-      c2 = (char)((int)c%16 + (int)'A');
-    }
-
-    name2[i*2] = c1;
-    name2[i*2+1] = c2;
-
-  }
-
-  name2[32] = 0;   /* Put in the nll ...*/
-
-}
-
-/* Converts an Ascii NB Name (16 chars) to an RFCNB Name (32 chars)
-   Uses the encoding in RFC1001. Each nibble of byte is added to 'A'
-   to produce the next byte in the name.
-
-   This routine assumes that AName is 16 bytes long and that NBName has
-   space for 32 chars, so be careful ...
-
-*/
-
-void RFCNB_AName_To_NBName(char *AName, char *NBName)
-
-{ char c, c1, c2;
-  int i;
-
-  for (i=0; i < 16; i++) {
-
-    c = AName[i];
-
-    c1 = (char)((c >> 4) + 'A');
-    c2 = (char)((c & 0xF) + 'A');
-
-    NBName[i*2] = c1;
-    NBName[i*2+1] = c2;
-  }
-
-  NBName[32] = 0; /* Put in a null */
-
-}
-
-/* Do the reverse of the above ... */
-
-void RFCNB_NBName_To_AName(char *NBName, char *AName)
-
-{ char c, c1, c2;
-  int i;
-
-  for (i=0; i < 16; i++) {
-
-    c1 = NBName[i*2];
-    c2 = NBName[i*2+1];
-
-    c = (char)(((int)c1 - (int)'A') * 16 + ((int)c2 - (int)'A'));
-
-    AName[i] = c;
-
-  }
-
-  AName[i] = 0;   /* Put a null on the end ... */
-
-}
-
-/* Print a string of bytes in HEX etc */
-
-void RFCNB_Print_Hex(FILE *fd, struct RFCNB_Pkt *pkt, int Offset, int Len)
-
-{ char c1, c2, outbuf1[33];
-  unsigned char c;
-  int i, j;
-  struct RFCNB_Pkt *pkt_ptr = pkt;
-  static char Hex_List[17] = "0123456789ABCDEF";
-
-  j = 0;
-
-  /* We only want to print as much as sepcified in Len */
-
-  while (pkt_ptr != NULL) {
-
-    for (i = 0;
-        i < ((Len > (pkt_ptr -> len)?pkt_ptr -> len:Len) - Offset);
-        i++) {
-
-      c = pkt_ptr -> data[i + Offset];
-      c1 = Hex_List[c >> 4];
-      c2 = Hex_List[c & 0xF];
-
-      outbuf1[j++] = c1; outbuf1[j++] = c2;
-
-      if (j == 32){ /* Print and reset */
-       outbuf1[j] = 0;
-       fprintf(fd, "    %s\n", outbuf1);
-       j = 0;
-      }
-
-    }
-
-    Offset = 0;
-    Len = Len - pkt_ptr -> len;   /* Reduce amount by this much */
-    pkt_ptr = pkt_ptr -> next;
-
-  }
-
-  /* Print last lot in the buffer ... */
-
-  if (j > 0) {
-
-    outbuf1[j] = 0;
-    fprintf(fd, "    %s\n", outbuf1);
-
-  }
-
-  fprintf(fd, "\n");
-
-}
-
-/* Get a packet of size n */
-
-struct RFCNB_Pkt *RFCNB_Alloc_Pkt(int n)
-
-{ RFCNB_Pkt *pkt;
-
-  if ((pkt = (struct RFCNB_Pkt *)malloc(sizeof(struct RFCNB_Pkt))) == NULL) {
-
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    return(NULL);
-
-  }
-
-  pkt -> next = NULL;
-  pkt -> len = n;
-
-  if (n == 0) return(pkt);
-
-  if ((pkt -> data = (char *)malloc(n)) == NULL) {
-
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    free(pkt);
-    return(NULL);
-
-  }
-
-  return(pkt);
-
-}
-
-/* Free up a packet */
-
-int RFCNB_Free_Pkt(struct RFCNB_Pkt *pkt)
-
-{ struct RFCNB_Pkt *pkt_next; char *data_ptr;
-
-  while (pkt != NULL) {
-
-    pkt_next = pkt -> next;
-
-    data_ptr = pkt -> data;
-
-    if (data_ptr != NULL)
-      free(data_ptr);
-
-    free(pkt);
-
-    pkt = pkt_next;
-
-  }
-
-}
-
-/* Print an RFCNB packet */
-
-void RFCNB_Print_Pkt(FILE *fd, char *dirn, struct RFCNB_Pkt *pkt, int len)
-
-{ char lname[17];
-
-  /* We assume that the first fragment is the RFCNB Header  */
-  /* We should loop through the fragments printing them out */
-
-  fprintf(fd, "RFCNB Pkt %s:", dirn);
-
-  switch (RFCNB_Pkt_Type(pkt -> data)) {
-
-  case RFCNB_SESSION_MESSAGE:
-
-    fprintf(fd, "SESSION MESSAGE: Length = %i\n", RFCNB_Pkt_Len(pkt -> data));
-    RFCNB_Print_Hex(fd, pkt, RFCNB_Pkt_Hdr_Len,
-#ifdef RFCNB_PRINT_DATA
-                   RFCNB_Pkt_Len(pkt -> data) - RFCNB_Pkt_Hdr_Len
-#else
-                    40
-#endif
-           );
-  if (Prot_Print_Routine != 0) { /* Print the rest of the packet */
-
-    Prot_Print_Routine(fd, strcmp(dirn, "sent"), pkt, RFCNB_Pkt_Hdr_Len,
-                      RFCNB_Pkt_Len(pkt -> data) - RFCNB_Pkt_Hdr_Len);
-
-      }
-
-      break;
-
- case RFCNB_SESSION_REQUEST:
-
-      fprintf(fd, "SESSION REQUEST: Length = %i\n",
-                 RFCNB_Pkt_Len(pkt -> data));
-      RFCNB_NBName_To_AName((char *)(pkt -> data + RFCNB_Pkt_Called_Offset), lname);
-      fprintf(fd, "  Called Name: %s\n", lname);
-      RFCNB_NBName_To_AName((char *)(pkt -> data + RFCNB_Pkt_Calling_Offset), lname);
-      fprintf(fd, "  Calling Name: %s\n", lname);
-
-      break;
-
- case RFCNB_SESSION_ACK:
-
-      fprintf(fd, "RFCNB SESSION ACK: Length = %i\n",
-                 RFCNB_Pkt_Len(pkt -> data));
-
-      break;
-
- case RFCNB_SESSION_REJ:
-      fprintf(fd, "RFCNB SESSION REJECT: Length = %i\n",
-                 RFCNB_Pkt_Len(pkt -> data));
-
-      if (RFCNB_Pkt_Len(pkt -> data) < 1) {
-       fprintf(fd, "   Protocol Error, short Reject packet!\n");
-      }
-      else {
-       fprintf(fd, "   Error = %x\n", CVAL(pkt -> data, RFCNB_Pkt_Error_Offset));
-      }
-
-      break;
-
- case RFCNB_SESSION_RETARGET:
-
-      fprintf(fd, "RFCNB SESSION RETARGET: Length = %i\n",
-                 RFCNB_Pkt_Len(pkt -> data));
-
-      /* Print out the IP address etc and the port? */
-
-      break;
-
- case RFCNB_SESSION_KEEP_ALIVE:
-
-      fprintf(fd, "RFCNB SESSION KEEP ALIVE: Length = %i\n",
-             RFCNB_Pkt_Len(pkt -> data));
-      break;
-
-    default:
-
-      break;
-  }
-
-}
-
-/* Resolve a name into an address */
-
-int RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP)
-
-{
-       fr_ipaddr_t ipaddr;
-
-       if (ip_hton(host, AF_INET, &ipaddr) < 0) {
-               /* Try NetBIOS name lookup, how the hell do we do that? */
-
-               RFCNB_errno = RFCNBE_BadName;   /* Is this right? */
-               RFCNB_saved_errno = errno;
-               return(RFCNBE_Bad);
-
-       }
-
-       memcpy(Dest_IP, &ipaddr.ipaddr.ip4addr, sizeof(struct in_addr));
-       return 0;
-}
-
-/* Disconnect the TCP connection to the server */
-
-int RFCNB_Close(int socket)
-
-{
-
-  close(socket);
-
-  /* If we want to do error recovery, here is where we put it */
-
-  return 0;
-
-}
-
-/* Connect to the server specified in the IP address.
-   Not sure how to handle socket options etc.         */
-
-int RFCNB_IP_Connect(struct in_addr Dest_IP, int port)
-
-{ struct sockaddr_in Socket;
-  int fd;
-
-  /* Create a socket */
-
-  if ((fd = socket(PF_INET, SOCK_STREAM, 0)) < 0) { /* Handle the error */
-
-    RFCNB_errno = RFCNBE_BadSocket;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-    }
-
-  bzero((char *)&Socket, sizeof(Socket));
-  memcpy((char *)&Socket.sin_addr, (char *)&Dest_IP, sizeof(Dest_IP));
-
-  Socket.sin_port = htons(port);
-  Socket.sin_family = PF_INET;
-
-  /* Now connect to the destination */
-
-  if (connect(fd, (struct sockaddr *)&Socket, sizeof(Socket)) < 0) { /* Error */
-
-    close(fd);
-    RFCNB_errno = RFCNBE_ConnectFailed;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-    }
-
-  return(fd);
-
-}
-
-/* handle the details of establishing the RFCNB session with remote
-   end
-
-*/
-
-int RFCNB_Session_Req(struct RFCNB_Con *con,
-                     char *Called_Name,
-                     char *Calling_Name,
-                     BOOL *redirect,
-                     struct in_addr *Dest_IP,
-                     int * port)
-
-{ char *sess_pkt;
-
-  /* Response packet should be no more than 9 bytes, make 16 jic */
-
-  char resp[16];
-  int len;
-  struct RFCNB_Pkt *pkt, res_pkt;
-
-  /* We build and send the session request, then read the response */
-
-  pkt = RFCNB_Alloc_Pkt(RFCNB_Pkt_Sess_Len);
-
-  if (pkt == NULL) {
-
-    return(RFCNBE_Bad);  /* Leave the error that RFCNB_Alloc_Pkt gives) */
-
-  }
-
-  sess_pkt = pkt -> data;    /* Get pointer to packet proper */
-
-  sess_pkt[RFCNB_Pkt_Type_Offset]  = RFCNB_SESSION_REQUEST;
-  RFCNB_Put_Pkt_Len(sess_pkt, RFCNB_Pkt_Sess_Len-RFCNB_Pkt_Hdr_Len);
-  sess_pkt[RFCNB_Pkt_N1Len_Offset] = 32;
-  sess_pkt[RFCNB_Pkt_N2Len_Offset] = 32;
-
-  RFCNB_CvtPad_Name(Called_Name, (sess_pkt + RFCNB_Pkt_Called_Offset));
-  RFCNB_CvtPad_Name(Calling_Name, (sess_pkt + RFCNB_Pkt_Calling_Offset));
-
-  /* Now send the packet */
-
-#ifdef RFCNB_DEBUG
-
-  fprintf(stderr, "Sending packet: ");
-
-#endif
-
-  if ((len = RFCNB_Put_Pkt(con, pkt, RFCNB_Pkt_Sess_Len)) < 0) {
-
-    return(RFCNBE_Bad);       /* Should be able to write that lot ... */
-
-    }
-
-#ifdef RFCNB_DEBUG
-
-  fprintf(stderr, "Getting packet.\n");
-
-#endif
-
-  res_pkt.data = resp;
-  res_pkt.len  = sizeof(resp);
-  res_pkt.next = NULL;
-
-  if ((len = RFCNB_Get_Pkt(con, &res_pkt, sizeof(resp))) < 0) {
-
-    return(RFCNBE_Bad);
-
-  }
-
-  /* Now analyze the packet ... */
-
-  switch (RFCNB_Pkt_Type(resp)) {
-
-    case RFCNB_SESSION_REJ:         /* Didnt like us ... too bad */
-
-      /* Why did we get rejected ? */
-
-      switch (CVAL(resp,RFCNB_Pkt_Error_Offset)) {
-
-      case 0x80:
-       RFCNB_errno = RFCNBE_CallRejNLOCN;
-       break;
-      case 0x81:
-       RFCNB_errno = RFCNBE_CallRejNLFCN;
-       break;
-      case 0x82:
-       RFCNB_errno = RFCNBE_CallRejCNNP;
-       break;
-      case 0x83:
-       RFCNB_errno = RFCNBE_CallRejInfRes;
-       break;
-      case 0x8F:
-       RFCNB_errno = RFCNBE_CallRejUnSpec;
-       break;
-      default:
-       RFCNB_errno = RFCNBE_ProtErr;
-       break;
-      }
-
-      return(RFCNBE_Bad);
-      break;
-
-    case RFCNB_SESSION_ACK:        /* Got what we wanted ...      */
-
-      return(0);
-      break;
-
-    case RFCNB_SESSION_RETARGET:   /* Go elsewhere                */
-
-      *redirect = TRUE;       /* Copy port and ip addr       */
-
-      memcpy(Dest_IP, (resp + RFCNB_Pkt_IP_Offset), sizeof(struct in_addr));
-      *port = SVAL(resp, RFCNB_Pkt_Port_Offset);
-
-      return(0);
-      break;
-
-    default:  /* A protocol error */
-
-      RFCNB_errno = RFCNBE_ProtErr;
-      return(RFCNBE_Bad);
-      break;
-    }
-}
diff --git a/src/modules/rlm_smb/rfcnb-util.h b/src/modules/rlm_smb/rfcnb-util.h
deleted file mode 100644 (file)
index d6e6cc7..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
-   Version 1.0
-   RFCNB Utility Defines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(rfcnb_util_h, "$Id$")
-
-void RFCNB_CvtPad_Name(char *name1, char *name2);
-
-void RFCNB_AName_To_NBName(char *AName, char *NBName);
-
-void RFCNB_NBName_To_AName(char *NBName, char *AName);
-
-void RFCNB_Print_Hex(FILE *fd, struct RFCNB_Pkt *pkt, int Offset, int Len);
-
-struct RFCNB_Pkt *RFCNB_Alloc_Pkt(int n);
-
-void RFCNB_Print_Pkt(FILE *fd, char *dirn, struct RFCNB_Pkt *pkt, int len);
-
-int RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP);
-
-int RFCNB_Close(int socket);
-
-int RFCNB_IP_Connect(struct in_addr Dest_IP, int port);
-
-int RFCNB_Session_Req(struct RFCNB_Con *con,
-                     char *Called_Name,
-                     char *Calling_Name,
-                     BOOL *redirect,
-                     struct in_addr *Dest_IP,
-                     int * port);
-
diff --git a/src/modules/rlm_smb/rfcnb.h b/src/modules/rlm_smb/rfcnb.h
deleted file mode 100644 (file)
index db00d99..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
-   Version 1.0
-   RFCNB Defines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(rfcnb_h, "$Id$")
-
-/* Error responses */
-
-#include "rfcnb-error.h"
-#include "rfcnb-common.h"
-
-/* Defines we need */
-
-#define RFCNB_Default_Port 139
-
-/* Definition of routines we define */
-
-void *RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address,
-                int port);
-
-int RFCNB_Send(void *Con_Handle, struct RFCNB_Pkt *Data, int Length);
-
-int RFCNB_Recv(void *Con_Handle, struct RFCNB_Pkt *Data, int Length);
-
-int RFCNB_Hangup(void *con_Handle);
-
-void *RFCNB_Listen();
-
-void RFCNB_Get_Error(char *buffer, int buf_len);
-
-struct RFCNB_Pkt *RFCNB_Alloc_Pkt(int n);
diff --git a/src/modules/rlm_smb/rlm_smb.c b/src/modules/rlm_smb/rlm_smb.c
deleted file mode 100644 (file)
index fdee2e4..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * rlm_smb.c
- *
- * Version:    $Id$
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * Copyright 2002,2006  The FreeRADIUS server project
- * Copyright 2002  Alan DeKok <aland@ox.org>
- */
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-#include <freeradius-devel/radiusd.h>
-#include <freeradius-devel/modules.h>
-
-#include "valid.h"
-
-/*
- *     Define a structure for our module configuration.
- *
- *     These variables do not need to be in a structure, but it's
- *     a lot cleaner to do so, and a pointer to the structure can
- *     be used as the instance handle.
- */
-typedef struct rlm_smb_t {
-       char            *server;
-       char            *backup;
-       char            *domain;
-} rlm_smb_t;
-
-/*
- *     A mapping of configuration file names to internal variables.
- *
- *     Note that the string is dynamically allocated, so it MUST
- *     be freed.  When the configuration file parse re-reads the string,
- *     it free's the old one, and strdup's the new one, placing the pointer
- *     to the strdup'd string into 'config.string'.  This gets around
- *     buffer over-flows.
- */
-static const CONF_PARSER module_config[] = {
-  { "server",  PW_TYPE_STRING_PTR, offsetof(rlm_smb_t,server), NULL,  NULL},
-  { "backup",  PW_TYPE_STRING_PTR, offsetof(rlm_smb_t,backup), NULL,  NULL},
-  { "domain",  PW_TYPE_STRING_PTR, offsetof(rlm_smb_t,domain), NULL,  NULL},
-
-  { NULL, -1, 0, NULL, NULL }          /* end the list */
-};
-
-/*
- *     Do any per-module initialization that is separate to each
- *     configured instance of the module.  e.g. set up connections
- *     to external databases, read configuration files, set up
- *     dictionary entries, etc.
- *
- *     If configuration information is given in the config section
- *     that must be referenced in later calls, store a handle to it
- *     in *instance otherwise put a null pointer there.
- */
-static int smb_instantiate(CONF_SECTION *conf, void **instance)
-{
-       rlm_smb_t *data;
-
-       /*
-        *      Set up a storage area for instance data
-        */
-       data = rad_malloc(sizeof(*data));
-       if (!data) {
-               return -1;
-       }
-       memset(data, 0, sizeof(*data));
-
-       /*
-        *      If the configuration parameters can't be parsed, then
-        *      fail.
-        */
-       if (cf_section_parse(conf, data, module_config) < 0) {
-               free(data);
-               return -1;
-       }
-
-       *instance = data;
-
-       return 0;
-}
-
-/*
- *     Authenticate the user with the given password.
- */
-static int smb_authenticate(void *instance, REQUEST *request)
-{
-       rlm_smb_t *data = (rlm_smb_t *) instance;
-       int rcode;
-
-       /*
-        *      We can only authenticate user requests which HAVE
-        *      a User-Name attribute.
-        */
-       if (!request->username) {
-               radlog(L_AUTH, "rlm_smb: Attribute \"User-Name\" is required for authentication.");
-               return RLM_MODULE_INVALID;
-       }
-
-       /*
-        *      We can only authenticate user requests which HAVE
-        *      a User-Password attribute.
-        */
-       if (!request->password) {
-               radlog(L_AUTH, "rlm_smb: Attribute \"User-Password\" is required for authentication.");
-               return RLM_MODULE_INVALID;
-       }
-
-       /*
-        *  Ensure that we're being passed a plain-text password,
-        *  and not anything else.
-        */
-       if (request->password->attribute != PW_USER_PASSWORD) {
-               radlog(L_AUTH, "rlm_smb: Attribute \"User-Password\" is required for authentication.  Cannot use \"%s\".", request->password->name);
-               return RLM_MODULE_INVALID;
-       }
-
-       /*
-        *  Call the SMB magic to do the work.
-        */
-       rcode = Valid_User(request->username->vp_strvalue,
-                          request->password->vp_strvalue,
-                          data->server, data->backup, data->domain);
-
-       switch (rcode) {
-       case 0:                 /* success */
-         return RLM_MODULE_OK;
-         break;
-
-       case 1:                 /* network failure */
-       case 2:                 /* protocol failure */
-         return RLM_MODULE_FAIL;
-         break;
-
-       case 3:                 /* invalid user name or password */
-         return RLM_MODULE_REJECT;
-       }
-
-       /*
-        *  Something weird happened.  Give up.
-        */
-       return RLM_MODULE_INVALID;
-}
-
-static int smb_detach(void *instance)
-{
-       rlm_smb_t *data = (rlm_smb_t *) instance;
-
-
-       free(instance);
-       return 0;
-}
-
-/*
- *     The module name should be the only globally exported symbol.
- *     That is, everything else should be 'static'.
- *
- *     If the module needs to temporarily modify it's instantiation
- *     data, the type should be changed to RLM_TYPE_THREAD_UNSAFE.
- *     The server will then take care of ensuring that the module
- *     is single-threaded.
- */
-module_t rlm_smb = {
-       RLM_MODULE_INIT,
-       "SMB",
-       RLM_TYPE_THREAD_UNSAFE,         /* type */
-       smb_instantiate,                /* instantiation */
-       smb_detach,                     /* detach */
-       {
-               smb_authenticate,       /* authentication */
-               NULL,                   /* authorization */
-               NULL,                   /* preaccounting */
-               NULL,                   /* accounting */
-               NULL,                   /* checksimul */
-               NULL,                   /* pre-proxy */
-               NULL,                   /* post-proxy */
-               NULL                    /* post-auth */
-       },
-};
diff --git a/src/modules/rlm_smb/session.c b/src/modules/rlm_smb/session.c
deleted file mode 100644 (file)
index ed6aa2b..0000000
+++ /dev/null
@@ -1,376 +0,0 @@
-/* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
-   Version 1.0
-   Session Routines ...
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-#include <string.h>
-
-int RFCNB_errno = 0;
-int RFCNB_saved_errno = 0;
-#define RFCNB_ERRNO
-
-#include "std-includes.h"
-
-#ifdef HAVE_NETINET_TCP_H
-#include <netinet/tcp.h>
-#endif
-
-#include "rfcnb-priv.h"
-#include "rfcnb-util.h"
-
-int RFCNB_Stats[RFCNB_MAX_STATS];
-
-void (*Prot_Print_Routine)() = NULL;      /* Pointer to print routine */
-
-/* Set up a session with a remote name. We are passed Called_Name as a
-   string which we convert to a NetBIOS name, ie space terminated, up to
-   16 characters only if we need to. If Called_Address is not empty, then
-   we use it to connect to the remote end, but put in Called_Name ... Called
-   Address can be a DNS based name, or a TCP/IP address ...
-*/
-
-void *RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address,
-                int port)
-
-{ struct RFCNB_Con *con;
-  struct in_addr Dest_IP;
-  int Client;
-  BOOL redirect; struct redirect_addr *redir_addr;
-  char *Service_Address;
-
-  /* Now, we really should look up the port in /etc/services ... */
-
-  if (port == 0) port = RFCNB_Default_Port;
-
-  /* Create a connection structure first */
-
-  if ((con = (struct RFCNB_Con *)malloc(sizeof(struct RFCNB_Con))) == NULL) { /* Error in size */
-
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    return(NULL);
-
-    }
-
-  con -> fd = -0;             /* no descriptor yet */
-  con -> rfc_errno = 0;           /* no error yet */
-  con -> timeout = 0;         /* no timeout   */
-  con -> redirects = 0;
-  con -> redirect_list = NULL; /* Fix bug still in version 0.50 */
-
-  /* Resolve that name into an IP address */
-
-  Service_Address = Called_Name;
-  if (strcmp(Called_Address, "") != 0) { /* If the Called Address = "" */
-    Service_Address = Called_Address;
-  }
-
-  if ((errno = RFCNB_Name_To_IP(Service_Address, &Dest_IP)) < 0) { /* Error */
-
-    /* No need to modify RFCNB_errno as it was done by RFCNB_Name_To_IP */
-
-    return(NULL);
-
-    }
-
-  /* Now connect to the remote end */
-
-  redirect = TRUE;     /* Fudge this one so we go once through */
-
-  while (redirect) {   /* Connect and get session info etc */
-
-    redirect = FALSE;  /* Assume all OK */
-
-    /* Build the redirect info. First one is first addr called */
-    /* And tack it onto the list of addresses we called        */
-
-    if ((redir_addr = (struct redirect_addr *)malloc(sizeof(struct redirect_addr))) == NULL) { /* Could not get space */
-
-      RFCNB_errno = RFCNBE_NoSpace;
-      RFCNB_saved_errno = errno;
-      return(NULL);
-
-    }
-
-    memcpy((char *)&(redir_addr -> ip_addr), (char *)&Dest_IP, sizeof(Dest_IP));
-    redir_addr -> port = port;
-    redir_addr -> next = NULL;
-
-    if (con -> redirect_list == NULL) { /* Stick on head */
-
-      con -> redirect_list = con -> last_addr = redir_addr;
-
-    } else {
-
-      con -> last_addr -> next = redir_addr;
-      con -> last_addr = redir_addr;
-
-    }
-
-    /* Now, make that connection */
-
-    if ((Client = RFCNB_IP_Connect(Dest_IP, port)) < 0) { /* Error */
-
-      /* No need to modify RFCNB_errno as it was done by RFCNB_IP_Connect */
-
-      return(NULL);
-
-      }
-
-    con -> fd = Client;
-
-    /* Now send and handle the RFCNB session request              */
-    /* If we get a redirect, we will comeback with redirect true
-       and a new IP address in DEST_IP                            */
-
-    if ((errno = RFCNB_Session_Req(con,
-                                  Called_Name,
-                                  Calling_Name,
-                                  &redirect, &Dest_IP, &port)) < 0) {
-
-      /* No need to modify RFCNB_errno as it was done by RFCNB_Session.. */
-
-      return(NULL);
-
-      }
-
-    if (redirect) {
-
-      /* We have to close the connection, and then try again */
-
-      (con -> redirects)++;
-
-      RFCNB_Close(con -> fd);  /* Close it */
-
-      }
-    }
-
-  return(con);
-
-}
-
-/* We send a packet to the other end ... for the moment, we treat the
-   data as a series of pointers to blocks of data ... we should check the
-   length ... */
-
-int RFCNB_Send(struct RFCNB_Con *Con_Handle, struct RFCNB_Pkt *udata, int Length)
-
-{ struct RFCNB_Pkt *pkt; char *hdr;
-  int len;
-
-  /* Plug in the header and send the data */
-
-  pkt = RFCNB_Alloc_Pkt(RFCNB_Pkt_Hdr_Len);
-
-  if (pkt == NULL) {
-
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-
-  }
-
-  pkt -> next = udata;   /* The user data we want to send */
-
-  hdr = pkt -> data;
-
-  /* Following crap is for portability across multiple UNIX machines */
-
-  *(hdr + RFCNB_Pkt_Type_Offset)  = RFCNB_SESSION_MESSAGE;
-  RFCNB_Put_Pkt_Len(hdr, Length);
-
-#ifdef RFCNB_DEBUG
-
-  fprintf(stderr, "Sending packet: ");
-
-#endif
-
-  if ((len = RFCNB_Put_Pkt(Con_Handle, pkt, Length + RFCNB_Pkt_Hdr_Len)) < 0) {
-
-    /* No need to change RFCNB_errno as it was done by put_pkt ...     */
-
-    return(RFCNBE_Bad);   /* Should be able to write that lot ... */
-
-  }
-
-  /* Now we have sent that lot, let's get rid of the RFCNB Header and return */
-
-  pkt -> next = NULL;
-
-  RFCNB_Free_Pkt(pkt);
-
-  return(len);
-
-}
-
-/* We pick up a message from the internet ... We have to worry about
-   non-message packets ...                                           */
-
-int RFCNB_Recv(void *con_Handle, struct RFCNB_Pkt *Data, int Length)
-
-{
-  struct RFCNB_Pkt *pkt;
-  int ret_len;
-
-  if (con_Handle == NULL){
-
-    RFCNB_errno = RFCNBE_BadHandle;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-
-  }
-
-  /* Now get a packet from below. We allocate a header first */
-
-  /* Plug in the header and send the data */
-
-  pkt = RFCNB_Alloc_Pkt(RFCNB_Pkt_Hdr_Len);
-
-  if (pkt == NULL) {
-
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-
-  }
-
-  pkt -> next = Data;  /* Plug in the data portion */
-
-  if ((ret_len = RFCNB_Get_Pkt(con_Handle, pkt, Length + RFCNB_Pkt_Hdr_Len)) < 0) {
-
-#ifdef RFCNB_DEBUG
-    fprintf(stderr, "Bad packet return in RFCNB_Recv... \n");
-#endif
-
-    return(RFCNBE_Bad);
-
-  }
-
-  /* We should check that we go a message and not a keep alive */
-
-  pkt -> next = NULL;
-
-  RFCNB_Free_Pkt(pkt);
-
-  return(ret_len);
-
-}
-
-/* We just disconnect from the other end, as there is nothing in the RFCNB */
-/* protocol that specifies any exchange as far as I can see                */
-
-int RFCNB_Hangup(struct RFCNB_Con *con_Handle)
-
-{
-
-  if (con_Handle != NULL) {
-    RFCNB_Close(con_Handle -> fd);  /* Could this fail? */
-    free(con_Handle);
-  }
-
-  return 0;
-
-
-}
-
-/* Set TCP_NODELAY on the socket                                          */
-
-int RFCNB_Set_Sock_NoDelay(struct RFCNB_Con *con_Handle, BOOL yn)
-
-{
-
-  return(setsockopt(con_Handle -> fd, IPPROTO_TCP, TCP_NODELAY,
-                   (char *)&yn, sizeof(yn)));
-
-}
-
-
-/* Listen for a connection on a port???, when                             */
-/* the connection comes in, we return with the connection                 */
-
-void *RFCNB_Listen()
-
-{
-
-}
-
-/* Pick up the last error response as a string, hmmm, this routine should */
-/* have been different ...                                                */
-
-void RFCNB_Get_Error(char *buffer, int buf_len)
-
-{
-
-  if (RFCNB_saved_errno <= 0) {
-    sprintf(buffer, "%s", RFCNB_Error_Strings[RFCNB_errno]);
-  }
-  else {
-    sprintf(buffer, "%s\n\terrno:%s", RFCNB_Error_Strings[RFCNB_errno],
-           strerror(RFCNB_saved_errno));
-  }
-
-}
-
-/* Pick up the last error response and returns as a code                 */
-
-int RFCNB_Get_Last_Error()
-
-{
-
-  return(RFCNB_errno);
-
-}
-
-/* Pick up saved errno as well */
-
-int RFCNB_Get_Last_Errno()
-
-{
-
-  return(RFCNB_saved_errno);
-
-}
-
-/* Pick up the last error response and return in string ...             */
-
-int RFCNB_Get_Error_Msg(int code, char *msg_buf, int len)
-
-{
-
-  strncpy(msg_buf, RFCNB_Error_Strings[abs(code)], len);
-
-}
-
-/* Register a higher level protocol print routine */
-
-void RFCNB_Register_Print_Routine(void (*fn)())
-
-{
-
-  Prot_Print_Routine = fn;
-
-}
diff --git a/src/modules/rlm_smb/smbdes.c b/src/modules/rlm_smb/smbdes.c
deleted file mode 100644 (file)
index 045cc3d..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
-   Unix SMB/Netbios implementation.
-   Version 1.9.
-
-   a partial implementation of DES designed for use in the
-   SMB authentication protocol
-
-   Copyright (C) Andrew Tridgell 1997
-   Copyright 2006 The FreeRADIUS server project
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-
-/* NOTES:
-
-   This code makes no attempt to be fast! In fact, it is a very
-   slow implementation
-
-   This code is NOT a complete DES implementation. It implements only
-   the minimum necessary for SMB authentication, as used by all SMB
-   products (including every copy of Microsoft Windows95 ever sold)
-
-   In particular, it can only do a unchained forward DES pass. This
-   means it is not possible to use this code for encryption/decryption
-   of data, instead it is only useful as a "hash" algorithm.
-
-   There is no entry point into this code that allows normal DES operation.
-
-   I believe this means that this code does not come under ITAR
-   regulations but this is NOT a legal opinion. If you are concerned
-   about the applicability of ITAR regulations to this code then you
-   should confirm it for yourself (and maybe let me know if you come
-   up with a different answer to the one above)
-*/
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-
-
-static int perm1[56] = {57, 49, 41, 33, 25, 17,  9,
-                        1, 58, 50, 42, 34, 26, 18,
-                       10,  2, 59, 51, 43, 35, 27,
-                       19, 11,  3, 60, 52, 44, 36,
-                       63, 55, 47, 39, 31, 23, 15,
-                        7, 62, 54, 46, 38, 30, 22,
-                       14,  6, 61, 53, 45, 37, 29,
-                       21, 13,  5, 28, 20, 12,  4};
-
-static int perm2[48] = {14, 17, 11, 24,  1,  5,
-                         3, 28, 15,  6, 21, 10,
-                        23, 19, 12,  4, 26,  8,
-                        16,  7, 27, 20, 13,  2,
-                        41, 52, 31, 37, 47, 55,
-                        30, 40, 51, 45, 33, 48,
-                        44, 49, 39, 56, 34, 53,
-                        46, 42, 50, 36, 29, 32};
-
-static int perm3[64] = {58, 50, 42, 34, 26, 18, 10,  2,
-                       60, 52, 44, 36, 28, 20, 12,  4,
-                       62, 54, 46, 38, 30, 22, 14,  6,
-                       64, 56, 48, 40, 32, 24, 16,  8,
-                       57, 49, 41, 33, 25, 17,  9,  1,
-                       59, 51, 43, 35, 27, 19, 11,  3,
-                       61, 53, 45, 37, 29, 21, 13,  5,
-                       63, 55, 47, 39, 31, 23, 15,  7};
-
-static int perm4[48] = {   32,  1,  2,  3,  4,  5,
-                            4,  5,  6,  7,  8,  9,
-                            8,  9, 10, 11, 12, 13,
-                           12, 13, 14, 15, 16, 17,
-                           16, 17, 18, 19, 20, 21,
-                           20, 21, 22, 23, 24, 25,
-                           24, 25, 26, 27, 28, 29,
-                           28, 29, 30, 31, 32,  1};
-
-static int perm5[32] = {      16,  7, 20, 21,
-                              29, 12, 28, 17,
-                               1, 15, 23, 26,
-                               5, 18, 31, 10,
-                               2,  8, 24, 14,
-                              32, 27,  3,  9,
-                              19, 13, 30,  6,
-                              22, 11,  4, 25};
-
-
-static int perm6[64] ={ 40,  8, 48, 16, 56, 24, 64, 32,
-                        39,  7, 47, 15, 55, 23, 63, 31,
-                        38,  6, 46, 14, 54, 22, 62, 30,
-                        37,  5, 45, 13, 53, 21, 61, 29,
-                        36,  4, 44, 12, 52, 20, 60, 28,
-                        35,  3, 43, 11, 51, 19, 59, 27,
-                        34,  2, 42, 10, 50, 18, 58, 26,
-                        33,  1, 41,  9, 49, 17, 57, 25};
-
-
-static int sc[16] = {1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1};
-
-static int sbox[8][4][16] = {
-       {{14,  4, 13,  1,  2, 15, 11,  8,  3, 10,  6, 12,  5,  9,  0,  7},
-        {0, 15,  7,  4, 14,  2, 13,  1, 10,  6, 12, 11,  9,  5,  3,  8},
-        {4,  1, 14,  8, 13,  6,  2, 11, 15, 12,  9,  7,  3, 10,  5,  0},
-        {15, 12,  8,  2,  4,  9,  1,  7,  5, 11,  3, 14, 10,  0,  6, 13}},
-
-       {{15,  1,  8, 14,  6, 11,  3,  4,  9,  7,  2, 13, 12,  0,  5, 10},
-        {3, 13,  4,  7, 15,  2,  8, 14, 12,  0,  1, 10,  6,  9, 11,  5},
-        {0, 14,  7, 11, 10,  4, 13,  1,  5,  8, 12,  6,  9,  3,  2, 15},
-        {13,  8, 10,  1,  3, 15,  4,  2, 11,  6,  7, 12,  0,  5, 14,  9}},
-
-       {{10,  0,  9, 14,  6,  3, 15,  5,  1, 13, 12,  7, 11,  4,  2,  8},
-        {13,  7,  0,  9,  3,  4,  6, 10,  2,  8,  5, 14, 12, 11, 15,  1},
-        {13,  6,  4,  9,  8, 15,  3,  0, 11,  1,  2, 12,  5, 10, 14,  7},
-        {1, 10, 13,  0,  6,  9,  8,  7,  4, 15, 14,  3, 11,  5,  2, 12}},
-
-       {{7, 13, 14,  3,  0,  6,  9, 10,  1,  2,  8,  5, 11, 12,  4, 15},
-        {13,  8, 11,  5,  6, 15,  0,  3,  4,  7,  2, 12,  1, 10, 14,  9},
-        {10,  6,  9,  0, 12, 11,  7, 13, 15,  1,  3, 14,  5,  2,  8,  4},
-        {3, 15,  0,  6, 10,  1, 13,  8,  9,  4,  5, 11, 12,  7,  2, 14}},
-
-       {{2, 12,  4,  1,  7, 10, 11,  6,  8,  5,  3, 15, 13,  0, 14,  9},
-        {14, 11,  2, 12,  4,  7, 13,  1,  5,  0, 15, 10,  3,  9,  8,  6},
-        {4,  2,  1, 11, 10, 13,  7,  8, 15,  9, 12,  5,  6,  3,  0, 14},
-        {11,  8, 12,  7,  1, 14,  2, 13,  6, 15,  0,  9, 10,  4,  5,  3}},
-
-       {{12,  1, 10, 15,  9,  2,  6,  8,  0, 13,  3,  4, 14,  7,  5, 11},
-        {10, 15,  4,  2,  7, 12,  9,  5,  6,  1, 13, 14,  0, 11,  3,  8},
-        {9, 14, 15,  5,  2,  8, 12,  3,  7,  0,  4, 10,  1, 13, 11,  6},
-        {4,  3,  2, 12,  9,  5, 15, 10, 11, 14,  1,  7,  6,  0,  8, 13}},
-
-       {{4, 11,  2, 14, 15,  0,  8, 13,  3, 12,  9,  7,  5, 10,  6,  1},
-        {13,  0, 11,  7,  4,  9,  1, 10, 14,  3,  5, 12,  2, 15,  8,  6},
-        {1,  4, 11, 13, 12,  3,  7, 14, 10, 15,  6,  8,  0,  5,  9,  2},
-        {6, 11, 13,  8,  1,  4, 10,  7,  9,  5,  0, 15, 14,  2,  3, 12}},
-
-       {{13,  2,  8,  4,  6, 15, 11,  1, 10,  9,  3, 14,  5,  0, 12,  7},
-        {1, 15, 13,  8, 10,  3,  7,  4, 12,  5,  6, 11,  0, 14,  9,  2},
-        {7, 11,  4,  1,  9, 12, 14,  2,  0,  6, 10, 13, 15,  3,  5,  8},
-        {2,  1, 14,  7,  4, 10,  8, 13, 15, 12,  9,  0,  3,  5,  6, 11}}};
-
-static void permute(char *out, char *in, int *p, int n)
-{
-       int i;
-       for (i=0;i<n;i++)
-               out[i] = in[p[i]-1];
-}
-
-static void lshift(char *d, int count, int n)
-{
-       char out[64];
-       int i;
-       for (i=0;i<n;i++)
-               out[i] = d[(i+count)%n];
-       for (i=0;i<n;i++)
-               d[i] = out[i];
-}
-
-static void concat(char *out, char *in1, char *in2, int l1, int l2)
-{
-       while (l1--)
-               *out++ = *in1++;
-       while (l2--)
-               *out++ = *in2++;
-}
-
-static void xor(char *out, char *in1, char *in2, int n)
-{
-       int i;
-       for (i=0;i<n;i++)
-               out[i] = in1[i] ^ in2[i];
-}
-
-static void dohash(char *out, char *in, char *key)
-{
-       int i, j, k;
-       char pk1[56];
-       char c[28];
-       char d[28];
-       char cd[56];
-       char ki[16][48];
-       char pd1[64];
-       char l[32], r[32];
-       char rl[64];
-
-       permute(pk1, key, perm1, 56);
-
-       for (i=0;i<28;i++)
-               c[i] = pk1[i];
-       for (i=0;i<28;i++)
-               d[i] = pk1[i+28];
-
-       for (i=0;i<16;i++) {
-               lshift(c, sc[i], 28);
-               lshift(d, sc[i], 28);
-
-               concat(cd, c, d, 28, 28);
-               permute(ki[i], cd, perm2, 48);
-       }
-
-       permute(pd1, in, perm3, 64);
-
-       for (j=0;j<32;j++) {
-               l[j] = pd1[j];
-               r[j] = pd1[j+32];
-       }
-
-       for (i=0;i<16;i++) {
-               char er[48];
-               char erk[48];
-               char b[8][6];
-               char cb[32];
-               char pcb[32];
-               char r2[32];
-
-               permute(er, r, perm4, 48);
-
-               xor(erk, er, ki[i], 48);
-
-               for (j=0;j<8;j++)
-                       for (k=0;k<6;k++)
-                               b[j][k] = erk[j*6 + k];
-
-               for (j=0;j<8;j++) {
-                       int m, n;
-                       m = (b[j][0]<<1) | b[j][5];
-
-                       n = (b[j][1]<<3) | (b[j][2]<<2) | (b[j][3]<<1) | b[j][4];
-
-                       for (k=0;k<4;k++)
-                               b[j][k] = (sbox[j][m][n] & (1<<(3-k)))?1:0;
-               }
-
-               for (j=0;j<8;j++)
-                       for (k=0;k<4;k++)
-                               cb[j*4+k] = b[j][k];
-               permute(pcb, cb, perm5, 32);
-
-               xor(r2, l, pcb, 32);
-
-               for (j=0;j<32;j++)
-                       l[j] = r[j];
-
-               for (j=0;j<32;j++)
-                       r[j] = r2[j];
-       }
-
-       concat(rl, r, l, 32, 32);
-
-       permute(out, rl, perm6, 64);
-}
-
-static void str_to_key(unsigned char *str,unsigned char *key)
-{
-       int i;
-
-       key[0] = str[0]>>1;
-       key[1] = ((str[0]&0x01)<<6) | (str[1]>>2);
-       key[2] = ((str[1]&0x03)<<5) | (str[2]>>3);
-       key[3] = ((str[2]&0x07)<<4) | (str[3]>>4);
-       key[4] = ((str[3]&0x0F)<<3) | (str[4]>>5);
-       key[5] = ((str[4]&0x1F)<<2) | (str[5]>>6);
-       key[6] = ((str[5]&0x3F)<<1) | (str[6]>>7);
-       key[7] = str[6]&0x7F;
-       for (i=0;i<8;i++) {
-               key[i] = (key[i]<<1);
-       }
-}
-
-
-static void smbhash(unsigned char *out, unsigned char *in, unsigned char *key)
-{
-       int i;
-       char outb[64];
-       char inb[64];
-       char keyb[64];
-       unsigned char key2[8];
-
-       str_to_key(key, key2);
-
-       for (i=0;i<64;i++) {
-               inb[i] = (in[i/8] & (1<<(7-(i%8)))) ? 1 : 0;
-               keyb[i] = (key2[i/8] & (1<<(7-(i%8)))) ? 1 : 0;
-               outb[i] = 0;
-       }
-
-       dohash(outb, inb, keyb);
-
-       for (i=0;i<8;i++) {
-               out[i] = 0;
-       }
-
-       for (i=0;i<64;i++) {
-               if (outb[i])
-                       out[i/8] |= (1<<(7-(i%8)));
-       }
-}
-
-void E_P16(unsigned char *p14,unsigned char *p16)
-{
-       unsigned char sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
-       smbhash(p16, sp8, p14);
-       smbhash(p16+8, sp8, p14+7);
-}
-
-void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24)
-{
-       smbhash(p24, c8, p21);
-       smbhash(p24+8, c8, p21+7);
-       smbhash(p24+16, c8, p21+14);
-}
-
-void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key)
-{
-       unsigned char buf[8];
-
-       smbhash(buf, in, key);
-       smbhash(out, buf, key+9);
-}
-
-void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key)
-{
-       unsigned char buf[8];
-       static unsigned char key2[8];
-
-       smbhash(buf, in, key);
-       key2[0] = key[7];
-       smbhash(out, buf, key2);
-}
-
diff --git a/src/modules/rlm_smb/smbencrypt.c b/src/modules/rlm_smb/smbencrypt.c
deleted file mode 100644 (file)
index e7ba6e3..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
-   Unix SMB/Netbios implementation.
-   Version 1.9.
-   SMB parameters and setup
-   Copyright (C) Andrew Tridgell 1992-1997
-   Modified by Jeremy Allison 1995.
-   Copyright 2006 The FreeRADIUS server project
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-#include <string.h>
-#ifdef HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif
-
-#include "smblib-priv.h"
-#define uchar unsigned char
-extern int DEBUGLEVEL;
-
-void strupper(char *s);
-
-/*
-   This implements the X/Open SMB password encryption
-   It takes a password, a 8 byte "crypt key" and puts 24 bytes of
-   encrypted password into p24 */
-void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24)
-{
-  uchar p14[15], p21[21];
-
-  memset(p21,'\0',21);
-  memset(p14,'\0',14);
-  strlcpy((char *)p14,(char *)passwd,14);
-
-  strupper((char *)p14);
-  E_P16(p14, p21);
-  E_P24(p21, c8, p24);
-}
-
-/* Routines for Windows NT MD4 Hash functions. */
-static int _my_wcslen(int16 *str)
-{
-       int len = 0;
-       while(*str++ != 0)
-               len++;
-       return len;
-}
-
-/*
- * Convert a string into an NT UNICODE string.
- * Note that regardless of processor type
- * this must be in intel (little-endian)
- * format.
- */
-
-static int _my_mbstowcs(int16 *dst, uchar *src, int len)
-{
-       int i;
-       int16 val;
-
-       for(i = 0; i < len; i++) {
-               val = *src;
-               SSVAL(dst,0,val);
-               dst++;
-               src++;
-               if(val == 0)
-                       break;
-       }
-       return i;
-}
-
-/*
- * Creates the MD4 Hash of the users password in NT UNICODE.
- */
-
-void E_md4hash(uchar *passwd, uchar *p16)
-{
-       int len;
-       int16 wpwd[129];
-
-       /* Password cannot be longer than 128 characters */
-       len = strlen((char *)passwd);
-       if(len > 128)
-               len = 128;
-       /* Password must be converted to NT unicode */
-       _my_mbstowcs(wpwd, passwd, len);
-       wpwd[len] = 0; /* Ensure string is null terminated */
-       /* Calculate length in bytes */
-       len = _my_wcslen(wpwd) * sizeof(int16);
-
-       mdfour(p16, (unsigned char *)wpwd, len);
-}
-
-/* Does the NT MD4 hash then des encryption. */
-
-void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24)
-{
-       uchar p21[21];
-
-       memset(p21,'\0',21);
-
-       E_md4hash(passwd, p21);
-       E_P24(p21, c8, p24);
-}
-
-/* Does both the NT and LM owfs of a user's password */
-
-void nt_lm_owf_gen(char *pwd, char *nt_p16, char *p16)
-{
-       char passwd[130];
-       strlcpy(passwd, pwd, sizeof(passwd));
-
-       /* Calculate the MD4 hash (NT compatible) of the password */
-       memset(nt_p16, '\0', 16);
-       E_md4hash((uchar *)passwd, (uchar *)nt_p16);
-
-       /* Mangle the passwords into Lanman format */
-       passwd[14] = '\0';
-       strupper(passwd);
-
-       /* Calculate the SMB (lanman) hash functions of the password */
-
-       memset(p16, '\0', 16);
-       E_P16((uchar *) passwd, (uchar *)p16);
-
-       /* clear out local copy of user's password (just being paranoid). */
-       bzero(passwd, sizeof(passwd));
-}
-
-void strupper(char *s)
-{
-  while (*s)
-  {
-    /*
-#if !defined(KANJI_WIN95_COMPATIBILITY)
-    if(lp_client_code_page() == KANJI_CODEPAGE)
-    {
-
-      if (is_shift_jis (*s))
-      {
-        if (is_sj_lower (s[0], s[1]))
-          s[1] = sj_toupper2 (s[1]);
-        s += 2;
-      }
-      else if (is_kana (*s))
-      {
-        s++;
-      }
-      else
-      {
-        if (islower(*s))
-         *s = toupper(*s);
-        s++;
-      }
-    }
-    else
-#endif */ /* KANJI_WIN95_COMPATIBILITY */
-    {
-      if (islower(*s))
-        *s = toupper(*s);
-      s++;
-    }
-  }
-}
diff --git a/src/modules/rlm_smb/smblib-common.h b/src/modules/rlm_smb/smblib-common.h
deleted file mode 100644 (file)
index 13751f6..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/* UNIX SMBlib NetBIOS implementation
-
-   Version 1.0
-   SMBlib Common Defines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(smblib_common_h, "$Id$")
-
-/* To get the error class we want the first 8 bits */
-/* Because we just grab 4bytes from the SMB header, we have to re-order */
-/* here, but it makes the NtStatus part easier in future                */
-
-#define SMBlib_Error_Class(p) (p & 0x000000FF)
-
-/* To get the error code, we want the bottom 16 bits */
-
-#define SMBlib_Error_Code(p) (((unsigned int)p & 0xFFFF0000) >>16)
-
-/* Error CLASS codes and etc ... */
-
-#define SMBC_SUCCESS        0
-#define SMBC_ERRDOS         0x01
-#define SMBC_ERRSRV         0x02
-#define SMBC_ERRHRD         0x03
-#define SMBC_ERRCMD         0xFF
-
-/* Success error codes    */
-
-#define SMBS_BUFFERED       0x54
-#define SMBS_LOGGED         0x55
-#define SMBS_DISPLAYED      0x56
-
-/* ERRDOS Error codes     */
-
-#define SMBD_badfunc        0x01
-#define SMBD_badfile        0x02
-#define SMBD_badpath        0x03
-#define SMBD_nofids         0x04
-#define SMBD_noaccess       0x05
-#define SMBD_badfid         0x06
-#define SMBD_badmcb         0x07
-#define SMBD_nomem          0x08
-#define SMBD_badmem         0x09
-#define SMBD_badenv         0x0A
-#define SMBD_badformat      0x0B
-#define SMBD_badaccess      0x0C
-#define SMBD_baddata        0x0D
-#define SMBD_reserved       0x0E
-#define SMBD_baddrive       0x0F
-#define SMBD_remcd          0x10
-#define SMBD_diffdevice     0x11
-#define SMBD_nofiles        0x12
-#define SMBD_badshare       0x20
-#define SMBD_errlock        0x21
-#define SMBD_filexists      0x50
-
-/* Server errors ... */
-
-#define SMBV_error          0x01         /* Generic error */
-#define SMBV_badpw          0x02
-#define SMBV_badtype        0x03
-#define SMBV_access         0x04
-#define SMBV_invnid         0x05
-#define SMBV_invnetname     0x06
-#define SMBV_invdevice      0x07
-#define SMBV_qfull          0x31
-#define SMBV_qtoobig        0x32
-#define SMBV_qeof           0x33
-#define SMBV_invpfid        0x34
-#define SMBV_paused         0x51
-#define SMBV_msgoff         0x52
-#define SMBV_noroom         0x53
-#define SMBV_rmuns          0x57
-#define SMBV_nosupport      0xFFFF
-
-/* Hardware error codes ... */
-
-#define SMBH_nowrite        0x13
-#define SMBH_badunit        0x14
-#define SMBH_notready       0x15
-#define SMBH_badcmd         0x16
-#define SMBH_data           0x17
-#define SMBH_badreq         0x18
-#define SMBH_seek           0x19
-#define SMBH_badmedia       0x1A
-#define SMBH_badsector      0x1B
-#define SMBH_nopaper        0x1C
-#define SMBH_write          0x1D
-#define SMBH_read           0x1E
-#define SMBH_general        0x1F
-#define SMBH_badshare       0x20
-
-/* Access mode defines ... */
-
-#define SMB_AMODE_WTRU      0x4000
-#define SMB_AMODE_NOCACHE   0x1000
-#define SMB_AMODE_COMPAT    0x0000
-#define SMB_AMODE_DENYRWX   0x0010
-#define SMB_AMODE_DENYW     0x0020
-#define SMB_AMODE_DENYRX    0x0030
-#define SMB_AMODE_DENYNONE  0x0040
-#define SMB_AMODE_OPENR     0x0000
-#define SMB_AMODE_OPENW     0x0001
-#define SMB_AMODE_OPENRW    0x0002
-#define SMB_AMODE_OPENX     0x0003
-#define SMB_AMODE_FCBOPEN   0x00FF
-#define SMB_AMODE_LOCUNKN   0x0000
-#define SMB_AMODE_LOCMSEQ   0x0100
-#define SMB_AMODE_LOCMRAN   0x0200
-#define SMB_AMODE_LOCRAL    0x0300
-
-/* File attribute encoding ... */
-
-#define SMB_FA_ORD          0x00
-#define SMB_FA_ROF          0x01
-#define SMB_FA_HID          0x02
-#define SMB_FA_SYS          0x04
-#define SMB_FA_VOL          0x08
-#define SMB_FA_DIR          0x10
-#define SMB_FA_ARC          0x20
-
-/* Define the protocol types ... */
-
-#define SMB_P_Unknown      -1        /* Hmmm, is this smart? */
-#define SMB_P_Core         0
-#define SMB_P_CorePlus     1
-#define SMB_P_DOSLanMan1   2
-#define SMB_P_LanMan1      3
-#define SMB_P_DOSLanMan2   4
-#define SMB_P_LanMan2      5
-#define SMB_P_DOSLanMan2_1 6
-#define SMB_P_LanMan2_1    7
-#define SMB_P_NT1          8
-
-/* SMBlib return codes */
-/* We want something that indicates whether or not the return code was a   */
-/* remote error, a local error in SMBlib or returned from lower layer ...  */
-/* Wonder if this will work ...                                            */
-/* SMBlibE_Remote = 1 indicates remote error                               */
-/* SMBlibE_ values < 0 indicate local error with more info available       */
-/* SMBlibE_ values >1 indicate local from SMBlib code errors?              */
-
-#define SMBlibE_Success 0
-#define SMBlibE_Remote  1    /* Remote error, get more info from con        */
-#define SMBlibE_BAD     -1
-#define SMBlibE_LowerLayer 2 /* Lower layer error                           */
-#define SMBlibE_NotImpl 3    /* Function not yet implemented                */
-#define SMBlibE_ProtLow 4    /* Protocol negotiated does not support req    */
-#define SMBlibE_NoSpace 5    /* No space to allocate a structure            */
-#define SMBlibE_BadParam 6   /* Bad parameters                              */
-#define SMBlibE_NegNoProt 7  /* None of our protocols was liked             */
-#define SMBlibE_SendFailed 8 /* Sending an SMB failed                       */
-#define SMBlibE_RecvFailed 9 /* Receiving an SMB failed                     */
-#define SMBlibE_GuestOnly 10 /* Logged in as guest                          */
-#define SMBlibE_CallFailed 11 /* Call remote end failed                     */
-#define SMBlibE_ProtUnknown 12 /* Protocol unknown                          */
-#define SMBlibE_NoSuchMsg  13 /* Keep this up to date                       */
-
-typedef struct {                       /* A structure for a Dirent */
-
-  unsigned char resume_key[21];        /* Don't touch this          */
-  unsigned char file_attributes;       /* Attributes of file        */
-  unsigned int date_time;              /* date and time of last mod */
-  unsigned int size;
-  char filename[13];                   /* The name of the file      */
-
-} SMB_CP_dirent;
diff --git a/src/modules/rlm_smb/smblib-priv.h b/src/modules/rlm_smb/smblib-priv.h
deleted file mode 100644 (file)
index 34ee24e..0000000
+++ /dev/null
@@ -1,626 +0,0 @@
-/* UNIX SMBlib NetBIOS implementation
-
-   Version 1.0
-   SMBlib private Defines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(smblib_priv_h, "$Id$")
-
-#include "std-includes.h"
-#include "smblib-common.h"
-
-typedef unsigned short uint16;
-typedef unsigned int   uint32;
-
-#include "byteorder.h"     /* Hmmm ... hot good */
-
-#define max(a,b) (a < b ? b : a)
-
-#define SMB_DEF_IDF 0x424D53FF        /* "\377SMB" */
-
-/* Core protocol commands */
-
-#define SMBmkdir      0x00   /* create directory */
-#define SMBrmdir      0x01   /* delete directory */
-#define SMBopen       0x02   /* open file */
-#define SMBcreate     0x03   /* create file */
-#define SMBclose      0x04   /* close file */
-#define SMBflush      0x05   /* flush file */
-#define SMBunlink     0x06   /* delete file */
-#define SMBmv         0x07   /* rename file */
-#define SMBgetatr     0x08   /* get file attributes */
-#define SMBsetatr     0x09   /* set file attributes */
-#define SMBread       0x0A   /* read from file */
-#define SMBwrite      0x0B   /* write to file */
-#define SMBlock       0x0C   /* lock byte range */
-#define SMBunlock     0x0D   /* unlock byte range */
-#define SMBctemp      0x0E   /* create temporary file */
-#define SMBmknew      0x0F   /* make new file */
-#define SMBchkpth     0x10   /* check directory path */
-#define SMBexit       0x11   /* process exit */
-#define SMBlseek      0x12   /* seek */
-#define SMBtcon       0x70   /* tree connect */
-#define SMBtdis       0x71   /* tree disconnect */
-#define SMBnegprot    0x72   /* negotiate protocol */
-#define SMBdskattr    0x80   /* get disk attributes */
-#define SMBsearch     0x81   /* search directory */
-#define SMBsplopen    0xC0   /* open print spool file */
-#define SMBsplwr      0xC1   /* write to print spool file */
-#define SMBsplclose   0xC2   /* close print spool file */
-#define SMBsplretq    0xC3   /* return print queue */
-#define SMBsends      0xD0   /* send single block message */
-#define SMBsendb      0xD1   /* send broadcast message */
-#define SMBfwdname    0xD2   /* forward user name */
-#define SMBcancelf    0xD3   /* cancel forward */
-#define SMBgetmac     0xD4   /* get machine name */
-#define SMBsendstrt   0xD5   /* send start of multi-block message */
-#define SMBsendend    0xD6   /* send end of multi-block message */
-#define SMBsendtxt    0xD7   /* send text of multi-block message */
-
-/* CorePlus protocol                                        */
-
-#define SMBlockread   0x13  /* Lock a range and read it */
-#define SMBwriteunlock 0x14 /* Unlock a range and then write */
-#define SMBreadbraw   0x1a  /* read a block of data without smb header ohead*/
-#define SMBwritebraw  0x1d  /* write a block of data without smb header ohead*/
-#define SMBwritec     0x20  /* secondary write request */
-#define SMBwriteclose 0x2c  /* write a file and then close it */
-
-/* DOS Extended Protocol                                    */
-
-#define SMBreadBraw      0x1A   /* read block raw */
-#define SMBreadBmpx      0x1B   /* read block multiplexed */
-#define SMBreadBs        0x1C   /* read block (secondary response) */
-#define SMBwriteBraw     0x1D   /* write block raw */
-#define SMBwriteBmpx     0x1E   /* write block multiplexed */
-#define SMBwriteBs       0x1F   /* write block (secondary request) */
-#define SMBwriteC        0x20   /* write complete response */
-#define SMBsetattrE      0x22   /* set file attributes expanded */
-#define SMBgetattrE      0x23   /* get file attributes expanded */
-#define SMBlockingX      0x24   /* lock/unlock byte ranges and X */
-#define SMBtrans         0x25   /* transaction - name, bytes in/out */
-#define SMBtranss        0x26   /* transaction (secondary request/response) */
-#define SMBioctl         0x27   /* IOCTL */
-#define SMBioctls        0x28   /* IOCTL  (secondary request/response) */
-#define SMBcopy          0x29   /* copy */
-#define SMBmove          0x2A   /* move */
-#define SMBecho          0x2B   /* echo */
-#define SMBopenX         0x2D   /* open and X */
-#define SMBreadX         0x2E   /* read and X */
-#define SMBwriteX        0x2F   /* write and X */
-#define SMBsesssetupX    0x73   /* Session Set Up & X (including User Logon) */
-#define SMBtconX         0x75   /* tree connect and X */
-#define SMBffirst        0x82   /* find first */
-#define SMBfunique       0x83   /* find unique */
-#define SMBfclose        0x84   /* find close */
-#define SMBinvalid       0xFE   /* invalid command */
-
-/* Any more ? */
-
-#define SMBdatablockID     0x01  /* A data block identifier */
-#define SMBdialectID       0x02  /* A dialect id            */
-#define SMBpathnameID      0x03  /* A pathname ID           */
-#define SMBasciiID         0x04  /* An ascii string ID      */
-#define SMBvariableblockID 0x05  /* A variable block ID     */
-
-/* some other defines we need */
-
-/* Flags defines ... */
-
-#define SMB_FLG2_NON_DOS    0x01 /* We know non dos names             */
-#define SMB_FLG2_EXT_ATR    0x02 /* We know about Extended Attributes */
-#define SMB_FLG2_LNG_NAM    0x04 /* Long names ?                      */
-
-typedef unsigned short WORD;
-typedef unsigned short UWORD;
-typedef unsigned int ULONG;
-typedef unsigned char BYTE;
-typedef unsigned char UCHAR;
-
-/* Some macros to allow access to actual packet data so that we */
-/* can change the underlying representation of packets.         */
-/*                                                              */
-/* The current formats vying for attention are a fragment       */
-/* approach where the SMB header is a fragment linked to the    */
-/* data portion with the transport protocol (rfcnb or whatever) */
-/* being linked on the front.                                   */
-/*                                                              */
-/* The other approach is where the whole packet is one array    */
-/* of bytes with space allowed on the front for the packet      */
-/* headers.                                                     */
-
-#define SMB_Hdr(p) (char *)(p -> data)
-
-/* SMB Hdr def for File Sharing Protocol? From MS and Intel,    */
-/* Intel PN 138446 Doc Version 2.0, Nov 7, 1988. This def also  */
-/* applies to LANMAN1.0 as well as the Core Protocol            */
-/* The spec states that wct and bcc must be present, even if 0  */
-
-/* We define these as offsets into a char SMB[] array for the   */
-/* sake of portability                                          */
-
-/* NOTE!. Some of the lenght defines, SMB_<protreq>_len do not include */
-/* the data that follows in the SMB packet, so the code will have to   */
-/* take that into account.                                             */
-
-#define SMB_hdr_idf_offset    0          /* 0xFF,'SMB' 0-3 */
-#define SMB_hdr_com_offset    4          /* BYTE       4   */
-#define SMB_hdr_rcls_offset   5          /* BYTE       5   */
-#define SMB_hdr_reh_offset    6          /* BYTE       6   */
-#define SMB_hdr_err_offset    7          /* WORD       7   */
-#define SMB_hdr_reb_offset    9          /* BYTE       9   */
-#define SMB_hdr_flg_offset    9          /* same as reb ...*/
-#define SMB_hdr_res_offset    10         /* 7 WORDs    10  */
-#define SMB_hdr_res0_offset   10         /* WORD       10  */
-#define SMB_hdr_flg2_offset   10         /* WORD           */
-#define SMB_hdr_res1_offset   12         /* WORD       12  */
-#define SMB_hdr_res2_offset   14
-#define SMB_hdr_res3_offset   16
-#define SMB_hdr_res4_offset   18
-#define SMB_hdr_res5_offset   20
-#define SMB_hdr_res6_offset   22
-#define SMB_hdr_tid_offset    24
-#define SMB_hdr_pid_offset    26
-#define SMB_hdr_uid_offset    28
-#define SMB_hdr_mid_offset    30
-#define SMB_hdr_wct_offset    32
-
-#define SMB_hdr_len           33        /* 33 byte header?      */
-
-#define SMB_hdr_axc_offset    33        /* AndX Command         */
-#define SMB_hdr_axr_offset    34        /* AndX Reserved        */
-#define SMB_hdr_axo_offset    35     /* Offset from start to WCT of AndX cmd */
-
-/* Format of the Negotiate Protocol SMB */
-
-#define SMB_negp_bcc_offset   33
-#define SMB_negp_buf_offset   35        /* Where the buffer starts   */
-#define SMB_negp_len          35        /* plus the data             */
-
-/* Format of the Negotiate Response SMB, for CoreProtocol, LM1.2 and */
-/* NT LM 0.12. wct will be 1 for CoreProtocol, 13 for LM 1.2, and 17 */
-/* for NT LM 0.12                                                    */
-
-#define SMB_negrCP_idx_offset   33        /* Response to the neg req */
-#define SMB_negrCP_bcc_offset   35
-#define SMB_negrLM_idx_offset   33        /* dialect index           */
-#define SMB_negrLM_sec_offset   35        /* Security mode           */
-#define SMB_sec_user_mask       0x01      /* 0 = share, 1 = user     */
-#define SMB_sec_encrypt_mask    0x02      /* pick out encrypt        */
-#define SMB_negrLM_mbs_offset   37        /* max buffer size         */
-#define SMB_negrLM_mmc_offset   39        /* max mpx count           */
-#define SMB_negrLM_mnv_offset   41        /* max number of VCs       */
-#define SMB_negrLM_rm_offset    43        /* raw mode support bit vec*/
-#define SMB_read_raw_mask       0x01
-#define SMB_write_raw_mask      0x02
-#define SMB_negrLM_sk_offset    45        /* session key, 32 bits    */
-#define SMB_negrLM_st_offset    49        /* Current server time     */
-#define SMB_negrLM_sd_offset    51        /* Current server date     */
-#define SMB_negrLM_stz_offset   53        /* Server Time Zone        */
-#define SMB_negrLM_ekl_offset   55        /* encryption key length   */
-#define SMB_negrLM_res_offset   57        /* reserved                */
-#define SMB_negrLM_bcc_offset   59        /* bcc                     */
-#define SMB_negrLM_len          61        /* 61 bytes ?              */
-#define SMB_negrLM_buf_offset   61        /* Where the fun begins    */
-
-#define SMB_negrNTLM_idx_offset 33        /* Selected protocol       */
-#define SMB_negrNTLM_sec_offset 35        /* Security more           */
-#define SMB_negrNTLM_mmc_offset 36        /* Different format above  */
-#define SMB_negrNTLM_mnv_offset 38        /* Max VCs                 */
-#define SMB_negrNTLM_mbs_offset 40        /* MBS now a long          */
-#define SMB_negrNTLM_mrs_offset 44        /* Max raw size            */
-#define SMB_negrNTLM_sk_offset  48        /* Session Key             */
-#define SMB_negrNTLM_cap_offset 52        /* Capabilities            */
-#define SMB_negrNTLM_stl_offset 56        /* Server time low         */
-#define SMB_negrNTLM_sth_offset 60        /* Server time high        */
-#define SMB_negrNTLM_stz_offset 64        /* Server time zone        */
-#define SMB_negrNTLM_ekl_offset 66        /* Encrypt key len         */
-#define SMB_negrNTLM_bcc_offset 67        /* Bcc                     */
-#define SMB_negrNTLM_len        69
-#define SMB_negrNTLM_buf_offset 69
-
-/* Offsets related to Tree Connect                                      */
-
-#define SMB_tcon_bcc_offset     33
-#define SMB_tcon_buf_offset     35        /* where the data is for tcon */
-#define SMB_tcon_len            35        /* plus the data              */
-
-#define SMB_tconr_mbs_offset    33        /* max buffer size         */
-#define SMB_tconr_tid_offset    35        /* returned tree id        */
-#define SMB_tconr_bcc_offset    37
-#define SMB_tconr_len           39
-
-#define SMB_tconx_axc_offset    33        /* And X Command                */
-#define SMB_tconx_axr_offset    34        /* reserved                     */
-#define SMB_tconx_axo_offset    35        /* Next command offset          */
-#define SMB_tconx_flg_offset    37        /* Flags, bit0=1 means disc TID */
-#define SMB_tconx_pwl_offset    39        /* Password length              */
-#define SMB_tconx_bcc_offset    41        /* bcc                          */
-#define SMB_tconx_buf_offset    43        /* buffer                       */
-#define SMB_tconx_len           43        /* up to data ...               */
-
-#define SMB_tconxr_axc_offset   33        /* Where the AndX Command is    */
-#define SMB_tconxr_axr_offset   34        /* Reserved                     */
-#define SMB_tconxr_axo_offset   35        /* AndX offset location         */
-
-/* Offsets related to tree_disconnect                                  */
-
-#define SMB_tdis_bcc_offset     33        /* bcc                     */
-#define SMB_tdis_len            35        /* total len               */
-
-#define SMB_tdisr_bcc_offset    33        /* bcc                     */
-#define SMB_tdisr_len           35
-
-/* Offsets related to Open Request                                     */
-
-#define SMB_open_mod_offset     33        /* Mode to open with       */
-#define SMB_open_atr_offset     35        /* Attributes of file      */
-#define SMB_open_bcc_offset     37        /* bcc                     */
-#define SMB_open_buf_offset     39        /* File name               */
-#define SMB_open_len            39        /* Plus the file name      */
-
-#define SMB_openx_axc_offset    33        /* Next command            */
-#define SMB_openx_axr_offset    34        /* Reserved                */
-#define SMB_openx_axo_offset    35        /* offset of next wct      */
-#define SMB_openx_flg_offset    37        /* Flags, bit0 = need more info */
-                                          /* bit1 = exclusive oplock */
-                                          /* bit2 = batch oplock     */
-#define SMB_openx_mod_offset    39        /* mode to open with       */
-#define SMB_openx_atr_offset    41        /* search attributes       */
-#define SMB_openx_fat_offset    43        /* File attributes         */
-#define SMB_openx_tim_offset    45        /* time and date of creat  */
-#define SMB_openx_ofn_offset    49        /* Open function           */
-#define SMB_openx_als_offset    51        /* Space to allocate on    */
-#define SMB_openx_res_offset    55        /* reserved                */
-#define SMB_openx_bcc_offset    63        /* bcc                     */
-#define SMB_openx_buf_offset    65        /* Where file name goes    */
-#define SMB_openx_len           65
-
-#define SMB_openr_fid_offset    33        /* FID returned            */
-#define SMB_openr_atr_offset    35        /* Attributes opened with  */
-#define SMB_openr_tim_offset    37        /* Last mod time of file   */
-#define SMB_openr_fsz_offset    41        /* File size 4 bytes       */
-#define SMB_openr_acc_offset    45        /* Access allowed          */
-#define SMB_openr_bcc_offset    47
-#define SMB_openr_len           49
-
-#define SMB_openxr_axc_offset   33        /* And X command           */
-#define SMB_openxr_axr_offset   34        /* reserved                */
-#define SMB_openxr_axo_offset   35        /* offset to next command  */
-#define SMB_openxr_fid_offset   37        /* FID returned            */
-#define SMB_openxr_fat_offset   39        /* File attributes returned*/
-#define SMB_openxr_tim_offset   41        /* File creation date etc  */
-#define SMB_openxr_fsz_offset   45        /* Size of file            */
-#define SMB_openxr_acc_offset   49        /* Access granted          */
-
-#define SMB_clos_fid_offset     33        /* FID to close            */
-#define SMB_clos_tim_offset     35        /* Last mod time           */
-#define SMB_clos_bcc_offset     39        /* bcc                     */
-#define SMB_clos_len            41
-
-/* Offsets related to Write requests                                 */
-
-#define SMB_write_fid_offset    33        /* FID to write            */
-#define SMB_write_cnt_offset    35        /* bytes to write          */
-#define SMB_write_ofs_offset    37        /* location to write to    */
-#define SMB_write_clf_offset    41        /* advisory count left     */
-#define SMB_write_bcc_offset    43        /* bcc = data bytes + 3    */
-#define SMB_write_buf_offset    45        /* Data=0x01, len, data    */
-#define SMB_write_len           45        /* plus the data ...       */
-
-#define SMB_writr_cnt_offset    33        /* Count of bytes written  */
-#define SMB_writr_bcc_offset    35        /* bcc                     */
-#define SMB_writr_len           37
-
-/* Offsets related to read requests */
-
-#define SMB_read_fid_offset     33        /* FID of file to read     */
-#define SMB_read_cnt_offset     35        /* count of words to read  */
-#define SMB_read_ofs_offset     37        /* Where to read from      */
-#define SMB_read_clf_offset     41        /* Advisory count to go    */
-#define SMB_read_bcc_offset     43
-#define SMB_read_len            45
-
-#define SMB_readr_cnt_offset    33        /* Count of bytes returned */
-#define SMB_readr_res_offset    35        /* 4 shorts reserved, 8 bytes */
-#define SMB_readr_bcc_offset    43        /* bcc                     */
-#define SMB_readr_bff_offset    45        /* buffer format char = 0x01 */
-#define SMB_readr_len_offset    46        /* buffer len              */
-#define SMB_readr_len           45        /* length of the readr before data */
-
-/* Offsets for Create file                                           */
-
-#define SMB_creat_atr_offset    33        /* Attributes of new file ... */
-#define SMB_creat_tim_offset    35        /* Time of creation           */
-#define SMB_creat_dat_offset    37        /* 4004BCE :-)                */
-#define SMB_creat_bcc_offset    39        /* bcc                        */
-#define SMB_creat_buf_offset    41
-#define SMB_creat_len           41        /* Before the data            */
-
-#define SMB_creatr_fid_offset   33        /* FID of created file        */
-
-/* Offsets for Delete file                                           */
-
-#define SMB_delet_sat_offset    33        /* search attribites          */
-#define SMB_delet_bcc_offset    35        /* bcc                        */
-#define SMB_delet_buf_offset    37
-#define SMB_delet_len           37
-
-/* Offsets for SESSION_SETUP_ANDX for both LM and NT LM protocols    */
-
-#define SMB_ssetpLM_mbs_offset  37        /* Max buffer Size, allow for AndX */
-#define SMB_ssetpLM_mmc_offset  39        /* max multiplex count             */
-#define SMB_ssetpLM_vcn_offset  41        /* VC number if new VC             */
-#define SMB_ssetpLM_snk_offset  43        /* Session Key                     */
-#define SMB_ssetpLM_pwl_offset  47        /* password length                 */
-#define SMB_ssetpLM_res_offset  49        /* reserved                        */
-#define SMB_ssetpLM_bcc_offset  53        /* bcc                             */
-#define SMB_ssetpLM_len         55        /* before data ...                 */
-#define SMB_ssetpLM_buf_offset  55
-
-#define SMB_ssetpNTLM_mbs_offset 37       /* Max Buffer Size for NT LM 0.12  */
-                                          /* and above                       */
-#define SMB_ssetpNTLM_mmc_offset 39       /* Max Multiplex count             */
-#define SMB_ssetpNTLM_vcn_offset 41       /* VC Number                       */
-#define SMB_ssetpNTLM_snk_offset 43       /* Session key                     */
-#define SMB_ssetpNTLM_cipl_offset 47      /* Case Insensitive PW Len         */
-#define SMB_ssetpNTLM_cspl_offset 49      /* Unicode pw len                  */
-#define SMB_ssetpNTLM_res_offset 51       /* reserved                        */
-#define SMB_ssetpNTLM_cap_offset 55       /* server capabilities             */
-#define SMB_ssetpNTLM_bcc_offset 59       /* bcc                             */
-#define SMB_ssetpNTLM_len        61       /* before data                     */
-#define SMB_ssetpNTLM_buf_offset 61
-
-#define SMB_ssetpr_axo_offset  35         /* Offset of next response ...    */
-#define SMB_ssetpr_act_offset  37         /* action, bit 0 = 1 => guest     */
-#define SMB_ssetpr_bcc_offset  39         /* bcc                            */
-#define SMB_ssetpr_buf_offset  41         /* Native OS etc                  */
-
-/* Offsets for SMB create directory                                         */
-
-#define SMB_creatdir_bcc_offset 33        /* only a bcc here                */
-#define SMB_creatdir_buf_offset 35        /* Where things start             */
-#define SMB_creatdir_len        35
-
-/* Offsets for SMB delete directory                                         */
-
-#define SMB_deletdir_bcc_offset 33        /* only a bcc here                */
-#define SMB_deletdir_buf_offset 35        /* where things start             */
-#define SMB_deletdir_len        35
-
-/* Offsets for SMB check directory                                          */
-
-#define SMB_checkdir_bcc_offset 33        /* Only a bcc here                */
-#define SMB_checkdir_buf_offset 35        /* where things start             */
-#define SMB_checkdir_len        35
-
-/* Offsets for SMB search                                                   */
-
-#define SMB_search_mdc_offset   33        /* Max Dir ents to return         */
-#define SMB_search_atr_offset   35        /* Search attributes              */
-#define SMB_search_bcc_offset   37        /* bcc                            */
-#define SMB_search_buf_offset   39        /* where the action is            */
-#define SMB_search_len          39
-
-#define SMB_searchr_dec_offset  33        /* Dir ents returned              */
-#define SMB_searchr_bcc_offset  35        /* bcc                            */
-#define SMB_searchr_buf_offset  37        /* Where the action starts        */
-#define SMB_searchr_len         37        /* before the dir ents            */
-
-#define SMB_searchr_dirent_len  43        /* 53 bytes                       */
-
-/* Defines for SMB transact and transact2 calls                             */
-
-#define SMB_trans_tpc_offset    33        /* Total param count              */
-#define SMB_trans_tdc_offset    35        /* total Data count               */
-#define SMB_trans_mpc_offset    37        /* Max params bytes to return     */
-#define SMB_trans_mdc_offset    39        /* Max data bytes to return       */
-#define SMB_trans_msc_offset    41        /* Max setup words to return      */
-#define SMB_trans_rs1_offset    42        /* Reserved byte                  */
-#define SMB_trans_flg_offset    43        /* flags                          */
-#define SMB_trans_tmo_offset    45        /* Timeout, long                  */
-#define SMB_trans_rs2_offset    49        /* Next reserved                  */
-#define SMB_trans_pbc_offset    51        /* Param Byte count in buf        */
-#define SMB_trans_pbo_offset    53        /* Offset to param bytes          */
-#define SMB_trans_dbc_offset    55        /* Data byte count in buf         */
-#define SMB_trans_dbo_offset    57        /* Data byte offset               */
-#define SMB_trans_suc_offset    59        /* Setup count - byte             */
-#define SMB_trans_rs3_offset    60        /* Reserved to pad ...            */
-#define SMB_trans_len           61        /* Up to setup, still need bcc    */
-
-#define SMB_transr_tpc_offset   33        /* Total param bytes returned     */
-#define SMB_transr_tdc_offset   35
-#define SMB_transr_rs1_offset   37
-#define SMB_transr_pbc_offset   39
-#define SMB_transr_pbo_offset   41
-#define SMB_transr_pdi_offset   43        /* parameter displacement         */
-#define SMB_transr_dbc_offset   45
-#define SMB_transr_dbo_offset   47
-#define SMB_transr_ddi_offset   49
-#define SMB_transr_suc_offset   51
-#define SMB_transr_rs2_offset   52
-#define SMB_transr_len          53
-
-/* Bit masks for SMB Capabilities ...                       */
-
-#define SMB_cap_raw_mode         0x0001
-#define SMB_cap_mpx_mode         0x0002
-#define SMB_cap_unicode          0x0004
-#define SMB_cap_large_files      0x0008
-#define SMB_cap_nt_smbs          0x0010
-#define SMB_rpc_remote_apis      0x0020
-#define SMB_cap_nt_status        0x0040
-#define SMB_cap_level_II_oplocks 0x0080
-#define SMB_cap_lock_and_read    0x0100
-#define SMB_cap_nt_find          0x0200
-
-/* SMB LANMAN api call defines */
-
-#define SMB_LMapi_SetUserInfo     0x0072
-#define SMB_LMapi_UserPasswordSet 0x0073
-
-/* Structures and defines we use in the client interface */
-
-/* The protocols we might support. Perhaps a bit ambitious, as only RFCNB */
-/* has any support so far 0(sometimes called NBT)                         */
-
-typedef enum {SMB_RFCNB, SMB_IPXNB, SMB_NETBEUI, SMB_X25} SMB_Transport_Types;
-
-typedef enum {SMB_Con_FShare, SMB_Con_PShare, SMB_Con_IPC} SMB_Con_Types;
-
-typedef enum {SMB_State_NoState, SMB_State_Stopped, SMB_State_Started} SMB_State_Types;
-
-/* The following two arrays need to be in step!              */
-/* We must make it possible for callers to specify these ... */
-
-
-static const char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0",
-                           "MICROSOFT NETWORKS 1.03",
-                           "MICROSOFT NETWORKS 3.0",
-                           "DOS LANMAN1.0",
-                           "LANMAN1.0",
-                           "DOS LM1.2X002",
-                           "LM1.2X002",
-                           "DOS LANMAN2.1",
-                           "LANMAN2.1",
-                           "Samba",
-                           "NT LM 0.12",
-                           "NT LANMAN 1.0",
-                           NULL};
-
-static const int SMB_Types[] = {SMB_P_Core,
-                          SMB_P_CorePlus,
-                         SMB_P_DOSLanMan1,
-                         SMB_P_DOSLanMan1,
-                         SMB_P_LanMan1,
-                         SMB_P_DOSLanMan2,
-                         SMB_P_LanMan2,
-                         SMB_P_LanMan2_1,
-                         SMB_P_LanMan2_1,
-                         SMB_P_NT1,
-                         SMB_P_NT1,
-                         SMB_P_NT1,
-                         -1};
-
-typedef struct SMB_Status {
-
-  union {
-    struct {
-      unsigned char ErrorClass;
-      unsigned char Reserved;
-      unsigned short Error;
-    } DosError;
-    unsigned int NtStatus;
-  } status;
-} SMB_Status;
-
-typedef struct SMB_Tree_Structure * SMB_Tree_Handle;
-
-typedef struct SMB_Connect_Def * SMB_Handle_Type;
-
-struct SMB_Connect_Def {
-
-  SMB_Handle_Type Next_Con, Prev_Con;          /* Next and previous conn */
-  int protocol;                                /* What is the protocol   */
-  int prot_IDX;                                /* And what is the index  */
-  void *Trans_Connect;                         /* The connection         */
-
-  /* All these strings should be malloc'd */
-
-  char service[80], username[80], password[80], desthost[80], sock_options[80];
-  char address[80], myname[80];
-
-  SMB_Tree_Handle first_tree, last_tree;  /* List of trees on this server */
-
-  int gid;         /* Group ID, do we need it?                      */
-  int mid;         /* Multiplex ID? We might need one per con       */
-  int pid;         /* Process ID                                    */
-
-  int uid;         /* Authenticated user id.                        */
-
-                   /* It is pretty clear that we need to bust some of */
-                   /* these out into a per TCon record, as there may  */
-                   /* be multiple TCon's per server, etc ... later    */
-
-  int port;        /* port to use in case not default, this is a TCPism! */
-
-  int max_xmit;    /* Max xmit permitted by server                  */
-  int Security;    /* 0 = share, 1 = user                           */
-  int Raw_Support; /* bit 0 = 1 = Read Raw supported, 1 = 1 Write raw */
-  BOOL encrypt_passwords; /* FALSE = don't                          */
-  int MaxMPX, MaxVC, MaxRaw;
-  unsigned int SessionKey, Capabilities;
-  int SvrTZ;                                 /* Server Time Zone */
-  int Encrypt_Key_Len;
-  char Encrypt_Key[80], Domain[80], PDomain[80], OSName[80], LMType[40];
-  char Svr_OS[80], Svr_LMType[80], Svr_PDom[80];
-
-};
-
-#define SMBLIB_DEFAULT_DOMAIN "STAFF"
-#define SMBLIB_DEFAULT_OSNAME "UNIX of some type"
-#define SMBLIB_DEFAULT_LMTYPE "SMBlib LM2.1 minus a bit"
-#define SMBLIB_MAX_XMIT 65535
-
-#define SMB_Sec_Mode_Share 0
-#define SMB_Sec_Mode_User  1
-
-/* A Tree_Structure                       */
-
-struct SMB_Tree_Structure {
-
-  SMB_Tree_Handle next, prev;
-  SMB_Handle_Type con;
-  char path[129];
-  char device_type[20];
-  int mbs;                   /* Local MBS */
-  int tid;
-
-};
-
-typedef struct SMB_File_Def SMB_File;
-
-struct SMB_File_Def {
-
-  SMB_Tree_Handle tree;
-  char filename[256];          /* We should malloc this ... */
-  UWORD fid;
-  unsigned int lastmod;
-  unsigned int size;           /* Could blow up if 64bit files supported */
-  UWORD access;
-  off_t fileloc;
-
-};
-
-/* global Variables for the library */
-
-extern SMB_State_Types SMBlib_State;
-
-#ifndef SMBLIB_ERRNO
-extern int SMBlib_errno;
-extern int SMBlib_SMB_Error;          /* last Error             */
-#endif
-
-SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con, SMB_Tree_Handle tree,
-                               char *path, char *password, char *dev);
diff --git a/src/modules/rlm_smb/smblib-util.c b/src/modules/rlm_smb/smblib-util.c
deleted file mode 100644 (file)
index 61f3871..0000000
+++ /dev/null
@@ -1,793 +0,0 @@
-/* UNIX SMBlib NetBIOS implementation
-
-   Version 1.0
-   SMBlib Utility Routines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-#include <string.h>
-#include "smblib-priv.h"
-#include "rfcnb.h"
-
-/* Print out an SMB pkt in all its gory detail ... */
-
-void SMB_Print_Pkt(FILE fd, RFCNB_Pkt *pkt, BOOL command, int Offset, int Len)
-
-{
-
-  /* Well, just how do we do this ... print it I suppose */
-
-  /* Print out the SMB header ...                        */
-
-  /* Print the command                                   */
-
-  /* Print the other bits in the header                  */
-
-
-  /* etc                                                 */
-
-}
-
-/* Convert a DOS Date_Time to a local host type date time for printing */
-
-char *SMB_DOSTimToStr(int DOS_time)
-
-{ static char SMB_Time_Temp[48];
-  int DOS_sec, DOS_min, DOS_hour, DOS_day, DOS_month, DOS_year;
-
-  SMB_Time_Temp[0] = 0;
-
-  DOS_sec   = (DOS_time & 0x001F) * 2;
-  DOS_min   = (DOS_time & 0x07E0) >> 5;
-  DOS_hour  = ((DOS_time & 0xF800) >> 11);
-
-  DOS_day   = (DOS_time & 0x001F0000) >> 16;
-  DOS_month = (DOS_time & 0x01E00000) >> 21;
-  DOS_year  = ((DOS_time & 0xFE000000) >> 25) + 80;
-
-  sprintf(SMB_Time_Temp, "%2d/%02d/%2d %2d:%02d:%02d", DOS_day, DOS_month,
-                        DOS_year, DOS_hour, DOS_min, DOS_sec);
-
-  return(SMB_Time_Temp);
-
-}
-
-/* Convert an attribute byte/word etc to a string ... We return a pointer
-   to a static string which we guarantee is long enough. If verbose is
-   true, we print out long form of strings ...                            */
-
-char *SMB_AtrToStr(int attribs, BOOL verbose)
-
-{ static char SMB_Attrib_Temp[128];
-
-  SMB_Attrib_Temp[0] = 0;
-
-  if (attribs & SMB_FA_ROF)
-    strcat(SMB_Attrib_Temp, (verbose?"Read Only ":"R"));
-
-  if (attribs & SMB_FA_HID)
-    strcat(SMB_Attrib_Temp, (verbose?"Hidden ":"H"));
-
-  if (attribs & SMB_FA_SYS)
-    strcat(SMB_Attrib_Temp, (verbose?"System ":"S"));
-
-  if (attribs & SMB_FA_VOL)
-    strcat(SMB_Attrib_Temp, (verbose?"Volume ":"V"));
-
-  if (attribs & SMB_FA_DIR)
-    strcat(SMB_Attrib_Temp, (verbose?"Directory ":"D"));
-
-  if (attribs & SMB_FA_ARC)
-    strcat(SMB_Attrib_Temp, (verbose?"Archive ":"A"));
-
-  return(SMB_Attrib_Temp);
-
-}
-
-/* Pick up the Max Buffer Size from the Tree Structure ... */
-
-int SMB_Get_Tree_MBS(SMB_Tree_Handle tree)
-
-{
-  if (tree != NULL) {
-    return(tree -> mbs);
-  }
-  else {
-    return(SMBlibE_BAD);
-  }
-}
-
-/* Pick up the Max buffer size */
-
-int SMB_Get_Max_Buf_Siz(SMB_Handle_Type Con_Handle)
-
-{
-  if (Con_Handle != NULL) {
-    return(Con_Handle -> max_xmit);
-  }
-  else {
-    return(SMBlibE_BAD);
-  }
-
-}
-/* Pickup the protocol index from the connection structure                 */
-
-int SMB_Get_Protocol_IDX(SMB_Handle_Type Con_Handle)
-
-{
-  if (Con_Handle != NULL) {
-    return(Con_Handle -> prot_IDX);
-  }
-  else {
-    return(0xFFFF);  /* Invalid protocol */
-  }
-
-}
-
-/* Pick up the protocol from the connection structure                       */
-
-int SMB_Get_Protocol(SMB_Handle_Type Con_Handle)
-
-{
-  if (Con_Handle != NULL) {
-    return(Con_Handle -> protocol);
-  }
-  else {
-    return(0xFFFF);  /* Invalid protocol */
-  }
-
-}
-
-/* Figure out what protocol was accepted, given the list of dialect strings */
-/* We offered, and the index back from the server. We allow for a user      */
-/* supplied list, and assume that it is a subset of our list                */
-
-int SMB_Figure_Protocol(char *dialects[], int prot_index)
-
-{ int i;
-
-  if (dialects == SMB_Prots) { /* The jobs is easy, just index into table */
-
-    return(SMB_Types[prot_index]);
-  }
-  else { /* Search through SMB_Prots looking for a match */
-
-    for (i = 0; SMB_Prots[i] != NULL; i++) {
-
-      if (strcmp(dialects[prot_index], SMB_Prots[i]) == 0) { /* A match */
-
-       return(SMB_Types[i]);
-
-      }
-
-    }
-
-    /* If we got here, then we are in trouble, because the protocol was not */
-    /* One we understand ...                                                */
-
-    return(SMB_P_Unknown);
-
-  }
-
-}
-
-
-/* Negotiate the protocol we will use from the list passed in Prots       */
-/* we return the index of the accepted protocol in NegProt, -1 indicates  */
-/* none acceptible, and our return value is 0 if ok, <0 if problems       */
-
-int SMB_Negotiate(SMB_Handle_Type Con_Handle, char *Prots[])
-
-{
-  struct RFCNB_Pkt *pkt;
-  int prots_len, i, pkt_len, prot, alloc_len;
-  char *p;
-
-  /* Figure out how long the prot list will be and allocate space for it */
-
-  prots_len = 0;
-
-  for (i = 0; Prots[i] != NULL; i++) {
-
-    prots_len = prots_len + strlen(Prots[i]) + 2; /* Account for null etc */
-
-  }
-
-  /* The -1 accounts for the one byte smb_buf we have because some systems */
-  /* don't like char msg_buf[]                                             */
-
-  pkt_len = SMB_negp_len + prots_len;
-
-  /* Make sure that the pkt len is long enough for the max response ...   */
-  /* Which is a problem, because the encryption key len eec may be long   */
-
-  if (pkt_len < (SMB_hdr_wct_offset + (19 * 2) + 40)) {
-
-    alloc_len = SMB_hdr_wct_offset + (19 * 2) + 40;
-
-  }
-  else {
-
-    alloc_len = pkt_len;
-
-  }
-
-  pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(alloc_len);
-
-  if (pkt == NULL) {
-
-    SMBlib_errno = SMBlibE_NoSpace;
-    return(SMBlibE_BAD);
-
-  }
-
-  /* Now plug in the bits we need */
-
-  bzero(SMB_Hdr(pkt), SMB_negp_len);
-  SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-  *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBnegprot;
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle -> pid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle -> mid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle -> uid);
-  *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 0;
-
-  SSVAL(SMB_Hdr(pkt), SMB_negp_bcc_offset, prots_len);
-
-  /* Now copy the prot strings in with the right stuff */
-
-  p = (char *)(SMB_Hdr(pkt) + SMB_negp_buf_offset);
-
-  for (i = 0; Prots[i] != NULL; i++) {
-
-    *p = SMBdialectID;
-    strcpy(p + 1, Prots[i]);
-    p = p + strlen(Prots[i]) + 2; /* Adjust len of p for null plus dialectID */
-
-  }
-
-  /* Now send the packet and sit back ... */
-
-  if (RFCNB_Send(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0){
-
-
-#ifdef DEBUG
-    fprintf(stderr, "Error sending negotiate protocol\n");
-#endif
-
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_SendFailed; /* Failed, check lower layer errno */
-    return(SMBlibE_BAD);
-
-  }
-
-  /* Now get the response ... */
-
-  if (RFCNB_Recv(Con_Handle -> Trans_Connect, pkt, alloc_len) < 0) {
-
-#ifdef DEBUG
-    fprintf(stderr, "Error receiving response to negotiate\n");
-#endif
-
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_RecvFailed; /* Failed, check lower layer errno */
-    return(SMBlibE_BAD);
-
-  }
-
-  if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {  /* Process error */
-
-#ifdef DEBUG
-    fprintf(stderr, "SMB_Negotiate failed with errorclass = %i, Error Code = %i\n",
-           CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset),
-           SVAL(SMB_Hdr(pkt), SMB_hdr_err_offset));
-#endif
-
-    SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_Remote;
-    return(SMBlibE_BAD);
-
-  }
-
-  if (SVAL(SMB_Hdr(pkt), SMB_negrCP_idx_offset) == 0xFFFF) {
-
-#ifdef DEBUG
-    fprintf(stderr, "None of our protocols was accepted ... ");
-#endif
-
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_NegNoProt;
-    return(SMBlibE_BAD);
-
-  }
-
-  /* Now, unpack the info from the response, if any and evaluate the proto */
-  /* selected. We must make sure it is one we like ...                     */
-
-  Con_Handle -> prot_IDX = prot = SVAL(SMB_Hdr(pkt), SMB_negrCP_idx_offset);
-  Con_Handle -> protocol = SMB_Figure_Protocol(Prots, prot);
-
-  if (Con_Handle -> protocol == SMB_P_Unknown) { /* No good ... */
-
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_ProtUnknown;
-    return(SMBlibE_BAD);
-
-  }
-
-  switch (CVAL(SMB_Hdr(pkt), SMB_hdr_wct_offset)) {
-
-  case 0x01:      /* No more info ... */
-
-    break;
-
-  case 13:        /* Up to and including LanMan 2.1 */
-
-    Con_Handle -> Security = SVAL(SMB_Hdr(pkt), SMB_negrLM_sec_offset);
-    Con_Handle -> encrypt_passwords = ((Con_Handle -> Security & SMB_sec_encrypt_mask) != 0x00);
-    Con_Handle -> Security = Con_Handle -> Security & SMB_sec_user_mask;
-
-    Con_Handle -> max_xmit = SVAL(SMB_Hdr(pkt), SMB_negrLM_mbs_offset);
-    Con_Handle -> MaxMPX = SVAL(SMB_Hdr(pkt), SMB_negrLM_mmc_offset);
-    Con_Handle -> MaxVC = SVAL(SMB_Hdr(pkt), SMB_negrLM_mnv_offset);
-    Con_Handle -> Raw_Support = SVAL(SMB_Hdr(pkt), SMB_negrLM_rm_offset);
-    Con_Handle -> SessionKey = IVAL(SMB_Hdr(pkt), SMB_negrLM_sk_offset);
-    Con_Handle -> SvrTZ = SVAL(SMB_Hdr(pkt), SMB_negrLM_stz_offset);
-    Con_Handle -> Encrypt_Key_Len = SVAL(SMB_Hdr(pkt), SMB_negrLM_ekl_offset);
-
-    p = (SMB_Hdr(pkt) + SMB_negrLM_buf_offset);
-    fprintf(stderr, "%s", (char *)(SMB_Hdr(pkt) + SMB_negrLM_buf_offset));
-    memcpy(Con_Handle->Encrypt_Key, p, 8);
-
-    p = (SMB_Hdr(pkt) + SMB_negrLM_buf_offset + Con_Handle -> Encrypt_Key_Len);
-
-    strncpy(p, Con_Handle -> Svr_PDom, sizeof(Con_Handle -> Svr_PDom) - 1);
-
-    break;
-
-  case 17:        /* NT LM 0.12 and LN LM 1.0 */
-
-    Con_Handle -> Security = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_sec_offset);
-    Con_Handle -> encrypt_passwords = ((Con_Handle -> Security & SMB_sec_encrypt_mask) != 0x00);
-    Con_Handle -> Security = Con_Handle -> Security & SMB_sec_user_mask;
-
-    Con_Handle -> max_xmit = IVAL(SMB_Hdr(pkt), SMB_negrNTLM_mbs_offset);
-    Con_Handle -> MaxMPX = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_mmc_offset);
-    Con_Handle -> MaxVC = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_mnv_offset);
-    Con_Handle -> MaxRaw = IVAL(SMB_Hdr(pkt), SMB_negrNTLM_mrs_offset);
-    Con_Handle -> SessionKey = IVAL(SMB_Hdr(pkt), SMB_negrNTLM_sk_offset);
-    Con_Handle -> SvrTZ = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_stz_offset);
-    Con_Handle -> Encrypt_Key_Len = CVAL(SMB_Hdr(pkt), SMB_negrNTLM_ekl_offset);
-
-    p = (SMB_Hdr(pkt) + SMB_negrNTLM_buf_offset );
-    memcpy(Con_Handle -> Encrypt_Key, p, 8);
-    p = (SMB_Hdr(pkt) + SMB_negrNTLM_buf_offset + Con_Handle -> Encrypt_Key_Len);
-
-    strncpy(p, Con_Handle -> Svr_PDom, sizeof(Con_Handle -> Svr_PDom) - 1);
-
-    break;
-
-  default:
-
-#ifdef DEBUG
-    fprintf(stderr, "Unknown NegProt response format ... Ignored\n");
-    fprintf(stderr, "  wct = %i\n", CVAL(SMB_Hdr(pkt), SMB_hdr_wct_offset));
-#endif
-
-    break;
-  }
-
-#ifdef DEBUG
-  fprintf(stderr, "Protocol selected is: %i:%s\n", prot, Prots[prot]);
-#endif
-
-  RFCNB_Free_Pkt(pkt);
-  return(0);
-
-}
-
-/* Get our hostname */
-
-void SMB_Get_My_Name(char *name, int len)
-
-{
-  if (gethostname(name, len) < 0) { /* Error getting name */
-
-    strncpy(name, "unknown", len);
-
-    /* Should check the error */
-
-#ifdef DEBUG
-    fprintf(stderr, "gethostname in SMB_Get_My_Name returned error:");
-    perror("");
-#endif
-
-  }
-
-  /* only keep the portion up to the first "." */
-
-
-}
-
-/* Send a TCON to the remote server ...               */
-
-SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type Con_Handle,
-                               SMB_Tree_Handle Tree_Handle,
-                               char *path,
-                               char *password,
-                               char *device)
-
-{
-  struct RFCNB_Pkt *pkt;
-  int param_len, pkt_len;
-  char *p;
-  SMB_Tree_Handle tree;
-
-  /* Figure out how much space is needed for path, password, dev ... */
-
-  if (path == NULL | password == NULL | device == NULL) {
-
-#ifdef DEBUG
-    fprintf(stderr, "Bad parameter passed to SMB_TreeConnect\n");
-#endif
-
-    SMBlib_errno = SMBlibE_BadParam;
-    return(NULL);
-
-  }
-
-  /* The + 2 is because of the \0 and the marker ...                    */
-
-  param_len = strlen(path) + 2 + strlen(password) + 2 + strlen(device) + 2;
-
-  /* The -1 accounts for the one byte smb_buf we have because some systems */
-  /* don't like char msg_buf[]                                             */
-
-  pkt_len = SMB_tcon_len + param_len;
-
-  pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(pkt_len);
-
-  if (pkt == NULL) {
-
-    SMBlib_errno = SMBlibE_NoSpace;
-    return(NULL); /* Should handle the error */
-
-  }
-
-  /* Now allocate a tree for this to go into ... */
-
-  if (Tree_Handle == NULL) {
-
-    tree = (SMB_Tree_Handle)malloc(sizeof(struct SMB_Tree_Structure));
-
-    if (tree == NULL) {
-
-      RFCNB_Free_Pkt(pkt);
-      SMBlib_errno = SMBlibE_NoSpace;
-      return(NULL);
-
-    }
-  }
-  else {
-
-    tree = Tree_Handle;
-
-  }
-
-  tree -> next = tree -> prev = NULL;
-  tree -> con = Con_Handle;
-  strncpy(tree -> path, path, sizeof(tree -> path));
-  strncpy(tree -> device_type, device, sizeof(tree -> device_type));
-
-  /* Now plug in the values ... */
-
-  bzero(SMB_Hdr(pkt), SMB_tcon_len);
-  SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-  *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBtcon;
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle -> pid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle -> mid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle -> uid);
-  *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 0;
-
-  SSVAL(SMB_Hdr(pkt), SMB_tcon_bcc_offset, param_len);
-
-  /* Now copy the param strings in with the right stuff */
-
-  p = (char *)(SMB_Hdr(pkt) + SMB_tcon_buf_offset);
-  *p = SMBasciiID;
-  strcpy(p + 1, path);
-  p = p + strlen(path) + 2;
-  *p = SMBasciiID;
-  strcpy(p + 1, password);
-  p = p + strlen(password) + 2;
-  *p = SMBasciiID;
-  strcpy(p + 1, device);
-
-  /* Now send the packet and sit back ... */
-
-  if (RFCNB_Send(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0){
-
-#ifdef DEBUG
-    fprintf(stderr, "Error sending TCon request\n");
-#endif
-
-    if (Tree_Handle == NULL)
-      free(tree);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_SendFailed;
-    return(NULL);
-
-  }
-
-  /* Now get the response ... */
-
-  if (RFCNB_Recv(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0) {
-
-#ifdef DEBUG
-    fprintf(stderr, "Error receiving response to TCon\n");
-#endif
-
-    if (Tree_Handle == NULL)
-      free(tree);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_RecvFailed;
-    return(NULL);
-
-  }
-
-  /* Check out the response type ... */
-
-  if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {  /* Process error */
-
-#ifdef DEBUG
-    fprintf(stderr, "SMB_TCon failed with errorclass = %i, Error Code = %i\n",
-           CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset),
-           SVAL(SMB_Hdr(pkt), SMB_hdr_err_offset));
-#endif
-
-    if (Tree_Handle == NULL)
-      free(tree);
-    SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_Remote;
-    return(NULL);
-
-  }
-
-  tree -> tid = SVAL(SMB_Hdr(pkt), SMB_tconr_tid_offset);
-  tree -> mbs = SVAL(SMB_Hdr(pkt), SMB_tconr_mbs_offset);
-
-#ifdef DEBUG
-  fprintf(stderr, "TConn succeeded, with TID=%i, Max Xmit=%i\n",
-                 tree -> tid, tree -> mbs);
-#endif
-
-  /* Now link the Tree to the Server Structure ... */
-
-  if (Con_Handle -> first_tree == NULL) {
-
-    Con_Handle -> first_tree = tree;
-    Con_Handle -> last_tree = tree;
-
-  }
-  else {
-
-    Con_Handle -> last_tree -> next = tree;
-    tree -> prev = Con_Handle -> last_tree;
-    Con_Handle -> last_tree = tree;
-
-  }
-
-  RFCNB_Free_Pkt(pkt);
-  return(tree);
-
-}
-
-int SMB_TreeDisconnect(SMB_Tree_Handle Tree_Handle, BOOL discard)
-
-{ struct RFCNB_Pkt *pkt;
-  int pkt_len;
-
-  pkt_len = SMB_tdis_len;
-
-  pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(pkt_len);
-
-  if (pkt == NULL) {
-
-    SMBlib_errno = SMBlibE_NoSpace;
-    return(SMBlibE_BAD); /* Should handle the error */
-
-  }
-
-  /* Now plug in the values ... */
-
-  bzero(SMB_Hdr(pkt), SMB_tdis_len);
-  SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-  *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBtdis;
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Tree_Handle -> con -> pid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Tree_Handle -> con -> mid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Tree_Handle -> con -> uid);
-  *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 0;
-
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, Tree_Handle -> tid);
-  SSVAL(SMB_Hdr(pkt), SMB_tcon_bcc_offset, 0);
-
-  /* Now send the packet and sit back ... */
-
-  if (RFCNB_Send(Tree_Handle -> con -> Trans_Connect, pkt, pkt_len) < 0){
-
-#ifdef DEBUG
-    fprintf(stderr, "Error sending TDis request\n");
-#endif
-
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_SendFailed;
-    return(SMBlibE_BAD);
-
-  }
-
-  /* Now get the response ... */
-
-  if (RFCNB_Recv(Tree_Handle -> con -> Trans_Connect, pkt, pkt_len) < 0) {
-
-#ifdef DEBUG
-    fprintf(stderr, "Error receiving response to TCon\n");
-#endif
-
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_RecvFailed;
-    return(SMBlibE_BAD);
-
-  }
-
-  /* Check out the response type ... */
-
-  if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {  /* Process error */
-
-#ifdef DEBUG
-    fprintf(stderr, "SMB_TDis failed with errorclass = %i, Error Code = %i\n",
-           CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset),
-           SVAL(SMB_Hdr(pkt), SMB_hdr_err_offset));
-#endif
-
-    SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_Remote;
-    return(SMBlibE_BAD);
-
-  }
-
-  Tree_Handle -> tid = 0xFFFF;        /* Invalid TID */
-  Tree_Handle -> mbs = 0;             /* Invalid     */
-
-#ifdef DEBUG
-
-  fprintf(stderr, "Tree disconnect successful ...\n");
-
-#endif
-
-  /* What about the tree handle ? */
-
-  if (discard == TRUE) { /* Unlink it and free it ... */
-
-    if (Tree_Handle -> next == NULL)
-      Tree_Handle -> con -> first_tree = Tree_Handle -> prev;
-    else
-      Tree_Handle -> next -> prev = Tree_Handle -> prev;
-
-    if (Tree_Handle -> prev == NULL)
-      Tree_Handle -> con -> last_tree = Tree_Handle -> next;
-    else
-      Tree_Handle -> prev -> next = Tree_Handle -> next;
-
-  }
-
-  RFCNB_Free_Pkt(pkt);
-  return(0);
-
-}
-
-/* Pick up the last LMBlib error ... */
-
-int SMB_Get_Last_Error()
-
-{
-
-  return(SMBlib_errno);
-
-}
-
-/* Pick up the last error returned in an SMB packet          */
-/* We will need macros to extract error class and error code */
-
-int SMB_Get_Last_SMB_Err()
-
-{
-
-  return(SMBlib_SMB_Error);
-
-}
-
-/* Pick up the error message associated with an error from SMBlib  */
-
-/* Keep this table in sync with the message codes in smblib-common.h */
-
-static const char *SMBlib_Error_Messages[] = {
-
-  "Request completed sucessfully.",
-  "Server returned a non-zero SMB Error Class and Code.",
-  "A lower layer protocol error occurred.",
-  "Function not yet implemented.",
-  "The protocol negotiated does not support the request.",
-  "No space available for operation.",
-  "One or more bad parameters passed.",
-  "None of the protocols we offered were accepted.",
-  "The attempt to send an SMB request failed. See protocol error info.",
-  "The attempt to get an SMB response failed. See protocol error info.",
-  "The logon request failed, but you were logged in as guest.",
-  "The attempt to call the remote server failed. See protocol error info.",
-  "The protocol dialect specified in a NegProt and accepted by the server is unknown.",
-  /* This next one simplifies error handling */
-  "No such error code.",
-  NULL};
-
-int SMB_Get_Error_Msg(int msg, char *msgbuf, int len)
-
-{
-
-  if (msg >= 0) {
-
-    strncpy(msgbuf,
-           SMBlib_Error_Messages[msg>SMBlibE_NoSuchMsg?SMBlibE_NoSuchMsg:msg],
-           len - 1);
-    msgbuf[len - 1] = 0; /* Make sure it is a string */
-  }
-  else { /* Add the lower layer message ... */
-
-    char prot_msg[1024];
-
-    msg = -msg;   /* Make it positive */
-
-    strncpy(msgbuf,
-           SMBlib_Error_Messages[msg>SMBlibE_NoSuchMsg?SMBlibE_NoSuchMsg:msg],
-           len - 1);
-
-    msgbuf[len - 1] = 0; /* make sure it is a string */
-
-    if (strlen(msgbuf) < len) { /* If there is space, put rest in */
-
-      strncat(msgbuf, "\n\t", len - strlen(msgbuf));
-
-      RFCNB_Get_Error(prot_msg, sizeof(prot_msg) - 1);
-
-      strncat(msgbuf, prot_msg, len - strlen(msgbuf));
-
-    }
-  }
-
-  return 0;
-}
diff --git a/src/modules/rlm_smb/smblib.c b/src/modules/rlm_smb/smblib.c
deleted file mode 100644 (file)
index b41ccf0..0000000
+++ /dev/null
@@ -1,571 +0,0 @@
-/* UNIX SMBlib NetBIOS implementation
-
-   Version 1.0
-   SMBlib Routines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-#include <ctype.h>
-#include <string.h>
-#include "smblib-priv.h"
-#include "rfcnb.h"
-
-#define SMBLIB_ERRNO
-#define uchar unsigned char
-
-int SMBlib_errno;
-int SMBlib_SMB_Error;
-SMB_State_Types SMBlib_State;
-
-/* Initialize the SMBlib package     */
-
-int SMB_Init()
-
-{
-
-  SMBlib_State = SMB_State_Started;
-
-  signal(SIGPIPE, SIG_IGN);   /* Ignore these ... */
-
-/* If SMBLIB_Instrument is defines, turn on the instrumentation stuff */
-#ifdef SMBLIB_INSTRUMENT
-
-  SMBlib_Instrument_Init();
-
-#endif
-
-  return 0;
-
-}
-
-int SMB_Term()
-
-{
-
-#ifdef SMBLIB_INSTRUMENT
-
-  SMBlib_Instrument_Term();       /* Clean up and print results */
-
-#endif
-
-  return 0;
-
-}
-
-/* SMB_Create: Create a connection structure and return for later use */
-/* We have other helper routines to set variables                     */
-
-SMB_Handle_Type SMB_Create_Con_Handle()
-
-{
-
-  SMBlib_errno = SMBlibE_NotImpl;
-  return(NULL);
-
-}
-
-int SMBlib_Set_Sock_NoDelay(SMB_Handle_Type Con_Handle, BOOL yn)
-
-{
-
-
-  if (RFCNB_Set_Sock_NoDelay(Con_Handle -> Trans_Connect, yn) < 0) {
-
-#ifdef DEBUG
-#endif
-
-    fprintf(stderr, "Setting no-delay on TCP socket failed ...\n");
-
-  }
-
-  return(0);
-
-}
-
-/* SMB_Connect_Server: Connect to a server, but don't negotiate protocol */
-/* or anything else ...                                                  */
-
-SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle,
-                                  char *server, char *NTdomain)
-
-{
-  SMB_Handle_Type con;
-  char called[80], calling[80], *address;
-  int i;
-
-  /* Get a connection structure if one does not exist */
-
-  con = Con_Handle;
-
-  if (Con_Handle == NULL) {
-
-    if ((con = (struct SMB_Connect_Def *)malloc(sizeof(struct SMB_Connect_Def))) == NULL) {
-
-
-      SMBlib_errno = SMBlibE_NoSpace;
-      return NULL;
-    }
-
-  }
-
-  /* Init some things ... */
-
-  strcpy(con -> service, "");
-  strcpy(con -> username, "");
-  strcpy(con -> password, "");
-  strcpy(con -> sock_options, "");
-  strcpy(con -> address, "");
-  strcpy(con -> desthost, server);
-  strcpy(con -> PDomain, NTdomain);
-  strcpy(con -> OSName, SMBLIB_DEFAULT_OSNAME);
-  strcpy(con -> LMType, SMBLIB_DEFAULT_LMTYPE);
-  con -> first_tree = con -> last_tree = NULL;
-
-  SMB_Get_My_Name(con -> myname, sizeof(con -> myname));
-
-  con -> port = 0;                    /* No port selected */
-
-  /* Get some things we need for the SMB Header */
-
-  con -> pid = getpid();
-  con -> mid = con -> pid;      /* This will do for now ... */
-  con -> uid = 0;               /* Until we have done a logon, no uid ... */
-  con -> gid = getgid();
-
-  /* Now connect to the remote end, but first upper case the name of the
-     service we are going to call, sine some servers want it in uppercase */
-
-  for (i=0; i < strlen(server); i++)
-    called[i] = toupper(server[i]);
-
-  called[strlen(server)] = 0;    /* Make it a string */
-
-  for (i=0; i < strlen(con -> myname); i++)
-    calling[i] = toupper(con -> myname[i]);
-
-  calling[strlen(con -> myname)] = 0;    /* Make it a string */
-
-  if (strcmp(con -> address, "") == 0)
-    address = con -> desthost;
-  else
-    address = con -> address;
-
-  con -> Trans_Connect = RFCNB_Call(called,
-                                   calling,
-                                   address, /* Protocol specific */
-                                   con -> port);
-
-  /* Did we get one? */
-
-  if (con -> Trans_Connect == NULL) {
-
-    if (Con_Handle == NULL) {
-      Con_Handle = NULL;
-      free(con);
-    }
-    SMBlib_errno = -SMBlibE_CallFailed;
-    return NULL;
-
-  }
-
-  return(con);
-
-}
-
-/* SMB_Connect: Connect to the indicated server                       */
-/* If Con_Handle == NULL then create a handle and connect, otherwise  */
-/* use the handle passed                                              */
-
-static const char *SMB_Prots_Restrict[] = {"PC NETWORK PROGRAM 1.0",
-                                         NULL};
-
-
-SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle,
-                           SMB_Tree_Handle *tree,
-                           char *service,
-                           char *username,
-                           char *password)
-
-{ SMB_Handle_Type con;
-  char *host, *address;
-  char temp[80], called[80], calling[80];
-  int i;
-
-  /* Get a connection structure if one does not exist */
-
-  con = Con_Handle;
-
-  if (Con_Handle == NULL) {
-
-    if ((con = (struct SMB_Connect_Def *)malloc(sizeof(struct SMB_Connect_Def))) == NULL) {
-
-      SMBlib_errno = SMBlibE_NoSpace;
-      return NULL;
-    }
-
-  }
-
-  /* Init some things ... */
-
-  strcpy(con -> service, service);
-  strcpy(con -> username, username);
-  strcpy(con -> password, password);
-  strcpy(con -> sock_options, "");
-  strcpy(con -> address, "");
-  strcpy(con -> PDomain, SMBLIB_DEFAULT_DOMAIN);
-  strcpy(con -> OSName, SMBLIB_DEFAULT_OSNAME);
-  strcpy(con -> LMType, SMBLIB_DEFAULT_LMTYPE);
-  con -> first_tree = con -> last_tree = NULL;
-
-  SMB_Get_My_Name(con -> myname, sizeof(con -> myname));
-
-  con -> port = 0;                    /* No port selected */
-
-  /* Get some things we need for the SMB Header */
-
-  con -> pid = getpid();
-  con -> mid = con -> pid;      /* This will do for now ... */
-  con -> uid = 0;               /* Until we have done a logon, no uid */
-  con -> gid = getgid();
-
-  /* Now figure out the host portion of the service */
-
-  strcpy(temp, service);
-  host = strtok(temp, "/\\");     /* Separate host name portion */
-  strcpy(con -> desthost, host);
-
-  /* Now connect to the remote end, but first upper case the name of the
-     service we are going to call, sine some servers want it in uppercase */
-
-  for (i=0; i < strlen(host); i++)
-    called[i] = toupper(host[i]);
-
-  called[strlen(host)] = 0;    /* Make it a string */
-
-  for (i=0; i < strlen(con -> myname); i++)
-    calling[i] = toupper(con -> myname[i]);
-
-  calling[strlen(con -> myname)] = 0;    /* Make it a string */
-
-  if (strcmp(con -> address, "") == 0)
-    address = con -> desthost;
-  else
-    address = con -> address;
-
-  con -> Trans_Connect = RFCNB_Call(called,
-                                   calling,
-                                   address, /* Protocol specific */
-                                   con -> port);
-
-  /* Did we get one? */
-
-  if (con -> Trans_Connect == NULL) {
-
-    if (Con_Handle == NULL) {
-      free(con);
-      Con_Handle = NULL;
-    }
-    SMBlib_errno = -SMBlibE_CallFailed;
-    return NULL;
-
-  }
-
-  /* Now, negotiate the protocol */
-
-  if (SMB_Negotiate(con, SMB_Prots_Restrict) < 0) {
-
-    /* Hmmm what should we do here ... We have a connection, but could not
-       negotiate ...                                                      */
-
-    return NULL;
-
-  }
-
-  /* Now connect to the service ... */
-
-  if ((*tree = SMB_TreeConnect(con, NULL, service, password, "A:")) == NULL) {
-
-    return NULL;
-
-  }
-
-  return(con);
-
-}
-
-/* Logon to the server. That is, do a session setup if we can. We do not do */
-/* Unicode yet!                                                             */
-
-int SMB_Logon_Server(SMB_Handle_Type Con_Handle, char *UserName,
-                    char *PassWord)
-
-{
-  struct RFCNB_Pkt *pkt;
-  int param_len, pkt_len, pass_len;
-  char *p, pword[256];
-
-  /* First we need a packet etc ... but we need to know what protocol has  */
-  /* been negotiated to figure out if we can do it and what SMB format to  */
-  /* use ...                                                               */
-
-  if (Con_Handle -> protocol < SMB_P_LanMan1) {
-
-    SMBlib_errno = SMBlibE_ProtLow;
-    return(SMBlibE_BAD);
-
-  }
-
-  strcpy(pword, PassWord);
-  if (Con_Handle -> encrypt_passwords)
-  {
-    pass_len=24;
-    SMBencrypt((uchar *) PassWord, (uchar *)Con_Handle -> Encrypt_Key,(uchar *)pword);
-  }
-  else
-       pass_len=strlen(pword);
-
-
-  /* Now build the correct structure */
-
-  if (Con_Handle -> protocol < SMB_P_NT1) {
-
-    param_len = strlen(UserName) + 1 + pass_len + 1 +
-                strlen(Con_Handle -> PDomain) + 1 +
-               strlen(Con_Handle -> OSName) + 1;
-
-    pkt_len = SMB_ssetpLM_len + param_len;
-
-    pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(pkt_len);
-
-    if (pkt == NULL) {
-
-      SMBlib_errno = SMBlibE_NoSpace;
-      return(SMBlibE_BAD); /* Should handle the error */
-
-    }
-
-    bzero(SMB_Hdr(pkt), SMB_ssetpLM_len);
-    SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-    *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle -> pid);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle -> mid);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle -> uid);
-    *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 10;
-    *(SMB_Hdr(pkt) + SMB_hdr_axc_offset) = 0xFF;    /* No extra command */
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_axo_offset, 0);
-
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_mbs_offset, SMBLIB_MAX_XMIT);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_mmc_offset, 2);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_vcn_offset, Con_Handle -> pid);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpLM_snk_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_pwl_offset, pass_len + 1);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpLM_res_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_bcc_offset, param_len);
-
-    /* Now copy the param strings in with the right stuff */
-
-    p = (char *)(SMB_Hdr(pkt) + SMB_ssetpLM_buf_offset);
-
-    /* Copy  in password, then the rest. Password has a null at end */
-
-    memcpy(p, pword, pass_len);
-
-    p = p + pass_len + 1;
-
-    strcpy(p, UserName);
-    p = p + strlen(UserName);
-    *p = 0;
-
-    p = p + 1;
-
-    strcpy(p, Con_Handle -> PDomain);
-    p = p + strlen(Con_Handle -> PDomain);
-    *p = 0;
-    p = p + 1;
-
-    strcpy(p, Con_Handle -> OSName);
-    p = p + strlen(Con_Handle -> OSName);
-    *p = 0;
-
-  }
-  else {
-
-    /* We don't admit to UNICODE support ... */
-
-    param_len = strlen(UserName) + 1 + pass_len +
-                strlen(Con_Handle -> PDomain) + 1 +
-               strlen(Con_Handle -> OSName) + 1 +
-               strlen(Con_Handle -> LMType) + 1;
-
-    pkt_len = SMB_ssetpNTLM_len + param_len;
-
-    pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(pkt_len);
-
-    if (pkt == NULL) {
-
-      SMBlib_errno = SMBlibE_NoSpace;
-      return(-1); /* Should handle the error */
-
-    }
-
-    bzero(SMB_Hdr(pkt), SMB_ssetpNTLM_len);
-    SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-    *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle -> pid);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle -> mid);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle -> uid);
-    *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 13;
-    *(SMB_Hdr(pkt) + SMB_hdr_axc_offset) = 0xFF;    /* No extra command */
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_axo_offset, 0);
-
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_mbs_offset, SMBLIB_MAX_XMIT);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_mmc_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_vcn_offset, 0);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_snk_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_cipl_offset, pass_len);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_cspl_offset, 0);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_res_offset, 0);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_cap_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_bcc_offset, param_len);
-
-    /* Now copy the param strings in with the right stuff */
-
-    p = (char *)(SMB_Hdr(pkt) + SMB_ssetpNTLM_buf_offset);
-
-    /* Copy  in password, then the rest. Password has no null at end */
-
-    memcpy(p, pword, pass_len);
-
-    p = p + pass_len;
-
-    strcpy(p, UserName);
-    p = p + strlen(UserName);
-    *p = 0;
-
-    p = p + 1;
-
-    strcpy(p, Con_Handle -> PDomain);
-    p = p + strlen(Con_Handle -> PDomain);
-  *p = 0;
-    p = p + 1;
-
-    strcpy(p, Con_Handle -> OSName);
-    p = p + strlen(Con_Handle -> OSName);
-    *p = 0;
-    p = p + 1;
-
-    strcpy(p, Con_Handle -> LMType);
-    p = p + strlen(Con_Handle -> LMType);
-    *p = 0;
-
-  }
-
-  /* Now send it and get a response */
-
-  if (RFCNB_Send(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0){
-
-#ifdef DEBUG
-    fprintf(stderr, "Error sending SessSetupX request\n");
-#endif
-
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_SendFailed;
-    return(SMBlibE_BAD);
-
-  }
-
-  /* Now get the response ... */
-
-  if (RFCNB_Recv(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0) {
-
-#ifdef DEBUG
-    fprintf(stderr, "Error receiving response to SessSetupAndX\n");
-#endif
-
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_RecvFailed;
-    return(SMBlibE_BAD);
-
-  }
-
-  /* Check out the response type ... */
-
-  if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {  /* Process error */
-
-#ifdef DEBUG
-    fprintf(stderr, "SMB_SessSetupAndX failed with errorclass = %i, Error Code = %i\n",
-           CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset),
-           SVAL(SMB_Hdr(pkt), SMB_hdr_err_offset));
-#endif
-
-    SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_Remote;
-    return(SMBlibE_BAD);
-
-  }
-/** @@@ mdz: check for guest login { **/
-       if (SVAL(SMB_Hdr(pkt), SMB_ssetpr_act_offset) & 0x1)
-       {
-               /* do we allow guest login? NO! */
-               return(SMBlibE_BAD);
-
-       }
- /** @@@ mdz: } **/
-
-
-#ifdef DEBUG
-  fprintf(stderr, "SessSetupAndX response. Action = %i\n",
-          SVAL(SMB_Hdr(pkt), SMB_ssetpr_act_offset));
-#endif
-
-  /* Now pick up the UID for future reference ... */
-
-  Con_Handle -> uid = SVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset);
-  RFCNB_Free_Pkt(pkt);
-
-  return(0);
-
-}
-
-
-/* Disconnect from the server, and disconnect all tree connects */
-
-int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle)
-
-{
-
-  /* We just disconnect the connection for now ... */
-
-  RFCNB_Hangup(Con_Handle -> Trans_Connect);
-
-  if (!KeepHandle)
-    free(Con_Handle);
-
-  return(0);
-
-}
diff --git a/src/modules/rlm_smb/smblib.h b/src/modules/rlm_smb/smblib.h
deleted file mode 100644 (file)
index 67b5b9e..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/* UNIX SMBlib NetBIOS implementation
-
-   Version 1.0
-   SMBlib Defines
-
-   Copyright (C) Richard Sharpe 1996
-   Copyright 2006 The FreeRADIUS server project
-
-*/
-
-/*
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(smblib_h, "$Id$")
-
-#include "std-defines.h"
-#include "smblib-common.h"
-
-/* Just define all the entry points */
-
-/* Create a handle to allow us to set/override some parameters ...       */
-
-void *SMB_Create_Con_Handle();
-
-/* Connect to a server, but do not do a tree con etc ... */
-
-void *SMB_Connect_Server(void *Con, char *server, char *NTdomain);
-
-/* Connect to a server and give us back a handle. If Con == NULL, create */
-/* The handle and populate it with defaults                              */
-
-void *SMB_Connect(void *Con, void **tree,
-                 char *name, char *User, char *Password);
-
-/* Negotiate a protocol                                                  */
-
-int SMB_Negotiate(void *Con_Handle, char *Prots[]);
-
-/* Connect to a tree ...                                                 */
-
-void *SMB_TreeConnect(void *con_handle, void *tree_handle,
-                     char *path, char *password, char *dev);
-
-/* Disconnect a tree ...                                                 */
-
-int SMB_TreeDisconect(void *tree_handle);
-
-/* Open a file                                                           */
-
-void *SMB_Open(void *tree_handle,
-              void *file_handle,
-              char *file_name,
-              unsigned short mode,
-              unsigned short search);
-
-/* Close a file                                                          */
-
-int SMB_Close(void *file_handle);
-
-/* Disconnect from server. Has flag to specify whether or not we keep the */
-/* handle.                                                                */
-
-int SMB_Discon(void *Con, BOOL KeepHandle);
-
-void *SMB_Create(void *Tree_Handle,
-              void *File_Handle,
-              char *file_name,
-              short search);
-
-int SMB_Delete(void *tree, char *file_name, short search);
-
-int SMB_Create_Dir(void *tree, char *dir_name);
-
-int SMB_Delete_Dir(void *tree, char *dir_name);
-
-int SMB_Check_Dir(void *tree, char *dir_name);
-
-int SMB_Get_Last_Error();
-
-int SMB_Get_Last_SMB_Err();
-
-int SMB_Get_Error_Msg(int msg, char *msgbuf, int len);
-
-void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass,
-                        char *service, char *st);
-
-#define SMBLIB_DEFAULT_DOMAIN "anydom"
diff --git a/src/modules/rlm_smb/std-includes.h b/src/modules/rlm_smb/std-includes.h
deleted file mode 100644 (file)
index 1b21c75..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* RFCNB Standard includes ... */
-/*
-
-   RFCNB Standard Includes
-
-   Copyright (C) 1996, Richard Sharpe
-   Copyright 2006 The FreeRADIUS server project
-
-   One day we will conditionalize these on OS types ...
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <freeradius-devel/ident.h>
-RCSIDH(std_includes_h, "$Id$")
-
-#include "config.h"
-
-#define BOOL int
-typedef short int16;
-
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
-#include <signal.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
-/* Pick up define for INADDR_NONE */
-
-#ifndef INADDR_NONE
-#define INADDR_NONE -1
-#endif
diff --git a/src/modules/rlm_smb/valid.c b/src/modules/rlm_smb/valid.c
deleted file mode 100644 (file)
index a4af4b7..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * valid.c
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * Copyright 2000,2006  The FreeRADIUS server project
- */
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-#include <freeradius-devel/radiusd.h>
-
-#include <syslog.h>
-#include "smblib-priv.h"
-#include "valid.h"
-
-SMB_Handle_Type SMB_Connect_Server(void *, char *, char *);
-
-int Valid_User(char *USERNAME,char *PASSWORD,char *SERVER,char *BACKUP, char *DOMAIN)
-{
-  char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0",
-                           "MICROSOFT NETWORKS 1.03",
-                           "MICROSOFT NETWORKS 3.0",
-                           "LANMAN1.0",
-                           "LM1.2X002",
-                           "Samba",
-                           "NT LM 0.12",
-                           "NT LANMAN 1.0",
-                           NULL};
-  SMB_Handle_Type con;
-
-  SMB_Init();
-  con = SMB_Connect_Server(NULL, SERVER, DOMAIN);
-  if (con == NULL) { /* Error ... */
-   con = SMB_Connect_Server(NULL, BACKUP, DOMAIN);
-   if (con == NULL) {
-       return(NTV_SERVER_ERROR);
-   }
-  }
-  if (SMB_Negotiate(con, SMB_Prots) < 0) { /* An error */
-    SMB_Discon(con,0);
-    return(NTV_PROTOCOL_ERROR);
-  }
-  /* Test for a server in share level mode do not authenticate against it */
-  if (con -> Security == 0)
-    {
-      SMB_Discon(con,0);
-      return(NTV_PROTOCOL_ERROR);
-    }
-
-  if (SMB_Logon_Server(con, USERNAME, PASSWORD) < 0) {
-    SMB_Discon(con,0);
-    return(NTV_LOGON_ERROR);
-  }
-
-  SMB_Discon(con,0);
-  return(NTV_NO_ERROR);
-}
diff --git a/src/modules/rlm_smb/valid.h b/src/modules/rlm_smb/valid.h
deleted file mode 100644 (file)
index 25c132e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright 2006 The FreeRADIUS server project */
-
-#ifndef _VALID_H_
-#define _VALID_H_
-
-#include <freeradius-devel/ident.h>
-RCSIDH(valid_h, "$Id$")
-
-/* SMB User verification function */
-
-#define NTV_NO_ERROR 0
-#define NTV_SERVER_ERROR 1
-#define NTV_PROTOCOL_ERROR 2
-#define NTV_LOGON_ERROR 3
-
-int Valid_User(char *USERNAME,char *PASSWORD,char *SERVER, char *BACKUP, char *DOMAIN);
-
-#endif