Index: configure.in =================================================================== diff -u -r697ce4d38e63d352779604444d01159a89bdd3f6 -r96fd7ec7c3e09038f2ac706a0ded966c2125be74 --- configure.in (.../configure.in) (revision 697ce4d38e63d352779604444d01159a89bdd3f6) +++ configure.in (.../configure.in) (revision 96fd7ec7c3e09038f2ac706a0ded966c2125be74) @@ -11,61 +11,64 @@ # for this package, and can be a relative path, such as: # #-------------------------------------------------------------------- -define(XOTclVersion, 1.6.6) -AC_INIT([xotcl], [XOTclVersion]) +define(NsfVersion, 2.0b2) +AC_INIT([nsf], [NsfVersion]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. # This will define a ${TEA_PLATFORM} variable == "unix" or "windows". #-------------------------------------------------------------------- -TEA_INIT([3.7]) +TEA_INIT([3.9]) AC_CONFIG_AUX_DIR(config) #-------------------------------------------------------------------- # specify some extra flags #-------------------------------------------------------------------- - +# According to http://www.gnu.org/software/autoconf/manual/autoconf.html +# - "with" is for external software (optional packages) +# - "enable" is for optional features +# AC_ARG_WITH(gdbm, - [ --with-gdbm=GDBM_INCLUDE_DIR[,GDBM_LIB_DIR] - absolute path to gdbm.h and optionally the path to the library, - --without-gdbm disables build of Tcl Gdbm], + AC_HELP_STRING([--with-gdbm=GDBM_INCLUDE_DIR,GDBM_LIB_DIR], + [build with gdbm support; provide path to gdbm.h and optionally + to the shared library (default: off)]), [with_gdbm=$withval], [with_gdbm=no]) AC_ARG_WITH(aolserver3, - [ --with-aolserver3=AOL_SERVER_DIR, (containing include ,...) - --without-aolserver3 disables build of AOLserver 3 module], + AC_HELP_STRING([--with-aolserver3=AOL_SERVER_DIR], + [build an AOLserver 3 module; + point to directory containing aolsever/include (default: off)]), [with_aol3=$withval], [with_aol3=no]) AC_ARG_WITH(actiweb, - [ --with-actiweb=yes|no, - --without-actiweb disables actiweb components], + AC_HELP_STRING([--with-actiweb=yes|no], [build with actiweb components (default: off)]), [with_actiweb=$withval], [with_actiweb=no]) -AC_ARG_WITH(xotclsh, - [ --with-xotclsh=yes|no, - --without-xotclsh disables built of xotclsh], - [with_xotclsh=$withval], [with_xotclsh=no]) -AC_ARG_WITH(xowish, - [ --with-xowish=yes|no, - --without-xowish disables built of xowish], - [with_xowish=$withval], [with_xowish=no]) -AC_ARG_WITH(all, - [ --with-all=yes|no, - --without-all disables built of all], - [with_all=$withval], [with_all=no]) AC_ARG_WITH(expat, - [ --with-expat=sys assumes a system-wide expat installation, - --with-expat= point to a custom expat installation, - --without-expat falls back to the bundled expat installation], + AC_HELP_STRING([--with-expat], + [ choose expat support; --with-expat=sys assumes a system-wide expat installation + --with-expat= point to a custom expat installation, + --without-expat falls back to the bundled expat installation]), [with_expat=$withval],[with_expat=bundle]) +AC_ARG_WITH(dtrace, + AC_HELP_STRING([--with-dtrace], [build nsf with dtrace (default: without)]), + [with_dtrace=$withval], [with_dtrace=no]) +AC_ARG_ENABLE(profile, + AC_HELP_STRING([--enable-profile], [build nsf with profile support (default: disabled)]), + [enable_profile=$enableval], [enable_profile=no]) +AC_ARG_ENABLE(memcount, + AC_HELP_STRING([--enable-memcount=yes|trace], + [build nsf with memcount debug support (default: disabled)]), + [enable_memcount=$enableval], [enable_memcount=no]) +AC_ARG_ENABLE(development, + AC_HELP_STRING([--enable-development], + [build nsf with development support (intensive runtime checking, etc.; default: disabled)]), + [enable_development=$enableval], [enable_development=no]) +AC_ARG_ENABLE(assertions, + AC_HELP_STRING([--enable-assertions], + [build nsf with assertion support (default: enabled)]), + [enable_assertions=$enableval], [enable_assertions=yes]) subdirs="" -if test "$with_all" = yes; then - with_actiweb=yes - with_xotclsh=yes - with_xowish=yes - with_gdbm=yes -fi - if test "$with_actiweb" = yes; then test_actiweb="test-actiweb" libdirs_actiweb="actiweb rdf registry store xml patterns" @@ -87,9 +90,6 @@ AC_SUBST(subdirs) -if test "$with_tk" = no; then with_xowish="" ; fi -if test "$with_xotclsh" = yes; then XOTCLSH="xotclsh" ; else XOTCLSH=""; fi -if test "$with_xowish" = yes; then XOWISH="xowish" ; else XOWISH=""; fi #-------------------------------------------------------------------- @@ -100,38 +100,36 @@ # other systems. #-------------------------------------------------------------------- -# do not modify the following lines manually, they are generated with changeXOTclVersion -XOTCL_MAJOR_VERSION=1 -XOTCL_MINOR_VERSION=6 -XOTCL_RELEASE_LEVEL=.6 +# do not modify the following lines manually, they are generated with +# the script changeXOTclVersion +NSF_MAJOR_VERSION=2 +NSF_MINOR_VERSION=0 -XOTCL_VERSION=${XOTCL_MAJOR_VERSION}.${XOTCL_MINOR_VERSION} -NODOT_VERSION=${XOTCL_MAJOR_VERSION}${XOTCL_MINOR_VERSION} +NSF_PATCH_LEVEL=$PACKAGE_VERSION -AC_SUBST(XOTCL_VERSION) -AC_SUBST(XOTCL_MAJOR_VERSION) -AC_SUBST(XOTCL_MINOR_VERSION) -AC_SUBST(XOTCL_RELEASE_LEVEL) +NSF_VERSION=${NSF_MAJOR_VERSION}.${NSF_MINOR_VERSION} +NODOT_VERSION=${NSF_MAJOR_VERSION}${NSF_MINOR_VERSION} -echo "Configuring XOTcl Version $PACKAGE_VERSION" +AC_SUBST(NSF_VERSION) +AC_SUBST(NSF_MAJOR_VERSION) +AC_SUBST(NSF_MINOR_VERSION) +AC_SUBST(NSF_PATCH_LEVEL) +echo "Configuring next Version $PACKAGE_VERSION" + #-------------------------------------------------------------------- # Load the tclConfig.sh file #-------------------------------------------------------------------- TEA_PATH_TCLCONFIG TEA_LOAD_TCLCONFIG +AC_CHECK_FUNCS([strnstr]) + #-------------------------------------------------------------------- # check for TK #-------------------------------------------------------------------- -if test "$with_xowish" = yes; then - TEA_PATH_TKCONFIG - TEA_LOAD_TKCONFIG -# TEA_PUBLIC_TK_HEADERS -# TEA_PATH_X -fi #-------------------------------------------------------------------- # Handle the --prefix=... option by defaulting to what Tcl gave. @@ -162,18 +160,56 @@ FORCE_NO_STUBS=0 fi +# set the default aol_prefix aol_prefix="/usr/local/aolserver" -if test -d "${prefix}/modules/tcl" ; then aol_prefix="${prefix}" ; fi +# if we have under ${prefix} either modules/tcl/init.tcl (aolserver +# style) or modules/tcl/init.tcl (naviserver style), then use +# ${prefix} as aol_prefix (path for the installation of +# aolserver/naviserver specific tcl files). +if test -f "${prefix}/modules/tcl/init.tcl" ; then + aol_prefix="${prefix}" +else + if test -f "${prefix}/tcl/init.tcl" ; then + aol_prefix="${prefix}" + fi +fi AC_SUBST(aol_prefix) #-------------------------------------------------------------------- # check for tclCompile.h (needed, when compiled without full source) if test -f "$TCL_SRC_DIR/generic/tclCompile.h"; then - HAVE_TCL_COMPILE_H="-DHAVE_TCL_COMPILE_H=1" -else - HAVE_TCL_COMPILE_H="" + AC_DEFINE(HAVE_TCL_COMPILE_H, 1, [Do we have tclCompile.h installed?]) fi +if test "$enable_assertions" = yes; then + AC_DEFINE(NSF_WITH_ASSERTIONS, 1, [Are we building with assertions support?]) +fi + +if test "$enable_profile" = yes; then + AC_DEFINE(NSF_PROFILE, 1, [Are we building with profile support?]) +fi + +if test "$enable_development" = yes; then + AC_DEFINE(NSF_DEVELOPMENT, 1, [Are we building with development support?]) +fi + +if test "$enable_memcount" = yes; then + AC_DEFINE(NSF_MEM_COUNT, 1, [Are we building with memcount support?]) +fi +if test "$enable_memcount" = trace; then + AC_DEFINE(NSF_MEM_TRACE, 1, [Are we building with memcount tracing support?]) +fi + +DTRACE_OBJ= +if test "$with_dtrace" = yes; then + AC_DEFINE(NSF_DTRACE, 1, [Are we building with DTrace support?]) + # Under Mac OS X, we need no nsfDTrace.o + if test "`uname -s`" != "Darwin" ; then + DTRACE_OBJ=nsfDTrace.o + fi +fi +AC_SUBST(DTRACE_OBJ) + #----------------------------------------------------------------------- # __CHANGE__ # Specify the C source files to compile in TEA_ADD_SOURCES, @@ -184,68 +220,61 @@ # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- - -TEA_ADD_SOURCES([xotcl.c xotclError.c xotclMetaData.c xotclObjectData.c xotclProfile.c \ - xotclTrace.c xotclUtil.c xotclShadow.c xotclCompile.c aolstub.c xotclStubInit.c]) -TEA_ADD_HEADERS([generic/xotcl.h generic/xotclInt.h generic/xotclDecls.h generic/xotclIntDecls.h]) +TEA_ADD_SOURCES([nsf.c nsfError.c nsfObjectData.c nsfProfile.c \ + nsfDebug.c nsfUtil.c nsfObj.c nsfPointer.c \ + nsfShadow.c nsfCompile.c aolstub.c nsfStubInit.c]) +TEA_ADD_HEADERS([generic/nsf.h generic/nsfInt.h generic/nsfDecls.h generic/nsfIntDecls.h]) TEA_ADD_INCLUDES([]) TEA_ADD_LIBS([]) -TEA_ADD_CFLAGS([-DXOTCLVERSION=\\\"$XOTCL_VERSION\\\" -DXOTCLPATCHLEVEL=\\\"$XOTCL_RELEASE_LEVEL\\\" \ - $AOL_DEFINES $HAVE_TCL_COMPILE_H]) -TEA_ADD_STUB_SOURCES([xotclStubLib.c]) +TEA_ADD_CFLAGS([-DNSF_VERSION=\\\"$NSF_VERSION\\\" -DNSF_PATCHLEVEL=\\\"$NSF_PATCH_LEVEL\\\" \ + $AOL_DEFINES ]) +TEA_ADD_STUB_SOURCES([nsfStubLib.c]) TEA_ADD_TCL_SOURCES([]) - #-------------------------------------------------------------------- +# __CHANGE__ +# +# You can add more files to clean if your extension creates any extra +# files by extending CLEANFILES. +# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure +# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. +# +# A few miscellaneous platform-specific items: +# TEA_ADD_* any platform specific compiler/build info here. +#-------------------------------------------------------------------- +if test "${TEA_PLATFORM}" = "windows" ; then + if test "$GCC" != "yes" ; then + AC_DEFINE(VISUAL_CC) + fi + CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch vc60.pch " + #TEA_ADD_SOURCES([win/winFile.c]) + #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) +else + CLEANFILES="*.o *.a *.so *~ core gmon.out" + #TEA_ADD_SOURCES([unix/unixFile.c]) + #TEA_ADD_LIBS([-lsuperfly]) +fi +CLEANFILES="$CLEANFILES pkgIndex.tcl" + #-------------------------------------------------------------------- # __CHANGE__ # Choose which headers you need. Extension authors should try very # hard to only rely on the Tcl public header files. Internal headers # contain private data structures and are subject to change without # notice. -# This must be done AFTER calling TEa_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG +# This must be done AFTER calling TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG # so that we can extract TCL_SRC_DIR from the config file (in the case # of private headers #-------------------------------------------------------------------- #TEA_PUBLIC_TCL_HEADERS TEA_PRIVATE_TCL_HEADERS -#-------------------------------------------------------------------- -# __CHANGE__ -# A few miscellaneous platform-specific items: -# -# Define a special symbol for Windows (BUILD_xotcl in this case) so -# that we create the export library with the dll. See sha1.h on how -# to use this. -# -# Windows creates a few extra files that need to be cleaned up. -# You can add more files to clean if your extension creates any extra -# files. -# -# Define any extra compiler flags in the PACKAGE_CFLAGS variable. -# These will be appended to the current set of compiler flags for -# your system. -#-------------------------------------------------------------------- +#TEA_PUBLIC_TK_HEADERS +#TEA_PRIVATE_TK_HEADERS +#TEA_PATH_X -if test "${TEA_PLATFORM}" = "windows" ; then - AC_DEFINE(BUILD_xotcl) - if test "$GCC" != "yes" ; then - AC_DEFINE(VISUAL_CC) - fi - CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch vc60.pch" - #TEA_ADD_SOURCES([win/winFile.c]) - #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/w -else - CLEANFILES="*.o *.a *.so *~ core gmon.out" - #TEA_ADD_SOURCES([unix/unixFile.c]) - #TEA_ADD_LIBS([-lsuperfly]) -fi - - -AC_SUBST(CLEANFILES) - #-------------------------------------------------------------------- # Check whether --enable-threads or --disable-threads was given. #-------------------------------------------------------------------- @@ -267,17 +296,17 @@ TEA_CONFIG_CFLAGS -# Without the following two eval statements, XOTCL_SHARED_LIB_SUFFIX -# in xotclConfig.sh has $PACKAGE_VERSION unresolved. When another +# Without the following two eval statements, NSF_SHARED_LIB_SUFFIX +# in nsfConfig.sh has $PACKAGE_VERSION unresolved. When another # app links against xotcl, the PACKAGE_VERSIONs are confused. # # Without the first eval, we get -# XOTCL_SHARED_LIB_SUFFIX=${PACKAGE_VERSION}\$\{DBGX\}${SHLIB_SUFFIX} -# XOTCL_UNSHARED_LIB_SUFFIX=${PACKAGE_VERSION}\$\{DBGX\}.a +# NSF_SHARED_LIB_SUFFIX=${PACKAGE_VERSION}\$\{DBGX\}${SHLIB_SUFFIX} +# NSF_UNSHARED_LIB_SUFFIX=${PACKAGE_VERSION}\$\{DBGX\}.a # # after the first eval, we get -# XOTCL_SHARED_LIB_SUFFIX=1.2.1${DBGX}.so -# XOTCL_UNSHARED_LIB_SUFFIX=1.2.1${DBGX}.a +# NSF_SHARED_LIB_SUFFIX=1.2.1${DBGX}.so +# NSF_UNSHARED_LIB_SUFFIX=1.2.1${DBGX}.a # after the second eval, all variables are resolved. @@ -301,15 +330,8 @@ # link against the non-stubbed Tcl library. #-------------------------------------------------------------------- +AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs]) -#if test "${TCL_MAJOR_VERSION}" = "8" -a "${TCL_MINOR_VERSION}" = "0"; then -# FORCE_NO_STUBS=1 -#fi - -if test "${FORCE_NO_STUBS}" = "0" ; then - AC_DEFINE(USE_TCL_STUBS) -fi - #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, @@ -328,78 +350,62 @@ TEA_PROG_TCLSH -# make this available, for such as xotclConfig.sh -XOTCL_COMPATIBLE_TCLSH=${TCLSH_PROG} -AC_SUBST(XOTCL_COMPATIBLE_TCLSH) +# make this available, for such as nsfConfig.sh +NSF_COMPATIBLE_TCLSH=${TCLSH_PROG} +AC_SUBST(NSF_COMPATIBLE_TCLSH) -# resolve the variables -eval "libdir=${libdir}" -eval "datadir=${datadir}" -eval "includedir=${includedir}" - -PKG_DIR="${PACKAGE_NAME}${PACKAGE_VERSION}" -pkgdatadir="${datadir}/${PKG_DIR}" -pkglibdir="${libdir}/${PKG_DIR}" -# make sure this is right (then remove this comment) -pkgincludedir="${includedir}/${PKG_DIR}" - -AC_SUBST(PKG_DIR) -AC_SUBST(pkgdatadir) -AC_SUBST(pkglibdir) -AC_SUBST(pkgincludedir) - # # XOTcl specific configs # if test "${TEA_PLATFORM}" != "windows" ; then -XOTCL_BUILD_LIB_SPEC="-L`pwd` -lxotcl${PACKAGE_VERSION}" -XOTCL_LIB_SPEC="-L${pkglibdir} -lxotcl${PACKAGE_VERSION}" +NSF_BUILD_LIB_SPEC="-L`pwd` -lnsf${PACKAGE_VERSION}" +NSF_LIB_SPEC="-L${pkglibdir} -lnsf${PACKAGE_VERSION}" # stub libs are not build for 8.0 if test "${TCL_MAJOR_VERSION}" = "8" -a "${TCL_MINOR_VERSION}" = "0"; then - XOTCL_BUILD_STUB_LIB_PATH="" - XOTCL_STUB_LIB_PATH="" - XOTCL_BUILD_STUB_LIB_SPEC="" - XOTCL_STUB_LIB_SPEC="" + NSF_BUILD_STUB_LIB_PATH="" + NSF_STUB_LIB_PATH="" + NSF_BUILD_STUB_LIB_SPEC="" + NSF_STUB_LIB_SPEC="" else - XOTCL_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}" - XOTCL_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}" - XOTCL_BUILD_STUB_LIB_SPEC="-L`pwd` -lxotclstub${PACKAGE_VERSION}" - XOTCL_STUB_LIB_SPEC="-L${pkglibdir} -lxotclstub${PACKAGE_VERSION}" - AC_DEFINE(COMPILE_XOTCL_STUBS) + NSF_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}" + NSF_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}" + NSF_BUILD_STUB_LIB_SPEC="-L`pwd` -lnsfstub${PACKAGE_VERSION}" + NSF_STUB_LIB_SPEC="-L${pkglibdir} -lnsfstub${PACKAGE_VERSION}" + AC_DEFINE(COMPILE_NSF_STUBS) fi else -XOTCL_BUILD_LIB_SPEC="`pwd`/${PKG_LIB_FILE}" -XOTCL_LIB_SPEC="${pkglibdir}/${PKG_LIB_FILE}" -XOTCL_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}" -XOTCL_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}" -XOTCL_BUILD_STUB_LIB_SPEC="`pwd`/${PKG_STUB_LIB_FILE}" -XOTCL_STUB_LIB_SPEC="${pkglibdir}/${PKG_STUB_LIB_FILE}" +NSF_BUILD_LIB_SPEC="`pwd`/${PKG_LIB_FILE}" +NSF_LIB_SPEC="${pkglibdir}/${PKG_LIB_FILE}" +NSF_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}" +NSF_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}" +NSF_BUILD_STUB_LIB_SPEC="`pwd`/${PKG_STUB_LIB_FILE}" +NSF_STUB_LIB_SPEC="${pkglibdir}/${PKG_STUB_LIB_FILE}" fi AC_SUBST(SHARED_LIB_SUFFIX) AC_SUBST(UNSHARED_LIB_SUFFIX) -AC_SUBST(XOTCL_BUILD_LIB_SPEC) -AC_SUBST(XOTCL_LIB_SPEC) -AC_SUBST(XOTCL_BUILD_STUB_LIB_SPEC) -AC_SUBST(XOTCL_STUB_LIB_SPEC) -AC_SUBST(XOTCL_BUILD_STUB_LIB_PATH) -AC_SUBST(XOTCL_STUB_LIB_PATH) -XOTCL_SRC_DIR=$srcdir -AC_SUBST(XOTCL_SRC_DIR) -AC_SUBST(XOTCLSH) +AC_SUBST(NSF_BUILD_LIB_SPEC) +AC_SUBST(NSF_LIB_SPEC) +AC_SUBST(NSF_BUILD_STUB_LIB_SPEC) +AC_SUBST(NSF_STUB_LIB_SPEC) +AC_SUBST(NSF_BUILD_STUB_LIB_PATH) +AC_SUBST(NSF_STUB_LIB_PATH) +NSF_SRC_DIR=$srcdir +AC_SUBST(NSF_SRC_DIR) +AC_SUBST(NXSH) AC_SUBST(XOWISH) # include dir of xotcl during build process (i.e., does not assume installed) -XOTCL_BUILD_INCLUDE_DIR="${XOTCL_SRC_DIR}/generic" -XOTCL_BUILD_INCLUDE_SPEC="-I${XOTCL_BUILD_INCLUDE_DIR}" -AC_SUBST(XOTCL_BUILD_INCLUDE_DIR) -AC_SUBST(XOTCL_BUILD_INCLUDE_SPEC) +NSF_BUILD_INCLUDE_DIR="${NSF_SRC_DIR}/generic" +NSF_BUILD_INCLUDE_SPEC="-I${NSF_BUILD_INCLUDE_DIR}" +AC_SUBST(NSF_BUILD_INCLUDE_DIR) +AC_SUBST(NSF_BUILD_INCLUDE_SPEC) AC_SUBST(test_actiweb) AC_SUBST(libdirs_actiweb) @@ -413,7 +419,7 @@ dnl Change the value of -this- macro if you want to add or remove dnl such files. -AC_DEFUN(CONFIG_OUTPUT_FILES, [[Makefile xotclConfig.sh apps/utils/xotclsh apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix]]) +AC_DEFUN(CONFIG_OUTPUT_FILES, [[Makefile nsfConfig.sh library/xotcl/xotclsh library/xotcl/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh nxwish]]) #-------------------------------------------------------------------- # the value of this variable is set to the files which are to be @@ -438,11 +444,16 @@ AC_OUTPUT +chmod +x nxsh nxwish library/xotcl/xotclsh library/xotcl/xowish +echo "==================== building genstubs (needed for Tcl 8.6)" +make genstubs +echo "==================== genstubs built" + here=${PWD} for subdir in ${subdirs} do - echo "==================== configure $subdir =====================" + echo "==================== configure $subdir" if test x"${srcdir}" = x. ; then confdir=. else @@ -471,34 +482,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -