]> git.meshlink.io Git - catta/commitdiff
* check for expat in configure
authorLennart Poettering <lennart@poettering.net>
Fri, 17 Jun 2005 16:29:16 +0000 (16:29 +0000)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Jun 2005 16:29:16 +0000 (16:29 +0000)
* some premature command line parsing stuff

git-svn-id: file:///home/lennart/svn/public/avahi/trunk@125 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-daemon/example.service
avahi-daemon/main.c
configure.ac

index a5f9071aced6f3a60d46d03a6c7578c158543de4..3df961c70997093b6c0d55d15cd5cd63dc46eb0e 100644 (file)
@@ -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>
index 4a8d44dd1d1cdd11f0c2b641a57596fd555e3eea..d59e9fb3df2ffe1d62418f8a39ec6d3a73ad5ba2 100644 (file)
@@ -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)
index 1a295d4c61d61cc463baea05b3b08d23472a062d..c9e2de567f5670c811218e3b7c897cac626aeab6 100644 (file)
@@ -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