diff options
-rw-r--r-- | avahi-daemon/example.service | 2 | ||||
-rw-r--r-- | avahi-daemon/main.c | 26 | ||||
-rw-r--r-- | configure.ac | 9 |
3 files changed, 36 insertions, 1 deletions
diff --git a/avahi-daemon/example.service b/avahi-daemon/example.service index a5f9071..3df961c 100644 --- a/avahi-daemon/example.service +++ b/avahi-daemon/example.service @@ -14,7 +14,7 @@ <service> <type>_telnet._tcp</type> <domain-name>local</domain-name> - <host-name>ecstasy.local</host-name> + <host-name>fuck.local</host-name> <port>23</port> <txt-record>foo=bar</txt-record> <txt-record>waldo=buzz</txt-record> diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 4a8d44d..d59e9fb 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -49,6 +49,26 @@ static void server_callback(AvahiServer *s, AvahiServerState state, gpointer use } } +static void help(FILE *f, const gchar *argv0) { + fprintf(f, + "%s [options]\n" + " -h --help Show this help\n" + " -D --daemon Daemonize after startup\n" + " -k --kill Kill a running daemon\n" + " -v --version Show version\n", + argv0); +} + +static gint parse_command_line(AvahiServerConfig *config, int argc, char *argv[]) { + + return 0; +} + +static gint load_config_file(AvahiServerConfig *config) { + + return 0; +} + int main(int argc, char *argv[]) { GMainLoop *loop = NULL; gint r = 255; @@ -56,6 +76,12 @@ int main(int argc, char *argv[]) { avahi_server_config_init(&config); + if (load_config_file(&config) < 0) + goto finish; + + if (parse_command_line(&config, argc, argv) < 0) + goto finish; + loop = g_main_loop_new(NULL, FALSE); if (simple_protocol_setup(NULL) < 0) diff --git a/configure.ac b/configure.ac index 1a295d4..c9e2de5 100644 --- a/configure.ac +++ b/configure.ac @@ -112,6 +112,15 @@ fi AM_CONDITIONAL(ENABLE_DBUS, test "x$ENABLE_DBUS" = "xyes") +AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false) + +if ! $have_expat ; then + AC_MSG_ERROR([*** libexpat not found ***]) +fi + +PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ]) +AC_SUBST(LIBDAEMON_CFLAGS) +AC_SUBST(LIBDAEMON_LIBS) # If using GCC specify some additional parameters if test "x$GCC" = "xyes" ; then |