From 430366a2c5ffbb0af5d7e5213f7f54c5833d7c97 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 31 May 2011 11:16:40 +0200 Subject: [PATCH] osmo-pcap: Create a dummy client. --- Makefile.am | 2 ++ configure.ac | 14 ++++++++++++++ include/Makefile.am | 1 + include/osmo-pcap/Makefile.am | 1 + src/Makefile.am | 8 ++++++++ src/osmo_client_main.c | 29 +++++++++++++++++++++++++++++ 6 files changed, 55 insertions(+) create mode 100644 include/Makefile.am create mode 100644 include/osmo-pcap/Makefile.am create mode 100644 src/Makefile.am create mode 100644 src/osmo_client_main.c diff --git a/Makefile.am b/Makefile.am index 909b356..b9a4331 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 +SUBDIRS = include src + BUILT_SOURCES = $(top_srcdir)/.version EXTRA_DIST = git-version-gen $(top_srcdir)/.version: diff --git a/configure.ac b/configure.ac index d800061..b57b3dd 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,18 @@ AC_HEADER_STDC dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_WITH([pcap-config], + AC_HELP_STRING([--with-pcap-config=FILE], [Use given pcap-config]), + [pcapcfg="$withval" ], + [AC_PATH_PROG([pcapcfg], [pcap-config], [])]) +if test x$pcapcfg = "x"; then + AC_MSG_ERROR([pcap-config can not be found]) +fi +PCAP_LIBS=`$pcapcfg --libs` +PCAP_CFLAGS=`$pcapcfg --cflags` +AC_SUBST([PCAP_LIBS]) +AC_SUBST([PCAP_CFLAGS]) # Coverage build taken from WebKit's configure.in AC_MSG_CHECKING([whether to enable code coverage support]) @@ -42,4 +53,7 @@ fi dnl Generate the output AC_OUTPUT( + include/Makefile + include/osmo-pcap/Makefile + src/Makefile Makefile) diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..244a03e --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = osmo-pcap diff --git a/include/osmo-pcap/Makefile.am b/include/osmo-pcap/Makefile.am new file mode 100644 index 0000000..c3a402d --- /dev/null +++ b/include/osmo-pcap/Makefile.am @@ -0,0 +1 @@ +noinst_HEADERS = diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..2b7eb13 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,8 @@ +INCLUDES = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(PCAP_CFLAGS) +AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) + +bin_PROGRAMS = osmo_pcap_client + +osmo_pcap_client_SOURCES = osmo_client_main.c +osmo_pcap_client_LDADD = $(PCAP_LIBS) diff --git a/src/osmo_client_main.c b/src/osmo_client_main.c new file mode 100644 index 0000000..4725f1a --- /dev/null +++ b/src/osmo_client_main.c @@ -0,0 +1,29 @@ +/* + * osmo-pcap-client code + * + * (C) 2011 by Holger Hans Peter Freyther + * (C) 2011 by On-Waves + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +int main(int argc, char **argv) +{ + return(0); +}