Added: qpid/trunk/qpid/extras/sasl/configure.ac
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/sasl/configure.ac?rev=835550&view=auto
==============================================================================
--- qpid/trunk/qpid/extras/sasl/configure.ac (added)
+++ qpid/trunk/qpid/extras/sasl/configure.ac Thu Nov 12 21:16:59 2009
@@ -0,0 +1,317 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl This file is free software; as a special exception the author gives
+dnl unlimited permission to copy and/or distribute it, with or without
+dnl modifications, as long as this notice is preserved.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+dnl
+dnl When updating the name/version number here, also update it in
+dnl src/qpid/Version.h
+
+AC_INIT([saslwrapper], [0.1], [...@qpid.apache.org])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects])
+
+# Minimum Autoconf version required.
+AC_PREREQ(2.59)
+
+AC_CONFIG_HEADERS([config.h])
+
+AC_PROG_CC_STDC
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_USE_SYSTEM_EXTENSIONS
+AC_LANG([C++]) 
+
+# Check for optional use of help2man
+AC_CHECK_PROG([HELP2MAN], [help2man], [help2man])
+AC_ARG_WITH([help2man],
+  [AS_HELP_STRING([--with-help2man], [Use help2man to generate man pages.])],
+  [case "$withval" in
+    yes) test -z "$HELP2MAN" && AC_MSG_ERROR([help2man not found.]) ;;
+    no) HELP2MAN="" ;;
+    *)   AC_MSG_ERROR([Bad value ${withval} for --with-help2man.]) ;;
+   esac])
+AM_CONDITIONAL([HAVE_HELP2MAN], [test -n "$HELP2MAN"])
+
+# Check for optional use of doxygen
+AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
+AC_ARG_WITH([doxygen],
+  [AS_HELP_STRING([--with-doxygen], [Use doxygen to generate API 
documentation.])],
+  [case "$withval" in
+    yes) test -z "$DOXYGEN" && AC_MSG_ERROR([doxygen not found.]) ;;
+    no) DOXYGEN="" ;;
+    *)   AC_MSG_ERROR([Bad value ${withval} for --with-doxygen.]) ;;
+   esac])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
+
+AC_ARG_ENABLE(warnings,
+[  --enable-warnings   turn on lots of compiler warnings (recommended)],
+[case "${enableval}" in
+   yes|no) ;;
+   *)  AC_MSG_ERROR([bad value ${enableval} for warnings option]) ;;
+ esac],
+ [enableval=yes])
+
+# Set up for gcc as compiler
+if test x$GXX = xyes; then
+       # Warnings: Enable as many as possible, keep the code clean. Please
+       # do not disable warnings or remove -Werror without discussing on
+       # qpid-dev list.
+       #
+       # The following warnings are deliberately omitted, they warn on valid 
code.
+       # -Wunreachable-code -Wpadded -Winline
+       # -Wshadow - warns about boost headers.
+       if test "${enableval}" = yes; then
+           gl_COMPILER_FLAGS(-Werror)
+           gl_COMPILER_FLAGS(-pedantic)
+           gl_COMPILER_FLAGS(-Wall)
+           gl_COMPILER_FLAGS(-Wextra)
+           gl_COMPILER_FLAGS(-Wno-shadow)
+           gl_COMPILER_FLAGS(-Wpointer-arith)
+           gl_COMPILER_FLAGS(-Wcast-qual)
+           gl_COMPILER_FLAGS(-Wcast-align)
+           gl_COMPILER_FLAGS(-Wno-long-long)
+           gl_COMPILER_FLAGS(-Wvolatile-register-var)
+           gl_COMPILER_FLAGS(-Winvalid-pch)
+           gl_COMPILER_FLAGS(-Wno-system-headers)
+           gl_COMPILER_FLAGS(-Woverloaded-virtual)     
+           AC_SUBST([WARNING_CFLAGS], [$COMPILER_FLAGS])
+           AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for 
lint.])
+           COMPILER_FLAGS=
+       fi
+else
+       AC_CHECK_DECL([__SUNPRO_CC], [SUNCC=yes], [SUNCC=no])
+       
+       # Set up for sun CC compiler
+       if test x$SUNCC = xyes; then
+               if test "${enableval}" = yes; then
+                       WARNING_FLAGS=+w
+               fi
+               CXXFLAGS="$CXXFLAGS -library=stlport4 -mt"
+               LD="$CXX"
+               LDFLAGS="$LDFLAGS -library=stlport4 -mt"
+               AC_SUBST([SUNCC_RUNTIME_LIBS], [-lCrun])
+       fi
+fi
+
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+AC_SUBST([LIBTOOL_DEPS])
+
+# For libraries (libcommon) that use dlopen, dlerror, etc.,
+# test whether we need to link with -ldl.
+gl_saved_libs=$LIBS
+  AC_SEARCH_LIBS(dlopen, [dl],
+                [test "$ac_cv_search_dlopen" = "none required" ||
+                 LIB_DLOPEN=$ac_cv_search_dlopen])
+  AC_SUBST([LIB_DLOPEN])
+LIBS=$gl_saved_libs
+
+# Set the argument to be used in "libtool -version-info ARG".
+QPID_CURRENT=2
+QPID_REVISION=0
+QPID_AGE=0
+LIBTOOL_VERSION_INFO_ARG=$QPID_CURRENT:$QPID_REVISION:$QPID_AGE
+AC_SUBST(LIBTOOL_VERSION_INFO_ARG)
+
+gl_CLOCK_TIME
+
+# Enable Valgrind      
+AC_ARG_ENABLE([valgrind],
+  [AS_HELP_STRING([--enable-valgrind],
+    [run valgrind memory checker on tests, if available (default yes)])],
+  [case $enableval in
+    yes|no) enable_VALGRIND=$enableval;;
+    *) AC_MSG_ERROR([Invalid value for --enable-valgrind: $enableval]);;
+   esac],
+  [enable_VALGRIND=yes]
+)
+
+# We use valgrind for the tests.  See if it's available.
+# Check for it unconditionally, so we don't have to duplicate its
+# use of AC_SUBST([VALGRIND]).
+AC_CHECK_PROG([VALGRIND], [valgrind], [valgrind])
+test "$enable_VALGRIND" = no && VALGRIND=
+
+# If rpmlint is available we'll run it when building RPMs.
+AC_CHECK_PROG([RPMLINT], [rpmlint], [rpmlint])
+AM_CONDITIONAL([HAS_RPMLINT], [test -n "$RPMLINT"])
+
+# Code generation: generated code is included in the distribution
+# so code generation is only required in an svn checkout.
+# It requires several external tools and files, which we check for here.
+
+AC_CHECK_PROG([RUBY], [ruby], [ruby])
+test -n "$RUBY" && generate=yes
+test -z "$RUBY" && AC_MSG_ERROR([Missing ruby installation (try "yum install 
ruby").])
+
+# Swig binding generator is needed for the script (Ruby, Python, etc.) 
bindings.
+AC_PROG_SWIG(1.3.26)
+test ! -x "$SWIG" && SWIG=""
+AC_ARG_WITH([swig],
+  [AS_HELP_STRING([--with-swig], [Use swig to generate qmf bindings.])],
+  [case "$withval" in
+    yes) test -z "$SWIG" && AC_MSG_ERROR([swig not found.]) ;;
+    no) SWIG="" ;;
+    *)   AC_MSG_ERROR([Bad value ${withval} for --with-swig.]) ;;
+   esac])
+AM_CONDITIONAL([HAVE_SWIG], [test -n "$SWIG"])
+
+# Ruby bindings: To build ruby wrappers, the ruby-devel files must be present.
+
+AC_PATH_PROGS(RUBY, [ruby1.8 ruby], [])
+AC_ARG_VAR(RUBY, [Ruby interpreter])
+if test -n "$RUBY" ; then
+   AC_ARG_VAR(RUBY_INC, [Directory where ruby.h can be found])
+   if test -z "$RUBY_INC" ; then
+      [RUBY_INC=`$RUBY -rrbconfig -e 'puts Config::CONFIG["rubyhdrdir"] || 
Config::CONFIG["archdir"]'`]
+   fi
+   AC_SUBST(RUBY_INC)
+
+   AC_ARG_VAR(RUBY_INC_ARCH, [Directory where ruby/config.h can be found 
(needed from Ruby 1.9)])
+   if test -z "$RUBY_INC_ARCH" ; then
+      [RUBY_INC_ARCH=`$RUBY -rrbconfig -e 'd = Config::CONFIG["rubyhdrdir"];if 
d != nil; print d + "/" + Config::CONFIG["arch"]; end'`]
+      dnl For earlier versions, just make it the same as RUBY_INC.
+      test x"$RUBY_INC_ARCH" != x || RUBY_INC_ARCH=$RUBY_INC
+   fi
+   AC_SUBST(RUBY_INC_ARCH)
+   AC_ARG_VAR(RUBY_LIB, [Directory to install ruby files into])
+      if test -z "$RUBY_LIB" ; then
+      dnl Kludge to install ruby files under $prefix
+      [RUBY_LIB=`$RUBY -rrbconfig -e 'puts 
Config::CONFIG["sitelibdir"].gsub("/usr", "${prefix}")'`]
+   fi
+   AC_SUBST(RUBY_LIB)
+
+       AC_ARG_VAR(RUBY_LIB_ARCH, [Directory to install ruby binary modules 
into])
+       if test -z "$RUBY_LIB_ARCH" ; then
+      dnl Kludge to install ruby files under $prefix
+         [RUBY_LIB_ARCH=`$RUBY -rrbconfig -e 'puts 
Config::CONFIG["sitearchdir"].gsub("/usr", "${prefix}")'`]
+       fi
+       AC_SUBST(RUBY_LIB_ARCH)
+
+       RUBY_LIBS=
+       case $host_os in
+       cygwin*) RUBY_LIBS=-lruby ;;
+       esac
+       AC_SUBST(RUBY_LIBS)
+
+   RUBY_DLEXT=`$RUBY -rrbconfig -e 'puts Config::CONFIG[["DLEXT"]]'`
+   AC_SUBST(RUBY_DLEXT)
+fi
+AM_CONDITIONAL([HAVE_RUBY_DEVEL], [test -f $RUBY_INC/ruby.h && test -n 
"$SWIG"])
+
+# Python bindings: To build python wrappers, the ruby-devel files must be 
present.
+
+AM_PATH_PYTHON()
+if test -n "$PYTHON" ; then
+    AC_MSG_CHECKING([$PYTHON include dir])
+    if $PYTHON -c 'import distutils.sysconfig' 2>/dev/null ; then
+        PYTHON_INC=`$PYTHON -c 'import 
os,distutils.sysconfig;print(distutils.sysconfig.get_python_inc().replace(os.sep,"/"))'`
+       AC_SUBST(PYTHON_INC)
+    else
+        if test yes = "$with_python" ; then
+           AC_MSG_ERROR([Couldn't import Python module distutils.sysconfig - 
you probably need to install a python-dev or python-devel package])
+       else
+           AC_MSG_WARN([Couldn't import Python module distutils.sysconfig - 
you probably don't have a python-dev or python-devel package installed])
+       fi
+    fi
+    AC_MSG_RESULT([$PYTHON_INC])
+    AC_MSG_CHECKING([for directory to install python bindings in])
+    if test -z "$PYTHON_LIB" ; then
+         PYTHON_LIB=`$PYTHON -c 'import 
os,distutils.sysconfig;print(distutils.sysconfig.get_python_lib(1).replace(os.sep,"/"))'`
+    fi
+    AC_MSG_RESULT([$PYTHON_LIB])
+    AC_ARG_VAR(PYTHON_LIB, [Directory to install python bindings in])
+
+    AC_MSG_CHECKING([for python libraries to link against])
+       PYTHON_LIBS=`$PYTHON -c 'import 
os,sys;print("-L"+os.path.join(sys.path[[3]],"config")+" 
-lpython"+sys.version[[:3]])'`
+    AC_SUBST(PYTHON_LIBS)
+    AC_MSG_RESULT([$PYTHON_LIBS])
+fi
+AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test -f $PYTHON_INC/Python.h && test -n 
"$SWIG"])
+
+
+LIBS=$tmp_LIBS
+
+# Setup --with-sasl/--without-sasl as arguments to configure
+AC_ARG_WITH([sasl],
+  [AS_HELP_STRING([--with-sasl], [Build with SASL authentication support])],
+  [WANT_SASL="$withval"],
+  [WANT_SASL=check])
+
+# Make sure --with-sasl/--without-sasl were only give yes|no|check
+AS_IF([test "x$WANT_SASL" != xyes -a \
+            "x$WANT_SASL" != xno -a \
+            "x$WANT_SASL" != xcheck],
+  [AC_MSG_ERROR([Bad value for --with-sasl: $withval])])
+
+# If we weren't explicitly asked /not/ to test, i.e. not given --without-sasl
+have_sasl=no
+AS_IF([test "x$WANT_SASL" != xno],
+  # Perform tests for headers and libraries. Remember, AC_CHECK_LIB
+  # will give you some useful default behavior, e.g. setup LDFLAGS, if
+  # you do not give it a second argument, so try not to
+  [AC_CHECK_HEADER([sasl/sasl.h], , [HAVE_SASL_H=no])
+   tmp_LIBS=$LIBS
+   AC_CHECK_LIB([sasl2], [sasl_checkpass], , [HAVE_SASL_LIB=no])
+   # Remove from LIBS, we will link it explicitly in make files.
+   LIBS=$tmp_LIBS
+   # If any of the tests failed
+   AS_IF([test "x$HAVE_SASL_H" = xno -o \
+               "x$HAVE_SASL_LIB" = xno],
+     # And we were given --with, then fail
+     [AS_IF([test "x$WANT_SASL" = xyes],
+       [AC_MSG_ERROR([sasl requested but not available])])],
+     # Otherwise, no tests failed, setup AC_SUBST/AC_DEFINE/vars for 
AM_CONDITIONALs
+     [AC_DEFINE([BROKER_SASL_NAME], ["qpidd"],
+                [The SASL app name for the qpid Broker])
+      AC_DEFINE([HAVE_SASL], [1], [Enable if libsasl is present])
+      have_sasl=yes])])
+AM_CONDITIONAL([HAVE_SASL], [test "x$have_sasl" = xyes])
+
+
+#Guess host architecture, to choose platform-dependent objects
+case "$host" in
+     *sun-solaris*)
+        arch=solaris
+     ;;
+esac
+AM_CONDITIONAL([SUNOS], [test x$arch = xsolaris])
+
+# Check for some syslog capabilities not present in all systems
+AC_TRY_COMPILE([#include <sys/syslog.h>], 
+               [int v = LOG_AUTHPRIV;],
+               [AC_DEFINE([HAVE_LOG_AUTHPRIV], [1], [Set to 1 whether 
LOG_AUTHPRIV is supported.])],)
+
+AC_TRY_COMPILE([#include <sys/syslog.h>], 
+               [int v = LOG_FTP;],
+               [AC_DEFINE([HAVE_LOG_FTP], [1], [Set to 1 whether LOG_FTP is 
supported.])],)
+
+#Check if we need to include libacl to provide acl API
+gl_saved_libs=$LIBS
+  AC_SEARCH_LIBS(acl, [acl],
+                [test "$ac_cv_search_acl" = "none required" ||
+                 LIB_ACL=$ac_cv_search_acl])
+  AC_SUBST([LIB_ACL])
+LIBS=$gl_saved_libs
+
+SOCKLIBS=""
+AC_CHECK_LIB([socket],[socket],[SOCKET_LIB="-lsocket"],[SOCKET_LIB=""],[])
+AC_CHECK_LIB([nsl],[getipnodebyname],[NSL_LIB="-lnsl"],[NSL_LIB=""],[])
+SOCKLIBS="$SOCKET_LIB $NSL_LIB"
+AC_SUBST([SOCKLIBS])
+
+AM_PATH_PYTHON()
+
+# Files to generate    
+AC_CONFIG_FILES([
+  Makefile
+  src/Makefile
+  python/Makefile
+  ])
+AC_OUTPUT
+

Added: qpid/trunk/qpid/extras/sasl/m4/ac_pkg_swig.m4
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/sasl/m4/ac_pkg_swig.m4?rev=835550&view=auto
==============================================================================
--- qpid/trunk/qpid/extras/sasl/m4/ac_pkg_swig.m4 (added)
+++ qpid/trunk/qpid/extras/sasl/m4/ac_pkg_swig.m4 Thu Nov 12 21:16:59 2009
@@ -0,0 +1,118 @@
+# ===========================================================================
+#           http://www.nongnu.org/autoconf-archive/ac_pkg_swig.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AC_PROG_SWIG([major.minor.micro])
+#
+# DESCRIPTION
+#
+#   This macro searches for a SWIG installation on your system. If found you
+#   should call SWIG via $(SWIG). You can use the optional first argument to
+#   check if the version of the available SWIG is greater than or equal to
+#   the value of the argument. It should have the format: N[.N[.N]] (N is a
+#   number between 0 and 999. Only the first N is mandatory.)
+#
+#   If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that
+#   the swig package is this version number or higher.
+#
+#   In configure.in, use as:
+#
+#     AC_PROG_SWIG(1.3.17)
+#     SWIG_ENABLE_CXX
+#     SWIG_MULTI_MODULE_SUPPORT
+#     SWIG_PYTHON
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Sebastian Huber <sebastian-hu...@web.de>
+#   Copyright (c) 2008 Alan W. Irwin <ir...@beluga.phys.uvic.ca>
+#   Copyright (c) 2008 Rafael Laboissiere <raf...@laboissiere.net>
+#   Copyright (c) 2008 Andrew Collier <colli...@ukzn.ac.za>
+#
+#   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, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AC_PROG_SWIG],[
+        AC_PATH_PROG([SWIG],[swig])
+        if test -z "$SWIG" ; then
+                AC_MSG_WARN([cannot find 'swig' program. You should look at 
http://www.swig.org])
+                SWIG='echo "Error: SWIG is not installed. You should look at 
http://www.swig.org"; ; false'
+        elif test -n "$1" ; then
+                AC_MSG_CHECKING([for SWIG version])
+                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 
's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
+                AC_MSG_RESULT([$swig_version])
+                if test -n "$swig_version" ; then
+                        # Calculate the required version number components
+                        [required=$1]
+                        [required_major=`echo $required | sed 's/[^0-9].*//'`]
+                        if test -z "$required_major" ; then
+                                [required_major=0]
+                        fi
+                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
+                        [required_minor=`echo $required | sed 's/[^0-9].*//'`]
+                        if test -z "$required_minor" ; then
+                                [required_minor=0]
+                        fi
+                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
+                        [required_patch=`echo $required | sed 's/[^0-9].*//'`]
+                        if test -z "$required_patch" ; then
+                                [required_patch=0]
+                        fi
+                        # Calculate the available version number components
+                        [available=$swig_version]
+                        [available_major=`echo $available | sed 
's/[^0-9].*//'`]
+                        if test -z "$available_major" ; then
+                                [available_major=0]
+                        fi
+                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
+                        [available_minor=`echo $available | sed 
's/[^0-9].*//'`]
+                        if test -z "$available_minor" ; then
+                                [available_minor=0]
+                        fi
+                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
+                        [available_patch=`echo $available | sed 
's/[^0-9].*//'`]
+                        if test -z "$available_patch" ; then
+                                [available_patch=0]
+                        fi
+                        if test $available_major -ne $required_major \
+                                -o $available_minor -ne $required_minor \
+                                -o $available_patch -lt $required_patch ; then
+                                AC_MSG_WARN([SWIG version >= $1 is required.  
You have $swig_version.  You should look at http://www.swig.org])
+                                SWIG='echo "Error: SWIG version >= $1 is 
required.  You have '"$swig_version"'.  You should look at http://www.swig.org"; 
; false'
+                        else
+                                AC_MSG_NOTICE([SWIG executable is '$SWIG'])
+                                SWIG_LIB=`$SWIG -swiglib`
+                                AC_MSG_NOTICE([SWIG library directory is 
'$SWIG_LIB'])
+                        fi
+                else
+                        AC_MSG_WARN([cannot determine SWIG version])
+                        SWIG='echo "Error: Cannot determine SWIG version.  You 
should look at http://www.swig.org"; ; false'
+                fi
+        fi
+        AC_SUBST([SWIG_LIB])
+])

Added: qpid/trunk/qpid/extras/sasl/m4/clock_time.m4
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/sasl/m4/clock_time.m4?rev=835550&view=auto
==============================================================================
--- qpid/trunk/qpid/extras/sasl/m4/clock_time.m4 (added)
+++ qpid/trunk/qpid/extras/sasl/m4/clock_time.m4 Thu Nov 12 21:16:59 2009
@@ -0,0 +1,30 @@
+# clock_time.m4 serial 8
+dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME.
+# For a program named, say foo, you should add a line like the following
+# in the corresponding Makefile.am file:
+# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
+
+AC_DEFUN([gl_CLOCK_TIME],
+[
+  dnl Persuade glibc and Solaris <time.h> to declare these functions.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
+  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+
+  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
+  # programs in the package would end up linked with that potentially-shared
+  # library, inducing unnecessary run-time overhead.
+  gl_saved_libs=$LIBS
+    AC_SEARCH_LIBS(clock_gettime, [rt posix4],
+                   [test "$ac_cv_search_clock_gettime" = "none required" ||
+                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+    AC_SUBST([LIB_CLOCK_GETTIME])
+    AC_CHECK_FUNCS(clock_gettime clock_settime)
+  LIBS=$gl_saved_libs
+])

Added: qpid/trunk/qpid/extras/sasl/m4/compiler-flags.m4
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/sasl/m4/compiler-flags.m4?rev=835550&view=auto
==============================================================================
--- qpid/trunk/qpid/extras/sasl/m4/compiler-flags.m4 (added)
+++ qpid/trunk/qpid/extras/sasl/m4/compiler-flags.m4 Thu Nov 12 21:16:59 2009
@@ -0,0 +1,23 @@
+# serial 3
+# Find valid warning flags for the C Compiler.           -*-Autoconf-*-
+dnl Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl Written by Jesse Thilo.
+
+AC_DEFUN([gl_COMPILER_FLAGS],
+  [AC_MSG_CHECKING(whether compiler accepts $1)
+   AC_SUBST(COMPILER_FLAGS)
+   ac_save_CFLAGS="$CFLAGS"
+   CFLAGS="$CFLAGS $1"
+   ac_save_CXXFLAGS="$CXXFLAGS"
+   CXXFLAGS="$CXXFLAGS $1"
+   AC_TRY_COMPILE(,
+    [int x;],
+    COMPILER_FLAGS="$COMPILER_FLAGS $1"
+    AC_MSG_RESULT(yes),
+    AC_MSG_RESULT(no))
+  CFLAGS="$ac_save_CFLAGS"
+  CXXFLAGS="$ac_save_CXXFLAGS"
+ ])

Added: qpid/trunk/qpid/extras/sasl/m4/cppunit.m4
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/sasl/m4/cppunit.m4?rev=835550&view=auto
==============================================================================
--- qpid/trunk/qpid/extras/sasl/m4/cppunit.m4 (added)
+++ qpid/trunk/qpid/extras/sasl/m4/cppunit.m4 Thu Nov 12 21:16:59 2009
@@ -0,0 +1,89 @@
+dnl
+dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl
+AC_DEFUN([AM_PATH_CPPUNIT],
+[
+
+AC_ARG_WITH(cppunit-prefix,[  --with-cppunit-prefix=PFX   Prefix where CppUnit 
is installed (optional)],
+            cppunit_config_prefix="$withval", cppunit_config_prefix="")
+AC_ARG_WITH(cppunit-exec-prefix,[  --with-cppunit-exec-prefix=PFX  Exec prefix 
where CppUnit is installed (optional)],
+            cppunit_config_exec_prefix="$withval", 
cppunit_config_exec_prefix="")
+
+  if test x$cppunit_config_exec_prefix != x ; then
+     cppunit_config_args="$cppunit_config_args 
--exec-prefix=$cppunit_config_exec_prefix"
+     if test x${CPPUNIT_CONFIG+set} != xset ; then
+        CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
+     fi
+  fi
+  if test x$cppunit_config_prefix != x ; then
+     cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
+     if test x${CPPUNIT_CONFIG+set} != xset ; then
+        CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
+     fi
+  fi
+
+  AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
+  cppunit_version_min=$1
+
+  AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min)
+  no_cppunit=""
+  if test "$CPPUNIT_CONFIG" = "no" ; then
+    AC_MSG_RESULT(no)
+    no_cppunit=yes
+  else
+    CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
+    CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
+    cppunit_version=`$CPPUNIT_CONFIG --version`
+
+    cppunit_major_version=`echo $cppunit_version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    cppunit_minor_version=`echo $cppunit_version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    cppunit_micro_version=`echo $cppunit_version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+    cppunit_major_min=`echo $cppunit_version_min | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    if test "x${cppunit_major_min}" = "x" ; then
+       cppunit_major_min=0
+    fi
+
+    cppunit_minor_min=`echo $cppunit_version_min | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    if test "x${cppunit_minor_min}" = "x" ; then
+       cppunit_minor_min=0
+    fi
+
+    cppunit_micro_min=`echo $cppunit_version_min | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+    if test "x${cppunit_micro_min}" = "x" ; then
+       cppunit_micro_min=0
+    fi
+
+    cppunit_version_proper=`expr \
+        $cppunit_major_version \> $cppunit_major_min \| \
+        $cppunit_major_version \= $cppunit_major_min \& \
+        $cppunit_minor_version \> $cppunit_minor_min \| \
+        $cppunit_major_version \= $cppunit_major_min \& \
+        $cppunit_minor_version \= $cppunit_minor_min \& \
+        $cppunit_micro_version \>= $cppunit_micro_min `
+
+    if test "$cppunit_version_proper" = "1" ; then
+      
AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
+    else
+      AC_MSG_RESULT(no)
+      no_cppunit=yes
+    fi
+  fi
+
+  if test "x$no_cppunit" = x ; then
+     ifelse([$2], , :, [$2])
+  else
+     CPPUNIT_CFLAGS=""
+     CPPUNIT_LIBS=""
+     ifelse([$3], , :, [$3])
+  fi
+
+  AC_SUBST(CPPUNIT_CFLAGS)
+  AC_SUBST(CPPUNIT_LIBS)
+])

Added: qpid/trunk/qpid/extras/sasl/m4/extensions.m4
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/sasl/m4/extensions.m4?rev=835550&view=auto
==============================================================================
--- qpid/trunk/qpid/extras/sasl/m4/extensions.m4 (added)
+++ qpid/trunk/qpid/extras/sasl/m4/extensions.m4 Thu Nov 12 21:16:59 2009
@@ -0,0 +1,59 @@
+# serial 5  -*- Autoconf -*-
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# Autoconf.  Perhaps we can remove this once we can assume Autoconf
+# 2.61 or later everywhere, but since CVS Autoconf mutates rapidly
+# enough in this area it's likely we'll need to redefine
+# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+[
+  AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+  AC_BEFORE([$0], [AC_RUN_IFELSE])
+
+  AC_REQUIRE([AC_GNU_SOURCE])
+  AC_REQUIRE([AC_AIX])
+  AC_REQUIRE([AC_MINIX])
+
+  AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif])
+  AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+    [ac_cv_safe_to_define___extensions__],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([
+#        define __EXTENSIONS__ 1
+         AC_INCLUDES_DEFAULT])],
+       [ac_cv_safe_to_define___extensions__=yes],
+       [ac_cv_safe_to_define___extensions__=no])])
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    AC_DEFINE([__EXTENSIONS__])
+  AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+  AC_DEFINE([_TANDEM_SOURCE])
+])])
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
+  [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscr...@qpid.apache.org

Reply via email to