?X: To force any unit to be included, copy this unit to your private U directory
?X: and add the name of the unit desired to the ?MAKE: dependency line.
?X:
-?MAKE:End: $W d_tcl MailList d_lua
+?MAKE:End: $W d_tcl MailList
?MAKE: -pick add $@ %<
-?LINT:use $W d_tcl MailList d_lua
+?LINT:use $W d_tcl MailList
: end of configuration questions
echo " "
echo "End of configuration questions."
?LINT:set defvoidused libswanted toplev
?INIT:toplev=`cd ..;pwd`
defvoidused=15
-libswanted='nsl socket m c crypt bind resolv ld dl tcl intl lua5.1'
+libswanted='nsl socket m c crypt bind resolv ld dl tcl intl'
?MAKE: d_lua: Loc test xlibpth libpth Csym Setvar Inhdr libs
?MAKE: -pick add $@ %<
+# Declare a function to check for loca LUA installation
+#
+checkLocalLua() {
+ myincs="lua5.1 lua-5.1.4"
+ otherincs=""
+ thisincl=""
+ for thisincl in $myincs; do
+ if $test -r "$toplev/$thisincl/src/lua.h" ; then
+ lua_h_path="$toplev/$thisincl/src"
+ elif $test -r "$toplev/$thisincl/lua.h" ; then
+ lua_h_path="$toplev/$thisincl"
+ else
+ otherincs="$otherincs $toplev/$thisincl $toplev/$thisincl/src"
+ echo "OI=$otherincs">&4
+ fi
+ done
+ if $test "$lua_h_path" ; then
+ echo "Found -llua" >&4
+ # try to link in local lua library into ldflags=
+ # Normally when you install the src in our directory it will be in the lua/src directory..
+ if $test -f "$lua_h_path/liblua.a"; then
+ ldflags="$ldflags -L$lua_h_path"
+ libs="$libs -llua"
+ else
+ echo "Could not local LUA library. Either install LUA development global libraries or compile your local LUA installation";
+ exit 1;
+ fi
+ fi
+
+}
+
# see if lua exists, otherwise end configure script
echo " "
-echo "Let's see if we have LUA (version 5.1)." >&4
-
-case $libs in
- *lua5.1*)
- echo "We have the LUA 5.1 library, too." >&4
- ;;
- *)
- echo "Oops, no LUA 5.1 library. Check your LUA installation." >&4
- exit 1;
- ;;
-esac
+echo "Let's search for LUA header files." >&4
myincs="/usr/include $locincpth"
otherincs=""
lua_h_path=""
for thisincl in $myincs $otherincs; do
- if [ -r "$thisincl/lua.h" ]; then
+ if $test -r "$thisincl/lua.h"; then
lua_h_path="$thisincl"
fi
done
-if [ x"$lua_h_path" == "x" ]; then
- echo "Unable to find lua.h header. Check your LUA installation." >&4
- echo "Looked in $myincs $otherincs for it" >&4
- exit 1
+if $test -z "$lua_h_path" ; then
+ echo "Unable to find global lua.h header. Checking local directories." >&4
+ checkLocalLua
+else
+ echo "Found LUA Header path at $lua_h_path">&4
+ echo "Searching for LUA Library"
+ # Could probably make this a function in libs.U and cut down on this kludge
+ thislib="lua5.1"
+ if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
+ echo "Found -l$thislib (shared)."
+ case " $libs " in
+ *"-l$thislib "*);;
+ *) libs="$libs -l$thislib";;
+ esac
+ elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
+ echo "Found -l$thislib (shared)."
+ case " $libs " in
+ *"-l$thislib "*);;
+ *) libs="$libs -l$thislib";;
+ esac
+ elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
+ echo "Found -l$thislib."
+ case " $libs " in
+ *"-l$thislib "*);;
+ *) libs="$libs -l$thislib";;
+ esac
+?X: Don't forget about OS/2 where -lmalloc is spelled out malloc.a
+ elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
+ echo "Found -l$thislib."
+ case " $libs " in
+ *"-l$thislib "*);;
+ *) libs="$libs -l$thislib";;
+ esac
+ elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
+ echo "Found -l${thislib}_s."
+ case " $dflt " in
+ *"-l$thislib "*);;
+ *) libs="$libs -l${thislib}_s";;
+ esac
+ elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
+ echo "Found -l$thislib."
+ case " $libs " in
+ *"-l$thislib "*);;
+ *) libs="$libs -l$thislib";;
+ esac
+ else
+ echo "Can't find global LUA Library. Checking Local."
+ checkLocalLua
+ fi
+
+
+fi
+
+if test -z "$lua_h_path"; then
+ echo "I Give up..">&4
+ echo "Looked in $otherincs for it" >&4
+ exit 1;
fi
ccflags="$ccflags -I$lua_h_path"
+
?RCS: Revision 3.0 1993/08/18 12:05:39 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_sigchld d_sigcld: Myread cat cc ccflags rm Setvar libs ldflags
+?MAKE:d_sigchld d_sigcld: Myread cat cc ccflags rm Setvar libs ldflags d_lua
?MAKE: -pick add $@ %<
?S:d_sigchld:
?S: This variable is set if the system defines SIGCHLD
?M:#endif
?M:.
?T:val
-?LINT:set d_sigchld d_sigcld
+?LINT:set d_sigchld d_sigcld d_lua
: see if we have SIGCHLD, SIGCLD, or both
echo " "
echo "How should a child signal a parent?" >&4
?X: Set proper libswanted in your private Myinit.U if needed.
?X:
?X:: default ordered library list
-?X:libswanted='net socket inet nsl nm sdbm gdbm ndbm dbm malloc dl lua5.1'
+?X:libswanted='net socket inet nsl nm sdbm gdbm ndbm dbm malloc dl'
?X:libswanted="$libswanted dld sun m c_s c posix cposix ndir dir ucb"
?X:libswanted="$libswanted bsd BSD PW x"
?X:
create_div(dbref owner, const char *name)
{
char buf[BUFFER_LEN];
+ char buf2[BUFFER_LEN];
dbref obj, loc;
if(!can_pay_fees(owner, DIVISION_COST))
}
Parent(obj) = SDIV(owner).object;
current_state.divisions++;
- sprintf(buf, object_header(owner, obj));
+ strcpy(buf, unparse_object(owner, obj));
+ strcpy(buf2, unparse_object(owner, SDIV(obj).object));
notify_format(owner, T("Division created: %s Parent division: %s"),
- buf, object_header(owner, SDIV(obj).object));
+ buf, buf2);
return obj;
}
char abuf[BUFFER_LEN], *abp;
char prebuf[BUFFER_LEN], *prep;
char postbuf[BUFFER_LEN], *postp;
- pcre *old_re_code;
int flags = 0, all = 0, match_offset = 0, len, funccount;
int i;
int *old_re_offsets;
char *old_re_from;
+
old_re_subpatterns = global_eval_context.re_subpatterns;
old_re_offsets = global_eval_context.re_offsets;
old_re_from = global_eval_context.re_from;
if (study)
mush_free((Malloc_t) study, "pcre.extra");
- global_eval_context.re_code = old_re_code;
+ /* TODO: this was set to the declared variable "pcre **old_re_code"..
+ * it was initialized and set in this function. Should look into this more.
+ * For now just setting this variable to NULL instead
+ */
+
+ global_eval_context.re_code = NULL;
global_eval_context.re_offsets = old_re_offsets;
global_eval_context.re_subpatterns = old_re_subpatterns;
global_eval_context.re_from = old_re_from;