cc32972
diff -u --recursive festival-vanilla/doc/festival.texi festival/doc/festival.texi
cc32972
--- festival-vanilla/doc/festival.texi	2017-09-04 11:54:08.000000000 -0400
cc32972
+++ festival/doc/festival.texi	2018-09-09 10:04:50.409877809 -0400
cc32972
@@ -936,14 +936,15 @@
cc32972
 @cindex initialization
cc32972
 @cindex installation initialization
cc32972
 @cindex @file{init.scm}
cc32972
-@cindex @file{siteinit.scm}
cc32972
+@cindex @file{/etc/festival.scm}
cc32972
+@cindex @file{/etc/festivalvars.scm}
cc32972
 Once compiled Festival may be further customized for particular sites.
cc32972
 At start up time Festival loads the file @file{init.scm} from its
cc32972
 library directory.  This file further loads other necessary files such
cc32972
 as phoneset descriptions, duration parameters, intonation parameters,
cc32972
 definitions of voices etc.  It will also load the files
cc32972
-@file{sitevars.scm} and @file{siteinit.scm} if they exist.  
cc32972
-@file{sitevars.scm} is loaded after the basic Scheme library functions
cc32972
+@file{/etc/festivalvars.scm} and @file{/etc/festival.scm} if they exist.
cc32972
+@file{/etc/festivalvars.scm} is loaded after the basic Scheme library functions
cc32972
 are loaded but before any of the festival related functions are
cc32972
 loaded.  This file is intended to set various path names before
cc32972
 various subsystems are loaded.  Typically variables such
cc32972
@@ -951,17 +952,17 @@
cc32972
 @code{voices_dir} (pointing to voice directories) should
cc32972
 be reset here if necessary.
cc32972
 
cc32972
-@cindex change libdir at run-time
cc32972
+@cindex change libdir or datadir at run-time
cc32972
 @cindex run-time configuration
cc32972
 @cindex @code{load-path}
cc32972
 The default installation will try to find its lexicons and voices
cc32972
 automatically based on the value of @code{load-path} (this is derived
cc32972
-from @code{FESTIVAL_HOME} at compilation time or by using the @code{--libdir}
cc32972
+from @code{FESTIVAL_HOME} at compilation time or by using the @code{--datadir}
cc32972
 at run-time).  If the voices and lexicons have been unpacked into
cc32972
 subdirectories of the library directory (the default) then no site
cc32972
 specific initialization of the above pathnames will be necessary.
cc32972
 
cc32972
-The second site specific file is @file{siteinit.scm}.  Typical examples
cc32972
+The second site specific file is @file{/etc/festival.scm}.  Typical examples
cc32972
 of local initialization are as follows.  The default audio output method
cc32972
 is NCD's NAS system if that is supported as that's what we use normally
cc32972
 in CSTR.  If it is not supported, any hardware specific mode is the
cc32972
@@ -969,7 +970,7 @@
cc32972
 But that default is just a setting in @file{init.scm}.  If for example
cc32972
 in your environment you may wish the default audio output method to be
cc32972
 8k mulaw through @file{/dev/audio} you should add the following line to
cc32972
-your @file{siteinit.scm} file
cc32972
+your @file{/etc/festival.scm} file
cc32972
 @lisp
cc32972
 (Parameter.set 'Audio_Method 'sunaudio)
cc32972
 @end lisp
cc32972
@@ -990,7 +991,7 @@
cc32972
 for sample rate and file type.  When playing waveforms, Festival, by
cc32972
 default, outputs as unheadered waveform in native byte order.  In this
cc32972
 example you would set up the default audio playing mechanism in
cc32972
-@file{siteinit.scm} as follows
cc32972
+@file{/etc/festival.scm} as follows
cc32972
 @lisp
cc32972
 (Parameter.set 'Audio_Method 'Audio_Command)
