fixed configure process

This commit is contained in:
psyc://psyced.org/~lynX 2011-05-24 16:29:03 +02:00
parent a94b8609ce
commit f90051b4d6
10 changed files with 21 additions and 22 deletions

View File

@ -88,7 +88,7 @@ MPATH=-DMUD_LIB='"$(MUD_LIB)"' -DBINDIR='"$(BINDIR)"' -DERQ_DIR='"$(ERQ_DIR)"'
# here either.. it makes this compile on OpenSolaris.. --lynX via tg 2010
CFLAGS=-DPROGNAME='"@PROGNAME@"' @EXTRA_CFLAGS@ $(OPTIMIZE) $(DEBUG) $(WARN) $(MPATH) $(PROFIL) -I/usr/include/idn -I/usr/local/include
#
LIBS=@LIBS@ @PKGLIBS@
LIBS= @PKGLIBS@ @LIBS@ -lm
#
LDFLAGS=$(PROFIL) -L/usr/local/lib @LDFLAGS@
#

View File

@ -1216,11 +1216,13 @@ fi
# --- libpsyc ---
echo "*** libpsyc"
lp_cv_has_psyc_lib="no"
AC_CHECK_LIB(psyc,main, lp_cv_has_psyc_lib="yes")
if test $lp_cv_has_psyc_lib = yes; then
LIBS="-lpsyc -lm"
LIBS="-lpsyc"
AC_CACHE_CHECK(for libpsyc usability,lp_cv_has_psyc,
AC_TRY_RUN([
#include <psyc.h>
@ -1237,7 +1239,7 @@ int main(void) {
if test $lp_cv_has_psyc = yes; then
AC_DEFINE(HAS_PSYC, 1, [Does the machine offer libpsyc?])
PKGLIBS="$PKGLIBS -lpsyc -lm"
PKGLIBS="$PKGLIBS -lpsyc"
echo "Congrats! libpsyc is available on this system."
else
echo "libpsyc not available on this system yet."
@ -1285,6 +1287,7 @@ fi
# --- iconv ---
echo "*** libiconv"
# iconv in glibc 2.2.5 is broken - but not every system even
# uses glibc.
changequote(,)dnl
@ -1418,6 +1421,8 @@ if test "x$lp_cv_has_iconv_nonconst_in" = "xyes"; then
fi
# --- libidn ---
echo "*** libidn"
AC_CHECK_HEADER(idna.h, lp_cv_has_idn=yes,lp_cv_has_idn=no)
AC_CHECK_HEADER(stringprep.h, lp_cv_has_idn=yes,lp_cv_has_idn=no)
# used to check for stringprep_check_version() but we require newer calls

View File

@ -338,10 +338,6 @@
*/
@cdef_use_system_crypt@ USE_SYSTEM_CRYPT
/* Define this if you want enhanced PSYC support (libpsyc)
*/
@cdef_use_psyc@ USE_PSYC
/* Define this if you want MCCP (Mud Control Compression Protocol).
*/
@cdef_use_mccp@ USE_MCCP

View File

@ -603,10 +603,10 @@ int attach_erq_demon(object|string, int default: F_CONST0);
int send_erq(int, int*|string, null|closure default: F_CONST0);
#endif
#ifdef USE_PSYC
#ifdef HAS_PSYC
int psyc_parse(int* | string);
string psyc_render(mixed*);
#endif /* USE_PSYC */
#endif /* HAS_PSYC */
/* Files */

View File

@ -76,7 +76,7 @@ psyc_dispatch(mixed p) {
#include "xalloc.h"
#include "efuns.h"
#ifdef USE_PSYC
#ifdef HAS_PSYC
# include "pkg-psyc.h"
@ -594,4 +594,4 @@ f_psyc_parse (svalue_t *sp) {
return sp;
} /* f_psyc_parse */
#endif /* USE_PSYC */
#endif /* HAS_PSYC */

View File

@ -1,4 +1,4 @@
#ifdef USE_PSYC
#ifdef HAS_PSYC
# ifndef PKG_PSYC_H
/* pkg-psyc takes and produces PSYC packets in form

View File

@ -43,7 +43,7 @@
#include "driver.h"
#include "typedefs.h"
#ifdef USE_PSYC
#ifdef HAS_PSYC
# include "pkg-psyc.h"
#endif
@ -131,7 +131,7 @@ struct shadow_s
ed_buffer_t *ed_buffer; /* the editor buffer, if needed */
#endif
interactive_t *ip; /* the information for interactive objects */
#ifdef USE_PSYC
#ifdef HAS_PSYC
psyc_state_t *psyc_state; /* in case this objects parses PSYC data */
#endif
};

View File

@ -25,6 +25,7 @@
# configure will strip this part from the script.
cp $0 settings/psyced-current
(cd autoconf;make)
exec ./configure-do --prefix=/opt/psyced --bindir=/opt/psyced/bin --libdir=/opt/psyced/world --libexec=/opt/psyced/run --with-setting=psyced-current $*
exit
@ -121,9 +122,6 @@ enable_use_mysql=no
enable_use_pgsql=no
enable_use_sqlite=no
# NEW: libpsyc support
enable_use_psyc=yes
# maximum permitted tcp connections
with_max_players=900

View File

@ -58,7 +58,7 @@
#ifdef USE_SQLITE
#include "pkg-sqlite.h"
#endif
#ifdef USE_PSYC
#ifdef HAS_PSYC
#include "pkg-psyc.h"
#endif
#include "prolang.h"
@ -2701,7 +2701,7 @@ destruct (object_t *ob)
}
#endif
#ifdef USE_PSYC
#ifdef HAS_PSYC
if (shadow_sent->psyc_state)
psyc_free_state(shadow_sent->psyc_state);
#endif
@ -3182,7 +3182,7 @@ new_shadow_sent(void)
#ifdef USE_BUILTIN_EDITOR
p->ed_buffer = NULL;
#endif
#ifdef USE_PSYC
#ifdef HAS_PSYC
p->psyc_state = NULL;
#endif
p->ip = NULL;
@ -3226,7 +3226,7 @@ check_shadow_sent (object_t *ob)
#ifdef USE_BUILTIN_EDITOR
&& !sh->ed_buffer
#endif
#ifdef USE_PSYC
#ifdef HAS_PSYC
&& !sh->psyc_state
#endif
#ifdef USE_SHADOWING

View File

@ -17,7 +17,7 @@ version_longtype="stable"
# A timestamp, to be used by bumpversion and other scripts.
# It can be used, for example, to 'touch' this file on every build, thus
# forcing revision control systems to add it on every checkin automatically.
version_stamp="Mon May 23 13:21:10 CEST 2011"
version_stamp="Tue May 24 16:27:09 CEST 2011"
# Okay, LDMUD is using 3.x.x so to avoid conflicts let's just use 4.x.x
version_major=4