summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in147
1 files changed, 85 insertions, 62 deletions
diff --git a/unix/configure.in b/unix/configure.in
index a201158..55bbadf 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,16 +3,26 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.111 2005/09/10 14:53:21 das Exp $
+# RCS: @(#) $Id: configure.in,v 1.112 2005/11/27 02:36:16 das Exp $
AC_INIT([tk],[8.5])
AC_PREREQ(2.59)
-dnl AC_CONFIG_HEADERS([tkConfig.h])
-dnl AC_CONFIG_COMMANDS_PRE([DEFS="-DHAVE_TK_CONFIG_H -imacros tkConfig.h"])
-dnl AH_TOP([#ifndef _TKCONFIG
-dnl #define _TKCONFIG])
-dnl AH_BOTTOM([#endif /* _TKCONFIG */])
+dnl This is only used when included from macosx/configure.ac
+m4_ifdef([SC_USE_CONFIG_HEADERS], [
+ AC_CONFIG_HEADERS([tkConfig.h:../unix/tkConfig.h.in])
+ AC_CONFIG_COMMANDS_PRE([DEFS="-DHAVE_TK_CONFIG_H -imacros tkConfig.h"])
+ AH_TOP([
+ #ifndef _TKCONFIG
+ #define _TKCONFIG])
+ AH_BOTTOM([
+ /* Undef unused package specific autoheader defines so that we can
+ * include both tclConfig.h and tkConfig.h at the same time: */
+ /* override */ #undef PACKAGE_NAME
+ /* override */ #undef PACKAGE_STRING
+ /* override */ #undef PACKAGE_TARNAME
+ #endif /* _TKCONFIG */])
+])
TK_VERSION=8.5
TK_MAJOR_VERSION=8
@@ -70,7 +80,22 @@ AC_PROG_CC
# limits header checks must come early to prevent
# an autoconf bug that throws errors on configure
-AC_HAVE_HEADERS([limits.h])
+AC_CHECK_HEADER(limits.h,
+ [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
+ [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])])
+
+#--------------------------------------------------------------------
+# Supply a substitute for stdlib.h if it doesn't define strtol,
+# strtoul, or strtod (which it doesn't in some versions of SunOS).
+#--------------------------------------------------------------------
+
+AC_CHECK_HEADER(stdlib.h, tk_ok=1, tk_ok=0)
+AC_EGREP_HEADER(strtol, stdlib.h, , tk_ok=0)
+AC_EGREP_HEADER(strtoul, stdlib.h, , tk_ok=0)
+AC_EGREP_HEADER(strtod, stdlib.h, , tk_ok=0)
+if test $tk_ok = 0; then
+ AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
+fi
#------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
@@ -142,46 +167,55 @@ if test "$TCL_PREFIX" != "$prefix"; then
fi
#--------------------------------------------------------------------
-# Supply a substitute for stdlib.h if it doesn't define strtol,
-# strtoul, or strtod (which it doesn't in some versions of SunOS).
-#--------------------------------------------------------------------
-
-AC_MSG_CHECKING(stdlib.h)
-AC_HEADER_EGREP(strtol, stdlib.h, tk_ok=yes, tk_ok=no)
-AC_HEADER_EGREP(strtoul, stdlib.h, , tk_ok=no)
-AC_HEADER_EGREP(strtod, stdlib.h, , tk_ok=no)
+# Include sys/select.h if it exists and if it supplies things
+# that appear to be useful and aren't already in sys/types.h.
+# This appears to be true only on the RS/6000 under AIX. Some
+# systems like OSF/1 have a sys/select.h that's of no use, and
+# other systems like SCO UNIX have a sys/select.h that's
+# pernicious. If "fd_set" isn't defined anywhere then set a
+# special flag.
+#--------------------------------------------------------------------
+
+AC_MSG_CHECKING([for fd_set in sys/types])
+AC_CACHE_VAL(tcl_cv_type_fd_set,
+ AC_TRY_COMPILE([#include <sys/types.h>],[fd_set readMask, writeMask;],
+ tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no))
+AC_MSG_RESULT($tcl_cv_type_fd_set)
+tk_ok=$tcl_cv_type_fd_set
+if test $tcl_cv_type_fd_set = no; then
+ AC_MSG_CHECKING([for fd_mask in sys/select])
+ AC_CACHE_VAL(tcl_cv_grep_fd_mask,
+ AC_EGREP_HEADER(fd_mask, sys/select.h,
+ 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, 1, [Should we include <sys/select.h>?])
+ tk_ok=yes
+ fi
+fi
if test $tk_ok = no; then
- AC_DEFINE(NO_STDLIB_H, 1, [Do we have a working <stdlib.h> to include?])
+ AC_DEFINE(NO_FD_SET, 1, [Do we have fd_set?])
fi
-AC_MSG_RESULT($tk_ok)
+
+#------------------------------------------------------------------------------
+# Find out all about time handling differences.
+#------------------------------------------------------------------------------
+
+AC_CHECK_HEADERS(sys/time.h)
+AC_HEADER_TIME
#--------------------------------------------------------------------
-# Include sys/select.h if it exists and if it supplies things
-# that appear to be useful and aren't already in sys/types.h.
-# This appears to be true only on the RS/6000 under AIX. Some
-# systems like OSF/1 have a sys/select.h that's of no use, and
-# other systems like SCO UNIX have a sys/select.h that's
-# pernicious. If "fd_set" isn't defined anywhere then set a
-# special flag.
+# Under Solaris 2.4, strtod returns the wrong value for the
+# terminating character under some conditions. Check for this
+# and if the problem exists use a substitute procedure
+# "fixstrtod" (provided by Tcl) that corrects the error.
#--------------------------------------------------------------------
-AC_MSG_CHECKING([fd_set and sys/select])
-AC_TRY_COMPILE([#include <sys/types.h>],
- [fd_set readMask, writeMask;], tk_ok=yes, tk_ok=no)
-if test $tk_ok = no; then
- AC_HEADER_EGREP(fd_mask, sys/select.h, tk_ok=yes)
- if test $tk_ok = yes; then
- AC_DEFINE(HAVE_SYS_SELECT_H, 1, [Should we include <sys/select.h>?])
- fi
-fi
-AC_MSG_RESULT($tk_ok)
-if test $tk_ok = no; then
- AC_DEFINE(NO_FD_SET, 1, [Do we have access to the fd_set type?])
-fi
+SC_BUGGY_STRTOD
#--------------------------------------------------------------------
-# Check for various typedefs and provide substitutes if
-# they don't exist.
+# Check for various typedefs and provide substitutes if
+# they don't exist.
#--------------------------------------------------------------------
AC_TYPE_MODE_T
@@ -189,22 +223,17 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_UID_T
-#------------------------------------------------------------------------------
-# Find out about time handling differences.
-#------------------------------------------------------------------------------
-
-AC_CHECK_HEADERS(sys/time.h)
-AC_HEADER_TIME
-
#-------------------------------------------
# In OS/390 struct pwd has no pw_gecos field
#-------------------------------------------
AC_MSG_CHECKING([pw_gecos in struct pwd])
-AC_TRY_COMPILE([#include <pwd.h>],
- [struct passwd pwd; pwd.pw_gecos;], tk_ok=yes, tk_ok=no)
-AC_MSG_RESULT($tk_ok)
-if test $tk_ok = yes; then
+AC_CACHE_VAL(tcl_cv_pwd_pw_gecos,
+ AC_TRY_COMPILE([#include <pwd.h>],
+ [struct passwd pwd; pwd.pw_gecos;],
+ tcl_cv_pwd_pw_gecos=yes, tcl_cv_pwd_pw_gecos=no))
+AC_MSG_RESULT($tcl_cv_pwd_pw_gecos)
+if test $tcl_cv_pwd_pw_gecos = yes; then
AC_DEFINE(HAVE_PW_GECOS, 1, [Does struct password have a pw_gecos field?])
fi
@@ -414,15 +443,6 @@ fi
AC_C_CHAR_UNSIGNED
#--------------------------------------------------------------------
-# Under Solaris 2.4, strtod returns the wrong value for the
-# terminating character under some conditions. Check for this
-# and if the problem exists use a substitute procedure
-# "fixstrtod" (provided by Tcl) that corrects the error.
-#--------------------------------------------------------------------
-
-SC_BUGGY_STRTOD
-
-#--------------------------------------------------------------------
# The statements below define a collection of symbols related to
# building libtk as a shared library instead of a static library.
#--------------------------------------------------------------------
@@ -456,7 +476,7 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc'
if test "`uname -s`" = "Darwin" ; then
SC_ENABLE_FRAMEWORK
TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`"
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | tail +3 > $$f && echo $$f)'
+ TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_ > $$f && echo $$f)'
fi
if test "$FRAMEWORK_BUILD" = "1" ; then
@@ -539,7 +559,7 @@ if test $tk_aqua = yes; then
LIB_RSRC_FILE='${TK_RSRC_FILE}'
APP_RSRC_FILE='${WISH_RSRC_FILE}'
REZ=/Developer/Tools/Rez
- REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF'
+ REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro'
if test "$SHARED_BUILD" = 0; then
EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) $(LIB_INSTALL_DIR)'
TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd`/\${TK_RSRC_FILE}"
@@ -628,5 +648,8 @@ AC_SUBST(APP_RSRC_FILE)
AC_SUBST(REZ)
AC_SUBST(REZ_FLAGS)
-AC_CONFIG_FILES([Makefile tkConfig.sh])
+AC_CONFIG_FILES([
+ Makefile:../unix/Makefile.in
+ tkConfig.sh:../unix/tkConfig.sh.in
+])
AC_OUTPUT