fixed hardcoded location of config file for xboard
authorArun Persaud <arun@nubati.net>
Sat, 23 Jan 2010 19:04:11 +0000 (11:04 -0800)
committerArun Persaud <arun@nubati.net>
Sat, 23 Jan 2010 19:04:11 +0000 (11:04 -0800)
the location should now follow sysconfdir during the configuration process.
Also added some more output to the configure script.

Makefile.am
configure.ac
xboard.h

index d343b08..3abd176 100644 (file)
@@ -30,18 +30,18 @@ xboard_SOURCES = backend.c backend.h backendz.h \
 xboard_LDADD = -lm @XAW_LIBS@ @X_LIBS@ 
 
 EXTRA_DIST = pixmaps bitmaps winboard sounds \
-       xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man xboard.conf \
+       xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man \
        COPYRIGHT FAQ.html engine-intf.html ics-parsing.txt readme.htm readme_HGM.txt zippy.README
 
 DISTCLEANFILES = stamp-h
 
-AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @X_CFLAGS@
+AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @X_CFLAGS@  -DSYSCONFDIR='"$(sysconfdir)"'
 
 info_TEXINFOS =  xboard.texi
 xboard_TEXINFOS =  copyright.texi 
 man6_MANS = xboard.man
 
-sysconf_DATA=xboard.conf
+dist_sysconf_DATA = xboard.conf
 
 xboard.man: xboard.texi copyright.texi gpl.texinfo version.texi
        $(srcdir)/texi2man $(srcdir)/xboard.texi > xboard.man || (rm -f xboard.man ; false)
index ce20a4f..d8c1554 100644 (file)
@@ -428,6 +428,9 @@ echo ""
 echo " Configurations summary:"
 echo ""
 echo "        prefix:          $prefix"
+echo "        datarootdir:     $datarootdir"
+echo "        infodir:         $infodir"
+echo "        sysconfdir:      $sysconfdir"
 echo ""
 echo "        Xaw3d:           $with_xaw3d"
 echo ""
index 7ada32f..77d41f3 100644 (file)
--- a/xboard.h
+++ b/xboard.h
@@ -113,7 +113,7 @@ typedef struct {
 #define FCP_NAMES               ""
 #define SCP_NAMES               ""
 #define ICS_TEXT_MENU_DEFAULT   ""
-#define SETTINGS_FILE           "/etc/xboard/xboard.conf"
+#define SETTINGS_FILE           SYSCONFDIR"/xboard.conf"
 #define COLOR_BKGD              "white"
 
 typedef int (*FileProc) P((FILE *f, int n, char *title));