comparison src/callproc.c @ 32:e04119814345 r19-15b99

Import from CVS: tag r19-15b99
author cvs
date Mon, 13 Aug 2007 08:52:56 +0200
parents 859a2309aef8
children 8d2a9b52c682
comparison
equal deleted inserted replaced
31:b9328a10c56c 32:e04119814345
47 Lisp_Object Vbinary_process_input; 47 Lisp_Object Vbinary_process_input;
48 Lisp_Object Vbinary_process_output; 48 Lisp_Object Vbinary_process_output;
49 #endif /* DOS_NT */ 49 #endif /* DOS_NT */
50 50
51 Lisp_Object Vexec_path, Vexec_directory, Vdata_directory, Vdoc_directory; 51 Lisp_Object Vexec_path, Vexec_directory, Vdata_directory, Vdoc_directory;
52 Lisp_Object Vconfigure_info_directory; 52 Lisp_Object Vconfigure_info_directory, Vsite_directory;
53 53
54 /* The default base directory XEmacs is installed under. */ 54 /* The default base directory XEmacs is installed under. */
55 Lisp_Object Vprefix_directory; 55 Lisp_Object Vprefix_directory;
56 56
57 Lisp_Object Vshell_file_name; 57 Lisp_Object Vshell_file_name;
944 */ 944 */
945 #ifndef CANNOT_DUMP 945 #ifndef CANNOT_DUMP
946 if (!initialized) 946 if (!initialized)
947 { 947 {
948 Vdata_directory = Qnil; 948 Vdata_directory = Qnil;
949 Vsite_directory = Qnil;
949 Vdoc_directory = Qnil; 950 Vdoc_directory = Qnil;
950 Vexec_path = Qnil; 951 Vexec_path = Qnil;
951 } 952 }
952 else 953 else
953 #endif 954 #endif
954 { 955 {
955 char *data_dir = egetenv ("EMACSDATA"); 956 char *data_dir = egetenv ("EMACSDATA");
957 char *site_dir = egetenv ("EMACSSITE");
956 char *doc_dir = egetenv ("EMACSDOC"); 958 char *doc_dir = egetenv ("EMACSDOC");
957 959
958 #ifdef PATH_DATA 960 #ifdef PATH_DATA
959 if (!data_dir) 961 if (!data_dir)
960 data_dir = (char *) PATH_DATA; 962 data_dir = (char *) PATH_DATA;
961 #endif 963 #endif
962 #ifdef PATH_DOC 964 #ifdef PATH_DOC
963 if (!doc_dir) 965 if (!doc_dir)
964 doc_dir = (char *) PATH_DOC; 966 doc_dir = (char *) PATH_DOC;
967 #endif
968 #ifdef PATH_SITE
969 if (!site_dir)
970 site_dir = (char *) PATH_SITE;
965 #endif 971 #endif
966 972
967 if (data_dir) 973 if (data_dir)
968 Vdata_directory = Ffile_name_as_directory 974 Vdata_directory = Ffile_name_as_directory
969 (build_string (data_dir)); 975 (build_string (data_dir));
972 if (doc_dir) 978 if (doc_dir)
973 Vdoc_directory = Ffile_name_as_directory 979 Vdoc_directory = Ffile_name_as_directory
974 (build_string (doc_dir)); 980 (build_string (doc_dir));
975 else 981 else
976 Vdoc_directory = Qnil; 982 Vdoc_directory = Qnil;
983 if (site_dir)
984 Vsite_directory = Ffile_name_as_directory
985 (build_string (site_dir));
986 else
987 Vsite_directory = Qnil;
977 988
978 /* Check the EMACSPATH environment variable, defaulting to the 989 /* Check the EMACSPATH environment variable, defaulting to the
979 PATH_EXEC path from paths.h. */ 990 PATH_EXEC path from paths.h. */
980 Vexec_path = decode_env_path ("EMACSPATH", 991 Vexec_path = decode_env_path ("EMACSPATH",
981 #ifdef PATH_EXEC 992 #ifdef PATH_EXEC
1026 (Qpath, Qwarning, 1037 (Qpath, Qwarning,
1027 "Warning: machine-independent data dir (%s) does not exist.\n", 1038 "Warning: machine-independent data dir (%s) does not exist.\n",
1028 XSTRING_DATA (Vdata_directory)); 1039 XSTRING_DATA (Vdata_directory));
1029 #else 1040 #else
1030 Vdata_directory = Qnil; 1041 Vdata_directory = Qnil;
1042 #endif
1043 }
1044 }
1045
1046 if (!NILP (Vsite_directory))
1047 {
1048 tempdir = Fdirectory_file_name (Vsite_directory);
1049 if (access ((char *) XSTRING_DATA (tempdir), 0) < 0)
1050 {
1051 /* If the hard-coded path is bogus, fail silently.
1052 This will allow the normal heuristics to make an attempt. */
1053 #if 0
1054 warn_when_safe
1055 (Qpath, Qwarning,
1056 "Warning: machine-independent site dir (%s) does not exist.\n",
1057 XSTRING_DATA (Vsite_directory));
1058 #else
1059 Vsite_directory = Qnil;
1031 #endif 1060 #endif
1032 } 1061 }
1033 } 1062 }
1034 1063
1035 #ifdef PATH_PREFIX 1064 #ifdef PATH_PREFIX
1118 DEFVAR_LISP ("data-directory", &Vdata_directory /* 1147 DEFVAR_LISP ("data-directory", &Vdata_directory /*
1119 Directory of architecture-independent files that come with XEmacs, 1148 Directory of architecture-independent files that come with XEmacs,
1120 intended for Emacs to use. 1149 intended for Emacs to use.
1121 */ ); 1150 */ );
1122 1151
1152 DEFVAR_LISP ("site-directory", &Vsite_directory /*
1153 Directory of architecture-independent files that do not come with XEmacs,
1154 intended for Emacs to use.
1155 */ );
1156
1123 /* FSF puts the DOC file into data-directory. They do a bunch of 1157 /* FSF puts the DOC file into data-directory. They do a bunch of
1124 contortions to attempt to put everything into the DOC file 1158 contortions to attempt to put everything into the DOC file
1125 whether the support is there or not. */ 1159 whether the support is there or not. */
1126 DEFVAR_LISP ("doc-directory", &Vdoc_directory /* 1160 DEFVAR_LISP ("doc-directory", &Vdoc_directory /*
1127 Directory containing the DOC file that comes with XEmacs. 1161 Directory containing the DOC file that comes with XEmacs.