diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-04-28 00:11:52 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-04-28 00:11:52 -0700 |
commit | d670a771cfe15aa99d812f4e4775f3924610a3af (patch) | |
tree | 154657fd924eb91ac2e0c6ecb68666728d05d612 | |
parent | 47bd0ee5afe38109771623335a5272f682432c5a (diff) | |
download | connman-d670a771cfe15aa99d812f4e4775f3924610a3af.tar.gz connman-d670a771cfe15aa99d812f4e4775f3924610a3af.tar.bz2 connman-d670a771cfe15aa99d812f4e4775f3924610a3af.zip |
Allow built-in of wifi, bluetooth and resolvconf plugins
-rwxr-xr-x | bootstrap-configure | 6 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | plugins/Makefile.am | 32 |
3 files changed, 28 insertions, 19 deletions
diff --git a/bootstrap-configure b/bootstrap-configure index c58f7aa4..e73f5eb8 100755 --- a/bootstrap-configure +++ b/bootstrap-configure @@ -19,12 +19,12 @@ fi --disable-datafiles \ --enable-loopback=builtin \ --enable-ethernet=builtin \ - --enable-wifi \ - --enable-bluetooth \ + --enable-wifi=builtin \ + --enable-bluetooth=builtin \ --enable-modemmgr \ --enable-udhcp \ --enable-dhclient \ - --enable-resolvconf \ + --enable-resolvconf=builtin \ --enable-dnsproxy=builtin \ --enable-novatel \ --enable-huawei \ diff --git a/configure.ac b/configure.ac index 2bcac75f..3b12175c 100644 --- a/configure.ac +++ b/configure.ac @@ -62,11 +62,13 @@ if (test "${enable_wifi}" = "yes"); then AC_PATH_PROG(WPASUPPLICANT, [wpa_supplicant], [], $PATH:/sbin:/usr/sbin) fi -AM_CONDITIONAL(WIFI, test "${enable_wifi}" = "yes") +AM_CONDITIONAL(WIFI, test "${enable_wifi}" != "no") +AM_CONDITIONAL(WIFI_BUILTIN, test "${enable_wifi}" = "builtin") AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--enable-bluetooth], [enable Bluetooth support]), [enable_bluetooth=${enableval}]) -AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" = "yes") +AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no") +AM_CONDITIONAL(BLUETOOTH_BUILTIN, test "${enable_bluetooth}" = "builtin") AC_ARG_ENABLE(modemmgr, AC_HELP_STRING([--enable-modemmgr], [enable Modem Manager support]), [enable_modemmgr=${enableval}]) @@ -115,7 +117,8 @@ if (test "${enable_resolvconf}" = "yes"); then AC_SUBST(RESOLVCONF) fi fi -AM_CONDITIONAL(RESOLVCONF, test "${enable_resolvconf}" = "yes") +AM_CONDITIONAL(RESOLVCONF, test "${enable_resolvconf}" != "no") +AM_CONDITIONAL(RESOLVCONF_BUILTIN, test "${enable_resolvconf}" = "builtin") AC_ARG_ENABLE(dnsproxy, AC_HELP_STRING([--enable-dnsproxy], [enable DNS proxy support]), [enable_dnsproxy=${enableval}]) diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 2fb60174..ed14ac2e 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -5,6 +5,7 @@ plugin_LTLIBRARIES = builtin_modules = builtin_sources = +builtin_cflags = if LOOPBACK if LOOPBACK_BUILTIN @@ -26,46 +27,49 @@ endif endif if WIFI +if WIFI_BUILTIN +builtin_modules += wifi +builtin_sources += wifi.c inet.h inet.c supplicant.h supplicant.c +else plugin_LTLIBRARIES += wifi.la - wifi_la_SOURCES = wifi.c inet.h inet.c supplicant.h supplicant.c wifi_la_LIBADD = @GDBUS_LIBS@ endif +endif if BLUETOOTH +if BLUETOOTH_BUILTIN +builtin_modules += bluetooth +builtin_sources += bluetooth.c inet.h inet.c +else plugin_LTLIBRARIES += bluetooth.la - bluetooth_la_SOURCES = bluetooth.c inet.h inet.c bluetooth_la_LIBADD = @GDBUS_LIBS@ endif +endif if MODEMMGR plugin_LTLIBRARIES += modemmgr.la - modemmgr_la_LIBADD = @GDBUS_LIBS@ endif if NOVATEL plugin_LTLIBRARIES += novatel.la - novatel_la_SOURCES = novatel.c modem.h modem.c endif if HUAWEI plugin_LTLIBRARIES += huawei.la - huawei_la_SOURCES = huawei.c modem.h modem.c endif if HSO plugin_LTLIBRARIES += hso.la - hso_la_SOURCES = hso.c modem.h modem.c endif if UDHCP plugin_LTLIBRARIES += udhcp.la - udhcp_la_SOURCES = udhcp.c inet.h inet.c task.h task.c udhcp_la_CFLAGS = $(AM_CFLAGS) -DUDHCPC=\"@UDHCPC@\" \ -DSTATEDIR=\""$(statedir)"\" -DSCRIPTDIR=\""$(scriptdir)"\" @@ -73,7 +77,6 @@ endif if DHCLIENT plugin_LTLIBRARIES += dhclient.la - dhclient_la_SOURCES = dhclient.c inet.h inet.c dhclient_la_CFLAGS = $(AM_CFLAGS) -DDHCLIENT=\"@DHCLIENT@\" \ -DSTATEDIR=\""$(statedir)"\" -DSCRIPTDIR=\""$(scriptdir)"\" @@ -81,15 +84,19 @@ endif if PPPD plugin_LTLIBRARIES += pppd.la - pppd_la_CFLAGS = $(AM_CFLAGS) -DPPPD=\"@PPPD@\" endif if RESOLVCONF +if RESOLVCONF_BUILTIN +builtin_modules += resolvconf +builtin_sources += resolvconf.c +builtin_cflags += -DRESOLVCONF=\"@RESOLVCONF@\" +else plugin_LTLIBRARIES += resolvconf.la - resolvconf_la_CFLAGS = $(AM_CFLAGS) -DRESOLVCONF=\"@RESOLVCONF@\" endif +endif if DNSPROXY if DNSPROXY_BUILTIN @@ -102,7 +109,6 @@ endif if POLKIT plugin_LTLIBRARIES += polkit.la - polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@ polkit_la_CFLAGS = $(AM_CFLAGS) @POLKIT_CFLAGS@ @@ -119,7 +125,6 @@ endif if IWMXSDK plugin_LTLIBRARIES += iwmxsdk.la - iwmxsdk_la_SOURCES = iwmxsdk.c inet.h inet.c iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@ iwmxsdk_la_CFLAGS = $(AM_CFLAGS) @IWMXSDK_CFLAGS@ @@ -133,7 +138,7 @@ noinst_LTLIBRARIES = libbuiltin.la libbuiltin_la_SOURCES = $(builtin_sources) libbuiltin_la_LDFLAGS = -libbuiltin_la_CFLAGS = $(AM_CFLAGS) -DCONNMAN_PLUGIN_BUILTIN +libbuiltin_la_CFLAGS = $(AM_CFLAGS) $(builtin_cflags) -DCONNMAN_PLUGIN_BUILTIN BUILT_SOURCES = builtin.h @@ -163,6 +168,7 @@ builtin.h: echo "" > $@ list='$(builtin_modules)'; for i in $$list; \ do echo "extern struct connman_plugin_desc __connman_builtin_$$i;" >> $@; done + echo "" >> $@ echo "static struct connman_plugin_desc *__connman_builtin[] = {" >> $@ list='$(builtin_modules)'; for i in $$list; \ do echo "&__connman_builtin_$$i," >> $@; done |