diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-11-12 16:44:54 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-11-12 16:44:54 (GMT) |
commit | d2ccdc3e5003ca2340946dd13dec6a4783f716f5 (patch) | |
tree | 5c1d1a11287554dfa45381eb9bd5bae42d7e2cc4 /unix/configure.in | |
parent | 51f2943afd57e033279f3ed72c4b15f31427c412 (diff) | |
download | tcl-d2ccdc3e5003ca2340946dd13dec6a4783f716f5.zip tcl-d2ccdc3e5003ca2340946dd13dec6a4783f716f5.tar.gz tcl-d2ccdc3e5003ca2340946dd13dec6a4783f716f5.tar.bz2 |
Adapt Tcl so it uses a config.h header instead of stuffing all #defs on the
command line. Third parties using generic/tclInt.h, unix/tclAppInit.c or
unix/tcl.m4 should be unaffected. Part of the general TIP#34 project.
Diffstat (limited to 'unix/configure.in')
-rw-r--r-- | unix/configure.in | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/unix/configure.in b/unix/configure.in index 6929bb6..fe8b3a8 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,10 +3,11 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.115 2004/07/16 23:31:37 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.116 2004/11/12 16:44:58 dkf Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.57) +AC_CONFIG_HEADERS(config.h) TCL_VERSION=8.5 TCL_MAJOR_VERSION=8 @@ -129,18 +130,18 @@ AC_C_BIGENDIAN #-------------------------------------------------------------------- # Check if Posix compliant getcwd exists, if not we'll use getwd. -AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD)]) +AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD, 1, [Is getcwd Posix-compliant?])]) # Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really # define USEGETWD even if the posix getcwd exists. Add a test ? AC_REPLACE_FUNCS(opendir strstr) AC_REPLACE_FUNCS(strtol strtoll strtoull tmpnam waitpid) -AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR)]) -AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD)]) -AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3)]) -AC_CHECK_FUNC(uname, , [AC_DEFINE(NO_UNAME)]) -AC_CHECK_FUNC(realpath, , [AC_DEFINE(NO_REALPATH)]) +AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR, 1, [Do we have strerror()])]) +AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD, 1, [Do we have getwd()])]) +AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3, 1, [Do we have wait3()])]) +AC_CHECK_FUNC(uname, , [AC_DEFINE(NO_UNAME, 1, [Do we have uname()])]) +AC_CHECK_FUNC(realpath, , [AC_DEFINE(NO_REALPATH, 1, [Do we have realpath()])]) #--------------------------------------------------------------------------- # Determine which interface to use to talk to the serial port. @@ -173,12 +174,12 @@ if test $tcl_cv_type_fd_set = no; then tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing)) AC_MSG_RESULT($tcl_cv_grep_fd_mask) if test $tcl_cv_grep_fd_mask = present; then - AC_DEFINE(HAVE_SYS_SELECT_H) + AC_DEFINE(HAVE_SYS_SELECT_H, 1, [May we include <sys/select.h>?]) tk_ok=yes fi fi if test $tk_ok = no; then - AC_DEFINE(NO_FD_SET) + AC_DEFINE(NO_FD_SET, 1, [Do we have fd_set?]) fi #------------------------------------------------------------------------------ @@ -192,7 +193,7 @@ SC_TIME_HANDLER # in struct stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- AC_STRUCT_ST_BLKSIZE -AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS)]) +AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS, 1, [Do we have fstatfs()?])]) #-------------------------------------------------------------------- # Some system have no memcmp or it does not work with 8 bit @@ -205,7 +206,9 @@ AC_FUNC_MEMCMP # have no memmove (we assume they have bcopy instead). # {The replacement define is in compat/string.h} #-------------------------------------------------------------------- -AC_CHECK_FUNC(memmove, , [AC_DEFINE(NO_MEMMOVE) AC_DEFINE(NO_STRING_H)]) +AC_CHECK_FUNC(memmove, , [ + AC_DEFINE(NO_MEMMOVE, 1, [Do we have memmove()?]) + AC_DEFINE(NO_STRING_H, 1, [May we include <string.h>?]) ]) #-------------------------------------------------------------------- # On some systems strstr is broken: it returns a pointer even @@ -311,7 +314,7 @@ changequote([,]),[ ], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)]) AC_MSG_RESULT($ac_cv_type_socklen_t) if test $ac_cv_type_socklen_t = no; then - AC_DEFINE(socklen_t, unsigned) + AC_DEFINE(socklen_t, unsigned, [What is the type of socklen_t?]) fi #-------------------------------------------------------------------- @@ -321,7 +324,7 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H)]) +AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H, 1, [May we include <dirent2.h>?])]) #-------------------------------------------------------------------- # The check below checks whether <sys/wait.h> defines the type @@ -341,7 +344,7 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED ], tcl_cv_union_wait=yes, tcl_cv_union_wait=no)) AC_MSG_RESULT($tcl_cv_union_wait) if test $tcl_cv_union_wait = no; then - AC_DEFINE(NO_UNION_WAIT) + AC_DEFINE(NO_UNION_WAIT, 1, [Do we have a usable 'union wait'?]) fi #-------------------------------------------------------------------- @@ -374,8 +377,8 @@ fi #-------------------------------------------------------------------- AC_CHECK_FUNC(BSDgettimeofday, - [AC_DEFINE(HAVE_BSDGETTIMEOFDAY)], [ - AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD)]) + [AC_DEFINE(HAVE_BSDGETTIMEOFDAY, 1, [Do we have BSDgettimeofday()?])], [ + AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD, 1, [Do we have gettimeofday()?])]) ]) AC_MSG_CHECKING([for gettimeofday declaration]) AC_CACHE_VAL(tcl_cv_grep_gettimeofday, @@ -383,7 +386,7 @@ AC_CACHE_VAL(tcl_cv_grep_gettimeofday, tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing)) AC_MSG_RESULT($tcl_cv_grep_gettimeofday) if test $tcl_cv_grep_gettimeofday = missing ; then - AC_DEFINE(GETTOD_NOT_DECLARED) + AC_DEFINE(GETTOD_NOT_DECLARED, 1, [Is gettimeofday() actually declared in <sys/time.h>?]) fi #-------------------------------------------------------------------- @@ -401,7 +404,7 @@ AC_CACHE_VAL(tcl_cv_char_signed, ], tcl_cv_char_signed=yes, tcl_cv_char_signed=no)) AC_MSG_RESULT($tcl_cv_char_signed) if test $tcl_cv_char_signed = yes; then - AC_DEFINE(HAVE_SIGNED_CHAR) + AC_DEFINE(HAVE_SIGNED_CHAR, 1, [Are characters signed?]) fi #-------------------------------------------------------------------- @@ -435,7 +438,8 @@ AC_CACHE_VAL(tcl_cv_putenv_copy, ) AC_MSG_RESULT($tcl_cv_putenv_copy) if test $tcl_cv_putenv_copy = yes; then - AC_DEFINE(HAVE_PUTENV_THAT_COPIES) + AC_DEFINE(HAVE_PUTENV_THAT_COPIES, 1, + [Does putenv() copy strings or incorporate them by reference?]) fi #-------------------------------------------------------------------- @@ -561,6 +565,15 @@ TCL_STUB_LIB_PATH="${libdir}/${TCL_STUB_LIB_FILE}" eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" #------------------------------------------------------------------------ + +AC_ARG_ENABLE(dll-unloading, + [ --enable-dll-unloading turn on the 'unload' command (default: on)], + [tcl_ok=$enableval], [tcl_ok=yes]) +if test $tcl_ok = yes; then + AC_DEFINE(TCL_UNLOAD_DLLS, 1, [Do we allow unloading of shared libraries?]) +fi + +#------------------------------------------------------------------------ # tclConfig.sh refers to this by a different name #------------------------------------------------------------------------ @@ -584,6 +597,8 @@ AC_SUBST(TCL_BUILD_STUB_LIB_PATH) AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_DBGX) +AC_DEFINE_UNQUOTED(TCL_DBGX,${TCL_DBGX}, + [What extra letters do we insert for debugging binary code?]) AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX) AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX) AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX) |