cc32972
 (Parameter.set 'Audio_Command "adplay -raw -r $SR $FILE")
cc32972
@@ -1036,12 +1037,12 @@
cc32972
 depend on many things but due to various licence (and resource)
cc32972
 restrictions you may only have some diphone/nphone databases available
cc32972
 in your installation.  The function name that is the value of
cc32972
-@code{voice_default} is called immediately after @file{siteinit.scm} is
cc32972
+@code{voice_default} is called immediately after @file{/etc/festival.scm} is
cc32972
 loaded offering the opportunity for you to change it.  In
cc32972
 the standard distribution no change should be required.  If you
cc32972
 download all the distributed voices @code{voice_rab_diphone} is
cc32972
 the default voice.  You may change this for a site by adding
cc32972
-the following to @file{siteinit.scm} or per person by changing
cc32972
+the following to @file{/etc/festival.scm} or per person by changing
cc32972
 your @file{.festivalrc}.  For example if you wish to
cc32972
 change the default voice to the American one @code{voice_ked_diphone}
cc32972
 @lisp
cc32972
@@ -1085,7 +1086,9 @@
cc32972
 Copyright (C) University of Edinburgh, 1996-2003. All rights reserved.
cc32972
 For details type `(festival_warranty)'
cc32972
 festival> libdir
cc32972
-"/projects/festival/lib/"
cc32972
+"/usr/lib/festival"
cc32972
+festival> datadir
cc32972
+"/usr/share/festival"
cc32972
 festival> ^D
cc32972
 @end example
cc32972
 This should show the pathname you set in your @file{config/config}.
cc32972
@@ -1106,7 +1109,7 @@
cc32972
 You have selected NAS as the audio output but have no server running on
cc32972
 that machine or your @code{DISPLAY} or @code{AUDIOSERVER} environment
cc32972
 variable is not set properly for your output device.  Either set these
cc32972
-properly or change the audio output device in @file{lib/siteinit.scm} as
cc32972
+properly or change the audio output device in @file{lib/festival.scm} as
cc32972
 described above.
cc32972
 
cc32972
 Ensure your audio device actually works the way you think it does.  On
cc32972
@@ -1136,7 +1139,7 @@
cc32972
 @code{voice_rab_diphone} (@file{festvox_rabxxxx.tar.gz}) is the default
cc32972
 voice and that @code{voice_ked_diphone} and @code{voice_don_diphone}
cc32972
 (@file{festvox_kedxxxx.tar.gz} and @file{festvox_don.tar.gz}) are
cc32972
-installed.  Also local settings in your @file{festival/lib/siteinit.scm}
cc32972
+installed.  Also local settings in your @file{/etc/festival.scm}
cc32972
 may affect these tests.  However, after installation it may
cc32972
 be worth trying
cc32972
 @example
cc32972
Only in festival/doc: festival.texi.orig
cc32972
Only in festival-vanilla/: festival
cc32972
diff -u --recursive festival-vanilla/lib/init.scm festival/lib/init.scm
cc32972
--- festival-vanilla/lib/init.scm	2017-09-04 11:54:08.000000000 -0400
cc32972
+++ festival/lib/init.scm	2018-09-09 10:04:50.406877794 -0400
cc32972
@@ -42,6 +42,10 @@
cc32972
   "home-directory
cc32972
    Place looked at for .festivalrc etc.")
cc32972
 
cc32972
+;;; system-wide startup initialization
cc32972
+(if (probe_file (path-append sysconfdir "festivalvars.scm"))
cc32972
+	(load (path-append sysconfdir "festivalvars.scm")))
cc32972
+
cc32972
 ;;;  User startup initialization, can be used to override load-path
cc32972
 ;;;  to allow alternate basic modules to be loaded.
cc32972
 (if (probe_file (path-append home-directory ".siodvarsrc"))
cc32972
@@ -50,11 +54,6 @@
cc32972
 (if (probe_file (path-append home-directory ".festivalvarsrc"))
cc32972
     (load (path-append home-directory ".festivalvarsrc")))
cc32972
 
cc32972
-;;;  A chance to set various variables to a local setting e.g.
cc32972
-;;;  lexdir, voices_dir audio etc etc.
cc32972
-(if (probe_file (path-append libdir "sitevars.scm"))
cc32972
-    (load (path-append libdir "sitevars.scm")))
cc32972
-
cc32972
 ;;; CSTR siod extensions
cc32972
 (require 'cstr)
cc32972
 
cc32972
@@ -135,8 +134,8 @@
cc32972
 ;;;
cc32972
 ;;;  Local site initialization, if the file exists load it
cc32972
 ;;;
cc32972
-(if (probe_file (path-append libdir "siteinit.scm"))
cc32972
-    (load (path-append libdir "siteinit.scm")))
cc32972
+(if (probe_file (path-append sysconfdir "festival.scm"))
cc32972
+    (load (path-append sysconfdir "festival.scm")))
cc32972
 
cc32972
 ;;;  User initialization, if a user has a personal customization
cc32972
 ;;;  file loaded it
cc32972
diff -u --recursive festival-vanilla/lib/synthesis.scm festival/lib/synthesis.scm
cc32972
--- festival-vanilla/lib/synthesis.scm	2017-09-04 11:54:08.000000000 -0400
cc32972
+++ festival/lib/synthesis.scm	2018-09-09 10:04:50.380877660 -0400
cc32972
@@ -68,7 +68,7 @@
cc32972
    The default list of functions to be run on all synthesized utterances
cc32972
    after Wave_Synth.  This will normally be nil but if for some reason you
cc32972
    need to change the gain or rescale *all* waveforms you could set the
cc32972
-   function here, in your siteinit.scm.")
cc32972
+   function here, in your /etc/festival.scm.")
cc32972
 
cc32972
 (defvar after_synth_hooks default_after_synth_hooks
cc32972
   "after_synth_hooks
cc32972
Only in festival/src/arch/festival: festival.cc.orig