activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r592787 - /activemq/activemq-cpp/trunk/m4/ac_amqcpp_utils.m4
Date Wed, 07 Nov 2007 15:33:21 GMT
Author: tabish
Date: Wed Nov  7 07:33:19 2007
New Revision: 592787

URL: http://svn.apache.org/viewvc?rev=592787&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103

Added:
    activemq/activemq-cpp/trunk/m4/ac_amqcpp_utils.m4   (with props)

Added: activemq/activemq-cpp/trunk/m4/ac_amqcpp_utils.m4
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/m4/ac_amqcpp_utils.m4?rev=592787&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/m4/ac_amqcpp_utils.m4 (added)
+++ activemq/activemq-cpp/trunk/m4/ac_amqcpp_utils.m4 Wed Nov  7 07:33:19 2007
@@ -0,0 +1,75 @@
+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 -*-
+
+# AMQ_EXTERNAL_PROJECT_SETUP()
+# Internal helper for AMQ_EXTERNAL_PROJECT.
+AC_DEFUN([AMQ_EXTERNAL_PROJECT_SETUP], [
+  do_subdir_config="yes"
+  AC_ARG_ENABLE([subdir-config],
+    AC_HELP_STRING([--disable-subdir-config],
+                   [do not reconfigure packages in subdirectories]),
+    [if test "$enableval" = "no"; then do_subdir_config="no"; fi])
+  AC_SUBST([AMQ_EXTERNAL_PROJECT_SUBDIRS], [""])
+])
+
+# AMQ_EXTERNAL_PROJECT(SUBDIR [, ADDITIONAL-CONFIGURE-ARGS])
+# Setup SUBDIR as an external project. This means:
+# - Execute the configure script immediately at the point of macro invocation.
+# - Add SUBDIR to the substitution variable AMQ_EXTERNAL_PROJECT_SUBDIRS,
+#   for the Makefile.in to arrange to execute make in the subdir.
+#
+# Derived from APR_SUBDIR_CONFIG
+AC_DEFUN([AMQ_EXTERNAL_PROJECT], [
+  AC_REQUIRE([AMQ_EXTERNAL_PROJECT_SETUP])
+  AMQ_EXTERNAL_PROJECT_SUBDIRS="$AMQ_EXTERNAL_PROJECT_SUBDIRS $1"
+  if test "$do_subdir_config" = "yes" ; then
+    # save our work to this point; this allows the sub-package to use it
+    AC_CACHE_SAVE
+
+    AC_MSG_NOTICE([configuring package in $1 now])
+    ac_popdir=`pwd`
+    ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
+    apr_config_subdirs="$1"
+    test -d $1 || $MKDIR $1
+    cd $1
+
+    # A "../" for each directory in /$config_subdirs.
+    ac_dots=[`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`]
+
+    # Make the cache file name correct relative to the subdirectory.
+    case "$cache_file" in
+    /*) ac_sub_cache_file=$cache_file ;;
+    *) # Relative path.
+      ac_sub_cache_file="$ac_dots$cache_file" ;;
+    esac
+
+    # The eval makes quoting arguments work.
+    if eval $SHELL $ac_abs_srcdir/configure $ac_configure_args --cache-file=$ac_sub_cache_file
--srcdir=$ac_abs_srcdir $2
+    then :
+      echo "$1 configured properly"
+    else
+      echo "configure failed for $1"
+      exit 1
+    fi
+    cd $ac_popdir
+
+    # grab any updates from the sub-package
+    AC_CACHE_LOAD
+  else
+    AC_MSG_WARN([not running configure in $1])
+  fi
+])

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



Mime
View raw message