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