You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/04/26 16:14:23 UTC

svn commit: r768711 [2/2] - in /activemq/activemq-cpp/trunk/activemq-c: ./ assembly/ m4/ src/ src/main/ src/main/c/ src/test/ src/test/c/

Added: activemq/activemq-cpp/trunk/activemq-c/m4/find_apr.m4
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/m4/find_apr.m4?rev=768711&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/m4/find_apr.m4 (added)
+++ activemq/activemq-cpp/trunk/activemq-c/m4/find_apr.m4 Sun Apr 26 14:14:22 2009
@@ -0,0 +1,202 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl find_apr.m4 : locate the APR include files and libraries
+dnl
+dnl This macro file can be used by applications to find and use the APR
+dnl library. It provides a standardized mechanism for using APR. It supports
+dnl embedding APR into the application source, or locating an installed
+dnl copy of APR.
+dnl
+dnl APR_FIND_APR(srcdir, builddir, implicit-install-check, acceptable-majors,
+dnl              detailed-check)
+dnl
+dnl   where srcdir is the location of the bundled APR source directory, or
+dnl   empty if source is not bundled.
+dnl
+dnl   where builddir is the location where the bundled APR will will be built,
+dnl   or empty if the build will occur in the srcdir.
+dnl
+dnl   where implicit-install-check set to 1 indicates if there is no
+dnl   --with-apr option specified, we will look for installed copies.
+dnl
+dnl   where acceptable-majors is a space separated list of acceptable major
+dnl   version numbers. Often only a single major version will be acceptable.
+dnl   If multiple versions are specified, and --with-apr=PREFIX or the
+dnl   implicit installed search are used, then the first (leftmost) version
+dnl   in the list that is found will be used.  Currently defaults to [0 1].
+dnl
+dnl   where detailed-check is an M4 macro which sets the apr_acceptable to
+dnl   either "yes" or "no". The macro will be invoked for each installed
+dnl   copy of APR found, with the apr_config variable set appropriately.
+dnl   Only installed copies of APR which are considered acceptable by
+dnl   this macro will be considered found. If no installed copies are
+dnl   considered acceptable by this macro, apr_found will be set to either
+dnl   either "no" or "reconfig".
+dnl
+dnl Sets the following variables on exit:
+dnl
+dnl   apr_found : "yes", "no", "reconfig"
+dnl
+dnl   apr_config : If the apr-config tool exists, this refers to it. If
+dnl                apr_found is "reconfig", then the bundled directory
+dnl                should be reconfigured *before* using apr_config.
+dnl
+dnl Note: this macro file assumes that apr-config has been installed; it
+dnl       is normally considered a required part of an APR installation.
+dnl
+dnl If a bundled source directory is available and needs to be (re)configured,
+dnl then apr_found is set to "reconfig". The caller should reconfigure the
+dnl (passed-in) source directory, placing the result in the build directory,
+dnl as appropriate.
+dnl
+dnl If apr_found is "yes" or "reconfig", then the caller should use the
+dnl value of apr_config to fetch any necessary build/link information.
+dnl
+
+AC_DEFUN([APR_FIND_APR], [
+  apr_found="no"
+
+  if test "$target_os" = "os2-emx"; then
+    # Scripts don't pass test -x on OS/2
+    TEST_X="test -f"
+  else
+    TEST_X="test -x"
+  fi
+
+  ifelse([$4], [], [
+         ifdef(AC_WARNING,AC_WARNING([$0: missing argument 4 (acceptable-majors): Defaulting to APR 0.x then APR 1.x]))
+         acceptable_majors="0 1"],
+         [acceptable_majors="$4"])
+
+  apr_temp_acceptable_apr_config=""
+  for apr_temp_major in $acceptable_majors
+  do
+    case $apr_temp_major in
+      0)
+      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
+      ;;
+      *)
+      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
+      ;;
+    esac
+  done
+
+  AC_MSG_CHECKING(for APR)
+  AC_ARG_WITH(apr,
+  [  --with-apr=PATH         prefix for installed APR or the full path to 
+                             apr-config],
+  [
+    if test "$withval" = "no" || test "$withval" = "yes"; then
+      AC_MSG_ERROR([--with-apr requires a directory or file to be provided])
+    fi
+
+    for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
+    do
+      for lookdir in "$withval/bin" "$withval"
+      do
+        if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
+          apr_config="$lookdir/$apr_temp_apr_config_file"
+          ifelse([$5], [], [], [
+          apr_acceptable="yes"
+          $5
+          if test "$apr_acceptable" != "yes"; then
+            AC_MSG_WARN([Found APR in $apr_config, but we think it is considered unacceptable])
+            continue
+          fi])
+          apr_found="yes"
+          break 2
+        fi
+      done
+    done
+
+    if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
+      apr_config="$withval"
+      ifelse([$5], [], [apr_found="yes"], [
+          apr_acceptable="yes"
+          $5
+          if test "$apr_acceptable" = "yes"; then
+                apr_found="yes"
+          fi])
+    fi
+
+    dnl if --with-apr is used, it is a fatal error for its argument
+    dnl to be invalid
+    if test "$apr_found" != "yes"; then
+      AC_MSG_ERROR([the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.])
+    fi
+  ],[
+    dnl If we allow installed copies, check those before using bundled copy.
+    if test -n "$3" && test "$3" = "1"; then
+      for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
+      do
+        if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
+          apr_config="$apr_temp_apr_config_file"
+          ifelse([$5], [], [], [
+          apr_acceptable="yes"
+          $5
+          if test "$apr_acceptable" != "yes"; then
+            AC_MSG_WARN([skipped APR at $apr_config, version not acceptable])
+            continue
+          fi])
+          apr_found="yes"
+          break
+        else
+          dnl look in some standard places
+          for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
+            if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
+              apr_config="$lookdir/bin/$apr_temp_apr_config_file"
+              ifelse([$5], [], [], [
+              apr_acceptable="yes"
+              $5
+              if test "$apr_acceptable" != "yes"; then
+                AC_MSG_WARN([skipped APR at $apr_config, version not acceptable])
+                continue
+              fi])
+              apr_found="yes"
+              break 2
+            fi
+          done
+        fi
+      done
+    fi
+    dnl if we have not found anything yet and have bundled source, use that
+    if test "$apr_found" = "no" && test -d "$1"; then
+      apr_temp_abs_srcdir="`cd $1 && pwd`"
+      apr_found="reconfig"
+      apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/apr_version.h\"`"
+      case $apr_bundled_major in
+        "")
+          AC_MSG_ERROR([failed to find major version of bundled APR])
+        ;;
+        0)
+          apr_temp_apr_config_file="apr-config"
+        ;;
+        *)
+          apr_temp_apr_config_file="apr-$apr_bundled_major-config"
+        ;;
+      esac
+      if test -n "$2"; then
+        apr_config="$2/$apr_temp_apr_config_file"
+      else
+        apr_config="$1/$apr_temp_apr_config_file"
+      fi
+    fi
+  ])
+
+  AC_MSG_RESULT($apr_found)
+])

