From f90051b4d6febde0858183036b3fa2ec09616ebe Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Tue, 24 May 2011 16:29:03 +0200 Subject: [PATCH] fixed configure process --- src/Makefile.in | 2 +- src/autoconf/configure.in | 9 +++++++-- src/config.h.in | 4 ---- src/func_spec | 4 ++-- src/pkg-psyc.c | 4 ++-- src/pkg-psyc.h | 2 +- src/sent.h | 4 ++-- src/settings/psyced | 4 +--- src/simulate.c | 8 ++++---- src/version.sh | 2 +- 10 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index fe72c77..fd04e44 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -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@ # diff --git a/src/autoconf/configure.in b/src/autoconf/configure.in index 015a4f4..e2f9b03 100644 --- a/src/autoconf/configure.in +++ b/src/autoconf/configure.in @@ -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 @@ -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 diff --git a/src/config.h.in b/src/config.h.in index acecd91..aee0aa8 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -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 diff --git a/src/func_spec b/src/func_spec index e161b05..c574ade 100644 --- a/src/func_spec +++ b/src/func_spec @@ -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 */ diff --git a/src/pkg-psyc.c b/src/pkg-psyc.c index 6323761..86039e2 100644 --- a/src/pkg-psyc.c +++ b/src/pkg-psyc.c @@ -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 */ diff --git a/src/pkg-psyc.h b/src/pkg-psyc.h index 97a979f..d503abf 100644 --- a/src/pkg-psyc.h +++ b/src/pkg-psyc.h @@ -1,4 +1,4 @@ -#ifdef USE_PSYC +#ifdef HAS_PSYC # ifndef PKG_PSYC_H /* pkg-psyc takes and produces PSYC packets in form diff --git a/src/sent.h b/src/sent.h index 794683b..5872d23 100644 --- a/src/sent.h +++ b/src/sent.h @@ -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 }; diff --git a/src/settings/psyced b/src/settings/psyced index ff9b5fe..e8dfe4f 100755 --- a/src/settings/psyced +++ b/src/settings/psyced @@ -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 diff --git a/src/simulate.c b/src/simulate.c index ecc3354..d6540fe 100644 --- a/src/simulate.c +++ b/src/simulate.c @@ -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 diff --git a/src/version.sh b/src/version.sh index e64cf7c..af13df4 100644 --- a/src/version.sh +++ b/src/version.sh @@ -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