AM_CFLAGS= \
-I$(top_srcdir) \
+ -DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
+ -DAVAHI_SOCKET=\"$(avahi_socket)\" \
-DAVAHI_SERVICE_DIRECTORY=\"$(servicedir)\" \
-DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi.conf\"
}
static const char* pid_file_proc(void) {
- return AVAHI_RUNTIME_DIR"/avahi-daemon.pid";
+ return AVAHI_DAEMON_RUNTIME_DIR"/pid";
}
static gint make_runtime_dir(void) {
u = umask(0000);
reset_umask = TRUE;
- if (mkdir(AVAHI_RUNTIME_DIR, 0755) < 0 && errno != EEXIST) {
- avahi_log_error("mkdir(\""AVAHI_RUNTIME_DIR"\"): %s", strerror(errno));
+ if (mkdir(AVAHI_DAEMON_RUNTIME_DIR, 0755) < 0 && errno != EEXIST) {
+ avahi_log_error("mkdir(\""AVAHI_DAEMON_RUNTIME_DIR"\"): %s", strerror(errno));
goto fail;
}
- chown(AVAHI_RUNTIME_DIR, pw->pw_uid, gr->gr_gid);
+ chown(AVAHI_DAEMON_RUNTIME_DIR, pw->pw_uid, gr->gr_gid);
- if (stat(AVAHI_RUNTIME_DIR, &st) < 0) {
+ if (stat(AVAHI_DAEMON_RUNTIME_DIR, &st) < 0) {
avahi_log_error("stat(): %s\n", strerror(errno));
goto fail;
}
if (!S_ISDIR(st.st_mode) || st.st_uid != pw->pw_uid || st.st_gid != gr->gr_gid) {
- avahi_log_error("Failed to create runtime directory "AVAHI_RUNTIME_DIR".");
+ avahi_log_error("Failed to create runtime directory "AVAHI_DAEMON_RUNTIME_DIR".");
goto fail;
}
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
-AM_CFLAGS=-I$(top_srcdir)
+AM_CFLAGS=-I$(top_srcdir) \
+ -DAVAHI_INTERFACES_DIR=\"$(interfacesdir)\"
AM_CFLAGS+=$(GLIB20_CFLAGS) $(GTK20_CFLAGS) $(GLADE20_CFLAGS)
AM_LDADD=$(GLIB20_LIBS) $(GTK20_LIBS) $(GLADE20_LIBS)
gtk_init(&argc, &argv);
glade_init();
- xml = glade_xml_new(INTERFACES_DIR"avahi-discover.glade", NULL, NULL);
+ xml = glade_xml_new(AVAHI_INTERFACES_DIR"avahi-discover.glade", NULL, NULL);
main_window = glade_xml_get_widget(xml, "main_window");
g_signal_connect(main_window, "delete-event", (GCallback) main_window_on_delete_event, NULL);
AM_CFLAGS= \
-I$(top_srcdir) \
+ -DAVAHI_RUNTIME_DIR=\"$(avahi_runtime_dir)/\" \
+ -DAVAHI_SOCKET=\"$(avahi_socket)\" \
-DAVAHI_DNSCONF_SCRIPT=\"$(pkgsysconfdir)/dnsconf.action\"
# GLIB 2.0
AC_SUBST(GLADE20_CFLAGS)
AC_SUBST(GLADE20_LIBS)
- DATADIRNAME=share
- if test "x${prefix}" = "xNONE"; then
- interfacesdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/interfaces/"
- else
- interfacesdir="${prefix}/${DATADIRNAME}/${PACKAGE}/interfaces/"
- fi
- AC_DEFINE_UNQUOTED(INTERFACES_DIR, "${interfacesdir}", [path where glade files will be installed])
+ interfacesdir="${datadir}/${PACKAGE}/interfaces/"
AC_SUBST(interfacesdir)
fi
DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
fi
AC_SUBST(DBUS_SYS_DIR)
- AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, `eval echo $DBUS_SYS_DIR` , [Where system.d dir for DBUS is])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
#
# Avahi runtime dir
#
-avahi_runtime_dir=`eval echo ${localstatedir}/run/avahi`
-AC_DEFINE_UNQUOTED(AVAHI_RUNTIME_DIR, "${avahi_runtime_dir}", [path where pid and socket will be stored])
-AC_DEFINE_UNQUOTED(AVAHI_SOCKET, "${avahi_runtime_dir}/socket", [path for avahi socket])
-
+avahi_runtime_dir="${localstatedir}/run"
+avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
+AC_SUBST(avahi_runtime_dir)
+AC_SUBST(avahi_socket)
AC_CONFIG_FILES([
Makefile