Propchange: activemq/activemq-cpp/trunk/activemq-c/m4/find_apr.m4
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/m4/find_apu.m4
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/m4/find_apu.m4?rev=768711&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/m4/find_apu.m4 (added)
+++ activemq/activemq-cpp/trunk/activemq-c/m4/find_apu.m4 Sun Apr 26 14:14:22 2009
@@ -0,0 +1,211 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl find_apu.m4 : locate the APR-util (APU) include files and libraries
+dnl
+dnl This macro file can be used by applications to find and use the APU
+dnl library. It provides a standardized mechanism for using APU. It supports
+dnl embedding APU into the application source, or locating an installed
+dnl copy of APU.
+dnl
+dnl APR_FIND_APU(srcdir, builddir, implicit-install-check, acceptable-majors,
+dnl              detailed-check)
+dnl
+dnl   where srcdir is the location of the bundled APU source directory, or
+dnl   empty if source is not bundled.
+dnl
+dnl   where builddir is the location where the bundled APU will be built,
+dnl   or empty if the build will occur in the srcdir.
+dnl
+dnl   where implicit-install-check set to 1 indicates if there is no
+dnl   --with-apr-util option specified, we will look for installed copies.
+dnl
+dnl   where acceptable-majors is a space separated list of acceptable major
+dnl   version numbers. Often only a single major version will be acceptable.
+dnl   If multiple versions are specified, and --with-apr-util=PREFIX or the
+dnl   implicit installed search are used, then the first (leftmost) version
+dnl   in the list that is found will be used.  Currently defaults to [0 1].
+dnl
+dnl   where detailed-check is an M4 macro which sets the apu_acceptable to
+dnl   either "yes" or "no". The macro will be invoked for each installed
+dnl   copy of APU found, with the apu_config variable set appropriately.
+dnl   Only installed copies of APU which are considered acceptable by
+dnl   this macro will be considered found. If no installed copies are
+dnl   considered acceptable by this macro, apu_found will be set to either
+dnl   either "no" or "reconfig".
+dnl
+dnl Sets the following variables on exit:
+dnl
+dnl   apu_found : "yes", "no", "reconfig"
+dnl
+dnl   apu_config : If the apu-config tool exists, this refers to it.  If
+dnl                apu_found is "reconfig", then the bundled directory
+dnl                should be reconfigured *before* using apu_config.
+dnl
+dnl Note: this macro file assumes that apr-config has been installed; it
+dnl       is normally considered a required part of an APR installation.
+dnl
+dnl Note: At this time, we cannot find *both* a source dir and a build dir.
+dnl       If both are available, the build directory should be passed to
+dnl       the --with-apr-util switch.
+dnl
+dnl Note: the installation layout is presumed to follow the standard
+dnl       PREFIX/lib and PREFIX/include pattern. If the APU config file
+dnl       is available (and can be found), then non-standard layouts are
+dnl       possible, since it will be described in the config file.
+dnl
+dnl If a bundled source directory is available and needs to be (re)configured,
+dnl then apu_found is set to "reconfig". The caller should reconfigure the
+dnl (passed-in) source directory, placing the result in the build directory,
+dnl as appropriate.
+dnl
+dnl If apu_found is "yes" or "reconfig", then the caller should use the
+dnl value of apu_config to fetch any necessary build/link information.
+dnl
+
+AC_DEFUN([APR_FIND_APU], [
+  apu_found="no"
+
+  if test "$target_os" = "os2-emx"; then
+    # Scripts don't pass test -x on OS/2
+    TEST_X="test -f"
+  else
+    TEST_X="test -x"
+  fi
+
+  ifelse([$4], [],
+  [
+    ifdef(AC_WARNING,([$0: missing argument 4 (acceptable-majors): Defaulting to APU 0.x then APU 1.x]))
+    acceptable_majors="0 1"
+  ], [acceptable_majors="$4"])
+
+  apu_temp_acceptable_apu_config=""
+  for apu_temp_major in $acceptable_majors
+  do
+    case $apu_temp_major in
+      0)
+      apu_temp_acceptable_apu_config="$apu_temp_acceptable_apu_config apu-config"
+      ;;
+      *)
+      apu_temp_acceptable_apu_config="$apu_temp_acceptable_apu_config apu-$apu_temp_major-config"
+      ;;
+    esac
+  done
+
+  AC_MSG_CHECKING(for APR-util)
+  AC_ARG_WITH(apr-util,
+  [  --with-apr-util=PATH    prefix for installed APU or the full path to 
+                             apu-config],
+  [
+    if test "$withval" = "no" || test "$withval" = "yes"; then
+      AC_MSG_ERROR([--with-apr-util requires a directory or file to be provided])
+    fi
+
+    for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
+    do
+      for lookdir in "$withval/bin" "$withval"
+      do
+        if $TEST_X "$lookdir/$apu_temp_apu_config_file"; then
+          apu_config="$lookdir/$apu_temp_apu_config_file"
+          ifelse([$5], [], [], [
+          apu_acceptable="yes"
+          $5
+          if test "$apu_acceptable" != "yes"; then
+            AC_MSG_WARN([Found APU in $apu_config, but it is considered unacceptable])
+            continue
+          fi])
+          apu_found="yes"
+          break 2
+        fi
+      done
+    done
+
+    if test "$apu_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
+      apu_config="$withval"
+      ifelse([$5], [], [apu_found="yes"], [
+          apu_acceptable="yes"
+          $5
+          if test "$apu_acceptable" = "yes"; then
+                apu_found="yes"
+          fi])
+    fi
+
+    dnl if --with-apr-util is used, it is a fatal error for its argument
+    dnl to be invalid
+    if test "$apu_found" != "yes"; then
+      AC_MSG_ERROR([the --with-apr-util parameter is incorrect. It must specify an install prefix, a build directory, or an apu-config file.])
+    fi
+  ],[
+    if test -n "$3" && test "$3" = "1"; then
+      for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
+      do
+        if $apu_temp_apu_config_file --help > /dev/null 2>&1 ; then
+          apu_config="$apu_temp_apu_config_file" 
+          ifelse([$5], [], [], [
+          apu_acceptable="yes"
+          $5
+          if test "$apu_acceptable" != "yes"; then
+            AC_MSG_WARN([skipped APR-util at $apu_config, version not acceptable])
+            continue
+          fi])
+          apu_found="yes"
+          break
+        else
+          dnl look in some standard places (apparently not in builtin/default)
+          for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
+            if $TEST_X "$lookdir/bin/$apu_temp_apu_config_file"; then
+              apu_config="$lookdir/bin/$apu_temp_apu_config_file"
+              ifelse([$5], [], [], [
+              apu_acceptable="yes"
+              $5
+              if test "$apu_acceptable" != "yes"; then
+                AC_MSG_WARN([skipped APR-util at $apu_config, version not acceptable])
+                continue
+              fi])
+              apu_found="yes"
+              break 2
+            fi
+          done
+        fi
+      done
+    fi
+    dnl if we have not found anything yet and have bundled source, use that
+    if test "$apu_found" = "no" && test -d "$1"; then
+      apu_temp_abs_srcdir="`cd $1 && pwd`"
+      apu_found="reconfig"
+      apu_bundled_major="`sed -n '/#define.*APU_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/apu_version.h\"`"
+      case $apu_bundled_major in
+        "")
+          AC_MSG_ERROR([failed to find major version of bundled APU])
+        ;;
+        0)
+          apu_temp_apu_config_file="apu-config"
+        ;;
+        *)
+          apu_temp_apu_config_file="apu-$apu_bundled_major-config"
+        ;;
+      esac
+      if test -n "$2"; then
+        apu_config="$2/$apu_temp_apu_config_file"
+      else
+        apu_config="$1/$apu_temp_apu_config_file"
+      fi
+    fi
+  ])
+
+  AC_MSG_RESULT($apu_found)
+])

