From 08eadce38597330524318abcf5322189daeaa986 Mon Sep 17 00:00:00 2001 From: Jaromil Date: Wed, 06 Mar 2013 00:53:29 +0000 Subject: compile with static upnp and discovery by default --- diff --git a/configure.ac b/configure.ac index b7cdcdb..fabd1f3 100644 --- a/configure.ac +++ b/configure.ac @@ -63,7 +63,7 @@ dnl ============================================================== AC_ARG_ENABLE(discovery, AS_HELP_STRING([--enable-discovery],[compile with miniupnp to enable auto-discovery]), [have_upnp=$enableval], - [have_upnp=no]) + [have_upnp=upnp]) AC_MSG_CHECKING([if compiling using external miniupnpc library]) UPNP_LIBS="\$(top_builddir)/src/upnp/libupnpc.a" UPNP_CPPFLAGS="-I\$(top_srcdir)/src/upnp" @@ -75,10 +75,10 @@ if test x$have_upnp = xyes; then UPNP_CPPFLAGS="-I /usr/include/miniupnpc" elif test x$have_upnp != xno; then # compile from indicated dir - AC_MSG_RESULT([yes, from $enableval]) + AC_MSG_RESULT([yes, from $have_upnp]) AC_DEFINE(USE_UPNP,1,[Define if building auto-detect for UPNP devices via miniupnp]) - UPNP_LIBS="$enableval/libminiupnpc.a" - UPNP_CPPFLAGS="-I$enableval" + UPNP_LIBS="$have_upnp/libminiupnpc.a" + UPNP_CPPFLAGS="-I$have_upnp" else AC_MSG_RESULT(no) fi diff --git a/src/Makefile.am b/src/Makefile.am index 6dc7253..c458c37 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,6 @@ +INCLUDES = -I$(top_srcdir)/src/upnp +LDFLAGS = -L$(top_srcdir)/src/upnp + SUBDIRS = upnp bin_PROGRAMS = avremote diff --git a/src/upnp/Makefile.am b/src/upnp/Makefile.am index 322d8c3..82e5f78 100644 --- a/src/upnp/Makefile.am +++ b/src/upnp/Makefile.am @@ -1,13 +1,13 @@ AM_CFLAGS = -I$(top_srcdir) $(HOST_CXXFLAGS) $(DEBUG_CXXFLAGS) -noinst_LIBRARIES = libupnpc.a +noinst_LIBRARIES = libminiupnpc.a -libupnpc_a_SOURCES = connecthostport.c igd_desc_parse.c minisoap.c \ +libminiupnpc_a_SOURCES = connecthostport.c igd_desc_parse.c minisoap.c \ miniupnpc.c miniwget.c minixml.c \ portlistingparse.c receivedata.c upnpcommands.c \ upnperrors.c upnpreplyparse.c minissdpc.c -libupnpc_a_CPPFLAGS = $(GLOBAL_CPPFLAGS) $(HOST_CPPFLAGS) $(DEBUG_CPPFLAGS) +libminiupnpc_a_CPPFLAGS = $(GLOBAL_CPPFLAGS) $(HOST_CPPFLAGS) $(DEBUG_CPPFLAGS) noinst_HEADERS = connecthostport.h igd_desc_parse.h minissdpc.h \ miniupnpctypes.h minixml.h receivedata.h upnperrors.h \ -- cgit v0.9.2-3-g52c9