summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am28
-rw-r--r--configure.ac28
2 files changed, 36 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am
index 9eeb2f5c..9d713aec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,8 +27,13 @@ gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \
gdhcp_sources = gdhcp/gdhcp.h gdhcp/common.h gdhcp/common.c gdhcp/client.c \
gdhcp/server.c gdhcp/ipv4ll.h gdhcp/ipv4ll.c
-gweb_sources = gweb/gweb.h gweb/gweb.c gweb/gresolv.h gweb/gresolv.c \
- gweb/giognutls.h gweb/giognutls.c
+gweb_sources = gweb/gweb.h gweb/gweb.c gweb/gresolv.h gweb/gresolv.c
+
+if WISPR
+gweb_sources += gweb/giognutls.h gweb/giognutls.c
+else
+gweb_sources += gweb/giognutls.h gweb/gionotls.c
+endif
if DATAFILES
@@ -62,10 +67,7 @@ unit_objects =
sbin_PROGRAMS = src/connmand
-src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) \
- gweb/gweb.h gweb/gweb.c \
- gweb/gresolv.h gweb/gresolv.c \
- gweb/giognutls.h gweb/giognutls.c \
+src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) $(gweb_sources) \
$(builtin_sources) src/connman.ver \
src/main.c src/connman.h src/log.c \
src/error.c src/plugin.c src/task.c \
@@ -122,7 +124,7 @@ AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
INCLUDES = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf \
- plugins/connman-nmcompat.conf gweb/gionotls.c
+ plugins/connman-nmcompat.conf
script_DATA =
@@ -138,8 +140,15 @@ client_cm_SOURCES = client/main.c
client_cm_LDADD = @DBUS_LIBS@
endif
+if WISPR
+noinst_PROGRAMS += tools/wispr
+
+tools_wispr_SOURCES = $(gweb_sources) tools/wispr.c
+tools_wispr_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
+endif
+
if TOOLS
-noinst_PROGRAMS += tools/wispr tools/supplicant-test \
+noinst_PROGRAMS += tools/supplicant-test \
tools/dhcp-test tools/dhcp-server-test \
tools/addr-test tools/web-test tools/resolv-test \
tools/dbus-test tools/polkit-test \
@@ -147,9 +156,6 @@ noinst_PROGRAMS += tools/wispr tools/supplicant-test \
tools/stats-tool tools/private-network-test \
unit/test-session unit/test-ippool unit/test-nat
-tools_wispr_SOURCES = $(gweb_sources) tools/wispr.c
-tools_wispr_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
-
tools_supplicant_test_SOURCES = $(gdbus_sources) tools/supplicant-test.c \
tools/supplicant-dbus.h tools/supplicant-dbus.c \
tools/supplicant.h tools/supplicant.c
diff --git a/configure.ac b/configure.ac
index 1f2b81ea..27104e6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -310,11 +310,6 @@ if (test -n "${path_systemdunit}"); then
fi
AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
-PKG_CHECK_MODULES(GNUTLS, gnutls, dummy=yes,
- AC_MSG_ERROR(GnuTLS library is required))
-AC_SUBST(GNUTLS_CFLAGS)
-AC_SUBST(GNUTLS_LIBS)
-
PKG_CHECK_MODULES(XTABLES, xtables, dummy=yes,
AC_MSG_ERROR(Xtables library is required))
AC_SUBST(XTABLES_CFLAGS)
@@ -372,16 +367,31 @@ AC_ARG_ENABLE(pacrunner, AC_HELP_STRING([--disable-pacrunner],
[enable_pacrunner=${enableval}])
AM_CONDITIONAL(PACRUNNER, test "${enable_pacrunner}" != "no")
-AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
- [disable command line client]),
- [disable_client=${enableval}])
-AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no")
+AC_ARG_ENABLE(wispr, AC_HELP_STRING([--disable-wispr],
+ [disable WISPr support]),
+ [enable_wispr=${enableval}])
+AM_CONDITIONAL(WISPR, test "${enable_wispr}" != "no")
AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools],
[disable testing tools]),
[enable_tools=${enableval}])
AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
+AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
+ [disable command line client]),
+ [disable_client=${enableval}])
+AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no")
+
+if (test "${enable_wispr}" != "no"); then
+ PKG_CHECK_MODULES(GNUTLS, gnutls, dummy=yes,
+ AC_MSG_ERROR(GnuTLS library is required))
+else
+ GNUTLS_CFLAGS=""
+ GNUTLS_LIBS=""
+fi
+AC_SUBST(GNUTLS_CFLAGS)
+AC_SUBST(GNUTLS_LIBS)
+
if (test "${enable_loopback}" != "no"); then
AC_CHECK_HEADERS(sys/inotify.h, dummy=yes,
AC_MSG_ERROR(inotify header files are required))