1. Call ‘kpse_set_program_name’ with ‘argv[0]’ as the first argument; 
     the second argument is a string or ‘NULL’.  The second argument is 
     used by Kpathsea as the program name for the ‘.PROGRAM’ feature of 
     config files (*note Config files::.).  If the second argument is 
     ‘NULL’, the value of the first argument is used.  This function 
     must be called before any other use of the Kpathsea library. 
 
     If necessary, ‘kpse_set_program_name’ sets the global variables 
     ‘program_invocation_name’ and ‘program_invocation_short_name’. 
     These variables are used in the error message macros defined in 
     ‘kpathsea/lib.h’.  It sets the global variable ‘kpse_program_name’ 
     to the program name it uses.  It also initializes debugging 
     options based on the environment variable ‘KPATHSEA_DEBUG’ (if 
     that is set).  Finally, it sets the variables ‘SELFAUTOLOC’, 
     ‘SELFAUTODIR’ and ‘SELFAUTOPARENT’ to the location, parent and 
     grandparent directory of the executable, removing ‘.’ and ‘..’ 
     path elements and resolving symbolic links.  These are used in the 
     default configuration file to allow people to invoke TeX from 
     anywhere, specifically from a mounted CD-ROM.  (You can use 
     ‘--expand-var=\$SELFAUTOLOC’, etc., to see the values finds.)