From 13b6537ee417d18734f69b25cc1c8442146502ba Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sat, 16 Jun 2012 19:46:29 -0700 Subject: [PATCH] NSM: Fix up configure and makefile. Also, clear some compiler warnings. --- session-manager/configure | 1 - session-manager/makefile.inc | 12 ++++++------ session-manager/src/jackpatch.c | 1 - session-manager/src/nsm-proxy-gui.C | 1 - session-manager/src/nsm-proxy.C | 11 +++++------ 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/session-manager/configure b/session-manager/configure index 6e281b6..3f1587c 100755 --- a/session-manager/configure +++ b/session-manager/configure @@ -20,7 +20,6 @@ require_FLTK 1.3.0 images require_command FLUID lib/ntk/fluid/fluid suggest_package JACK 0.103.0 jack require_package liblo 0.23 liblo -require_package sigcpp 2.0.0 sigc++-2.0 suggest_package XPM 2.0.0 xpm test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later" diff --git a/session-manager/makefile.inc b/session-manager/makefile.inc index d07158f..4bdd02a 100644 --- a/session-manager/makefile.inc +++ b/session-manager/makefile.inc @@ -13,8 +13,8 @@ SRCS:=$(SRCS:.fl=.C) SRCS:=$(sort $(SRCS)) OBJS:=$(SRCS:.C=.o) -LIBS += $(LIBLO_LIBS) $(SIGCPP_LIBS) -CFLAGS += $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) $(FLTK_CFLAGS) +LIBS += $(LIBLO_LIBS) +CFLAGS += $(LIBLO_CFLAGS) $(XPM_CFLAGS) $(FLTK_CFLAGS) -D_GNU_SOURCE src/nsmd: src/nsmd.o nonlib/libnonlib.a @ echo -n Linking session handler. @@ -26,14 +26,14 @@ src/session-manager: src/session-manager.o nonlib/libnonlib.a $(FLTK_LIBS) src/nsm-proxy: src/nsm-proxy.o nonlib/libnonlib.a @ echo -n Linking NSM Proxy. - @ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -Lnonlib -lnonlib && echo $(DONE) + @ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBLO_LIBS) -Lnonlib -lnonlib && echo $(DONE) # src/NSM_Proxy_UI.o: # @ cd src && $(FLUID) -c NSM_Proxy_UI.fl -src/nsm-proxy-gui: src/NSM_Proxy_UI.o src/nsm-proxy-gui.o nonlib/libnonlib.a $(FLTK_LIBS) - @ echo -n Linking NSM Proxy. - @ $(CXX) $(CXXFLAGS) $(FLTK_LDFLAGS) $^ -o $@ $(XPM_LIBS) $(LIBS) -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) +src/nsm-proxy-gui: src/NSM_Proxy_UI.o src/nsm-proxy-gui.o $(FLTK_LIBS) + @ echo -n Linking NSM Proxy... + @ $(CXX) $(CXXFLAGS) $(FLTK_LDFLAGS) $^ -o $@ $(XPM_LIBS) $(LIBLO_LIBS) $(FLTK_LIBS) -LFL -lfl_widgets && echo $(DONE) src/send_osc: src/send_osc.o nonlib/libnonlib.a @ $(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS) -Lnonlib -lnonlib && echo $(DONE) diff --git a/session-manager/src/jackpatch.c b/session-manager/src/jackpatch.c index 8b25bf2..9dfe0c0 100644 --- a/session-manager/src/jackpatch.c +++ b/session-manager/src/jackpatch.c @@ -23,7 +23,6 @@ */ -#define _GNU_SOURCE #pragma GCC diagnostic ignored "-Wunused-parameter" #include diff --git a/session-manager/src/nsm-proxy-gui.C b/session-manager/src/nsm-proxy-gui.C index f29b84f..ba49b5d 100644 --- a/session-manager/src/nsm-proxy-gui.C +++ b/session-manager/src/nsm-proxy-gui.C @@ -17,7 +17,6 @@ /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*******************************************************************************/ -#define _GNU_SOURCE #pragma GCC diagnostic ignored "-Wunused-parameter" diff --git a/session-manager/src/nsm-proxy.C b/session-manager/src/nsm-proxy.C index d1d5c71..1bcad6f 100644 --- a/session-manager/src/nsm-proxy.C +++ b/session-manager/src/nsm-proxy.C @@ -17,7 +17,6 @@ /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*******************************************************************************/ -#define _GNU_SOURCE #pragma GCC diagnostic ignored "-Wunused-parameter" #define _MODULE_ "nsm-proxy" @@ -115,12 +114,12 @@ public: else asprintf( &cmd, "exec %s", _executable ); - char *args[] = { _executable, "-c", cmd, NULL }; + const char *args[] = { _executable, "-c", cmd, NULL }; setenv( "NSM_CLIENT_ID", nsm_client_id, 1 ); setenv( "NSM_SESSION_NAME", nsm_display_name, 1 ); - if ( -1 == execvp( "/bin/sh", args ) ) + if ( -1 == execvp( "/bin/sh", (char**)args ) ) { WARNING( "Error starting process: %s", strerror( errno ) ); @@ -358,9 +357,9 @@ show_gui ( void ) char *url = lo_server_get_url( losrv ); - char *args[] = { executable, "--connect-to", url, NULL }; + const char *args[] = { executable, "--connect-to", url, NULL }; - if ( -1 == execvp( executable, args ) ) + if ( -1 == execvp( executable, (char**)args ) ) { WARNING( "Error starting process: %s", strerror( errno ) ); @@ -493,7 +492,7 @@ osc_start ( const char *path, const char *types, lo_arg **argv, int argc, lo_mes { snapshot( project_file ); - if ( nsm_proxy->start( &argv[0]->s, &argv[1]->s ) ); + if ( nsm_proxy->start( &argv[0]->s, &argv[1]->s ) ) { hide_gui(); }