-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef2d10b
commit 242377f
Showing
11 changed files
with
1,155 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ACLOCAL_AMFLAGS = -I m4 | ||
SUBDIRS = smpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Autoconf Minimum Version Required Check | ||
AC_PREREQ([2.68]) | ||
# Initilise Autoconf with project Name and Version Details | ||
AC_INIT([ksmppd], [1.4.4], [kneodev@gmail.com], [ksmppd], [https://github.com/kneodev/ksmppd]) | ||
# Put autotools auxiliary files in a subdir, so they don't clutter top dir: | ||
AC_CONFIG_AUX_DIR([build-aux]) | ||
# Initialise Automake with Default version Number and Default CPP flags | ||
AM_INIT_AUTOMAKE([1.11 -Wall -Werror subdir-objects]) | ||
# Check for some Unique file in the Project | ||
AC_CONFIG_SRCDIR([smpp/]) | ||
# Check for C Compiler | ||
AC_PROG_CC | ||
AC_PROG_CC_C99 | ||
# config.h will be created and default header | ||
AC_CONFIG_HEADERS([config.h]) | ||
# all Macro in this folder | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
# AR required to create static library | ||
AM_PROG_AR | ||
# Silence warning: ar: 'u' modifier ignored since 'D' is the default | ||
AC_SUBST(AR_FLAGS, [cr]) | ||
# libtool Required | ||
LT_PREREQ([2.2]) | ||
LT_INIT([dlopen]) | ||
AC_LIBTOOL_DLOPEN | ||
AC_PROG_LIBTOOL | ||
# Check of library created using ranlib | ||
#AC_PROG_RANLIB | ||
AC_ENABLE_SHARED | ||
# Check for pthread | ||
AC_CHECK_LIB(pthread, pthread_create,[AC_DEFINE(ENABLE_THREADS, 1, [Define this to enable threads.])],[AC_MSG_ERROR([required library pthread missing])]) | ||
# libtool Required | ||
LT_PREREQ([2.2]) | ||
LT_INIT([dlopen]) | ||
AC_ENABLE_SHARED | ||
AC_PROG_LIBTOOL(libtool) | ||
# check for libevent library | ||
AC_MSG_NOTICE([Checking for libevent2 and its requirements.]) | ||
PKG_CHECK_MODULES([libevent], [libevent >= 2.0], with_libevent=yes, with_libevent=no) | ||
if test "$with_libevent" == "no" | ||
then | ||
AC_MSG_ERROR([libevent library not found ]) | ||
exit 1 | ||
else | ||
AC_DEFINE(WITH_LIBEVENT, 1 ,[libevent is Enabled]) | ||
fi | ||
|
||
#check for shtool required to extract platform | ||
AC_CHECK_PROG(SHTOOL_CHECK, shtool, yes) | ||
if test x"$SHTOOL_CHECK" != x"yes" ; then | ||
AC_MSG_ERROR([Please install shtool before installing.]) | ||
fi | ||
PLATFORMINFO=`shtool platform -S "-" -F "%<ac>-%<sp>" --lower` | ||
AC_DEFINE_UNQUOTED(PLATFORMINFO,"$PLATFORMINFO",[platform version]) | ||
|
||
AC_CHECK_PROG(GWCONFIG_CHECK, gw-config, yes) | ||
if test x"$GWCONFIG_CHECK" != x"yes" ; then | ||
AC_MSG_ERROR([Please install kannel gw-config before installing.]) | ||
fi | ||
# define GIT_VERSION | ||
AC_CHECK_PROG(GIT_CHECK, git, yes) | ||
if test x"$GIT_CHECK" != x"yes" ; then | ||
AC_MSG_ERROR([Please install git before installing.]) | ||
fi | ||
GITVERSION=`git describe --always --tags` | ||
AC_DEFINE_UNQUOTED(GITVERSION,"$GITVERSION",[git version]) | ||
# Generate These Files for Sucessfully Build | ||
AC_CONFIG_FILES([ | ||
Makefile | ||
smpp/Makefile | ||
]) | ||
AC_OUTPUT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ACLOCAL_AMFLAGS = -I m4 | ||
noinst_LTLIBRARIES = libsmpp.la | ||
libsmpp_la_SOURCES = \ | ||
libsmpp/smpp_bearerbox.c libsmpp/smpp_database_mysql.c libsmpp/smpp_http_client.c libsmpp/smpp_listener.c \ | ||
libsmpp/smpp_plugin.c libsmpp/smpp_queues.c libsmpp/smpp_server.c libsmpp/smpp_uuid.c libsmpp/smpp_database.c \ | ||
libsmpp/smpp_database.c libsmpp/smpp_esme.c libsmpp/smpp_http_server.c libsmpp/smpp_pdu_util.c libsmpp/smpp_queued_pdu.c \ | ||
libsmpp/smpp_route.c libsmpp/smpp_server_cfg.c | ||
libsmpp_la_CPPFLAGS = -fPIC -I ${top_srcdir}/smpp/libsmpp ${libevent_CFLAGS} `gw-config --cflags` | ||
libsmpp_la_LDFLAGS = `gw-config --libs` ${libevent_LIBS} -ldl | ||
|
||
bin_PROGRAMS = ksmppd | ||
ksmppd_SOURCES = ksmppd.c | ||
ksmppd_CPPFLAGS = -I ${top_srcdir}/smpp/libsmpp `gw-config --cflags` | ||
ksmppd_LDFLAGS = `gw-config --libs` ${libevent_LIBS} -ldl | ||
ksmppd_LDADD= ${top_srcdir}/smpp/libsmpp.la ${libevent_LIBS} |