Propchange: activemq/activemq-cpp/trunk/activemq-c/m4/find_apu.m4
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/m4/find_cppunit.m4
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/m4/find_cppunit.m4?rev=768711&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/m4/find_cppunit.m4 (added)
+++ activemq/activemq-cpp/trunk/activemq-c/m4/find_cppunit.m4 Sun Apr 26 14:14:22 2009
@@ -0,0 +1,106 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Copyright 2002-2005 The Apache Software Foundation or its licensors, as
+dnl applicable.
+dnl
+dnl Licensed under the Apache License, Version 2.0 (the "License");
+dnl you may not use this file except in compliance with the License.
+dnl You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl -------------------------------------------------------- -*- autoconf -*-
+
+dnl
+dnl AMQ_FIND_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl
+AC_DEFUN([AMQ_FIND_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)
+])

Propchange: activemq/activemq-cpp/trunk/activemq-c/m4/find_cppunit.m4
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/m4/find_decaf.m4
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/m4/find_decaf.m4?rev=768711&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/m4/find_decaf.m4 (added)
+++ activemq/activemq-cpp/trunk/activemq-c/m4/find_decaf.m4 Sun Apr 26 14:14:22 2009
@@ -0,0 +1,146 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl
+dnl find_decaf.m4 : locate the decaf include files and libraries
+dnl
+dnl This macro file can be used by applications to find and use the Decaf
+dnl library. It provides a standardized mechanism for using Decaf. It supports
+dnl embedding Decaf into the application source, or locating an installed
+dnl copy of Decaf.
+dnl
+dnl DECAF_FIND_DECAF(srcdir, builddir, implicit-install-check, acceptable-majors)
+dnl
+dnl   where srcdir is the location of the bundled Decaf source directory, or
+dnl   empty if source is not bundled.
+dnl
+dnl   where builddir is the location where the bundled Decaf will will be built,
+dnl   or empty if the build will occur in the srcdir.
+dnl
+dnl   where implicit-install-check set to 1 indicates if there is no
+dnl   --with-decaf option specified, we will look for installed copies.
+dnl
+dnl   where acceptable-majors is a space separated list of acceptable major
+dnl   version numbers. Often only a single major version will be acceptable.
+dnl   If multiple versions are specified, and --with-decaf=PREFIX or the
+dnl   implicit installed search are used, then the first (leftmost) version
+dnl   in the list that is found will be used.  Currently defaults to [0 1].
+dnl
+dnl Sets the following variables on exit:
+dnl
+dnl   decaf_found : "yes", "no", "reconfig"
+dnl
+dnl   decaf_config : If the decaf-config tool exists, this refers to it. If
+dnl                  decaf_found is "reconfig", then the bundled directory
+dnl                  should be reconfigured *before* using decaf_config.
+dnl
+dnl Note: this macro file assumes that decaf-config has been installed; it
+dnl       is normally considered a required part of an Decaf installation.
+dnl
+dnl If a bundled source directory is available and needs to be (re)configured,
+dnl then decaf_found is set to "reconfig". The caller should reconfigure the
+dnl (passed-in) source directory, placing the result in the build directory,
+dnl as appropriate.
+dnl
+dnl If decaf_found is "yes" or "reconfig", then the caller should use the
+dnl value of decaf_config to fetch any necessary build/link information.
+dnl
+
+AC_DEFUN([DECAF_FIND_DECAF], [
+  decaf_found="no"
+
+  if test "$target_os" = "os2-emx"; then
+    # Scripts don't pass test -x on OS/2
+    TEST_X="test -f"
+  else
+    TEST_X="test -x"
+  fi
+
+  ifelse([$4], [], [
+         ifdef(AC_WARNING,AC_WARNING([$0: missing argument 4 (acceptable-majors): Defaulting to DECAF 0.x then DECAF 1.x]))
+         acceptable_majors="0 1"],
+         [acceptable_majors="$4"])
+
+  decaf_temp_acceptable_decaf_config="decaf-config"
+
+  AC_MSG_CHECKING(for DECAF)
+  AC_ARG_WITH(decaf,
+  [  --with-decaf=PATH         prefix for installed Decaf, path to Decaf build tree,
+                               or the full path to decaf-config],
+  [
+    if test "$withval" = "no" || test "$withval" = "yes"; then
+      AC_MSG_ERROR([--with-decaf requires a directory or file to be provided])
+    fi
+
+    for decaf_temp_decaf_config_file in $decaf_temp_acceptable_decaf_config
+    do
+      for lookdir in "$withval/bin" "$withval"
+      do
+        if $TEST_X "$lookdir/$decaf_temp_decaf_config_file"; then
+          decaf_found="yes"
+          decaf_config="$lookdir/$decaf_temp_decaf_config_file"
+          break 2
+        fi
+      done
+    done
+
+    if test "$decaf_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
+      decaf_found="yes"
+      decaf_config="$withval"
+    fi
+
+    dnl if --with-decaf is used, it is a fatal error for its argument
+    dnl to be invalid
+    if test "$decaf_found" != "yes"; then
+      AC_MSG_ERROR([the --with-decaf parameter is incorrect. It must specify an install prefix, a build directory, or an decaf-config file.])
+    fi
+  ],[
+    dnl If we allow installed copies, check those before using bundled copy.
+    if test -n "$3" && test "$3" = "1"; then
+      for decaf_temp_decaf_config_file in $decaf_temp_acceptable_decaf_config
+      do
+        if $decaf_temp_decaf_config_file --help > /dev/null 2>&1 ; then
+          decaf_found="yes"
+          decaf_config="$decaf_temp_decaf_config_file"
+          break
+        else
+          dnl look in some standard places
+          for lookdir in /usr /usr/local /usr/local/decaf /opt/decaf; do
+            if $TEST_X "$lookdir/bin/$decaf_temp_decaf_config_file"; then
+              decaf_found="yes"
+              decaf_config="$lookdir/bin/$decaf_temp_decaf_config_file"
+              break 2
+            fi
+          done
+        fi
+      done
+    fi
+    dnl if we have not found anything yet and have bundled source, use that
+    if test "$decaf_found" = "no" && test -d "$1"; then
+      decaf_temp_abs_srcdir="`cd $1 && pwd`"
+      decaf_found="reconfig"
+      decaf_temp_decaf_config_file="decaf-config"
+
+      if test -n "$2"; then
+        decaf_config="$2/$decaf_temp_decaf_config_file"
+      else
+        decaf_config="$1/$decaf_temp_decaf_config_file"
+      fi
+    fi
+  ])
+
+  AC_MSG_RESULT($decaf_found)
+])

