From 42d9888c94dd7c1ddf5b9fe75766c34b29044d65 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 31 Dec 2008 19:38:00 +0000 Subject: [PATCH] integrate fs_cli into core build git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11035 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- Makefile.am | 9 +++++++-- debian/freeswitch.install | 1 + libs/esl/Makefile | 2 +- libs/esl/fs_cli.c | 7 +++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 11bb1e7148..6e0baf5ad8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -158,13 +158,18 @@ MOD_LINK = $(BASE)/libfreeswitch.la CLEANFILES = src/include/switch_version.h src/include/switch_swigable_cpp.h BUILT_SOURCES = src/include/switch_version.h src/include/switch_swigable_cpp.h -bin_PROGRAMS = freeswitch +bin_PROGRAMS = freeswitch fs_cli +fs_cli_SOURCES = libs/esl/src/esl.c libs/esl/src/esl_config.c libs/esl/src/esl_event.c libs/esl/src/esl_threadmutex.c libs/esl/fs_cli.c freeswitch_SOURCES = src/switch.c -nodist_freeswitch_SOURCES = src/include/switch_version.h +nodist_freeswitch_SOURCES = src/include/switch_version.h +fs_cli_CFLAGS = $(AM_CFLAGS) -Ilibs/esl/src/include +fs_cli_LDFLAGS = $(AM_LDFLAGS) -lpthread freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS) freeswitch_LDFLAGS = $(AM_LDFLAGS) -rpath $(libdir) freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la if ADD_LIBEDIT +fs_cli_CFLAGS += -DHAVE_EDITLINE -Ilibs/libedit/src +fs_cli_LDADD = libs/libedit/src/.libs/libedit.a freeswitch_CFLAGS += -Ilibs/libedit/src -DSWITCH_HAVE_LIBEDIT freeswitch_LDADD += libs/libedit/src/.libs/libedit.a endif diff --git a/debian/freeswitch.install b/debian/freeswitch.install index 072f67ec1e..4759686970 100644 --- a/debian/freeswitch.install +++ b/debian/freeswitch.install @@ -1,5 +1,6 @@ opt/freeswitch/htdocs/* opt/freeswitch/bin/freeswitch +opt/freeswitch/bin/fs_cli opt/freeswitch/bin/scripts/* opt/freeswitch/lib/libfreeswitch*.so* opt/freeswitch/lib/libopenzap*.so* diff --git a/libs/esl/Makefile b/libs/esl/Makefile index 69dda1af2f..c1d431f57e 100644 --- a/libs/esl/Makefile +++ b/libs/esl/Makefile @@ -2,7 +2,7 @@ INCS=-Isrc/include LIBEDIT_DIR=../../libs/libedit DEBUG=-g -ggdb PICKY=-O2 -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -CFLAGS=$(INCS) -D_GNU_SOURCE $(DEBUG) -I$(LIBEDIT_DIR)/src/ $(PICKY) +CFLAGS=$(INCS) $(DEBUG) -I$(LIBEDIT_DIR)/src/ $(PICKY) MYLIB=libesl.a LIBS=-lncurses -lpthread -lesl LDFLAGS=-L. diff --git a/libs/esl/fs_cli.c b/libs/esl/fs_cli.c index fb5f1187b4..1d526207fd 100644 --- a/libs/esl/fs_cli.c +++ b/libs/esl/fs_cli.c @@ -1,3 +1,7 @@ +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 500 +#endif + #include #include #include @@ -11,9 +15,12 @@ #include #else #include +#include #include +#ifndef HAVE_EDITLINE #define HAVE_EDITLINE #endif +#endif #include