From c56e896b72c73fab69cc88678ef3c09cddc499ce Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 19 Sep 2010 15:32:15 +0900 Subject: [PATCH] Add skeleton for PAC runner support --- Makefile.am | 1 + Makefile.plugins | 12 ++++++++++++ bootstrap-configure | 1 + configure.ac | 7 +++++++ plugins/pacrunner.c | 39 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 plugins/pacrunner.c diff --git a/Makefile.am b/Makefile.am index 397822e..3de7186 100644 --- a/Makefile.am +++ b/Makefile.am @@ -212,6 +212,7 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc \ --enable-ofono \ --enable-dhclient \ --enable-dnsproxy \ + --enable-pacrunner \ --enable-google \ --enable-meego \ --enable-udev \ diff --git a/Makefile.plugins b/Makefile.plugins index 5ce6c52..3b3164b 100644 --- a/Makefile.plugins +++ b/Makefile.plugins @@ -135,6 +135,18 @@ plugins_dnsproxy_la_LDFLAGS = $(plugin_ldflags) endif endif +if PACRUNNER +if PACRUNNER_BUILTIN +builtin_modules += pacrunner +builtin_sources += plugins/pacrunner.c +else +plugin_LTLIBRARIES += plugins/pacrunner.la +plugin_objects += $(plugins_pacrunner_la_OBJECTS) +plugins_pacrunner_la_CFLAGS = $(plugin_cflags) +plugins_pacrunner_la_LDFLAGS = $(plugin_ldflags) +endif +endif + if GOOGLE if GOOGLE_BUILTIN builtin_modules += google diff --git a/bootstrap-configure b/bootstrap-configure index 1045688..bda9708 100755 --- a/bootstrap-configure +++ b/bootstrap-configure @@ -23,6 +23,7 @@ fi --enable-ofono=builtin \ --enable-dhclient=builtin \ --enable-openconnect=builtin \ + --enable-pacrunner=builtin \ --enable-dnsproxy=builtin \ --enable-google=builtin \ --enable-meego=builtin \ diff --git a/configure.ac b/configure.ac index daffc47..b2dcc80 100644 --- a/configure.ac +++ b/configure.ac @@ -158,6 +158,13 @@ AC_ARG_ENABLE(dnsproxy, AM_CONDITIONAL(DNSPROXY, test "${enable_dnsproxy}" != "no") AM_CONDITIONAL(DNSPROXY_BUILTIN, test "${enable_dnsproxy}" = "builtin") +AC_ARG_ENABLE(pacrunner, + AC_HELP_STRING([--enable-pacrunner], [enable PAC runner support]), + [enable_pacrunner=${enableval}], [enable_pacrunner="no"]) + +AM_CONDITIONAL(PACRUNNER, test "${enable_pacrunner}" != "no") +AM_CONDITIONAL(PACRUNNER_BUILTIN, test "${enable_pacrunner}" = "builtin") + AC_ARG_ENABLE(google, AC_HELP_STRING([--enable-google], [enable Google Public DNS support]), [enable_google=${enableval}], [enable_google="no"]) diff --git a/plugins/pacrunner.c b/plugins/pacrunner.c new file mode 100644 index 0000000..06a309d --- /dev/null +++ b/plugins/pacrunner.c @@ -0,0 +1,39 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2007-2010 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#define CONNMAN_API_SUBJECT_TO_CHANGE +#include + +static int pacrunner_init(void) +{ + return 0; +} + +static void pacrunner_exit(void) +{ +} + +CONNMAN_PLUGIN_DEFINE(pacrunner, "PAC runner proxy plugin", VERSION, + CONNMAN_PLUGIN_PRIORITY_DEFAULT, pacrunner_init, pacrunner_exit) -- 2.7.4