replaced hardcoded pngdir with built-in ~~
[xboard.git] / Makefile.am
index e9d8ca8..5316962 100644 (file)
@@ -57,20 +57,20 @@ xboard_SOURCES = backend.c backend.h backendz.h \
 ###
 
 SUBDIRS = po
-xboard_LDADD = -lm @FRONTEND_LIBS@ @X_LIBS@ @LIBINTL@ @CAIRO_LIBS@
+xboard_LDADD = -ldl -lm @FRONTEND_LIBS@ @X_LIBS@ @LIBINTL@ @CAIRO_LIBS@
 
 EXTRA_DIST = pixmaps themes png sounds winboard \
        xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man xboard.desktop xboard-config.desktop \
        xboard-fen-viewer.desktop  xboard-pgn-viewer.desktop  xboard-tourney.desktop xboard.xml \
        COPYRIGHT FAQ.html engine-intf.html ics-parsing.txt readme.htm zippy.README \
-       xboard.conf.in SHORTLOG DIFFSTAT history.c ABOUT-NLS $(FRONTENDextras)
+       xboard.conf SHORTLOG DIFFSTAT history.c ABOUT-NLS $(FRONTENDextras)
 
 DISTCLEANFILES = stamp-h
 
 GITVERSION=$(shell sh -c 'git describe --dirty --always 2>/dev/null')
 AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @X_CFLAGS@ @CAIRO_CFLAGS@ @FRONTEND_CFLAGS@  -DSYSCONFDIR='"$(sysconfdir)"' \
            -DLOCALEDIR='"$(localedir)"' -DSVGDIR='"$(svgdir)"' -D__GIT_VERSION='"$(GITVERSION)"' \
-            -DCONFIGURE_OPTIONS='"@CONFIGURE_OPTIONS@"' $(headers)
+            -DCONFIGURE_OPTIONS='"@CONFIGURE_OPTIONS@"' -DDATADIR='"$(datadir)/games/xboard"' $(headers)
 
 ACLOCAL_AMFLAGS = -I m4
 
@@ -176,6 +176,11 @@ dist_xiangqi_DATA = themes/xiangqi/BlackAdvisor.svg  themes/xiangqi/WhiteAdvisor
            themes/xiangqi/BlackPawn.svg            themes/xiangqi/WhitePawn.svg     \
            themes/xiangqi/BlackRook.svg            themes/xiangqi/WhiteRook.svg
 
+### directory and files for themes (and other) configuration files
+
+themesdir = $(datadir)/games/xboard/themes/conf
+dist_themes_DATA = conf/shogi conf/xq conf/chu conf/ics conf/mini conf/mini.fen conf/sho conf/sho.fen
+
 ### directory and files for pixmaps
 
 pixmapsdir = $(gamedatadir)/pixmaps/textures
@@ -193,21 +198,6 @@ dist_sounds_DATA = \
   sounds/cymbal.wav     sounds/pop2.wav   sounds/slap.wav     sounds/ding1.wav      sounds/laser.wav \
   sounds/woodthunk.wav  sounds/gong.wav   sounds/penalty.wav  sounds/honkhonk.wav   sounds/phone.wav  sounds/roar.wav
 
-
-### set correct dir in xboard.conf
-
-edit = sed -e 's|@pngdir[@]|$(pngdir)|g' \
-           -e 's|@soundsdir[@]|$(soundsdir)|g'
-
-xboard.conf: Makefile $(srcdir)/xboard.conf.in
-       @echo '  'GEN '  ' $@;
-       @rm -f $@ $@.tmp
-       @$(edit) $(srcdir)/$@.in >$@.tmp
-       @mv $@.tmp $@
-
-distclean-local:
-       -rm -f xboard.conf
-
 ### the man page depends on several files, so we add a special rule
 
 xboard.man: xboard.texi copyright.texi gpl.texinfo version.texi