Thread: [asycxx-devel] [PATCH] asycxx pre-build
Status: Alpha
Brought to you by:
joe_steeve
|
From: Karthik B. <ka...@hi...> - 2009-02-16 14:32:16
|
Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac (revision 3)
+++ trunk/configure.ac (working copy)
@@ -1,68 +1,11 @@
-AC_INIT([hmi-ctrl], [0.1], jo...@hi...)
+AC_INIT([asycxx], [0.1], jo...@hi...)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AC_PREFIX_DEFAULT(/opt/asycxx)
+
CFLAGS="-Wall -Werror"
CXXFLAGS="-Wall -Werror"
-dnl setup the debug level
-AC_ARG_WITH(verbose-level,
- AS_HELP_STRING([--with-verbose-level],
- [Use the given debug level (0 to 3) 0=disable]),
- [hmi_ctrl_with_verbose_level=$withval],)
-
-if test $hmi_ctrl_with_verbose_level; then
- HMI_CTRL_verbose_level=$hmi_ctrl_with_verbose_level
-else
- HMI_CTRL_verbose_level=2
-fi
-AC_DEFINE_UNQUOTED(HMI_CTRL_VERBOSE_LEVEL, $HMI_CTRL_verbose_level,
- [Controls the amount of logs])
-
-dnl SCM revision tag
-HMI_CTRL_revision=`svn info | grep "^Revision" | cut -d' ' -f 2 -s`
-if [[ "$HMI_CTRL_revision" = "" ]]; then
- HMI_CTRL_revision="unknown"
-fi
-AC_DEFINE_UNQUOTED(HMI_CTRL_REVISION, "$HMI_CTRL_revision",
- [SCM revision number])
-
-dnl setup a release tag
-AC_ARG_WITH(release-tag,
- AS_HELP_STRING([--with-release-tag],
- [Release tag to associate with the build]),
- [HMI_CTRL_release_tag=$withval],)
-
-if test -z $HMI_CTRL_release_tag; then
- HMI_CTRL_release_tag="<DEBUG:Rev=$HMI_CTRL_revision>"
-fi
-AC_DEFINE_UNQUOTED(HMI_CTRL_RELEASE_TAG, "$HMI_CTRL_release_tag",
- [Release tag associated with the build])
-
-
-dnl setup the acw-common
-ACW_COMMON_Folder=`pwd`/../acw-common
-CFLAGS="$CFLAGS -I $ACW_COMMON_Folder"
-CXXFLAGS="$CXXFLAGS -I $ACW_COMMON_Folder"
-dnl setup the hmi-common
-HMI_COMMON_Folder=`pwd`/../hmi-common
-CFLAGS="$CFLAGS -I $HMI_COMMON_Folder"
-CXXFLAGS="$CXXFLAGS -I $HMI_COMMON_Folder"
-
-dnl enable/disable sanity checks
-AC_ARG_ENABLE(sanity-checks,
- AS_HELP_STRING([--enable-sanity-checks],
- [Enable all sanity checks]),
- [
- if [[ "$enableval" = "yes" ]]; then
- HMI_CTRL_sanity_checks=1
- else
- HMI_CTRL_sanity_checks=0
- fi
- ],
- [HMI_CTRL_sanity_checks=1])
-AC_DEFINE_UNQUOTED(ENABLE_SANITY_CHECKS, $HMI_CTRL_sanity_checks,
- [Enable/Disable sanity checks])
-
dnl check for libhdb-tinyxml
PKG_CHECK_MODULES(HDB_TINYXML, hdb-tinyxml-1.0)
AC_SUBST(HDB_TINYXML_CFLAGS)
@@ -74,10 +17,33 @@
AC_PROG_CXX
AC_GNU_SOURCE
+AC_PROG_LIBTOOL
-AC_CONFIG_HEADERS([hmi-ctrl-config.h])
+AC_CONFIG_HEADERS([asycxx-config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
+include/Makefile
+asycxx-0.1.pc
])
+AC_CONFIG_LINKS(src/Logger.h:include/asycxx/Logger.h
+ src/Error.h:include/asycxx/Error.h
+ src/Deferred.h:include/asycxx/Deferred.h
+ src/RefCounter.h:include/asycxx/RefCounter.h
+ src/DataBuffer.h:include/asycxx/DataBuffer.h
+ src/Reactor.h:include/asycxx/Reactor.h
+ src/SelectReactor.h:include/asycxx/SelectReactor.h
+ src/Timer.h:include/asycxx/Timer.h
+ src/Transport.h:include/asycxx/Transport.h
+ src/Listener.h:include/asycxx/Listener.h
+ src/TCPTransport.h:include/asycxx/TCPTransport.h
+ src/TCPListener.h:include/asycxx/TCPListener.h
+ src/TCPLLTransport.h:include/asycxx/TCPLLTransport.h
+ src/Protocol.h:include/asycxx/Protocol.h
+ src/Factory.h:include/asycxx/Factory.h
+ src/MsgBus.h:include/asycxx/MsgBus.h
+ src/MsgHandler.h:include/asycxx/MsgHandler.h
+ src/GimpleMsgBus.h:include/asycxx/GimpleMsgBus.h
+ src/XMLParser.h:include/asycxx/XMLParser.h
+ src/asycxx-log.h:include/asycxx/asycxx-log.h)
AC_OUTPUT
Index: trunk/src/Deferred.cxx
===================================================================
--- trunk/src/Deferred.cxx (revision 3)
+++ trunk/src/Deferred.cxx (working copy)
@@ -13,14 +13,14 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <stdlib.h>
#include <errno.h>
#include <string.h>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Deferred.h"
Index: trunk/src/Timer.cxx
===================================================================
--- trunk/src/Timer.cxx (revision 3)
+++ trunk/src/Timer.cxx (working copy)
@@ -39,12 +39,12 @@
*/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <vector>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Timer.h"
Index: trunk/src/core.cxx
===================================================================
--- trunk/src/core.cxx (revision 3)
+++ trunk/src/core.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <sys/time.h>
@@ -22,7 +22,7 @@
#include <unistd.h>
#include <fcntl.h>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
h_msecs_t
Index: trunk/src/TCPLLTransport.cxx
===================================================================
--- trunk/src/TCPLLTransport.cxx (revision 3)
+++ trunk/src/TCPLLTransport.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <errno.h>
@@ -23,7 +23,7 @@
#include <netinet/in.h>
#include <netinet/tcp.h>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Protocol.h"
#include "TCPLLTransport.h"
Index: trunk/src/Transport.cxx
===================================================================
--- trunk/src/Transport.cxx (revision 3)
+++ trunk/src/Transport.cxx (working copy)
@@ -13,12 +13,12 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <unistd.h>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Transport.h"
#include "Protocol.h"
Index: trunk/src/GimpleMsgBus.cxx
===================================================================
--- trunk/src/GimpleMsgBus.cxx (revision 3)
+++ trunk/src/GimpleMsgBus.cxx (working copy)
@@ -11,13 +11,13 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <string.h>
#include <arpa/inet.h>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Transport.h"
Index: trunk/src/SelectReactor.cxx
===================================================================
--- trunk/src/SelectReactor.cxx (revision 3)
+++ trunk/src/SelectReactor.cxx (working copy)
@@ -13,14 +13,14 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <sys/select.h>
#include <errno.h>
#include <string.h>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "SelectReactor.h"
Index: trunk/src/XMLParser.cxx
===================================================================
--- trunk/src/XMLParser.cxx (revision 3)
+++ trunk/src/XMLParser.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <stdio.h>
@@ -21,7 +21,7 @@
#include <errno.h>
#include "XMLParser.h"
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include <hdb-tinyxml/tinyxml.h>
Index: trunk/src/Logger.cxx
===================================================================
--- trunk/src/Logger.cxx (revision 3)
+++ trunk/src/Logger.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <stdio.h>
Index: trunk/src/MsgHandler.cxx
===================================================================
--- trunk/src/MsgHandler.cxx (revision 3)
+++ trunk/src/MsgHandler.cxx (working copy)
@@ -11,10 +11,10 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "MsgHandler.h"
Index: trunk/src/Listener.cxx
===================================================================
--- trunk/src/Listener.cxx (revision 3)
+++ trunk/src/Listener.cxx (working copy)
@@ -13,11 +13,11 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Listener.h"
Index: trunk/src/Error.cxx
===================================================================
--- trunk/src/Error.cxx (revision 3)
+++ trunk/src/Error.cxx (working copy)
@@ -13,14 +13,14 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <execinfo.h>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
void
Index: trunk/src/TCPListener.cxx
===================================================================
--- trunk/src/TCPListener.cxx (revision 3)
+++ trunk/src/TCPListener.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <sys/types.h>
@@ -26,7 +26,7 @@
#include <errno.h>
#include <unistd.h>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Factory.h"
#include "Protocol.h"
Index: trunk/src/Reactor.cxx
===================================================================
--- trunk/src/Reactor.cxx (revision 3)
+++ trunk/src/Reactor.cxx (working copy)
@@ -21,13 +21,13 @@
*/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <unistd.h>
#include <exception>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Reactor.h"
#include "Deferred.h"
Index: trunk/src/MsgBus.cxx
===================================================================
--- trunk/src/MsgBus.cxx (revision 3)
+++ trunk/src/MsgBus.cxx (working copy)
@@ -11,10 +11,10 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "MsgBus.h"
#include "MsgHandler.h"
Index: trunk/src/Protocol.cxx
===================================================================
--- trunk/src/Protocol.cxx (revision 3)
+++ trunk/src/Protocol.cxx (working copy)
@@ -13,11 +13,11 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Protocol.h"
Index: trunk/src/DataBuffer.cxx
===================================================================
--- trunk/src/DataBuffer.cxx (revision 3)
+++ trunk/src/DataBuffer.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include "DataBuffer.h"
Index: trunk/src/TCPTransport.cxx
===================================================================
--- trunk/src/TCPTransport.cxx (revision 3)
+++ trunk/src/TCPTransport.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <errno.h>
@@ -24,7 +24,7 @@
#include <sys/socket.h>
#include <errno.h>
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Protocol.h"
#include "TCPTransport.h"
Index: trunk/src/Factory.cxx
===================================================================
--- trunk/src/Factory.cxx (revision 3)
+++ trunk/src/Factory.cxx (working copy)
@@ -13,11 +13,11 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "Reactor.h"
#include "Factory.h"
Index: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am (revision 3)
+++ trunk/src/Makefile.am (working copy)
@@ -1,40 +1,28 @@
# -*- mode: makefile; indent-tabs-mode: nil; tab-width: 4; -*-
-AM_LDFLAGS = -lpthread $(HDB_TINYXML_LIBS) -rdynamic
-AM_CXXFLAGS = \
- -DHMI_CTRL_CONFIGDIR=\"$(sysconfdir)/hmi-ctrl/\" \
- -DHMI_CTRL_DATADIR=\"$(pkgdatadir)/data/\" \
- $(HDB_TINYXML_CFLAGS)
+lib_LTLIBRARIES = libasycxx-0.1.la
-
-bin_PROGRAMS = hmi-ctrl hmi-ctrl.debug
-
-hmi_ctrl_SOURCES = \
- Logger.cxx Logger.h \
- Error.cxx Error.h \
- Deferred.cxx Deferred.h \
- RefCounter.cxx RefCounter.h \
- DataBuffer.cxx DataBuffer.h \
- Reactor.cxx Reactor.h \
- SelectReactor.cxx SelectReactor.h \
- Timer.cxx Timer.h \
- Transport.cxx Transport.h \
- Listener.cxx Listener.h \
- TCPTransport.cxx TCPTransport.h \
- TCPListener.cxx TCPListener.h \
- TCPLLTransport.cxx TCPLLTransport.h \
- Protocol.cxx Protocol.h \
- Factory.cxx Factory.h \
- MsgBus.cxx MsgBus.h \
- MsgHandler.cxx MsgHandler.h \
- GimpleMsgBus.cxx GimpleMsgBus.h \
- XMLParser.cxx XMLParser.h \
- Config.cxx Config.h \
- App.cxx App.h \
- hmi-ctrl.cxx hmi-ctrl.h \
+libasycxx_0_1_la_SOURCES = \
+ Logger.cxx \
+ Error.cxx \
+ Deferred.cxx.h \
+ RefCounter.cxx \
+ DataBuffer.cxx \
+ Reactor.cxx \
+ SelectReactor.cxx \
+ Timer.cxx \
+ Transport.cxx \
+ Listener.cxx \
+ TCPTransport.cxx \
+ TCPListener.cxx \
+ TCPLLTransport.cxx \
+ Protocol.cxx \
+ Factory.cxx \
+ MsgBus.cxx \
+ MsgHandler.cxx \
+ GimpleMsgBus.cxx \
+ XMLParser.cxx \
core.cxx
-hmi_ctrl_CXXFLAGS = -O2 $(AM_CXXFLAGS)
-
-hmi_ctrl_debug_SOURCES = $(hmi_ctrl_SOURCES)
-hmi_ctrl_debug_CXXFLAGS = -g $(AM_CXXFLAGS)
+libasycxx_0_1_la_CXXFLAGS = -O2 $(HDB_TINYXML_CFLAGS)
+libasycxx_0_1_la_LDFLAGS = -version-info 0:1:0
Index: trunk/src/RefCounter.cxx
===================================================================
--- trunk/src/RefCounter.cxx (revision 3)
+++ trunk/src/RefCounter.cxx (working copy)
@@ -13,10 +13,10 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx-log.h"
#include "Error.h"
#include "RefCounter.h"
Index: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am (revision 3)
+++ trunk/Makefile.am (working copy)
@@ -1,5 +1,5 @@
# -*- mode: makefile; indent-tabs-mode: nil; tab-width: 4; -*-
-configdir = $(sysconfdir)/hmi-ctrl
-dist_config_DATA = hmi-ctrl-config.xml.sample
+SUBDIRS = src include
-SUBDIRS = src
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = asycxx-0.1.pc
Index: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh (revision 3)
+++ trunk/autogen.sh (working copy)
@@ -2,5 +2,6 @@
echo "Generating build necessaries..."
aclocal
+libtoolize --force
automake --add-missing
autoconf |
|
From: Joe S. <js...@hi...> - 2009-02-17 10:45:53
|
Karthik Balakrishnan wrote: > .. > -dnl setup the debug level > -AC_ARG_WITH(verbose-level, > - AS_HELP_STRING([--with-verbose-level], > - [Use the given debug level (0 to 3) 0=disable]), > - [hmi_ctrl_with_verbose_level=$withval],) > - > -if test $hmi_ctrl_with_verbose_level; then > - HMI_CTRL_verbose_level=$hmi_ctrl_with_verbose_level > -else > - HMI_CTRL_verbose_level=2 > -fi > -AC_DEFINE_UNQUOTED(HMI_CTRL_VERBOSE_LEVEL, $HMI_CTRL_verbose_level, > - [Controls the amount of logs]) This configuration option controls what LOGs are getting printed on the console. This needs to stay. > -dnl setup a release tag > -AC_ARG_WITH(release-tag, > - AS_HELP_STRING([--with-release-tag], > - [Release tag to associate with the build]), > - [HMI_CTRL_release_tag=$withval],) > - > -if test -z $HMI_CTRL_release_tag; then > - HMI_CTRL_release_tag="<DEBUG:Rev=$HMI_CTRL_revision>" > -fi > -AC_DEFINE_UNQUOTED(HMI_CTRL_RELEASE_TAG, "$HMI_CTRL_release_tag", > - [Release tag associated with the build]) We might need this for library versioning. But for now I guess we can simply ignore it. > -dnl enable/disable sanity checks > -AC_ARG_ENABLE(sanity-checks, > - AS_HELP_STRING([--enable-sanity-checks], > - [Enable all sanity checks]), > - [ > - if [[ "$enableval" = "yes" ]]; then > - HMI_CTRL_sanity_checks=1 > - else > - HMI_CTRL_sanity_checks=0 > - fi > - ], > - [HMI_CTRL_sanity_checks=1]) > -AC_DEFINE_UNQUOTED(ENABLE_SANITY_CHECKS, $HMI_CTRL_sanity_checks, > - [Enable/Disable sanity checks]) I remember putting some checks inside the code based on this macro. These checks are there for debugging. This needs to stay. > -#include "hmi-ctrl.h" > +#include "asycxx-log.h" call this header as "asycxx.h". This is an internal header. This need not be put in a separate folder and installed while installing the dev files. > Index: trunk/Makefile.am > =================================================================== > --- trunk/Makefile.am (revision 3) > +++ trunk/Makefile.am (working copy) > @@ -1,5 +1,5 @@ > # -*- mode: makefile; indent-tabs-mode: nil; tab-width: 4; -*- > -configdir = $(sysconfdir)/hmi-ctrl > -dist_config_DATA = hmi-ctrl-config.xml.sample > +SUBDIRS = src include > > -SUBDIRS = src > +pkgconfigdir = $(libdir)/pkgconfig > +pkgconfig_DATA = asycxx-0.1.pc > Index: trunk/autogen.sh Hmm. Does 'make install' install the headers and the .la file also? -- Joe Steeve HiPro IT Solutions Pvt. Ltd. http://hipro.co.in/ |
|
From: Karthik B. <ka...@hi...> - 2009-02-17 17:02:23
|
On Tue, Feb 17, 2009 at 4:15 PM, Joe Steeve <js...@hi...> wrote: > ... This needs to stay. All that needs to stay will be added again including the library versioning thing. > call this header as "asycxx.h". changes will be done. > This is an internal header. This need not be put in a separate folder and installed while installing the dev > files. The macros in asycxx.h might be useful.. Are you sure you don't want this file to be available for development? > Hmm. Does 'make install' install the headers and the .la file also? > Yups. It does install both -- Karthik HiPro IT Solutions Pvt. Ltd. http://hipro.co.in/ |
|
From: Joe S. <js...@hi...> - 2009-02-18 06:02:08
|
Karthik Balakrishnan wrote: > All that needs to stay will be added again including the library versioning > thing. Yeah, actually that would be better. We can get the things we need back after the basic library gets to shape. > This is an internal header. This need not be put in a > separate folder and installed while installing the dev > files. > The macros in asycxx.h might be useful.. Are you sure you > don't want this file to be available for development? The macros in that file are controlled by the configure command line. It basically controls the level of logs generated by the library. So, those macros are irrelevant to an application that is using the library. The application should be defining such macros in its code base. The application can probably use the asycxx library's logger. However, those convenience macros are asycxx specific. -- Joe Steeve HiPro IT Solutions Pvt. Ltd. http://hipro.co.in/ |
|
From: Karthik B. <ka...@hi...> - 2009-02-18 08:27:05
|
On Wed, Feb 18, 2009 at 11:31 AM, Joe Steeve <js...@hi...> wrote: > Yeah, actually that would be better. We can get the things we need back > after the basic library gets to shape. > The macros ... are asycxx specific. > I'll resend the patch this evening with the changes. Sorry on the delay.. -- Karthik HiPro IT Solutions Pvt. Ltd. http://hipro.co.in/ |
|
From: Karthik B. <ka...@hi...> - 2009-02-19 17:26:52
|
Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac (revision 3)
+++ trunk/configure.ac (working copy)
@@ -1,6 +1,8 @@
-AC_INIT([hmi-ctrl], [0.1], jo...@hi...)
+AC_INIT([asycxx], [0.1], jo...@hi...)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AC_PREFIX_DEFAULT(/opt/asycxx)
+
CFLAGS="-Wall -Werror"
CXXFLAGS="-Wall -Werror"
@@ -8,59 +10,49 @@
AC_ARG_WITH(verbose-level,
AS_HELP_STRING([--with-verbose-level],
[Use the given debug level (0 to 3) 0=disable]),
- [hmi_ctrl_with_verbose_level=$withval],)
+ [asycxx_with_verbose_level=$withval],)
-if test $hmi_ctrl_with_verbose_level; then
- HMI_CTRL_verbose_level=$hmi_ctrl_with_verbose_level
+if test $asycxx_with_verbose_level; then
+ ASYCXX_verbose_level=$asycxx_with_verbose_level
else
- HMI_CTRL_verbose_level=2
+ ASYCXX_verbose_level=2
fi
-AC_DEFINE_UNQUOTED(HMI_CTRL_VERBOSE_LEVEL, $HMI_CTRL_verbose_level,
+AC_DEFINE_UNQUOTED(ASYCXX_VERBOSE_LEVEL, $ASYCXX_verbose_level,
[Controls the amount of logs])
dnl SCM revision tag
-HMI_CTRL_revision=`svn info | grep "^Revision" | cut -d' ' -f 2 -s`
-if [[ "$HMI_CTRL_revision" = "" ]]; then
- HMI_CTRL_revision="unknown"
+ASYCXX_revision=`svn info | grep "^Revision" | cut -d' ' -f 2 -s`
+if [[ "$ASYCXX_revision" = "" ]]; then
+ ASYCXX_revision="unknown"
fi
-AC_DEFINE_UNQUOTED(HMI_CTRL_REVISION, "$HMI_CTRL_revision",
+AC_DEFINE_UNQUOTED(ASYCXX_REVISION, "$ASYCXX_revision",
[SCM revision number])
dnl setup a release tag
AC_ARG_WITH(release-tag,
AS_HELP_STRING([--with-release-tag],
[Release tag to associate with the build]),
- [HMI_CTRL_release_tag=$withval],)
+ [ASYCXX_release_tag=$withval],)
-if test -z $HMI_CTRL_release_tag; then
- HMI_CTRL_release_tag="<DEBUG:Rev=$HMI_CTRL_revision>"
+if test -z $ASYCXX_release_tag; then
+ ASYCXX_release_tag="<DEBUG:Rev=$ASYCXX_revision>"
fi
-AC_DEFINE_UNQUOTED(HMI_CTRL_RELEASE_TAG, "$HMI_CTRL_release_tag",
+AC_DEFINE_UNQUOTED(ASYCXX_RELEASE_TAG, "$ASYCXX_release_tag",
[Release tag associated with the build])
-
-dnl setup the acw-common
-ACW_COMMON_Folder=`pwd`/../acw-common
-CFLAGS="$CFLAGS -I $ACW_COMMON_Folder"
-CXXFLAGS="$CXXFLAGS -I $ACW_COMMON_Folder"
-dnl setup the hmi-common
-HMI_COMMON_Folder=`pwd`/../hmi-common
-CFLAGS="$CFLAGS -I $HMI_COMMON_Folder"
-CXXFLAGS="$CXXFLAGS -I $HMI_COMMON_Folder"
-
dnl enable/disable sanity checks
AC_ARG_ENABLE(sanity-checks,
AS_HELP_STRING([--enable-sanity-checks],
[Enable all sanity checks]),
[
if [[ "$enableval" = "yes" ]]; then
- HMI_CTRL_sanity_checks=1
+ ASYCXX_sanity_checks=1
else
- HMI_CTRL_sanity_checks=0
+ ASYCXX_sanity_checks=0
fi
],
- [HMI_CTRL_sanity_checks=1])
-AC_DEFINE_UNQUOTED(ENABLE_SANITY_CHECKS, $HMI_CTRL_sanity_checks,
+ [ASYCXX_sanity_checks=1])
+AC_DEFINE_UNQUOTED(ENABLE_SANITY_CHECKS, $ASYCXX_sanity_checks,
[Enable/Disable sanity checks])
dnl check for libhdb-tinyxml
@@ -74,10 +66,33 @@
AC_PROG_CXX
AC_GNU_SOURCE
+AC_PROG_LIBTOOL
-AC_CONFIG_HEADERS([hmi-ctrl-config.h])
+AC_CONFIG_HEADERS([asycxx-config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
+include/Makefile
+asycxx-0.1.pc
])
+AC_CONFIG_LINKS(src/Logger.h:include/asycxx/Logger.h
+ src/Error.h:include/asycxx/Error.h
+ src/Deferred.h:include/asycxx/Deferred.h
+ src/RefCounter.h:include/asycxx/RefCounter.h
+ src/DataBuffer.h:include/asycxx/DataBuffer.h
+ src/Reactor.h:include/asycxx/Reactor.h
+ src/SelectReactor.h:include/asycxx/SelectReactor.h
+ src/Timer.h:include/asycxx/Timer.h
+ src/Transport.h:include/asycxx/Transport.h
+ src/Listener.h:include/asycxx/Listener.h
+ src/TCPTransport.h:include/asycxx/TCPTransport.h
+ src/TCPListener.h:include/asycxx/TCPListener.h
+ src/TCPLLTransport.h:include/asycxx/TCPLLTransport.h
+ src/Protocol.h:include/asycxx/Protocol.h
+ src/Factory.h:include/asycxx/Factory.h
+ src/MsgBus.h:include/asycxx/MsgBus.h
+ src/MsgHandler.h:include/asycxx/MsgHandler.h
+ src/GimpleMsgBus.h:include/asycxx/GimpleMsgBus.h
+ src/XMLParser.h:include/asycxx/XMLParser.h
+ src/asycxx.h:include/asycxx/asycxx.h)
AC_OUTPUT
Index: trunk/src/Deferred.cxx
===================================================================
--- trunk/src/Deferred.cxx (revision 3)
+++ trunk/src/Deferred.cxx (working copy)
@@ -13,14 +13,14 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <stdlib.h>
#include <errno.h>
#include <string.h>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Deferred.h"
Index: trunk/src/Timer.cxx
===================================================================
--- trunk/src/Timer.cxx (revision 3)
+++ trunk/src/Timer.cxx (working copy)
@@ -39,12 +39,12 @@
*/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <vector>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Timer.h"
Index: trunk/src/core.cxx
===================================================================
--- trunk/src/core.cxx (revision 3)
+++ trunk/src/core.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <sys/time.h>
@@ -22,7 +22,7 @@
#include <unistd.h>
#include <fcntl.h>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
h_msecs_t
Index: trunk/src/TCPLLTransport.cxx
===================================================================
--- trunk/src/TCPLLTransport.cxx (revision 3)
+++ trunk/src/TCPLLTransport.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <errno.h>
@@ -23,7 +23,7 @@
#include <netinet/in.h>
#include <netinet/tcp.h>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Protocol.h"
#include "TCPLLTransport.h"
Index: trunk/src/Transport.cxx
===================================================================
--- trunk/src/Transport.cxx (revision 3)
+++ trunk/src/Transport.cxx (working copy)
@@ -13,12 +13,12 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <unistd.h>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Transport.h"
#include "Protocol.h"
Index: trunk/src/GimpleMsgBus.cxx
===================================================================
--- trunk/src/GimpleMsgBus.cxx (revision 3)
+++ trunk/src/GimpleMsgBus.cxx (working copy)
@@ -11,13 +11,13 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <string.h>
#include <arpa/inet.h>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Transport.h"
Index: trunk/src/SelectReactor.cxx
===================================================================
--- trunk/src/SelectReactor.cxx (revision 3)
+++ trunk/src/SelectReactor.cxx (working copy)
@@ -13,14 +13,14 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <sys/select.h>
#include <errno.h>
#include <string.h>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "SelectReactor.h"
Index: trunk/src/XMLParser.cxx
===================================================================
--- trunk/src/XMLParser.cxx (revision 3)
+++ trunk/src/XMLParser.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <stdio.h>
@@ -21,7 +21,7 @@
#include <errno.h>
#include "XMLParser.h"
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include <hdb-tinyxml/tinyxml.h>
Index: trunk/src/Logger.cxx
===================================================================
--- trunk/src/Logger.cxx (revision 3)
+++ trunk/src/Logger.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <stdio.h>
Index: trunk/src/MsgHandler.cxx
===================================================================
--- trunk/src/MsgHandler.cxx (revision 3)
+++ trunk/src/MsgHandler.cxx (working copy)
@@ -11,10 +11,10 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "MsgHandler.h"
Index: trunk/src/Listener.cxx
===================================================================
--- trunk/src/Listener.cxx (revision 3)
+++ trunk/src/Listener.cxx (working copy)
@@ -13,11 +13,11 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Listener.h"
Index: trunk/src/Error.cxx
===================================================================
--- trunk/src/Error.cxx (revision 3)
+++ trunk/src/Error.cxx (working copy)
@@ -13,14 +13,14 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <execinfo.h>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
void
Index: trunk/src/TCPListener.cxx
===================================================================
--- trunk/src/TCPListener.cxx (revision 3)
+++ trunk/src/TCPListener.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <sys/types.h>
@@ -26,7 +26,7 @@
#include <errno.h>
#include <unistd.h>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Factory.h"
#include "Protocol.h"
Index: trunk/src/Reactor.cxx
===================================================================
--- trunk/src/Reactor.cxx (revision 3)
+++ trunk/src/Reactor.cxx (working copy)
@@ -21,13 +21,13 @@
*/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <unistd.h>
#include <exception>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Reactor.h"
#include "Deferred.h"
Index: trunk/src/MsgBus.cxx
===================================================================
--- trunk/src/MsgBus.cxx (revision 3)
+++ trunk/src/MsgBus.cxx (working copy)
@@ -11,10 +11,10 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "MsgBus.h"
#include "MsgHandler.h"
Index: trunk/src/Protocol.cxx
===================================================================
--- trunk/src/Protocol.cxx (revision 3)
+++ trunk/src/Protocol.cxx (working copy)
@@ -13,11 +13,11 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Protocol.h"
Index: trunk/src/DataBuffer.cxx
===================================================================
--- trunk/src/DataBuffer.cxx (revision 3)
+++ trunk/src/DataBuffer.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include "DataBuffer.h"
Index: trunk/src/TCPTransport.cxx
===================================================================
--- trunk/src/TCPTransport.cxx (revision 3)
+++ trunk/src/TCPTransport.cxx (working copy)
@@ -13,7 +13,7 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
#include <errno.h>
@@ -24,7 +24,7 @@
#include <sys/socket.h>
#include <errno.h>
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Protocol.h"
#include "TCPTransport.h"
Index: trunk/src/Factory.cxx
===================================================================
--- trunk/src/Factory.cxx (revision 3)
+++ trunk/src/Factory.cxx (working copy)
@@ -13,11 +13,11 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "Reactor.h"
#include "Factory.h"
Index: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am (revision 3)
+++ trunk/src/Makefile.am (working copy)
@@ -1,40 +1,28 @@
# -*- mode: makefile; indent-tabs-mode: nil; tab-width: 4; -*-
-AM_LDFLAGS = -lpthread $(HDB_TINYXML_LIBS) -rdynamic
-AM_CXXFLAGS = \
- -DHMI_CTRL_CONFIGDIR=\"$(sysconfdir)/hmi-ctrl/\" \
- -DHMI_CTRL_DATADIR=\"$(pkgdatadir)/data/\" \
- $(HDB_TINYXML_CFLAGS)
+lib_LTLIBRARIES = libasycxx-0.1.la
-
-bin_PROGRAMS = hmi-ctrl hmi-ctrl.debug
-
-hmi_ctrl_SOURCES = \
- Logger.cxx Logger.h \
- Error.cxx Error.h \
- Deferred.cxx Deferred.h \
- RefCounter.cxx RefCounter.h \
- DataBuffer.cxx DataBuffer.h \
- Reactor.cxx Reactor.h \
- SelectReactor.cxx SelectReactor.h \
- Timer.cxx Timer.h \
- Transport.cxx Transport.h \
- Listener.cxx Listener.h \
- TCPTransport.cxx TCPTransport.h \
- TCPListener.cxx TCPListener.h \
- TCPLLTransport.cxx TCPLLTransport.h \
- Protocol.cxx Protocol.h \
- Factory.cxx Factory.h \
- MsgBus.cxx MsgBus.h \
- MsgHandler.cxx MsgHandler.h \
- GimpleMsgBus.cxx GimpleMsgBus.h \
- XMLParser.cxx XMLParser.h \
- Config.cxx Config.h \
- App.cxx App.h \
- hmi-ctrl.cxx hmi-ctrl.h \
+libasycxx_0_1_la_SOURCES = \
+ Logger.cxx \
+ Error.cxx \
+ Deferred.cxx.h \
+ RefCounter.cxx \
+ DataBuffer.cxx \
+ Reactor.cxx \
+ SelectReactor.cxx \
+ Timer.cxx \
+ Transport.cxx \
+ Listener.cxx \
+ TCPTransport.cxx \
+ TCPListener.cxx \
+ TCPLLTransport.cxx \
+ Protocol.cxx \
+ Factory.cxx \
+ MsgBus.cxx \
+ MsgHandler.cxx \
+ GimpleMsgBus.cxx \
+ XMLParser.cxx \
core.cxx
-hmi_ctrl_CXXFLAGS = -O2 $(AM_CXXFLAGS)
-
-hmi_ctrl_debug_SOURCES = $(hmi_ctrl_SOURCES)
-hmi_ctrl_debug_CXXFLAGS = -g $(AM_CXXFLAGS)
+libasycxx_0_1_la_CXXFLAGS = -O2 $(HDB_TINYXML_CFLAGS)
+libasycxx_0_1_la_LDFLAGS = -version-info 0:1:0
Index: trunk/src/RefCounter.cxx
===================================================================
--- trunk/src/RefCounter.cxx (revision 3)
+++ trunk/src/RefCounter.cxx (working copy)
@@ -13,10 +13,10 @@
*******************************************************************/
#ifdef HAVE_CONFIG_H
-#include <hmi-ctrl-config.h>
+#include <asycxx-config.h>
#endif
-#include "hmi-ctrl.h"
+#include "asycxx.h"
#include "Error.h"
#include "RefCounter.h"
Index: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am (revision 3)
+++ trunk/Makefile.am (working copy)
@@ -1,5 +1,5 @@
# -*- mode: makefile; indent-tabs-mode: nil; tab-width: 4; -*-
-configdir = $(sysconfdir)/hmi-ctrl
-dist_config_DATA = hmi-ctrl-config.xml.sample
+SUBDIRS = src include
-SUBDIRS = src
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = asycxx-0.1.pc
Index: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh (revision 3)
+++ trunk/autogen.sh (working copy)
@@ -2,5 +2,6 @@
echo "Generating build necessaries..."
aclocal
+libtoolize --force
automake --add-missing
autoconf |
|
From: js <js...@hi...> - 2009-02-20 18:21:28
|
On Thu, 2009-02-19 at 22:56 +0530, Karthik Balakrishnan wrote: > Patch file attached. > > I retained the configure.ac 's 'setup a release tag'. I thought it > might be useful. Though i am not sure of it. Comments please Seems fine. Please commit it. -- Joe Steeve HiPro IT Solutions Pvt. Ltd. http://hipro.co.in/ |