Propchange: activemq/activemq-cpp/trunk/activemq-c/m4/find_decaf.m4
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/pom.xml?rev=768711&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/pom.xml (added)
+++ activemq/activemq-cpp/trunk/activemq-c/pom.xml Sun Apr 26 14:14:22 2009
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.activemq</groupId>
+    <artifactId>activemq-cpp-parent</artifactId>
+    <version>3.0-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+
+  <artifactId>activemq-c-library</artifactId>
+  <packaging>pom</packaging>
+  <name>ActiveMQ-CPP C Wrapper Library</name>
+  <description>The ActiveMQ-C Library</description>
+  <version>3.0-SNAPSHOT</version>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.activemq.maven</groupId>
+        <artifactId>maven-cpptools-plugin</artifactId>
+        <inherited>false</inherited>
+        <executions>
+          <execution>
+            <id>Integration-Test-Makefile</id>
+            <configuration>
+              <outputDirectory>${basedir}/src/test-integration/c/</outputDirectory>
+              <template>${basedir}/src/test-integration/c/Makefile.maven</template>
+              <sources>
+                <directory>${basedir}/src/test-integration/c</directory>
+                <includes>
+                  <includes>**\*.cpp</includes>
+                </includes>
+              </sources>
+              <headers>
+                <directory>${basedir}/src/test-integration/c</directory>
+                <includes>
+                  <includes>**\*.h</includes>
+                </includes>
+              </headers>
+            </configuration>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>makefile</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>Test-Makefile</id>
+            <configuration>
+              <outputDirectory>${basedir}/src/test/c</outputDirectory>
+              <template>${basedir}/src/test/c/Makefile.maven</template>
+              <sources>
+                <directory>${basedir}/src/test/c</directory>
+                <includes>
+                  <includes>**\*.cpp</includes>
+                </includes>
+              </sources>
+              <headers>
+                <directory>${basedir}/src/test/c</directory>
+                <includes>
+                  <includes>**\*.h</includes>
+                </includes>
+              </headers>
+            </configuration>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>makefile</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>Main-Makefile</id>
+            <configuration>
+              <outputDirectory>${basedir}/src/main/c/</outputDirectory>
+              <template>${basedir}/src/main/c/Makefile.maven</template>
+              <sources>
+                <directory>${basedir}/src/main/c</directory>
+                <includes>
+                  <includes>**\*.c</includes>
+                </includes>
+              </sources>
+              <headers>
+                <directory>${basedir}/src/main/c</directory>
+                <includes>
+                  <includes>**\*.h</includes>
+                </includes>
+              </headers>
+            </configuration>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>makefile</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>assembly/source.xml</descriptor>
+          </descriptors>
+          <tarLongFileMode>gnu</tarLongFileMode>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-gpg-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>verify</phase>
+            <goals>
+              <goal>sign</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: activemq/activemq-cpp/trunk/activemq-c/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.maven
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.maven?rev=768711&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.maven (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.maven Sun Apr 26 14:14:22 2009
@@ -0,0 +1,38 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+cc_sources = \
+    ${source}
+
+h_sources = \
+    ${headers}
+
+##
+## Compiler / Linker Info
+##
+
+lib_LTLIBRARIES= libactivemq-c.la
+libactivemq_c_la_SOURCES= $(h_sources) $(cc_sources)
+libactivemq_c_la_CXXFLAGS= $(AMQ_CXXFLAGS)
+libactivemq_c_la_LDFLAGS= -version-info $(ACTIVEMQ_LIBRARY_VERSION)
+libactivemq_c_la_LIBADD= $(AMQ_LIBS)
+
+##
+## Packaging Info
+##
+library_includedir=$(includedir)/$(ACTIVEMQ_LIBRARY_NAME)-$(ACTIVEMQ_VERSION)
+nobase_library_include_HEADERS = $(h_sources)

Added: activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.maven
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.maven?rev=768711&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.maven (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.maven Sun Apr 26 14:14:22 2009
@@ -0,0 +1,35 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+cc_sources = \
+    ${source}
+
+h_sources = \
+    ${headers}
+
+## Compile this as part of make check
+check_PROGRAMS = activemqc-test
+
+## Also run the tests as part of make check
+TESTS = $(check_PROGRAMS)
+
+## 
+## Compiler/Linker Options
+##
+activemqc_test_SOURCES = $(cc_sources)
+activemqc_test_CXXFLAGS = $(AMQ_TEST_CXXFLAGS) -I$(srcdir)/../main @CPPUNIT_CFLAGS@
+activemqc_test_LDADD= $(AMQ_TEST_LIBS) @CPPUNIT_LIBS@