Hi all,
Do we need to build samples? Since we link samples against installed
libraries, we can't build sampels *before* the installation.
Maintaining a seperate build system for sampels will solve this
problem. A patch is attached. Please review and apply.
Thanks.
~sanjaya
--
http://sanjaya.8k.com
Index: include/Makefile.am
===================================================================
--- include/Makefile.am (revision 386821)
+++ include/Makefile.am (working copy)
@@ -1,3 +1,3 @@
TESTS=
-nobase_include_HEADERS=platforms/unix/*.h platforms/windows/*.h
+nobase_include_HEADERS= platforms/*.h platforms/unix/*.h platforms/windows/*.h
Index: configure.ac
===================================================================
--- configure.ac (revision 386821)
+++ configure.ac (working copy)
@@ -141,23 +141,6 @@
TESTDIR=""
)
-AC_MSG_CHECKING(whether to build samples)
-AC_ARG_ENABLE(tests, [ --enable-samples build samples. default=no],
-[ case "${enableval}" in
- no)
- AC_MSG_RESULT(no)
- SAMPLES=""
- ;;
- *)
- AC_MSG_RESULT(yes)
- SAMPLES="samples"
-
- ;;
- esac ],
- AC_MSG_RESULT(no)
- SAMPLES=""
-)
-
AC_MSG_CHECKING(whether to enable trace)
AC_ARG_ENABLE(tests, [ --enable-trace enable trace. default=no],
[ case "${enableval}" in
@@ -235,16 +218,6 @@
modules/wsdl/Makefile \
modules/wsdl/builder/Makefile \
modules/mod_addr/Makefile \
- samples/Makefile \
- samples/server/Makefile \
- samples/server/echo/Makefile \
- samples/server/math/Makefile \
- samples/client/Makefile \
- samples/client/echo/Makefile \
- samples/client/math/Makefile \
- samples/client/addr_echo/Makefile \
- samples/client/echo_non_blocking/Makefile \
- samples/client/google/Makefile \
test/Makefile \
test/xml/Makefile \
test/xml/om/Makefile \
Index: samples/server/math/Makefile.am
===================================================================
--- samples/server/math/Makefile.am (revision 386821)
+++ samples/server/math/Makefile.am (working copy)
@@ -8,15 +8,8 @@
SUBDIRS =
libmath_la_SOURCES = math.c math_skeleton.c
libmath_la_LIBADD =
-INCLUDES = -I$(top_builddir)/include \
- -I$(top_builddir)/modules/util \
- -I$(top_builddir)/modules/core/description \
- -I$(top_builddir)/modules/core/deployment \
- -I$(top_builddir)/modules/wsdl \
- -I$(top_builddir)/modules/core/transport \
- -I$(top_builddir)/modules/platforms \
- -I$(top_builddir)/modules/xml/parser \
- -I$(top_builddir)/include
+INCLUDES = -I$(AXIS2C_HOME)/include \
+ -I$(AXIS2C_HOME)/include/platforms
Index: samples/server/echo/Makefile.am
===================================================================
--- samples/server/echo/Makefile.am (revision 386821)
+++ samples/server/echo/Makefile.am (working copy)
@@ -8,15 +8,8 @@
SUBDIRS =
libecho_la_SOURCES = echo.c echo_skeleton.c
libecho_la_LIBADD =
-INCLUDES = -I$(top_builddir)/include \
- -I$(top_builddir)/modules/util \
- -I$(top_builddir)/modules/core/description \
- -I$(top_builddir)/modules/core/deployment \
- -I$(top_builddir)/modules/wsdl \
- -I$(top_builddir)/modules/core/transport \
- -I$(top_builddir)/modules/platforms \
- -I$(top_builddir)/modules/xml/parser \
- -I$(top_builddir)/include
+INCLUDES = -I$(AXIS2C_HOME)/include \
+ -I$(AXIS2C_HOME)/include/platforms
Index: samples/client/echo_non_blocking/Makefile.am
===================================================================
--- samples/client/echo_non_blocking/Makefile.am (revision 386821)
+++ samples/client/echo_non_blocking/Makefile.am (working copy)
@@ -21,19 +21,8 @@
$(GUTHTHILA_LIBS) \
$(LIBXML2_LIBS)
-INCLUDES = -I$(top_builddir)/include \
- -I$(top_builddir)/modules/util \
- -I$(top_builddir)/modules/wsdl \
- -I$(top_builddir)/modules/core/description \
- -I$(top_builddir)/modules/core/context \
- -I$(top_builddir)/modules/core/phaseresolver \
- -I$(top_builddir)/modules/core/deployment \
- -I$(top_builddir)/modules/core/transport \
- -I$(top_builddir)/modules/core/engine \
- -I$(top_builddir)/modules/core/clientapi \
- -I$(top_builddir)/modules/platforms \
- -I$(top_builddir)/modules/xml/parser \
- -I$(top_builddir)/include
+INCLUDES = -I$(AXIS2C_HOME)/include \
+ -I$(AXIS2C_HOME)/include/platforms
Index: samples/client/addr_echo/Makefile.am
===================================================================
--- samples/client/addr_echo/Makefile.am (revision 386821)
+++ samples/client/addr_echo/Makefile.am (working copy)
@@ -18,19 +18,8 @@
$(GUTHTHILA_LIBS) \
$(LIBXML2_LIBS)
-INCLUDES = -I$(top_builddir)/include \
- -I$(top_builddir)/modules/util \
- -I$(top_builddir)/modules/wsdl \
- -I$(top_builddir)/modules/core/description \
- -I$(top_builddir)/modules/core/context \
- -I$(top_builddir)/modules/core/phaseresolver \
- -I$(top_builddir)/modules/core/deployment \
- -I$(top_builddir)/modules/core/transport \
- -I$(top_builddir)/modules/core/engine \
- -I$(top_builddir)/modules/core/clientapi \
- -I$(top_builddir)/modules/platforms \
- -I$(top_builddir)/modules/xml/parser \
- -I$(top_builddir)/include
+INCLUDES = -I$(AXIS2C_HOME)/include \
+ -I$(AXIS2C_HOME)/include/platforms
Index: samples/client/math/Makefile.am
===================================================================
--- samples/client/math/Makefile.am (revision 386821)
+++ samples/client/math/Makefile.am (working copy)
@@ -20,9 +20,5 @@
$(GUTHTHILA_LIBS) \
$(LIBXML2_LIBS)
-INCLUDES = -I$(top_builddir)/include \
- -I$(top_builddir)/modules/util \
- -I$(top_builddir)/modules/platforms \
- -I$(top_builddir)/modules/xml/parser
-
-
+INCLUDES = -I$(AXIS2C_HOME)/include \
+ -I$(AXIS2C_HOME)/include/platforms
Index: samples/client/google/Makefile.am
===================================================================
--- samples/client/google/Makefile.am (revision 386821)
+++ samples/client/google/Makefile.am (working copy)
@@ -17,9 +17,7 @@
$(GUTHTHILA_LIBS) \
$(LIBXML2_LIBS)
-INCLUDES = -I$(top_builddir)/include \
- -I$(top_builddir)/modules/util \
- -I$(top_builddir)/modules/platforms \
- -I$(top_builddir)/modules/xml/parser
+INCLUDES = -I$(AXIS2C_HOME)/include \
+ -I$(AXIS2C_HOME)/include/platforms
Index: samples/client/echo/Makefile.am
===================================================================
--- samples/client/echo/Makefile.am (revision 386821)
+++ samples/client/echo/Makefile.am (working copy)
@@ -21,7 +21,4 @@
$(GUTHTHILA_LIBS)
-INCLUDES = -I$(top_builddir)/include \
- -I$(top_builddir)/modules/util \
- -I$(top_builddir)/modules/platforms \
- -I$(top_builddir)/modules/xml/parser
+INCLUDES = -I$(AXIS2C_HOME)/include
Index: build.sh
===================================================================
--- build.sh (revision 386821)
+++ build.sh (working copy)
@@ -1,6 +1,6 @@
#!/bin/bash
./autogen.sh
AXIS2C_HOME=`pwd`/deploy
-./configure --prefix=${AXIS2C_HOME} --enable-tests=yes --enable-samples=yes
--enable-trace=yes --with-apache2=/usr/include/apache2
--with-apr=/usr/include/apr-0
+./configure --prefix=${AXIS2C_HOME} --enable-tests=yes --enable-trace=yes
--with-apache2=/usr/include/apache2 --with-apr=/usr/include/apr-0
make
make install
Index: Makefile.am
===================================================================
--- Makefile.am (revision 386821)
+++ Makefile.am (working copy)
@@ -1,8 +1,8 @@
TESTS =
datadir=$(prefix)
logsdir=$(prefix)/logs
-SUBDIRS = modules $(TESTDIR) $(SAMPLES) ides
-include_HEADERS=$(top_builddir)/include/*.h
+SUBDIRS = modules $(TESTDIR) ides include
+include_HEADERS=$(top_builddir)/include/*.h
data_DATA= samples/server/axis2.xml INSTALL README AUTHORS NEWS CREDITS
LICENSE COPYING
logs_DATA=samples/server/axis2.log
EXTRA_DIST = build.sh autogen.sh CREDITS LICENSE samples/server/axis2.log
dnl run autogen.sh to generate the configure script.
AC_PREREQ(2.59)
AC_INIT(axis2c-src, M0.5)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AC_PREFIX_DEFAULT(/usr/local/axis2c/samples)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AM_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl Checks for libraries.
AC_CHECK_LIB(dl, dlopen)
CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE"
LDFLAGS="-lpthread"
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdio.h stdlib.h string.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
PKG_CHECK_MODULES(LIBXML2, libxml-2.0)
CFLAGS="$CFLAGS $LIBXML2_CFLAGS $GUTHTHILA_CFLAGS"
AC_SUBST(LIBXML2_CFLAGS)
AC_SUBST(LIBXML2_LIBS)
AC_SUBST(LIBXML2_DIR)
AC_SUBST(GUTHTHILA_DIR)
AC_SUBST(GUTHTHILA_LIBS)
AC_CONFIG_FILES([Makefile \
server/Makefile \
server/echo/Makefile \
server/math/Makefile \
client/Makefile \
client/echo/Makefile \
client/math/Makefile \
client/addr_echo/Makefile \
client/echo_non_blocking/Makefile \
client/google/Makefile \
])
AC_OUTPUT