summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-04-22 20:40:47 +0000
committerStephen D. Huston <shuston@apache.org>2009-04-22 20:40:47 +0000
commit8d32b03448e8e1ba6319fc0ac484d0ab54b29b38 (patch)
treefe3d4b1414664df2983fbe77ea083dd63d3c8012
parenta972ef826158ffcfd48d50f2afeff5b6f04f8c29 (diff)
downloadqpid-python-8d32b03448e8e1ba6319fc0ac484d0ab54b29b38.tar.gz
Re-enable autoconf-based build in rubygen and migrate to use of specific MODULE_DIR and CONF_FILE macros
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/cmake@767651 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xqpid/cpp/rubygen/generate72
-rw-r--r--qpid/cpp/src/Makefile.am4
-rw-r--r--qpid/cpp/src/config.h.in201
-rw-r--r--qpid/cpp/src/ssl.mk2
4 files changed, 216 insertions, 63 deletions
diff --git a/qpid/cpp/rubygen/generate b/qpid/cpp/rubygen/generate
index 775bd3fd58..0ce1fec46a 100755
--- a/qpid/cpp/rubygen/generate
+++ b/qpid/cpp/rubygen/generate
@@ -26,7 +26,8 @@ require 'amqpgen'
if ARGV.size < 3
puts <<EOS
Usage: #{ARGV[0]} OUTDIR SPEC.xml [ ... ] TEMPLATE.rb [ ... ]
-or: #{ARGV[0]} OUTDIR SPEC.xml [ ... ] all [ makefragment.cmake ]
+or: #{ARGV[0]} OUTDIR SPEC.xml [ ... ] all [ makefragment.mk |
+ makefragment.cmake ]
Parse all SPEC.xml files to create an AMQP model, run each TEMPLATE
putting the resulting files under OUTDIR. Prints a list of files
@@ -77,15 +78,18 @@ templates.each { |t|
}
def cmake_continue(lines) lines.join(" \n "); end
+def make_continue(lines) lines.join(" \\\n "); end
# Generate makefile
-makefile=ARGV.grep(/.cmake$/)[0]
-if makefile
+makefile=ARGV.grep(/.mk$/)[0]
+cmakefile=ARGV.grep(/.cmake$/)[0]
+if cmakefile || makefile
dir=Dir.getwd
Dir.chdir File.dirname(__FILE__)
generator_files=Dir["**/*.rb"] << File.basename(__FILE__)
Dir.chdir dir
- rgen_generator=generator_files.map{ |f| "${rgen_dir}/#{f}" }
+ rgen_generator=generator_files.map{ |f| "$(rgen_dir)/#{f}" }
+ cmake_rgen_generator=generator_files.map{ |f| "${rgen_dir}/#{f}" }
rgen_srcs=GenFiles.get.map{ |f| "#{$outdir}/#{f}" }
rgen_subdirs={}
rgen_srcs.each { |src|
@@ -95,31 +99,61 @@ if makefile
rgen_subdirs[subdir] << src
end
}
- File.open(makefile, 'w') { |out|
- out << <<EOS
+ if (makefile)
+ File.open(makefile, 'w') { |out|
+ out << <<EOS
# Generated makefile fragment.
# Including makefile defines $(rgen_dir) $(rgen_cmd) and $(specs).
-set(rgen_generator #{cmake_continue rgen_generator})
+rgen_generator=#{make_continue rgen_generator}
EOS
- rgen_subdirs.each_key { |subdir|
- out << "\nset(rgen_#{subdir}_srcs #{cmake_continue(rgen_subdirs[subdir])})\n"
- }
- out << <<EOS
-set(rgen_srcs #{cmake_continue rgen_srcs})
+ rgen_subdirs.each_key { |subdir|
+ out << "\nrgen_#{subdir}_srcs = #{make_continue(rgen_subdirs[subdir])}\n"
+ }
+ out << <<EOS
+rgen_srcs=#{make_continue rgen_srcs}
# Header file install rules.
EOS
- ["amqp_0_10", "framing", "client/no_keyword","client", "broker"].each { |ns|
- dir="qpid/#{ns}"
- dir_ = dir.tr("/", "_")
- regex=%r|#{dir}/[^/]+\.h$|
+ ["amqp_0_10", "framing", "client/no_keyword","client", "broker"].each { |ns|
+ dir="qpid/#{ns}"
+ dir_ = dir.tr("/", "_")
+ regex=%r|#{dir}/[^/]+\.h$|
+ out << <<EOS
+#{dir_}dir = $(includedir)/#{dir}
+dist_#{dir_}_HEADERS = #{make_continue rgen_srcs.grep(regex)}
+
+EOS
+ } # each
+ } # File makefile
+ end # if (makefile)
+
+ if (cmakefile)
+ File.open(cmakefile, 'w') { |out|
+ out << <<EOS
+# Generated makefile fragment.
+# Including makefile defines ${rgen_dir} ${rgen_cmd} and ${specs}.
+
+set(rgen_generator #{cmake_continue cmake_rgen_generator})
+EOS
+ rgen_subdirs.each_key { |subdir|
+ out << "\nset(rgen_#{subdir}_srcs #{cmake_continue(rgen_subdirs[subdir])})\n"
+ }
out << <<EOS
+set(rgen_srcs #{cmake_continue rgen_srcs})
+
+# Header file install rules.
+EOS
+ ["amqp_0_10", "framing", "client/no_keyword","client", "broker"].each { |ns|
+ dir="qpid/#{ns}"
+ dir_ = dir.tr("/", "_")
+ regex=%r|#{dir}/[^/]+\.h$|
+ out << <<EOS
set(#{dir_}dir \${includedir}/#{dir})
set(dist_#{dir_}_HEADERS #{cmake_continue rgen_srcs.grep(regex)})
EOS
- }
- }
+ } # each
+ } # File makefile
+ end # if (makefile)
end
-
diff --git a/qpid/cpp/src/Makefile.am b/qpid/cpp/src/Makefile.am
index 7de05645fa..3ac1992e2f 100644
--- a/qpid/cpp/src/Makefile.am
+++ b/qpid/cpp/src/Makefile.am
@@ -106,8 +106,8 @@ AM_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO_ARG)
INCLUDES = -Igen -I$(srcdir)/gen
## Automake macros to build libraries and executables.
-qpidd_CXXFLAGS = $(AM_CXXFLAGS) -DMODULE_DIR=\"$(dmoduledir)\" -DCONF_FILE=\"$(sysconfdir)/qpidd.conf\"
-libqpidclient_la_CXXFLAGS = $(AM_CXXFLAGS) -DMODULE_DIR=\"$(cmoduledir)\" -DCONF_FILE=\"$(confdir)/qpidc.conf\"
+qpidd_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDD_MODULE_DIR=\"$(dmoduledir)\" -DQPIDD_CONF_FILE=\"$(sysconfdir)/qpidd.conf\"
+libqpidclient_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_MODULE_DIR=\"$(cmoduledir)\" -DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\"
qpidd_LDADD = \
libqpidbroker.la \
diff --git a/qpid/cpp/src/config.h.in b/qpid/cpp/src/config.h.in
index 9ce1f5a188..a1cae75447 100644
--- a/qpid/cpp/src/config.h.in
+++ b/qpid/cpp/src/config.h.in
@@ -1,41 +1,160 @@
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed 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.
- *
- */
-
-/*
- * This file is automatically generated and will be overwritten by the
- * next CMake invocation.
- */
-
-#ifndef QPID_CONFIG_H
-#define QPID_CONFIG_H
-
-#cmakedefine QPIDC_CONF_FILE "${QPIDC_CONF_FILE}"
-#cmakedefine QPIDD_CONF_FILE "${QPIDD_CONF_FILE}"
-
-#cmakedefine QPIDC_MODULE_DIR "${QPIDC_MODULE_DIR}"
-#cmakedefine QPIDD_MODULE_DIR "${QPIDD_MODULE_DIR}"
-
-#cmakedefine QPID_HAS_CLOCK_GETTIME
-
-#cmakedefine QPID_HAS_SASL
-#cmakedefine BROKER_SASL_NAME "${BROKER_SASL_NAME}"
-
-#cmakedefine HAVE_LOG_AUTHPRIV
-#cmakedefine HAVE_LOG_FTP
-
-#endif /* QPID_CONFIG_H */
+/* src/config.h.in. Generated from configure.ac by autoheader. */
+
+/* The SASL app name for the qpid Broker */
+#undef BROKER_SASL_NAME
+
+/* Define to 1 if you have the <boost/shared_ptr.hpp> header file. */
+#undef HAVE_BOOST_SHARED_PTR_HPP
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the `clock_settime' function. */
+#undef HAVE_CLOCK_SETTIME
+
+/* Define to 1 if you have the <corosync/cpg.h> header file. */
+#undef HAVE_COROSYNC_CPG_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <infiniband/verbs.h> header file. */
+#undef HAVE_INFINIBAND_VERBS_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <libcman.h> header file. */
+#undef HAVE_LIBCMAN_H
+
+/* Define to 1 if you have the `ibverbs' library (-libverbs). */
+#undef HAVE_LIBIBVERBS
+
+/* Define to 1 if you have the `rdmacm' library (-lrdmacm). */
+#undef HAVE_LIBRDMACM
+
+/* Define to 1 if you have the `sasl2' library (-lsasl2). */
+#undef HAVE_LIBSASL2
+
+/* Define to 1 if you have the `xerces-c' library (-lxerces-c). */
+#undef HAVE_LIBXERCES_C
+
+/* Define to 1 if you have the `xqilla' library (-lxqilla). */
+#undef HAVE_LIBXQILLA
+
+/* Set to 1 whether LOG_AUTHPRIV is supported. */
+#undef HAVE_LOG_AUTHPRIV
+
+/* Set to 1 whether LOG_FTP is supported. */
+#undef HAVE_LOG_FTP
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <openais/cpg.h> header file. */
+#undef HAVE_OPENAIS_CPG_H
+
+/* Define to 1 if you have the <port.h> header file. */
+#undef HAVE_PORT_H
+
+/* Define to 1 if you have the <rdma/rdma_cma.h> header file. */
+#undef HAVE_RDMA_RDMA_CMA_H
+
+/* Enable if libsasl is present */
+#undef HAVE_SASL
+
+/* 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/epoll.h> header file. */
+#undef HAVE_SYS_EPOLL_H
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#undef HAVE_SYS_POLL_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 <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <uuid/uuid.h> header file. */
+#undef HAVE_UUID_UUID_H
+
+/* Compile-in XML Exchange support. */
+#undef HAVE_XML
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of package */
+#undef PACKAGE
+
+/* 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
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* 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
+
+/* Define to 1 if the compiler is checking for lint. */
+#undef lint
diff --git a/qpid/cpp/src/ssl.mk b/qpid/cpp/src/ssl.mk
index 5b0ef3d8ae..fa94814f75 100644
--- a/qpid/cpp/src/ssl.mk
+++ b/qpid/cpp/src/ssl.mk
@@ -56,7 +56,7 @@ sslconnector_la_LIBADD = \
libqpidclient.la \
libsslcommon.la
-sslconnector_la_CXXFLAGS = $(AM_CXXFLAGS) -DCONF_FILE=\"$(confdir)/qpidc.conf\"
+sslconnector_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\"
sslconnector_la_LDFLAGS = $(PLUGINLDFLAGS)