|
|
@ -33,16 +33,30 @@ mkvar(char **p, char *path_prefix, char *var_dir, char *env_var) |
|
|
*p = tprintf("%s%s%s", path_prefix, DIR_PATHSEP, var_dir); |
|
|
*p = tprintf("%s%s%s", path_prefix, DIR_PATHSEP, var_dir); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* $dprefix has been set to /usr/local or C:/Spice (Windows) in configure.ac, |
|
|
|
|
|
or to <path> given by prefix="<path>" as parameter to ./configure command. |
|
|
|
|
|
NGSPICEBINDIR has been set to $dprefix/bin in config.h. |
|
|
|
|
|
NGSPICEDATADIR has been set to $dprefix/share/ngspice in config.h. |
|
|
|
|
|
If --enable-relpath is selected as paramter to the ./configure command, then |
|
|
|
|
|
NGSPICEBINDIR is set to ../bin in config.h. |
|
|
|
|
|
NGSPICEDATADIR is set to ../share/ngspice in config.h. |
|
|
|
|
|
Spice_Exec_Dir has been set to NGSPICEBINDIR in conf.c, |
|
|
|
|
|
may be overridden here by environmental variable SPICE_EXEC_DIR. |
|
|
|
|
|
Spice_Lib_Dir has been set to NGSPICEDATADIR in conf.c, |
|
|
|
|
|
may be overridden here by environmental variable SPICE_LIB_DIR. |
|
|
|
|
|
The search path for codemodels in spinit contains $dprefix, or, if --enable-relpath |
|
|
|
|
|
is given, to ../lib, set by src/makefile.am. With Visual C, it is set manually by |
|
|
|
|
|
an entry to ngspice\visualc\src\include\ngspice\config.h.*/ |
|
|
void |
|
|
void |
|
|
ivars(char *argv0) |
|
|
ivars(char *argv0) |
|
|
{ |
|
|
{ |
|
|
char *temp=NULL; |
|
|
char *temp=NULL; |
|
|
/* $dprefix has been set to /usr/local or C:/Spice (Windows) in configure.ac, |
|
|
|
|
|
NGSPICEBINDIR has been set to $dprefix/bin in configure.ac, |
|
|
|
|
|
Spice_Exec_Dir has been set to NGSPICEBINDIR in conf.c, |
|
|
|
|
|
may be overridden here by environmental variable SPICE_EXEC_DIR */ |
|
|
|
|
|
env_overr(&Spice_Exec_Dir, "SPICE_EXEC_DIR"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAS_RELPATH |
|
|
|
|
|
Spice_Lib_Dir = temp = copy("../share/ngspice"); |
|
|
|
|
|
#else |
|
|
env_overr(&Spice_Lib_Dir, "SPICE_LIB_DIR"); |
|
|
env_overr(&Spice_Lib_Dir, "SPICE_LIB_DIR"); |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
/* for printing a news file */ |
|
|
/* for printing a news file */ |
|
|
mkvar(&News_File, Spice_Lib_Dir, "news", "SPICE_NEWS"); |
|
|
mkvar(&News_File, Spice_Lib_Dir, "news", "SPICE_NEWS"); |
|
|
@ -52,6 +66,7 @@ ivars(char *argv0) |
|
|
mkvar(&Lib_Path, Spice_Lib_Dir, "scripts", "SPICE_SCRIPTS"); |
|
|
mkvar(&Lib_Path, Spice_Lib_Dir, "scripts", "SPICE_SCRIPTS"); |
|
|
/* used to call ngspice with aspice command, not used in Windows mode */ |
|
|
/* used to call ngspice with aspice command, not used in Windows mode */ |
|
|
mkvar(&Spice_Path, Spice_Exec_Dir, "ngspice", "SPICE_PATH"); |
|
|
mkvar(&Spice_Path, Spice_Exec_Dir, "ngspice", "SPICE_PATH"); |
|
|
|
|
|
tfree(temp); |
|
|
/* may be used to store input files (*.lib, *.include, ...) */ |
|
|
/* may be used to store input files (*.lib, *.include, ...) */ |
|
|
/* get directory where ngspice resides */ |
|
|
/* get directory where ngspice resides */ |
|
|
#if defined (HAS_WINGUI) || defined (__MINGW32__) || defined (_MSC_VER) |
|
|
#if defined (HAS_WINGUI) || defined (__MINGW32__) || defined (_MSC_VER) |
|
|
|