The automake version complaints about files in subdirs.
Automake isn't specified as make to build files in Subdirs,
but to recurse into them.
My first aproach was just to copy the Structure from the gwlib
dir, but this resulted in the smsc's being built as .so's,
which makes them almost un-gdb'able.
so the configure-patch mainly just adds gw/smsc/Makefile.am,
and sorts the output file list in one output per line, which
increases readability.
The gwMakefile.am patch removes the files in smsc/, adds a
Subdir to recurse into, and adds the .a from the smsc/ dir
to the bearerbox.
Allso the bearerbox was missing the dlr .so, which i added.
building with mysql support should work now.
Makefile.am is the makefile for gw/smsc/ to be added.
Wilfried Goesgens
--- /home/willi/Makefile.am 2005-02-16 14:37:18.000000000 +0100
+++ Makefile.am 2005-02-11 13:02:44.000000000 +0100
@@ -1,37 +1,28 @@
INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/gwlib -I$(top_srcdir)/gwlib
-I$(top_builddir) -I$(top_srcdir)
+SUBDIRS=smsc
+
+dist_noinst_DATA = \
+ other_smskannel.conf \
+ pushkannel.conf \
+ smskannel.conf \
+ smskannel-ssl.conf \
+ wapkannel.conf
+
lib_LTLIBRARIES = libgw.la
libgw_la_SOURCES = \
- dlr.c \
- dlr_mem.c \
- dlr_mysql.c \
- dlr_oracle.c \
- dlr_pgsql.c \
- dlr_sdb.c \
heartbeat.c \
- html.c \
msg.c \
numhash.c \
- ota_compiler.c \
- ota_prov.c \
shared.c \
sms.c \
urltrans.c \
xml_shared.c \
- alt_charsets.h \
- dlr.h \
- dlr_p.h \
heartbeat.h \
- html.h \
msg-decl.h \
msg.h \
numhash.h \
- ota_compiler.h \
- ota_prov_attr.h \
- ota_prov.h \
shared.h \
- smscconn.h \
- smscconn_p.h \
sms.h \
urltrans.h \
wml_compiler.h \
@@ -41,11 +32,36 @@ libgw_la_SOURCES = \
sbin_PROGRAMS = bearerbox wapbox smsbox
-bearerbox_LDADD = ../gwlib/libgwlib.la libgw.la
-wapbox_LDADD = ../gwlib/libgwlib.la libgw.la ../wap/libwap.la
../radius/libradius.la ../wmlscript/libwmlscript.la
-smsbox_LDADD = ../gwlib/libgwlib.la libgw.la ../wap/libwap.la
+bearerbox_LDADD = $(top_builddir)/gwlib/libgwlib.la
$(top_builddir)/gw/libgw.la $(top_builddir)/gw/smsc/libsmsc.a
$(top_builddir)/gwlib/libgwlibdb.la
+wapbox_LDADD = $(top_builddir)/gwlib/libgwlib.la $(top_builddir)/gw/libgw.la
$(top_builddir)/wap/libwap.la $(top_builddir)/radius/libwapradius.la
$(top_builddir)/wmlscript/libwmlscript.la
+smsbox_LDADD = $(top_builddir)/gwlib/libgwlib.la $(top_builddir)/gw/libgw.la
$(top_builddir)/wap/libwap.la $(top_builddir)/gwlib/libgwlibdb.la libsmsbox.a
+
+noinst_LIBRARIES = libsmsbox.a
+
+libsmsbox_a_SOURCES = \
+ ota_compiler.c \
+ ota_prov.c \
+ ota_compiler.h \
+ ota_prov_attr.h \
+ ota_prov.h \
+ html.h \
+ html.c
+
+smsbox_SOURCES = \
+ smsbox.c
bearerbox_SOURCES = \
+ smscconn.h \
+ smscconn_p.h \
+ alt_charsets.h \
+ dlr.h \
+ dlr_p.h \
+ dlr.c \
+ dlr_mem.c \
+ dlr_mysql.c \
+ dlr_oracle.c \
+ dlr_pgsql.c \
+ dlr_sdb.c \
bearerbox.c \
bb_alog.c \
bb_boxc.c \
@@ -56,36 +72,7 @@ bearerbox_SOURCES = \
bb_smscconn_cb.h \
bearerbox.h \
bb.h \
- smscconn.c \
- smsc/emimsg.c \
- smsc/smasi_pdu.c \
- smsc/smpp_pdu.c \
- smsc/smsc_at.c \
- smsc/smsc.c \
- smsc/smsc_cgw.c \
- smsc/smsc_cimd2.c \
- smsc/smsc_cimd.c \
- smsc/smsc_emi.c \
- smsc/smsc_emi_x25.c \
- smsc/smsc_fake.c \
- smsc/smsc_http.c \
- smsc/smsc_ois.c \
- smsc/smsc_oisd.c \
- smsc/smsc_sema.c \
- smsc/smsc_smasi.c \
- smsc/smsc_smpp.c \
- smsc/smsc_soap.c \
- smsc/smsc_wrapper.c \
- smsc/emimsg.h \
- smsc/smasi_pdu.h \
- smsc/smpp_pdu.h \
- smsc/smsc_at.h \
- smsc/smsc.h \
- smsc/smsc_p.h \
- smsc/smsc_sema.h \
- smsc/smasi_pdu.def \
- smsc/smpp_pdu.def \
- smsc/smpp_pdu_opt.def
+ smscconn.c
wapbox_SOURCES = \
wapbox.c \
--- /home/willi/configure.in 2005-02-16 14:39:22.000000000 +0100
+++ ./configure.in 2005-02-10 15:35:08.000000000 +0100
@@ -62,31 +62,30 @@ dnl
dnl initialization
-AC_PREREQ(2.54)
-
-AC_INIT(gwlib/gwlib.h)
-AC_CONFIG_HEADER(gw-config.h)
-dnl AC_SUBST(SHELL)
-AC_CONFIG_AUX_DIR(.)
-AC_SET_TERMINAL_SEQUENCES()
+AC_INIT(kannel, stingr-B4)
+AM_DISABLE_STATIC
+AM_INIT_AUTOMAKE
+AC_PROG_LIBTOOL
-Check gateway version number.
-VERSION=`head -n 1 VERSION`
+AM_CONFIG_HEADER(gw-config.h)
+AC_SUBST(SHELL)
+dnl AC_CONFIG_AUX_DIR(.)
+dnl williwashere AC_SET_TERMINAL_SEQUENCES()
+
+dnl Check gateway version number.
+TOP=`dirname $0`
+VERSION=`head -n 1 $TOP/VERSION`
if test "x$VERSION" = "xcvs"; then
- AC_MSG_CHECKING([cvs checkout date])
- AC_CVS_DATE(CVS_DATE)
- AC_MSG_RESULT([$CVS_DATE])
- VERSION="$VERSION-$CVS_DATE"
+ AC_MSG_CHECKING([cvs checkout date])
+ AC_CVS_DATE(CVS_DATE)
+ AC_MSG_RESULT([$CVS_DATE])
+ VERSION="$VERSION-$CVS_DATE"
fi
AC_DEFINE_UNQUOTED(GW_NAME, "Kannel", [Gateway name])
AC_DEFINE_UNQUOTED(GW_VERSION, "$VERSION", [Gateway version])
dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Gateway version])
AC_SUBST(GW_VERSION)
dnl AC_SUBST(VERSION)
-AM_INIT_AUTOMAKE(Kannel,$VERSION)
-AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
AC_CONFIG_SECTION([Configuring for Kannel gateway version $VERSION])
dnl Solaris pkgadd support definitions
@@ -125,7 +124,7 @@ dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_YACC
-AC_PROG_LEX
+dnl #AC_ PROG_ LEX
AC_PATH_PROG(CONVERT, convert)
AC_PATH_PROG(PERL, perl)
@@ -183,6 +182,66 @@ AC_CHECK_FUNC(gethostbyname_r, [ AC_FUNC
AC_MSG_ERROR([Couldnot find gethostbyname_r nor gethostbyname
functions])])]
)
+dnl curl support
+
+CURL_PREFIX=""
+
+AC_ARG_WITH(curl,
+[ --with-curl=DIR curl base installation path], [
+ if test "x$withval" != "x" ; then
+ CURL_PREFIX=$withval
+ fi
+])
+
+
+AC_MSG_CHECKING([whether to compile with CURL support])
+AC_ARG_ENABLE(curl,
+[ --enable-curl enable curl for wapbox's http (TRY THIS!!!)],
+[
+ if test "$enableval" != yes; then
+ AC_MSG_RESULT(disabled)
+ else
+ AC_MSG_RESULT(searching)
+ MY_CURL
+ if test "$my_cv_curl_vers" != NONE; then
+ LIBS="$LIBS $($curl_config --libs)"
+ CFLAGS="$CFLAGS $($curl_config --cflags)"
+ CFLAGS="$CFLAGS -DCURL_SUPPORT=1"
+ else
+ AC_MSG_ERROR([Cannot find suitable libcurl])
+ fi
+ fi
+],[
+ AC_MSG_RESULT(disabled)
+]
+)
+
+AC_MSG_CHECKING([whether to do all wapbox xml processing in utf-8])
+AC_ARG_ENABLE(scharset,
+[ --enable-scharset do all wapbox xml processing in utf-8],
+[
+ if test "$enableval" != yes; then
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(NEW_CHARSETS, 1, [Simplify wapbox charset processing])
+ fi
+])
+
+AC_ARG_ENABLE(cdb,
+[ --enable-cdb enable shared cdb for msisdn lookups],
+[
+ case "${enableval}" in
+ yes) cdb=true
+ AC_CHECK_HEADERS(db.h)
+ AC_CHECK_LIB(db, db_env_create)
+ ;;
+ no) cdb=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-cdb) ;;
+esac],[cdb=false])
+
+AM_CONDITIONAL(RADIUS_CDB, test x$cdb = xtrue)
+
dnl Extra feature checks
dnl GW_HAVE_TYPE_FROM(HDRNAME, TYPE, HAVENAME, DESCRIPTION)
@@ -1098,7 +1157,21 @@ AH_VERBATIM([PRINTFLIKE], [
dnl Final Output
AC_CONFIG_SECTION([Generating output files])
-AC_OUTPUT(gwlib/gw_uuid_types.h Makefile gwlib/Makefile wmlscript/Makefile
radius/Makefile wap/Makefile gw/Makefile benchmarks/Makefile utils/Makefile
checks/Makefile doc/Makefile test/Makefile)
+AC_OUTPUT(
+ gwlib/gw_uuid_types.h
+ Makefile
+ gwlib/Makefile
+ wmlscript/Makefile
+ radius/Makefile
+ wap/Makefile
+ gw/Makefile
+ gw/smsc/Makefile
+ benchmarks/Makefile
+ utils/Makefile
+ checks/Makefile
+ doc/Makefile
+ test/Makefile)
dnl LICENSE notice
INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/gwlib -I$(top_srcdir)/gwlib
-I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/gw/
#lib_LTLIBRARIES=libsmsc.la
noinst_LIBRARIES=libsmsc.a
libsmsc_a_SOURCES= \
emimsg.c \
smasi_pdu.c \
smpp_pdu.c \
smsc.c \
smsc_at.c \
smsc_cgw.c \
smsc_cimd2.c \
smsc_cimd.c \
smsc_emi.c \
smsc_emi_x25.c \
smsc_fake.c \
smsc_http.c \
smsc_ois.c \
smsc_oisd.c \
smsc_sema.c \
smsc_smasi.c \
smsc_smpp.c \
smsc_soap.c \
smsc_wrapper.c \
emimsg.h \
smasi_pdu.h \
smpp_pdu.h \
smsc.h \
smsc_p.h \
smsc_sema.h \
smasi_pdu.def \
smpp_pdu.def \
smpp_pdu_opt.def