- Timestamp:
- Sep 21, 2006, 8:27:40 AM (18 years ago)
- Location:
- trunk/src/tcl
- Files:
-
- 8 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tcl/Makefile.in
r399 r527 1 1 # Makefile.in -- 2 2 # 3 # This file is a Makefile for the Rappture GUI library. If it has 4 # the name "Makefile.in" then it is a template for a Makefile. 5 # To generate the actual Makefile, run "./configure", which is a 6 # configuration script generated by the "autoconf" program 7 # (constructs like "@foo@" will get replaced in the actual Makefile. 8 # 9 #======================================================================== 10 # This is the parameterized name of the library that we are building. 11 #======================================================================== 12 13 lib_BINARIES=$(Rappture_LIB_FILE) 14 BINARIES=$(lib_BINARIES) 15 16 #======================================================================== 17 # Enumerate the names of the source files included in this package. 3 # This file is a Makefile for Sample TEA Extension. If it has the name 4 # "Makefile.in" then it is a template for a Makefile; to generate the 5 # actual Makefile, run "./configure", which is a configuration script 6 # generated by the "autoconf" program (constructs like "@foo@" will get 7 # replaced in the actual Makefile. 8 # 9 # Copyright (c) 1999 Scriptics Corporation. 10 # Copyright (c) 2002-2005 ActiveState Corporation. 11 # 12 # See the file "license.terms" for information on usage and redistribution 13 # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 14 # 15 # RCS: @(#) $Id: Makefile.in,v 1.60 2005/09/13 22:06:37 hobbs Exp $ 16 17 #======================================================================== 18 # Add additional lines to handle any additional AC_SUBST cases that 19 # have been added in a customized configure script. 20 #======================================================================== 21 22 #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@ 23 BLT_SRC_DIR = @BLT_SRC_DIR@ 24 ALT_DIR = @ALT_DIR@ 25 RAPPTURE_DIR = @RAPPTURE_DIR@ 26 27 28 #======================================================================== 29 # Nothing of the variables below this line should need to be changed. 30 # Please check the TARGETS section below to make sure the make targets 31 # are correct. 32 #======================================================================== 33 34 #======================================================================== 35 # The names of the source files is defined in the configure script. 36 # The object files are used for linking into the final library. 18 37 # This will be used when a dist target is added to the Makefile. 19 #======================================================================== 20 21 Rappture_SOURCES = \ 22 src/Rappture_Init.cc \ 23 src/RpLibraryTclInterface.cc \ 24 src/RpUnitsTclInterface.cc 25 SOURCES = $(Rappture_SOURCES) 26 27 #======================================================================== 28 # Enumerate the names of the object files included in this package. 29 # These objects are created and linked into the final library. In 30 # most cases these object files will correspond to the source files 31 # above. 32 #======================================================================== 33 34 Rappture_OBJECTS = \ 35 Rappture_Init.$(OBJEXT) \ 36 RpLibraryTclInterface.$(OBJEXT) \ 37 RpUnitsTclInterface.$(OBJEXT) 38 OBJECTS = $(Rappture_OBJECTS) 39 40 #======================================================================== 41 # The substitution of "Rappture_LIB_FILE" into the variable name below 42 # let's us refer to the objects for the library without knowing the name 43 # of the library in advance. It also lets us use the "$@" variable in 44 # the rule for building the library, so we can refer to both the list of 45 # objects and the library itself in a platform-independent manner. 46 #======================================================================== 47 48 Rappture_LIB_FILE = @Rappture_LIB_FILE@ 49 $(Rappture_LIB_FILE)_OBJECTS = $(Rappture_OBJECTS) 50 51 #======================================================================== 52 # This is a list of header files to be installed 53 #======================================================================== 54 55 GENERIC_HDRS= 56 57 #======================================================================== 58 # Nothing of the variables below this line need to be changed. Please 59 # check the TARGETS section below to make sure the make targets are 60 # correct. 61 #======================================================================== 62 63 SHELL = @SHELL@ 64 65 srcdir = @srcdir@ 66 top_srcdir = @top_srcdir@ 67 prefix = @prefix@ 68 exec_prefix = @exec_prefix@ 69 70 bindir = @bindir@ 71 sbindir = @sbindir@ 72 libexecdir = @libexecdir@ 73 datadir = @datadir@ 74 sysconfdir = @sysconfdir@ 75 sharedstatedir = @sharedstatedir@ 76 localstatedir = @localstatedir@ 77 libdir = @libdir@ 78 infodir = @infodir@ 79 mandir = @mandir@ 80 includedir = @includedir@ 81 oldincludedir = /usr/include 82 83 DESTDIR = 84 85 pkgdatadir = $(datadir)/@PACKAGE@@VERSION@ 86 pkglibdir = $(libdir)/@PACKAGE@@VERSION@ 87 pkgincludedir = $(includedir)/@PACKAGE@@VERSION@ 88 89 top_builddir = . 90 91 INSTALL = @INSTALL@ 92 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 93 INSTALL_DATA = @INSTALL_DATA@ 94 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 95 INSTALL_STRIP_FLAG = 96 transform = @program_transform_name@ 97 98 NORMAL_INSTALL = : 99 PRE_INSTALL = : 100 POST_INSTALL = : 101 NORMAL_UNINSTALL = : 102 PRE_UNINSTALL = : 103 POST_UNINSTALL = : 104 105 PACKAGE = @PACKAGE@ 106 VERSION = @VERSION@ 107 CC = @CC@ 108 CXX = @CXX@ 109 CFLAGS_DEBUG = @CFLAGS_DEBUG@ -Wall 110 CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ -Wall 111 CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ -Wall 112 CLEANFILES = @CLEANFILES@ 113 EXEEXT = @EXEEXT@ 114 LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ 115 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 116 LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ 117 MAKE_LIB = @MAKE_LIB@ 118 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 119 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 120 OBJEXT = @OBJEXT@ 121 RANLIB = @RANLIB@ 122 SHLIB_CFLAGS = @SHLIB_CFLAGS@ 123 SHLIB_LD = @SHLIB_LD@ 124 SHLIB_LDFLAGS = @SHLIB_LDFLAGS@ 125 SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 126 STLIB_LD = @STLIB_LD@ 127 TCL_BIN_DIR = @TCL_BIN_DIR@ 128 TCL_DEFS = @TCL_DEFS@ 129 TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@ 130 TCL_LD_FLAGS = @TCL_LD_FLAGS@ 131 TCL_LIBS = @TCL_LIBS@ 132 TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@ 133 TCL_SRC_DIR = @TCL_SRC_DIR@ 134 TCL_DBGX = @TCL_DBGX@ 135 TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@ 136 TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ 137 TCLSH_PROG = @TCLSH_PROG@ 138 139 BLT_SRC_DIR = @BLT_SRC_DIR@ 140 141 AUTOCONF = autoconf 142 143 LDFLAGS = $(LDFLAGS_DEFAULT) 144 145 INCLUDES = @TCL_INCLUDES@ -I$(BLT_SRC_DIR) 146 147 EXTRA_CFLAGS = $(TCL_DEFS) $(PROTO_FLAGS) $(SECURITY_FLAGS) $(MEM_DEBUG_FLAGS) $(KEYSYM_FLAGS) $(NO_DEPRECATED_FLAGS) 148 149 DEFS = @DEFS@ $(EXTRA_CFLAGS) 150 151 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 152 mkinstalldirs = $(SHELL) $(top_srcdir)/cf/mkinstalldirs 153 CONFIG_CLEAN_FILES = pkgIndex.tcl init.tcl 154 155 CPPFLAGS = @CPPFLAGS@ 156 LIBS = @LIBS@ 157 AR = ar 158 CFLAGS = @CFLAGS@ 159 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 160 COMPILEXX = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 161 CCLD = $(CC) 162 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ 38 # It is not important to specify the directory, as long as it is the 39 # $(srcdir) or in the generic, win or unix subdirectory. 40 #======================================================================== 41 42 PKG_SOURCES = @PKG_SOURCES@ 43 PKG_OBJECTS = @PKG_OBJECTS@ 44 45 PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ 46 PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ 47 48 #======================================================================== 49 # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with 50 # this package that need to be installed, if any. 51 #======================================================================== 52 53 PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ 54 55 #======================================================================== 56 # This is a list of public header files to be installed, if any. 57 #======================================================================== 58 59 PKG_HEADERS = @PKG_HEADERS@ 60 61 #======================================================================== 62 # "PKG_LIB_FILE" refers to the library (dynamic or static as per 63 # configuration options) composed of the named objects. 64 #======================================================================== 65 66 PKG_LIB_FILE = @PKG_LIB_FILE@ 67 PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ 68 69 lib_BINARIES = $(PKG_LIB_FILE) 70 BINARIES = $(lib_BINARIES) 71 72 SHELL = @SHELL@ 73 74 srcdir = @srcdir@ 75 prefix = @prefix@ 76 exec_prefix = @exec_prefix@ 77 78 bindir = @bindir@ 79 libdir = @libdir@ 80 datadir = @datadir@ 81 mandir = @mandir@ 82 includedir = @includedir@ 83 84 DESTDIR = 85 86 PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 87 pkgdatadir = $(datadir)/$(PKG_DIR) 88 pkglibdir = $(libdir)/$(PKG_DIR) 89 pkgincludedir = $(includedir)/$(PKG_DIR) 90 91 top_builddir = . 92 93 INSTALL = @INSTALL@ 94 INSTALL_PROGRAM = @INSTALL_PROGRAM@ 95 INSTALL_DATA = @INSTALL_DATA@ 96 INSTALL_SCRIPT = @INSTALL_SCRIPT@ 97 98 PACKAGE_NAME = @PACKAGE_NAME@ 99 PACKAGE_VERSION = @PACKAGE_VERSION@ 100 CC = @CC@ 101 CXX = @CXX@ 102 CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 103 CFLAGS_WARNING = @CFLAGS_WARNING@ 104 CLEANFILES = @CLEANFILES@ 105 EXEEXT = @EXEEXT@ 106 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 107 MAKE_LIB = @MAKE_LIB@ 108 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 109 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 110 MAKE_STUB_LIB = @MAKE_STUB_LIB@ 111 OBJEXT = @OBJEXT@ 112 RANLIB = @RANLIB@ 113 RANLIB_STUB = @RANLIB_STUB@ 114 SHLIB_CFLAGS = @SHLIB_CFLAGS@ 115 SHLIB_LD = @SHLIB_LD@ 116 SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 117 STLIB_LD = @STLIB_LD@ 118 #TCL_DEFS = @TCL_DEFS@ 119 TCL_BIN_DIR = @TCL_BIN_DIR@ 120 TCL_SRC_DIR = @TCL_SRC_DIR@ 121 #TK_BIN_DIR = @TK_BIN_DIR@ 122 #TK_SRC_DIR = @TK_SRC_DIR@ 123 124 # Not used, but retained for reference of what libs Tcl required 125 #TCL_LIBS = @TCL_LIBS@ 126 127 #======================================================================== 128 # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our 129 # package without installing. The other environment variables allow us 130 # to test against an uninstalled Tcl. Add special env vars that you 131 # require for testing here (like TCLX_LIBRARY). 132 #======================================================================== 133 134 EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) 135 #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR) 136 TCLLIBPATH = $(top_builddir) 137 TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ 138 @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 139 PATH="$(EXTRA_PATH):$(PATH)" \ 140 TCLLIBPATH="$(TCLLIBPATH)" 141 # TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` 142 143 TCLSH_PROG = @TCLSH_PROG@ 144 TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) 145 146 #WISH_PROG = @WISH_PROG@ 147 #WISH = $(TCLSH_ENV) $(WISH_PROG) 148 149 150 SHARED_BUILD = @SHARED_BUILD@ 151 152 INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ -I$(BLT_SRC_DIR) -I$(ALT_DIR)/include -I$(RAPPTURE_DIR)/include -EHsc 153 #INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ 154 155 PKG_CFLAGS = @PKG_CFLAGS@ 156 157 # TCL_DEFS is not strictly need here, but if you remove it, then you 158 # must make sure that configure.in checks for the necessary components 159 # that your library may use. TCL_DEFS can actually be a problem if 160 # you do not compile with a similar machine setup as the Tcl core was 161 # compiled with. 162 #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) 163 DEFS = @DEFS@ $(PKG_CFLAGS) 164 165 CONFIG_CLEAN_FILES = Makefile 166 167 CPPFLAGS = @CPPFLAGS@ 168 LIBS = @PKG_LIBS@ @LIBS@ 169 AR = @AR@ 170 CFLAGS = @CFLAGS@ 171 COMPILE = $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 163 172 164 173 #======================================================================== … … 187 196 libraries: 188 197 198 199 #======================================================================== 200 # Your doc target should differentiate from doc builds (by the developer) 201 # and doc installs (see install-doc), which just install the docs on the 202 # end user machine when building from source. 203 #======================================================================== 204 189 205 doc: 190 191 install: all install-binaries install-libraries 206 # @echo "If you have documentation to create, place the commands to" 207 # @echo "build the docs in the 'doc:' target. For example:" 208 # @echo " xml2nroff sample.xml > sample.n" 209 # @echo " xml2html sample.xml > sample.html" 210 211 install: all install-binaries install-libraries install-doc 192 212 193 213 install-binaries: binaries install-lib-binaries install-bin-binaries … … 195 215 #======================================================================== 196 216 # This rule installs platform-independent files, such as header files. 217 # The list=...; for p in $$list handles the empty list case x-platform. 197 218 #======================================================================== 198 219 199 220 install-libraries: libraries 200 $(mkinstalldirs)$(includedir)201 echo "Installing header files in$(includedir)"202 @ for i in $(GENERIC_HDRS); do \203 echo "Installing $ $i" ; \204 $(INSTALL_DATA) $ $i$(includedir) ; \221 @mkdir -p $(DESTDIR)$(includedir) 222 @echo "Installing header files in $(DESTDIR)$(includedir)" 223 @list='$(PKG_HEADERS)'; for i in $$list; do \ 224 echo "Installing $(srcdir)/$$i" ; \ 225 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 205 226 done; 206 227 … … 211 232 212 233 install-doc: doc 213 $(mkinstalldirs) $(mandir)/man1 214 $(mkinstalldirs) $(mandir)/man3 215 $(mkinstalldirs) $(mandir)/mann 216 @for i in $(srcdir)/*.n; \ 217 do \ 218 echo "Installing $$i"; \ 219 rm -f $(mandir)/mann/$$i; \ 220 $(INSTALL_DATA) $$i $(mandir)/mann/$$i ; \ 221 chmod 444 $(mandir)/mann/$$i; \ 222 done 223 224 test: 234 # @mkdir -p $(DESTDIR)$(mandir)/mann 235 # @echo "Installing documentation in $(DESTDIR)$(mandir)" 236 # @list='$(srcdir)/doc/*.n'; for i in $$list; do \ 237 # echo "Installing $$i"; \ 238 # rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ 239 # $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ 240 # done 241 242 test: binaries libraries 243 $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 244 245 shell: binaries libraries 246 @$(TCLSH) $(SCRIPT) 247 248 gdb: 249 $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) 225 250 226 251 depend: 227 252 228 253 #======================================================================== 229 # Enumerate the names of the object files included in this package. 230 # These objects are created and linked into the final library. In 231 # most cases these object files will correspond to the source files 232 # above. 233 # 234 # $(Rappture_LIB_FILE) should be listed as part of the BINARIES variable 235 # at the top of the Makefile. That will ensure that this target is built 236 # when you run "make binaries". 237 # 238 # You shouldn't need to modify this target, except to change the package 239 # name from "Rappture" to your package's name. 240 #======================================================================== 241 242 $(Rappture_LIB_FILE): $(Rappture_OBJECTS) 243 -rm -f $(Rappture_LIB_FILE) 244 @MAKE_LIB@ -lrappture 245 $(RANLIB) $(Rappture_LIB_FILE) -lrappture 254 # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 255 # mentioned above. That will ensure that this target is built when you 256 # run "make binaries". 257 # 258 # The $(PKG_OBJECTS) objects are created and linked into the final 259 # library. In most cases these object files will correspond to the 260 # source files above. 261 #======================================================================== 262 263 $(PKG_LIB_FILE): $(PKG_OBJECTS) 264 -rm -f $(PKG_LIB_FILE) 265 ${MAKE_LIB} 266 $(RANLIB) $(PKG_LIB_FILE) 267 268 $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) 269 -rm -f $(PKG_STUB_LIB_FILE) 270 ${MAKE_STUB_LIB} 271 $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) 246 272 247 273 #======================================================================== 248 274 # We need to enumerate the list of .c to .o lines here. 249 # Unfortunately, there does not seem to be any other way to do this250 # in a Makefile-independent way. We can't use VPATH because it picks up251 # object files that may be located in the source directory.252 275 # 253 276 # In the following lines, $(srcdir) refers to the toplevel directory … … 255 278 # you will have to modify the paths to reflect this: 256 279 # 257 # exampleA.$(OBJEXT): $(srcdir)/src/win/exampleA.c 258 # $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/win/exampleA.c` -o $@ 259 #======================================================================== 260 261 #RpRusage.$(OBJEXT): $(srcdir)/src/RpRusage.c 262 # $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/RpRusage.c` -o $@ 263 264 Rappture_Init.$(OBJEXT): $(srcdir)/src/Rappture_Init.cc 265 $(COMPILEXX) -c `@CYGPATH@ $(srcdir)/src/Rappture_Init.cc` -o $@ 266 267 RpLibraryTclInterface.$(OBJEXT): $(srcdir)/src/RpLibraryTclInterface.cc 268 $(COMPILEXX) -c `@CYGPATH@ $(srcdir)/src/RpLibraryTclInterface.cc` -o $@ 269 270 RpUnitsTclInterface.$(OBJEXT): $(srcdir)/src/RpUnitsTclInterface.cc 271 $(COMPILEXX) -c `@CYGPATH@ $(srcdir)/src/RpUnitsTclInterface.cc` -o $@ 272 280 # sample.$(OBJEXT): $(srcdir)/generic/sample.c 281 # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ 282 # 283 # Setting the VPATH variable to a list of paths will cause the makefile 284 # to look into these paths when resolving .c to .obj dependencies. 285 # As necessary, add $(srcdir):$(srcdir)/compat:.... 286 #======================================================================== 287 288 VPATH = $(srcdir):$(srcdir)/src:$(srcdir)/unix:$(srcdir)/win 289 290 .c.@OBJEXT@: 291 $(CC) $(COMPILE) -c `@CYGPATH@ $<` -o $@ 292 .cc.@OBJEXT@: 293 $(CXX) $(COMPILE) -c `@CYGPATH@ $<` -o $@ 294 .cpp.@OBJEXT@: 295 $(CXX) $(COMPILE) -c `@CYGPATH@ $<` -o $@ 296 297 #======================================================================== 298 # Distribution creation 299 # You may need to tweak this target to make it work correctly. 300 #======================================================================== 301 302 #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar 303 COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 304 DIST_ROOT = /tmp/dist 305 DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) 306 307 dist-clean: 308 rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 309 310 dist: dist-clean 311 mkdir -p $(DIST_DIR) 312 cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \ 313 $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ 314 $(DIST_DIR)/ 315 chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 316 chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in 317 318 for i in $(srcdir)/*.[ch]; do \ 319 if [ -f $$i ]; then \ 320 cp -p $$i $(DIST_DIR)/ ; \ 321 fi; \ 322 done; 323 324 mkdir $(DIST_DIR)/tclconfig 325 cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ 326 $(DIST_DIR)/tclconfig/ 327 chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 328 chmod +x $(DIST_DIR)/tclconfig/install-sh 329 330 list='demos doc generic library mac tests unix win'; \ 331 for p in $$list; do \ 332 if test -d $(srcdir)/$$p ; then \ 333 mkdir $(DIST_DIR)/$$p; \ 334 cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \ 335 fi; \ 336 done 337 338 (cd $(DIST_ROOT); $(COMPRESS);) 273 339 274 340 #======================================================================== … … 283 349 clean: 284 350 -test -z "$(BINARIES)" || rm -f $(BINARIES) 285 -rm -f *.o core *.core 286 -rm -f *.$(OBJEXT) 351 -rm -f *.$(OBJEXT) core *.core 287 352 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 288 : 353 289 354 distclean: clean 290 355 -rm -f *.tab.c 291 -rm -f Makefile $(CONFIG_CLEAN_FILES) 292 -rm -f config.cache config.log stamp-h stamp-h[0-9]* 293 -rm -f config.status 294 -rm -rf autom4te.cache 356 -rm -f $(CONFIG_CLEAN_FILES) 357 -rm -f config.cache config.log config.status 295 358 296 359 #======================================================================== … … 298 361 # .lib files. Because the .lib files are not explicitly listed anywhere, 299 362 # we need to deduce their existence from the .dll file of the same name. 300 # Additionally, the .dll files go into the bin directory, but the .lib 301 # files go into the lib directory. On Unix platforms, all library files 302 # go into the lib directory. In addition, this will generate the pkgIndex.tcl 303 # file in the install location (assuming it can find a usable tclsh8.2 shell) 363 # Library files go into the lib directory. 364 # In addition, this will generate the pkgIndex.tcl 365 # file in the install location (assuming it can find a usable tclsh shell) 304 366 # 305 367 # You should not have to modify this target. 306 368 #======================================================================== 307 369 308 install-lib-binaries: installdirs 370 install-lib-binaries: binaries 371 @mkdir -p $(DESTDIR)$(pkglibdir) 309 372 @list='$(lib_BINARIES)'; for p in $$list; do \ 310 373 if test -f $$p; then \ 374 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 375 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 376 stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ 377 if test "x$$stub" = "xstub"; then \ 378 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ 379 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ 380 else \ 381 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 382 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ 383 fi; \ 311 384 ext=`echo $$p|sed -e "s/.*\.//"`; \ 312 385 if test "x$$ext" = "xdll"; then \ 313 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \314 $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \315 386 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ 316 387 if test -f $$lib; then \ 317 echo " $(INSTALL_DATA) $$lib $(DESTDIR)$( libdir)/$$lib"; \318 $(INSTALL_DATA) $$lib $(DESTDIR)$( libdir)/$$lib; \388 echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ 389 $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ 319 390 fi; \ 320 else \321 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \322 $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \323 391 fi; \ 324 else :; fi; \ 325 done 326 @list='$(lib_BINARIES)'; for p in $$list; do \ 327 if test -f $$p; then \ 328 echo " $(RANLIB) $(DESTDIR)$(bindir)/$$p"; \ 329 $(RANLIB) $(DESTDIR)$(bindir)/$$p; \ 330 else :; fi; \ 331 done 332 $(mkinstalldirs) $(pkglibdir)/scripts 333 @for i in $(srcdir)/scripts/*.tcl; do \ 334 echo "Installing $$i" ; \ 335 $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir)/scripts ; \ 336 done; 337 $(TCLSH_PROG) $(srcdir)/cf/mkindex.tcl $(DESTDIR)$(pkglibdir)/scripts 338 $(mkinstalldirs) $(pkglibdir)/lib 339 @for i in $(srcdir)/../../lib/*; do \ 340 echo "Installing $$i" ; \ 341 $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir)/lib ; \ 342 done; 343 $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)/pkgIndex.tcl 344 $(INSTALL_DATA) init.tcl $(DESTDIR)$(pkglibdir)/init.tcl 345 346 #======================================================================== 347 # Install binary executables (e.g. .exe files) 348 # 349 # You should not have to modify this target. 350 #======================================================================== 351 352 install-bin-binaries: installdirs 392 fi; \ 393 done 394 @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 395 if test -f $(srcdir)/$$p; then \ 396 destp=`basename $$p`; \ 397 echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ 398 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ 399 fi; \ 400 done 401 @if test "x$(SHARED_BUILD)" = "x1"; then \ 402 echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ 403 $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ 404 fi 405 406 #======================================================================== 407 # Install binary executables (e.g. .exe files and dependent .dll files) 408 # This is for files that must go in the bin directory (located next to 409 # wish and tclsh), like dependent .dll files on Windows. 410 # 411 # You should not have to modify this target, except to define bin_BINARIES 412 # above if necessary. 413 #======================================================================== 414 415 install-bin-binaries: binaries 416 @mkdir -p $(DESTDIR)$(bindir) 353 417 @list='$(bin_BINARIES)'; for p in $$list; do \ 354 418 if test -f $$p; then \ 355 echo " $(INSTALL_ DATA) $$p $(DESTDIR)$(bindir)/$$p"; \356 $(INSTALL_ DATA) $$p $(DESTDIR)$(bindir)/$$p; \357 else :;fi; \358 done 359 360 .SUFFIXES: .c . o .obj419 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 420 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 421 fi; \ 422 done 423 424 .SUFFIXES: .c .$(OBJEXT) 361 425 362 426 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 364 428 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 365 429 366 config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)367 $(SHELL) ./config.status --recheck368 $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)369 cd $(srcdir) && $(AUTOCONF)370 371 372 430 uninstall-binaries: 373 @$(NORMAL_UNINSTALL)374 list='$(BINARIES)'; for p in $$list; do\375 rm -f $(DESTDIR)$(libdir)/$$p; \376 done377 378 installdirs: 379 $(mkinstalldirs) $(DESTDIR)$(libdir)380 $(mkinstalldirs) $(DESTDIR)$(bindir)381 $(mkinstalldirs) $(DESTDIR)$(pkglibdir)382 383 .PHONY: all binaries clean depend distclean doc install installdirs \ 384 libraries test431 list='$(lib_BINARIES)'; for p in $$list; do \ 432 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 433 done 434 list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 435 p=`basename $$p`; \ 436 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 437 done 438 list='$(bin_BINARIES)'; for p in $$list; do \ 439 rm -f $(DESTDIR)$(bindir)/$$p; \ 440 done 441 442 .PHONY: all binaries clean depend distclean doc install libraries test 385 443 386 444 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
trunk/src/tcl/aclocal.m4
r207 r527 1 builtin(include,tcl.m4) 1 # 2 # Include the TEA standard macro set 3 # 4 5 builtin(include,tclconfig/tcl.m4) 6 7 # 8 # Add here whatever m4 macros you want to define for your package 9 # -
trunk/src/tcl/configure
r225 r527 1 1 #! /bin/sh 2 2 # Guess values for system-dependent variables and create Makefiles. 3 # Generated by GNU Autoconf 2.59 .3 # Generated by GNU Autoconf 2.59 for Rappture 1.1. 4 4 # 5 5 # Copyright (C) 2003 Free Software Foundation, Inc. … … 266 266 267 267 # Identity of this package. 268 PACKAGE_NAME= 269 PACKAGE_TARNAME= 270 PACKAGE_VERSION= 271 PACKAGE_STRING= 272 PACKAGE_BUGREPORT= 273 274 ac_unique_file="src/RpLibraryTclInterface.cc" 275 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os CYGPATH TCL_INCLUDES TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIBS TCL_DEFS TCL_SHLIB_LD_LIBS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_STUB_LIB_FILE TCL_LIB_SPEC TCL_BUILD_LIB_SPEC TCL_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_SPEC BLT_SRC_DIR CLEANFILES CC CFLAGS ac_ct_CC CFLAGS_DEBUG CFLAGS_OPTIMIZE STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LDFLAGS TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB Rappture_LIB_FILE SHLIB_LD_LIBS TCLSH_PROG PACKAGE VERSION PATCHLEVEL EXACT_VERSION NODOT_VERSION LIBOBJS LTLIBOBJS' 268 PACKAGE_NAME='Rappture' 269 PACKAGE_TARNAME='rappture' 270 PACKAGE_VERSION='1.1' 271 PACKAGE_STRING='Rappture 1.1' 272 PACKAGE_BUGREPORT='' 273 274 # Factoring default headers for most tests. 275 ac_includes_default="\ 276 #include <stdio.h> 277 #if HAVE_SYS_TYPES_H 278 # include <sys/types.h> 279 #endif 280 #if HAVE_SYS_STAT_H 281 # include <sys/stat.h> 282 #endif 283 #if STDC_HEADERS 284 # include <stdlib.h> 285 # include <stddef.h> 286 #else 287 # if HAVE_STDLIB_H 288 # include <stdlib.h> 289 # endif 290 #endif 291 #if HAVE_STRING_H 292 # if !STDC_HEADERS && HAVE_MEMORY_H 293 # include <memory.h> 294 # endif 295 # include <string.h> 296 #endif 297 #if HAVE_STRINGS_H 298 # include <strings.h> 299 #endif 300 #if HAVE_INTTYPES_H 301 # include <inttypes.h> 302 #else 303 # if HAVE_STDINT_H 304 # include <stdint.h> 305 # endif 306 #endif 307 #if HAVE_UNISTD_H 308 # include <unistd.h> 309 #endif" 310 311 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS CLEANFILES TCL_INCLUDES TCL_THREADS SHARED_BUILD AR CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB TCLSH_PROG BLT_SRC_DIR RAPPTURE_DIR ALT_DIR PATCHLEVEL EXACT_VERSION NODOT_VERSION LTLIBOBJS' 276 312 ac_subst_files='' 277 313 … … 714 750 ac_cv_env_target_alias_set=${target_alias+set} 715 751 ac_cv_env_target_alias_value=$target_alias 752 ac_env_CC_set=${CC+set} 753 ac_env_CC_value=$CC 754 ac_cv_env_CC_set=${CC+set} 755 ac_cv_env_CC_value=$CC 756 ac_env_CFLAGS_set=${CFLAGS+set} 757 ac_env_CFLAGS_value=$CFLAGS 758 ac_cv_env_CFLAGS_set=${CFLAGS+set} 759 ac_cv_env_CFLAGS_value=$CFLAGS 760 ac_env_LDFLAGS_set=${LDFLAGS+set} 761 ac_env_LDFLAGS_value=$LDFLAGS 762 ac_cv_env_LDFLAGS_set=${LDFLAGS+set} 763 ac_cv_env_LDFLAGS_value=$LDFLAGS 764 ac_env_CPPFLAGS_set=${CPPFLAGS+set} 765 ac_env_CPPFLAGS_value=$CPPFLAGS 766 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} 767 ac_cv_env_CPPFLAGS_value=$CPPFLAGS 716 768 ac_env_CXX_set=${CXX+set} 717 769 ac_env_CXX_value=$CXX … … 722 774 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} 723 775 ac_cv_env_CXXFLAGS_value=$CXXFLAGS 724 ac_env_LDFLAGS_set=${LDFLAGS+set} 725 ac_env_LDFLAGS_value=$LDFLAGS 726 ac_cv_env_LDFLAGS_set=${LDFLAGS+set} 727 ac_cv_env_LDFLAGS_value=$LDFLAGS 728 ac_env_CPPFLAGS_set=${CPPFLAGS+set} 729 ac_env_CPPFLAGS_value=$CPPFLAGS 730 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} 731 ac_cv_env_CPPFLAGS_value=$CPPFLAGS 732 ac_env_CC_set=${CC+set} 733 ac_env_CC_value=$CC 734 ac_cv_env_CC_set=${CC+set} 735 ac_cv_env_CC_value=$CC 736 ac_env_CFLAGS_set=${CFLAGS+set} 737 ac_env_CFLAGS_value=$CFLAGS 738 ac_cv_env_CFLAGS_set=${CFLAGS+set} 739 ac_cv_env_CFLAGS_value=$CFLAGS 776 ac_env_CPP_set=${CPP+set} 777 ac_env_CPP_value=$CPP 778 ac_cv_env_CPP_set=${CPP+set} 779 ac_cv_env_CPP_value=$CPP 740 780 741 781 # … … 746 786 # This message is too long to be a string in the A/UX 3.1 sh. 747 787 cat <<_ACEOF 748 \`configure' configures this packageto adapt to many kinds of systems.788 \`configure' configures Rappture 1.1 to adapt to many kinds of systems. 749 789 750 790 Usage: $0 [OPTION]... [VAR=VALUE]... … … 798 838 799 839 cat <<\_ACEOF 800 801 System types:802 --build=BUILD configure for building on BUILD [guessed]803 --host=HOST cross-compile to build programs to run on HOST [BUILD]804 840 _ACEOF 805 841 fi 806 842 807 843 if test -n "$ac_init_help"; then 808 844 case $ac_init_help in 845 short | recursive ) echo "Configuration of Rappture 1.1:";; 846 esac 809 847 cat <<\_ACEOF 810 848 … … 813 851 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 814 852 --enable-threads build with threads 815 --enable-shared build and link with shared libraries --enable-shared 816 --enable-symbols build with debugging symbols --disable-symbols 853 --enable-shared build and link with shared libraries (default: on) 854 --enable-64bit enable 64bit support (default: off) 855 --enable-64bit-vis enable 64bit Sparc VIS support (default: off) 856 --enable-wince enable Win/CE support (where applicable) 857 --disable-load disallow dynamic loading and "load" command 858 (default: enabled) 859 --enable-symbols build with debugging symbols (default: off) 817 860 818 861 Optional Packages: 819 862 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 820 863 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 821 --with-tclinclude directory containing the public Tcl header files. 822 --with-tcl directory containing tcl configuration (tclConfig.sh) 864 --with-blt=DIR Find bltInt.h in DIR 865 --with-rappture=DIR Find include/core/rappture.h in DIR 866 --with-altpath=DIR Alternate path to search for required packages 867 --with-tcl directory containing tcl configuration 868 (tclConfig.sh) 869 --with-tclinclude directory containing the public Tcl header files 870 --with-celib=DIR use Windows/CE support library from DIR 823 871 824 872 Some influential environment variables: 825 C XX C++compiler command826 C XXFLAGS C++compiler flags873 CC C compiler command 874 CFLAGS C compiler flags 827 875 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 828 876 nonstandard directory <lib dir> 829 877 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have 830 878 headers in a nonstandard directory <include dir> 831 CC C compiler command 832 CFLAGS C compiler flags 879 CXX C++ compiler command 880 CXXFLAGS C++ compiler flags 881 CPP C preprocessor 833 882 834 883 Use these variables to override the choices made by `configure' or to help … … 923 972 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 924 973 fi 925 cd "$ac_popdir"974 cd $ac_popdir 926 975 done 927 976 fi … … 930 979 if $ac_init_version; then 931 980 cat <<\_ACEOF 981 Rappture configure 1.1 982 generated by GNU Autoconf 2.59 932 983 933 984 Copyright (C) 2003 Free Software Foundation, Inc. … … 942 993 running configure, to aid debugging if configure makes a mistake. 943 994 944 It was created by $as_me, which was995 It was created by Rappture $as_me 1.1, which was 945 996 generated by GNU Autoconf 2.59. Invocation command line was 946 997 … … 1270 1321 1271 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 #-------------------------------------------------------------------- 1333 # Call TEA_INIT as the first TEA_ macro to set up initial vars. 1334 # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" 1335 # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. 1336 #-------------------------------------------------------------------- 1337 1338 1339 # TEA extensions pass this us the version of TEA they think they 1340 # are compatible with. 1341 TEA_VERSION="3.5" 1342 1343 echo "$as_me:$LINENO: checking for correct TEA configuration" >&5 1344 echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6 1345 if test x"${PACKAGE_NAME}" = x ; then 1346 { { echo "$as_me:$LINENO: error: 1347 The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5 1348 echo "$as_me: error: 1349 The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;} 1350 { (exit 1); exit 1; }; } 1351 fi 1352 if test x"3.5" = x ; then 1353 { { echo "$as_me:$LINENO: error: 1354 TEA version not specified." >&5 1355 echo "$as_me: error: 1356 TEA version not specified." >&2;} 1357 { (exit 1); exit 1; }; } 1358 elif test "3.5" != "${TEA_VERSION}" ; then 1359 echo "$as_me:$LINENO: result: warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&5 1360 echo "${ECHO_T}warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&6 1361 else 1362 echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5 1363 echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6 1364 fi 1365 case "`uname -s`" in 1366 *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) 1367 # Extract the first word of "cygpath", so it can be a program name with args. 1368 set dummy cygpath; ac_word=$2 1369 echo "$as_me:$LINENO: checking for $ac_word" >&5 1370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1371 if test "${ac_cv_prog_CYGPATH+set}" = set; then 1372 echo $ECHO_N "(cached) $ECHO_C" >&6 1373 else 1374 if test -n "$CYGPATH"; then 1375 ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. 1376 else 1377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1378 for as_dir in $PATH 1379 do 1380 IFS=$as_save_IFS 1381 test -z "$as_dir" && as_dir=. 1382 for ac_exec_ext in '' $ac_executable_extensions; do 1383 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1384 ac_cv_prog_CYGPATH="cygpath -w" 1385 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1386 break 2 1387 fi 1388 done 1389 done 1390 1391 test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" 1392 fi 1393 fi 1394 CYGPATH=$ac_cv_prog_CYGPATH 1395 if test -n "$CYGPATH"; then 1396 echo "$as_me:$LINENO: result: $CYGPATH" >&5 1397 echo "${ECHO_T}$CYGPATH" >&6 1398 else 1399 echo "$as_me:$LINENO: result: no" >&5 1400 echo "${ECHO_T}no" >&6 1401 fi 1402 1403 EXEEXT=".exe" 1404 TEA_PLATFORM="windows" 1405 ;; 1406 *) 1407 CYGPATH=echo 1408 EXEEXT="" 1409 TEA_PLATFORM="unix" 1410 ;; 1411 esac 1412 1413 # Check if exec_prefix is set. If not use fall back to prefix. 1414 # Note when adjusted, so that TEA_PREFIX can correct for this. 1415 # This is needed for recursive configures, since autoconf propagates 1416 # $prefix, but not $exec_prefix (doh!). 1417 if test x$exec_prefix = xNONE ; then 1418 exec_prefix_default=yes 1419 exec_prefix=$prefix 1420 fi 1421 1422 1423 1424 1425 # This package name must be replaced statically for AC_SUBST to work 1426 1427 # Substitute STUB_LIB_FILE in case package creates a stub library too. 1428 1429 1430 # We AC_SUBST these here to ensure they are subst'ed, 1431 # in case the user doesn't call TEA_ADD_... 1432 1433 1434 1435 1436 1437 1438 1439 1440 1272 1441 ac_aux_dir= 1273 for ac_dir in cf $srcdir/cf; do1442 for ac_dir in tclconfig $srcdir/tclconfig; do 1274 1443 if test -f $ac_dir/install-sh; then 1275 1444 ac_aux_dir=$ac_dir … … 1287 1456 done 1288 1457 if test -z "$ac_aux_dir"; then 1289 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in cf $srcdir/cf" >&51290 echo "$as_me: error: cannot find install-sh or install.sh in cf $srcdir/cf" >&2;}1458 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&5 1459 echo "$as_me: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&2;} 1291 1460 { (exit 1); exit 1; }; } 1292 1461 fi … … 1297 1466 1298 1467 #-------------------------------------------------------------------- 1299 # __CHANGE__1300 # Set your package name and version numbers here. The NODOT_VERSION is1301 # required for constructing the library name on systems that don't like1302 # dots in library names (Windows). The VERSION variable is used on the1303 # other systems.1304 #--------------------------------------------------------------------1305 1306 PACKAGE=Rappture1307 1308 MAJOR_VERSION=11309 MINOR_VERSION=11310 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}1311 1312 #--------------------------------------------------------------------1313 1468 # Extra build options 1314 1469 #-------------------------------------------------------------------- 1315 #AC_ARG_WITH(blt, [ --with-blt=DIR Find bltInt.h in DIR], 1316 # blt_source_dir=$withval) 1470 1471 # Check whether --with-blt or --without-blt was given. 1472 if test "${with_blt+set}" = set; then 1473 withval="$with_blt" 1474 blt_source_dir=$withval 1475 fi; 1476 1477 1478 # Check whether --with-rappture or --without-rappture was given. 1479 if test "${with_rappture+set}" = set; then 1480 withval="$with_rappture" 1481 rappture_dir=$withval 1482 fi; 1483 1484 1485 # Check whether --with-altpath or --without-altpath was given. 1486 if test "${with_altpath+set}" = set; then 1487 withval="$with_altpath" 1488 alt_dir=$withval 1489 fi; 1317 1490 1318 1491 #-------------------------------------------------------------------- 1319 # We put this here so that you can compile with -DVERSION="1.2" to 1320 # encode the package version directly into the source files. 1492 # Load the tclConfig.sh file 1321 1493 #-------------------------------------------------------------------- 1322 1494 1323 eval cat >>confdefs.h <<_ACEOF 1324 #define VERSION "${VERSION}" 1325 _ACEOF 1495 1496 1497 # 1498 # Ok, lets find the tcl configuration 1499 # First, look for one uninstalled. 1500 # the alternative search directory is invoked by --with-tcl 1501 # 1502 1503 if test x"${no_tcl}" = x ; then 1504 # we reset no_tcl in case something fails here 1505 no_tcl=true 1506 1507 # Check whether --with-tcl or --without-tcl was given. 1508 if test "${with_tcl+set}" = set; then 1509 withval="$with_tcl" 1510 with_tclconfig=${withval} 1511 fi; 1512 echo "$as_me:$LINENO: checking for Tcl configuration" >&5 1513 echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6 1514 if test "${ac_cv_c_tclconfig+set}" = set; then 1515 echo $ECHO_N "(cached) $ECHO_C" >&6 1516 else 1517 1518 1519 # First check to see if --with-tcl was specified. 1520 if test x"${with_tclconfig}" != x ; then 1521 case ${with_tclconfig} in 1522 */tclConfig.sh ) 1523 if test -f ${with_tclconfig}; then 1524 { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5 1525 echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;} 1526 with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'` 1527 fi ;; 1528 esac 1529 if test -f "${with_tclconfig}/tclConfig.sh" ; then 1530 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` 1531 else 1532 { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5 1533 echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;} 1534 { (exit 1); exit 1; }; } 1535 fi 1536 fi 1537 1538 # then check for a private Tcl installation 1539 if test x"${ac_cv_c_tclconfig}" = x ; then 1540 for i in \ 1541 ../tcl \ 1542 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ 1543 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ 1544 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ 1545 ../../tcl \ 1546 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ 1547 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ 1548 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ 1549 ../../../tcl \ 1550 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ 1551 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ 1552 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do 1553 if test -f "$i/unix/tclConfig.sh" ; then 1554 ac_cv_c_tclconfig=`(cd $i/unix; pwd)` 1555 break 1556 fi 1557 done 1558 fi 1559 1560 # on Darwin, check in Framework installation locations 1561 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then 1562 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ 1563 `ls -d /Library/Frameworks 2>/dev/null` \ 1564 `ls -d /Network/Library/Frameworks 2>/dev/null` \ 1565 `ls -d /System/Library/Frameworks 2>/dev/null` \ 1566 ; do 1567 if test -f "$i/Tcl.framework/tclConfig.sh" ; then 1568 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` 1569 break 1570 fi 1571 done 1572 fi 1573 1574 # on Windows, check in common installation locations 1575 if test "${TEA_PLATFORM}" = "windows" \ 1576 -a x"${ac_cv_c_tclconfig}" = x ; then 1577 for i in `ls -d C:/Tcl/lib 2>/dev/null` \ 1578 `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ 1579 ; do 1580 if test -f "$i/tclConfig.sh" ; then 1581 ac_cv_c_tclconfig=`(cd $i; pwd)` 1582 break 1583 fi 1584 done 1585 fi 1586 1587 # check in a few common install locations 1588 if test x"${ac_cv_c_tclconfig}" = x ; then 1589 for i in `ls -d ${libdir} 2>/dev/null` \ 1590 `ls -d ${exec_prefix}/lib 2>/dev/null` \ 1591 `ls -d ${prefix}/lib 2>/dev/null` \ 1592 `ls -d /usr/local/lib 2>/dev/null` \ 1593 `ls -d /usr/contrib/lib 2>/dev/null` \ 1594 `ls -d /usr/lib 2>/dev/null` \ 1595 ; do 1596 if test -f "$i/tclConfig.sh" ; then 1597 ac_cv_c_tclconfig=`(cd $i; pwd)` 1598 break 1599 fi 1600 done 1601 fi 1602 1603 # check in a few other private locations 1604 if test x"${ac_cv_c_tclconfig}" = x ; then 1605 for i in \ 1606 ${srcdir}/../tcl \ 1607 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ 1608 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ 1609 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do 1610 if test -f "$i/unix/tclConfig.sh" ; then 1611 ac_cv_c_tclconfig=`(cd $i/unix; pwd)` 1612 break 1613 fi 1614 done 1615 fi 1616 1617 fi 1618 1619 1620 if test x"${ac_cv_c_tclconfig}" = x ; then 1621 TCL_BIN_DIR="# no Tcl configs found" 1622 { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5 1623 echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} 1624 exit 0 1625 else 1626 no_tcl= 1627 TCL_BIN_DIR=${ac_cv_c_tclconfig} 1628 echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 1629 echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6 1630 fi 1631 fi 1632 1633 1634 echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 1635 echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6 1636 1637 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then 1638 echo "$as_me:$LINENO: result: loading" >&5 1639 echo "${ECHO_T}loading" >&6 1640 . ${TCL_BIN_DIR}/tclConfig.sh 1641 else 1642 echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 1643 echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6 1644 fi 1645 1646 # eval is required to do the TCL_DBGX substitution 1647 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" 1648 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" 1649 1650 # If the TCL_BIN_DIR is the build directory (not the install directory), 1651 # then set the common variable name to the value of the build variables. 1652 # For example, the variable TCL_LIB_SPEC will be set to the value 1653 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC 1654 # instead of TCL_BUILD_LIB_SPEC since it will work with both an 1655 # installed and uninstalled version of Tcl. 1656 if test -f ${TCL_BIN_DIR}/Makefile ; then 1657 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} 1658 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} 1659 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} 1660 elif test "`uname -s`" = "Darwin"; then 1661 # If Tcl was built as a framework, attempt to use the libraries 1662 # from the framework at the given location so that linking works 1663 # against Tcl.framework installed in an arbitary location. 1664 case ${TCL_DEFS} in 1665 *TCL_FRAMEWORK*) 1666 if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then 1667 for i in "`cd ${TCL_BIN_DIR}; pwd`" \ 1668 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do 1669 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then 1670 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" 1671 break 1672 fi 1673 done 1674 fi 1675 if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then 1676 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" 1677 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" 1678 fi 1679 ;; 1680 esac 1681 fi 1682 1683 # eval is required to do the TCL_DBGX substitution 1684 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" 1685 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" 1686 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" 1687 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1326 1706 1327 1707 1328 1708 #-------------------------------------------------------------------- 1329 # Check whether --enable-gcc or --disable-gcc was given. Do this 1330 # before AC_CYGWIN is called so the compiler can 1331 # be fully tested by built-in autoconf tools. 1332 # This macro also calls AC_PROG_CC to set the compiler if --enable-gcc 1333 # was not used. 1709 # Load the tkConfig.sh file if necessary (Tk extension) 1334 1710 #-------------------------------------------------------------------- 1335 1711 1336 #SC_ENABLE_GCC 1337 ac_ext=cc 1338 ac_cpp='$CXXCPP $CPPFLAGS' 1339 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 1340 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1341 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 1712 #TEA_PATH_TKCONFIG 1713 #TEA_LOAD_TKCONFIG 1714 1715 #----------------------------------------------------------------------- 1716 # Handle the --prefix=... option by defaulting to what Tcl gave. 1717 # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. 1718 #----------------------------------------------------------------------- 1719 1720 1721 if test "${prefix}" = "NONE"; then 1722 prefix_default=yes 1723 if test x"${TCL_PREFIX}" != x; then 1724 { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5 1725 echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;} 1726 prefix=${TCL_PREFIX} 1727 else 1728 { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5 1729 echo "$as_me: --prefix defaulting to /usr/local" >&6;} 1730 prefix=/usr/local 1731 fi 1732 fi 1733 if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \ 1734 -o x"${exec_prefix_default}" = x"yes" ; then 1735 if test x"${TCL_EXEC_PREFIX}" != x; then 1736 { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5 1737 echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;} 1738 exec_prefix=${TCL_EXEC_PREFIX} 1739 else 1740 { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5 1741 echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;} 1742 exec_prefix=$prefix 1743 fi 1744 fi 1745 1746 1747 #----------------------------------------------------------------------- 1748 # Standard compiler checks. 1749 # This sets up CC by using the CC env var, or looks for gcc otherwise. 1750 # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create 1751 # the basic setup necessary to compile executables. 1752 #----------------------------------------------------------------------- 1753 1754 1755 # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) 1756 # in this macro, they need to go into TEA_SETUP_COMPILER instead. 1757 1758 # If the user did not set CFLAGS, set it now to keep 1759 # the AC_PROG_CC macro from adding "-g -O2". 1760 if test "${CFLAGS+set}" != "set" ; then 1761 CFLAGS="" 1762 fi 1763 1764 ac_ext=c 1765 ac_cpp='$CPP $CPPFLAGS' 1766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 1767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1768 ac_compiler_gnu=$ac_cv_c_compiler_gnu 1342 1769 if test -n "$ac_tool_prefix"; then 1343 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 1344 do 1345 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 1346 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 1770 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 1771 set dummy ${ac_tool_prefix}gcc; ac_word=$2 1347 1772 echo "$as_me:$LINENO: checking for $ac_word" >&5 1348 1773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1349 if test "${ac_cv_prog_C XX+set}" = set; then1774 if test "${ac_cv_prog_CC+set}" = set; then 1350 1775 echo $ECHO_N "(cached) $ECHO_C" >&6 1351 1776 else 1352 if test -n "$C XX"; then1353 ac_cv_prog_C XX="$CXX" # Let the user override the test.1777 if test -n "$CC"; then 1778 ac_cv_prog_CC="$CC" # Let the user override the test. 1354 1779 else 1355 1780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR … … 1360 1785 for ac_exec_ext in '' $ac_executable_extensions; do 1361 1786 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1362 ac_cv_prog_C XX="$ac_tool_prefix$ac_prog"1787 ac_cv_prog_CC="${ac_tool_prefix}gcc" 1363 1788 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1364 1789 break 2 … … 1369 1794 fi 1370 1795 fi 1371 C XX=$ac_cv_prog_CXX1372 if test -n "$C XX"; then1373 echo "$as_me:$LINENO: result: $C XX" >&51374 echo "${ECHO_T}$C XX" >&61796 CC=$ac_cv_prog_CC 1797 if test -n "$CC"; then 1798 echo "$as_me:$LINENO: result: $CC" >&5 1799 echo "${ECHO_T}$CC" >&6 1375 1800 else 1376 1801 echo "$as_me:$LINENO: result: no" >&5 … … 1378 1803 fi 1379 1804 1380 test -n "$CXX" && break 1381 done 1382 fi 1383 if test -z "$CXX"; then 1384 ac_ct_CXX=$CXX 1385 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 1386 do 1387 # Extract the first word of "$ac_prog", so it can be a program name with args. 1388 set dummy $ac_prog; ac_word=$2 1805 fi 1806 if test -z "$ac_cv_prog_CC"; then 1807 ac_ct_CC=$CC 1808 # Extract the first word of "gcc", so it can be a program name with args. 1809 set dummy gcc; ac_word=$2 1389 1810 echo "$as_me:$LINENO: checking for $ac_word" >&5 1390 1811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1391 if test "${ac_cv_prog_ac_ct_C XX+set}" = set; then1812 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 1392 1813 echo $ECHO_N "(cached) $ECHO_C" >&6 1393 1814 else 1394 if test -n "$ac_ct_C XX"; then1395 ac_cv_prog_ac_ct_C XX="$ac_ct_CXX" # Let the user override the test.1815 if test -n "$ac_ct_CC"; then 1816 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 1396 1817 else 1397 1818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR … … 1402 1823 for ac_exec_ext in '' $ac_executable_extensions; do 1403 1824 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1404 ac_cv_prog_ac_ct_C XX="$ac_prog"1825 ac_cv_prog_ac_ct_CC="gcc" 1405 1826 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1406 1827 break 2 … … 1411 1832 fi 1412 1833 fi 1413 ac_ct_C XX=$ac_cv_prog_ac_ct_CXX1414 if test -n "$ac_ct_C XX"; then1415 echo "$as_me:$LINENO: result: $ac_ct_C XX" >&51416 echo "${ECHO_T}$ac_ct_C XX" >&61834 ac_ct_CC=$ac_cv_prog_ac_ct_CC 1835 if test -n "$ac_ct_CC"; then 1836 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 1837 echo "${ECHO_T}$ac_ct_CC" >&6 1417 1838 else 1418 1839 echo "$as_me:$LINENO: result: no" >&5 … … 1420 1841 fi 1421 1842 1422 test -n "$ac_ct_CXX" && break 1843 CC=$ac_ct_CC 1844 else 1845 CC="$ac_cv_prog_CC" 1846 fi 1847 1848 if test -z "$CC"; then 1849 if test -n "$ac_tool_prefix"; then 1850 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 1851 set dummy ${ac_tool_prefix}cc; ac_word=$2 1852 echo "$as_me:$LINENO: checking for $ac_word" >&5 1853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1854 if test "${ac_cv_prog_CC+set}" = set; then 1855 echo $ECHO_N "(cached) $ECHO_C" >&6 1856 else 1857 if test -n "$CC"; then 1858 ac_cv_prog_CC="$CC" # Let the user override the test. 1859 else 1860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1861 for as_dir in $PATH 1862 do 1863 IFS=$as_save_IFS 1864 test -z "$as_dir" && as_dir=. 1865 for ac_exec_ext in '' $ac_executable_extensions; do 1866 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1867 ac_cv_prog_CC="${ac_tool_prefix}cc" 1868 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1869 break 2 1870 fi 1423 1871 done 1424 test -n "$ac_ct_CXX" || ac_ct_CXX="g++" 1425 1426 CXX=$ac_ct_CXX 1427 fi 1428 1872 done 1873 1874 fi 1875 fi 1876 CC=$ac_cv_prog_CC 1877 if test -n "$CC"; then 1878 echo "$as_me:$LINENO: result: $CC" >&5 1879 echo "${ECHO_T}$CC" >&6 1880 else 1881 echo "$as_me:$LINENO: result: no" >&5 1882 echo "${ECHO_T}no" >&6 1883 fi 1884 1885 fi 1886 if test -z "$ac_cv_prog_CC"; then 1887 ac_ct_CC=$CC 1888 # Extract the first word of "cc", so it can be a program name with args. 1889 set dummy cc; ac_word=$2 1890 echo "$as_me:$LINENO: checking for $ac_word" >&5 1891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1892 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 1893 echo $ECHO_N "(cached) $ECHO_C" >&6 1894 else 1895 if test -n "$ac_ct_CC"; then 1896 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 1897 else 1898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1899 for as_dir in $PATH 1900 do 1901 IFS=$as_save_IFS 1902 test -z "$as_dir" && as_dir=. 1903 for ac_exec_ext in '' $ac_executable_extensions; do 1904 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1905 ac_cv_prog_ac_ct_CC="cc" 1906 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1907 break 2 1908 fi 1909 done 1910 done 1911 1912 fi 1913 fi 1914 ac_ct_CC=$ac_cv_prog_ac_ct_CC 1915 if test -n "$ac_ct_CC"; then 1916 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 1917 echo "${ECHO_T}$ac_ct_CC" >&6 1918 else 1919 echo "$as_me:$LINENO: result: no" >&5 1920 echo "${ECHO_T}no" >&6 1921 fi 1922 1923 CC=$ac_ct_CC 1924 else 1925 CC="$ac_cv_prog_CC" 1926 fi 1927 1928 fi 1929 if test -z "$CC"; then 1930 # Extract the first word of "cc", so it can be a program name with args. 1931 set dummy cc; ac_word=$2 1932 echo "$as_me:$LINENO: checking for $ac_word" >&5 1933 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1934 if test "${ac_cv_prog_CC+set}" = set; then 1935 echo $ECHO_N "(cached) $ECHO_C" >&6 1936 else 1937 if test -n "$CC"; then 1938 ac_cv_prog_CC="$CC" # Let the user override the test. 1939 else 1940 ac_prog_rejected=no 1941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1942 for as_dir in $PATH 1943 do 1944 IFS=$as_save_IFS 1945 test -z "$as_dir" && as_dir=. 1946 for ac_exec_ext in '' $ac_executable_extensions; do 1947 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1948 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 1949 ac_prog_rejected=yes 1950 continue 1951 fi 1952 ac_cv_prog_CC="cc" 1953 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1954 break 2 1955 fi 1956 done 1957 done 1958 1959 if test $ac_prog_rejected = yes; then 1960 # We found a bogon in the path, so make sure we never use it. 1961 set dummy $ac_cv_prog_CC 1962 shift 1963 if test $# != 0; then 1964 # We chose a different compiler from the bogus one. 1965 # However, it has the same basename, so the bogon will be chosen 1966 # first if we set CC to just the basename; use the full file name. 1967 shift 1968 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" 1969 fi 1970 fi 1971 fi 1972 fi 1973 CC=$ac_cv_prog_CC 1974 if test -n "$CC"; then 1975 echo "$as_me:$LINENO: result: $CC" >&5 1976 echo "${ECHO_T}$CC" >&6 1977 else 1978 echo "$as_me:$LINENO: result: no" >&5 1979 echo "${ECHO_T}no" >&6 1980 fi 1981 1982 fi 1983 if test -z "$CC"; then 1984 if test -n "$ac_tool_prefix"; then 1985 for ac_prog in cl 1986 do 1987 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 1988 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 1989 echo "$as_me:$LINENO: checking for $ac_word" >&5 1990 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1991 if test "${ac_cv_prog_CC+set}" = set; then 1992 echo $ECHO_N "(cached) $ECHO_C" >&6 1993 else 1994 if test -n "$CC"; then 1995 ac_cv_prog_CC="$CC" # Let the user override the test. 1996 else 1997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1998 for as_dir in $PATH 1999 do 2000 IFS=$as_save_IFS 2001 test -z "$as_dir" && as_dir=. 2002 for ac_exec_ext in '' $ac_executable_extensions; do 2003 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2004 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 2005 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2006 break 2 2007 fi 2008 done 2009 done 2010 2011 fi 2012 fi 2013 CC=$ac_cv_prog_CC 2014 if test -n "$CC"; then 2015 echo "$as_me:$LINENO: result: $CC" >&5 2016 echo "${ECHO_T}$CC" >&6 2017 else 2018 echo "$as_me:$LINENO: result: no" >&5 2019 echo "${ECHO_T}no" >&6 2020 fi 2021 2022 test -n "$CC" && break 2023 done 2024 fi 2025 if test -z "$CC"; then 2026 ac_ct_CC=$CC 2027 for ac_prog in cl 2028 do 2029 # Extract the first word of "$ac_prog", so it can be a program name with args. 2030 set dummy $ac_prog; ac_word=$2 2031 echo "$as_me:$LINENO: checking for $ac_word" >&5 2032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2033 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 2034 echo $ECHO_N "(cached) $ECHO_C" >&6 2035 else 2036 if test -n "$ac_ct_CC"; then 2037 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 2038 else 2039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2040 for as_dir in $PATH 2041 do 2042 IFS=$as_save_IFS 2043 test -z "$as_dir" && as_dir=. 2044 for ac_exec_ext in '' $ac_executable_extensions; do 2045 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2046 ac_cv_prog_ac_ct_CC="$ac_prog" 2047 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2048 break 2 2049 fi 2050 done 2051 done 2052 2053 fi 2054 fi 2055 ac_ct_CC=$ac_cv_prog_ac_ct_CC 2056 if test -n "$ac_ct_CC"; then 2057 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 2058 echo "${ECHO_T}$ac_ct_CC" >&6 2059 else 2060 echo "$as_me:$LINENO: result: no" >&5 2061 echo "${ECHO_T}no" >&6 2062 fi 2063 2064 test -n "$ac_ct_CC" && break 2065 done 2066 2067 CC=$ac_ct_CC 2068 fi 2069 2070 fi 2071 2072 2073 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH 2074 See \`config.log' for more details." >&5 2075 echo "$as_me: error: no acceptable C compiler found in \$PATH 2076 See \`config.log' for more details." >&2;} 2077 { (exit 1); exit 1; }; } 1429 2078 1430 2079 # Provide some information about the compiler. 1431 2080 echo "$as_me:$LINENO:" \ 1432 "checking for C ++compiler version" >&52081 "checking for C compiler version" >&5 1433 2082 ac_compiler=`set X $ac_compile; echo $2` 1434 2083 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 … … 1468 2117 # It will help us diagnose broken compilers, and finding out an intuition 1469 2118 # of exeext. 1470 echo "$as_me:$LINENO: checking for C ++compiler default output file name" >&51471 echo $ECHO_N "checking for C ++compiler default output file name... $ECHO_C" >&62119 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 2120 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 1472 2121 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 1473 2122 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 … … 1512 2161 sed 's/^/| /' conftest.$ac_ext >&5 1513 2162 1514 { { echo "$as_me:$LINENO: error: C ++compiler cannot create executables2163 { { echo "$as_me:$LINENO: error: C compiler cannot create executables 1515 2164 See \`config.log' for more details." >&5 1516 echo "$as_me: error: C ++compiler cannot create executables2165 echo "$as_me: error: C compiler cannot create executables 1517 2166 See \`config.log' for more details." >&2;} 1518 2167 { (exit 77); exit 77; }; } … … 1525 2174 # Check the compiler produces executables we can run. If not, either 1526 2175 # the compiler is broken, or we cross compile. 1527 echo "$as_me:$LINENO: checking whether the C ++compiler works" >&51528 echo $ECHO_N "checking whether the C ++compiler works... $ECHO_C" >&62176 echo "$as_me:$LINENO: checking whether the C compiler works" >&5 2177 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 1529 2178 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 1530 2179 # If not cross compiling, check that we can run a simple program. … … 1541 2190 cross_compiling=yes 1542 2191 else 1543 { { echo "$as_me:$LINENO: error: cannot run C ++compiled programs.2192 { { echo "$as_me:$LINENO: error: cannot run C compiled programs. 1544 2193 If you meant to cross compile, use \`--host'. 1545 2194 See \`config.log' for more details." >&5 1546 echo "$as_me: error: cannot run C ++compiled programs.2195 echo "$as_me: error: cannot run C compiled programs. 1547 2196 If you meant to cross compile, use \`--host'. 1548 2197 See \`config.log' for more details." >&2;} … … 1649 2298 OBJEXT=$ac_cv_objext 1650 2299 ac_objext=$OBJEXT 1651 echo "$as_me:$LINENO: checking whether we are using the GNU C ++compiler" >&51652 echo $ECHO_N "checking whether we are using the GNU C ++compiler... $ECHO_C" >&61653 if test "${ac_cv_c xx_compiler_gnu+set}" = set; then2300 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 2301 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 2302 if test "${ac_cv_c_compiler_gnu+set}" = set; then 1654 2303 echo $ECHO_N "(cached) $ECHO_C" >&6 1655 2304 else … … 1681 2330 echo "$as_me:$LINENO: \$? = $ac_status" >&5 1682 2331 (exit $ac_status); } && 1683 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' 2332 { ac_try='test -z "$ac_c_werror_flag" 2333 || test ! -s conftest.err' 1684 2334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 1685 2335 (eval $ac_try) 2>&5 … … 1701 2351 fi 1702 2352 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 1703 ac_cv_c xx_compiler_gnu=$ac_compiler_gnu1704 1705 fi 1706 echo "$as_me:$LINENO: result: $ac_cv_c xx_compiler_gnu" >&51707 echo "${ECHO_T}$ac_cv_c xx_compiler_gnu" >&61708 G XX=`test $ac_compiler_gnu = yes && echo yes`1709 ac_test_C XXFLAGS=${CXXFLAGS+set}1710 ac_save_C XXFLAGS=$CXXFLAGS1711 C XXFLAGS="-g"1712 echo "$as_me:$LINENO: checking whether $C XXaccepts -g" >&51713 echo $ECHO_N "checking whether $C XXaccepts -g... $ECHO_C" >&61714 if test "${ac_cv_prog_c xx_g+set}" = set; then2353 ac_cv_c_compiler_gnu=$ac_compiler_gnu 2354 2355 fi 2356 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 2357 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 2358 GCC=`test $ac_compiler_gnu = yes && echo yes` 2359 ac_test_CFLAGS=${CFLAGS+set} 2360 ac_save_CFLAGS=$CFLAGS 2361 CFLAGS="-g" 2362 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 2363 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 2364 if test "${ac_cv_prog_cc_g+set}" = set; then 1715 2365 echo $ECHO_N "(cached) $ECHO_C" >&6 1716 2366 else … … 1739 2389 echo "$as_me:$LINENO: \$? = $ac_status" >&5 1740 2390 (exit $ac_status); } && 1741 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' 2391 { ac_try='test -z "$ac_c_werror_flag" 2392 || test ! -s conftest.err' 1742 2393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 1743 2394 (eval $ac_try) 2>&5 … … 1751 2402 echo "$as_me:$LINENO: \$? = $ac_status" >&5 1752 2403 (exit $ac_status); }; }; then 1753 ac_cv_prog_c xx_g=yes2404 ac_cv_prog_cc_g=yes 1754 2405 else 1755 2406 echo "$as_me: failed program was:" >&5 1756 2407 sed 's/^/| /' conftest.$ac_ext >&5 1757 2408 1758 ac_cv_prog_c xx_g=no2409 ac_cv_prog_cc_g=no 1759 2410 fi 1760 2411 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 1761 2412 fi 1762 echo "$as_me:$LINENO: result: $ac_cv_prog_c xx_g" >&51763 echo "${ECHO_T}$ac_cv_prog_c xx_g" >&61764 if test "$ac_test_C XXFLAGS" = set; then1765 C XXFLAGS=$ac_save_CXXFLAGS1766 elif test $ac_cv_prog_c xx_g = yes; then1767 if test "$G XX" = yes; then1768 C XXFLAGS="-g -O2"2413 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 2414 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 2415 if test "$ac_test_CFLAGS" = set; then 2416 CFLAGS=$ac_save_CFLAGS 2417 elif test $ac_cv_prog_cc_g = yes; then 2418 if test "$GCC" = yes; then 2419 CFLAGS="-g -O2" 1769 2420 else 1770 C XXFLAGS="-g"2421 CFLAGS="-g" 1771 2422 fi 1772 2423 else 1773 if test "$G XX" = yes; then1774 C XXFLAGS="-O2"2424 if test "$GCC" = yes; then 2425 CFLAGS="-O2" 1775 2426 else 1776 C XXFLAGS=2427 CFLAGS= 1777 2428 fi 1778 2429 fi 1779 for ac_declaration in \ 2430 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 2431 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 2432 if test "${ac_cv_prog_cc_stdc+set}" = set; then 2433 echo $ECHO_N "(cached) $ECHO_C" >&6 2434 else 2435 ac_cv_prog_cc_stdc=no 2436 ac_save_CC=$CC 2437 cat >conftest.$ac_ext <<_ACEOF 2438 /* confdefs.h. */ 2439 _ACEOF 2440 cat confdefs.h >>conftest.$ac_ext 2441 cat >>conftest.$ac_ext <<_ACEOF 2442 /* end confdefs.h. */ 2443 #include <stdarg.h> 2444 #include <stdio.h> 2445 #include <sys/types.h> 2446 #include <sys/stat.h> 2447 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 2448 struct buf { int x; }; 2449 FILE * (*rcsopen) (struct buf *, struct stat *, int); 2450 static char *e (p, i) 2451 char **p; 2452 int i; 2453 { 2454 return p[i]; 2455 } 2456 static char *f (char * (*g) (char **, int), char **p, ...) 2457 { 2458 char *s; 2459 va_list v; 2460 va_start (v,p); 2461 s = g (p, va_arg (v,int)); 2462 va_end (v); 2463 return s; 2464 } 2465 2466 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 2467 function prototypes and stuff, but not '\xHH' hex character constants. 2468 These don't provoke an error unfortunately, instead are silently treated 2469 as 'x'. The following induces an error, until -std1 is added to get 2470 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 2471 array size at least. It's necessary to write '\x00'==0 to get something 2472 that's true only with -std1. */ 2473 int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 2474 2475 int test (int i, double x); 2476 struct s1 {int (*f) (int a);}; 2477 struct s2 {int (*f) (double a);}; 2478 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 2479 int argc; 2480 char **argv; 2481 int 2482 main () 2483 { 2484 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 2485 ; 2486 return 0; 2487 } 2488 _ACEOF 2489 # Don't try gcc -ansi; that turns off useful extensions and 2490 # breaks some systems' header files. 2491 # AIX -qlanglvl=ansi 2492 # Ultrix and OSF/1 -std1 2493 # HP-UX 10.20 and later -Ae 2494 # HP-UX older versions -Aa -D_HPUX_SOURCE 2495 # SVR4 -Xc -D__EXTENSIONS__ 2496 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 2497 do 2498 CC="$ac_save_CC $ac_arg" 2499 rm -f conftest.$ac_objext 2500 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2501 (eval $ac_compile) 2>conftest.er1 2502 ac_status=$? 2503 grep -v '^ *+' conftest.er1 >conftest.err 2504 rm -f conftest.er1 2505 cat conftest.err >&5 2506 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2507 (exit $ac_status); } && 2508 { ac_try='test -z "$ac_c_werror_flag" 2509 || test ! -s conftest.err' 2510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2511 (eval $ac_try) 2>&5 2512 ac_status=$? 2513 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2514 (exit $ac_status); }; } && 2515 { ac_try='test -s conftest.$ac_objext' 2516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2517 (eval $ac_try) 2>&5 2518 ac_status=$? 2519 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2520 (exit $ac_status); }; }; then 2521 ac_cv_prog_cc_stdc=$ac_arg 2522 break 2523 else 2524 echo "$as_me: failed program was:" >&5 2525 sed 's/^/| /' conftest.$ac_ext >&5 2526 2527 fi 2528 rm -f conftest.err conftest.$ac_objext 2529 done 2530 rm -f conftest.$ac_ext conftest.$ac_objext 2531 CC=$ac_save_CC 2532 2533 fi 2534 2535 case "x$ac_cv_prog_cc_stdc" in 2536 x|xno) 2537 echo "$as_me:$LINENO: result: none needed" >&5 2538 echo "${ECHO_T}none needed" >&6 ;; 2539 *) 2540 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 2541 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 2542 CC="$CC $ac_cv_prog_cc_stdc" ;; 2543 esac 2544 2545 # Some people use a C++ compiler to compile C. Since we use `exit', 2546 # in C++ we need to declare it. In case someone uses the same compiler 2547 # for both compiling C and C++ we need to have the C++ compiler decide 2548 # the declaration of exit, since it's the most demanding environment. 2549 cat >conftest.$ac_ext <<_ACEOF 2550 #ifndef __cplusplus 2551 choke me 2552 #endif 2553 _ACEOF 2554 rm -f conftest.$ac_objext 2555 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2556 (eval $ac_compile) 2>conftest.er1 2557 ac_status=$? 2558 grep -v '^ *+' conftest.er1 >conftest.err 2559 rm -f conftest.er1 2560 cat conftest.err >&5 2561 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2562 (exit $ac_status); } && 2563 { ac_try='test -z "$ac_c_werror_flag" 2564 || test ! -s conftest.err' 2565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2566 (eval $ac_try) 2>&5 2567 ac_status=$? 2568 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2569 (exit $ac_status); }; } && 2570 { ac_try='test -s conftest.$ac_objext' 2571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2572 (eval $ac_try) 2>&5 2573 ac_status=$? 2574 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2575 (exit $ac_status); }; }; then 2576 for ac_declaration in \ 1780 2577 '' \ 1781 2578 'extern "C" void std::exit (int) throw (); using std::exit;' \ … … 1810 2607 echo "$as_me:$LINENO: \$? = $ac_status" >&5 1811 2608 (exit $ac_status); } && 1812 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' 2609 { ac_try='test -z "$ac_c_werror_flag" 2610 || test ! -s conftest.err' 1813 2611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 1814 2612 (eval $ac_try) 2>&5 … … 1854 2652 echo "$as_me:$LINENO: \$? = $ac_status" >&5 1855 2653 (exit $ac_status); } && 1856 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' 2654 { ac_try='test -z "$ac_c_werror_flag" 2655 || test ! -s conftest.err' 1857 2656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 1858 2657 (eval $ac_try) 2>&5 … … 1881 2680 fi 1882 2681 2682 else 2683 echo "$as_me: failed program was:" >&5 2684 sed 's/^/| /' conftest.$ac_ext >&5 2685 2686 fi 2687 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 1883 2688 ac_ext=c 1884 2689 ac_cpp='$CPP $CPPFLAGS' … … 1887 2692 ac_compiler_gnu=$ac_cv_c_compiler_gnu 1888 2693 1889 # Find a good install program. We prefer a C program (faster), 2694 ac_ext=cc 2695 ac_cpp='$CXXCPP $CPPFLAGS' 2696 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2697 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2698 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2699 if test -n "$ac_tool_prefix"; then 2700 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 2701 do 2702 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 2703 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 2704 echo "$as_me:$LINENO: checking for $ac_word" >&5 2705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2706 if test "${ac_cv_prog_CXX+set}" = set; then 2707 echo $ECHO_N "(cached) $ECHO_C" >&6 2708 else 2709 if test -n "$CXX"; then 2710 ac_cv_prog_CXX="$CXX" # Let the user override the test. 2711 else 2712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2713 for as_dir in $PATH 2714 do 2715 IFS=$as_save_IFS 2716 test -z "$as_dir" && as_dir=. 2717 for ac_exec_ext in '' $ac_executable_extensions; do 2718 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2719 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 2720 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2721 break 2 2722 fi 2723 done 2724 done 2725 2726 fi 2727 fi 2728 CXX=$ac_cv_prog_CXX 2729 if test -n "$CXX"; then 2730 echo "$as_me:$LINENO: result: $CXX" >&5 2731 echo "${ECHO_T}$CXX" >&6 2732 else 2733 echo "$as_me:$LINENO: result: no" >&5 2734 echo "${ECHO_T}no" >&6 2735 fi 2736 2737 test -n "$CXX" && break 2738 done 2739 fi 2740 if test -z "$CXX"; then 2741 ac_ct_CXX=$CXX 2742 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 2743 do 2744 # Extract the first word of "$ac_prog", so it can be a program name with args. 2745 set dummy $ac_prog; ac_word=$2 2746 echo "$as_me:$LINENO: checking for $ac_word" >&5 2747 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2748 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then 2749 echo $ECHO_N "(cached) $ECHO_C" >&6 2750 else 2751 if test -n "$ac_ct_CXX"; then 2752 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. 2753 else 2754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2755 for as_dir in $PATH 2756 do 2757 IFS=$as_save_IFS 2758 test -z "$as_dir" && as_dir=. 2759 for ac_exec_ext in '' $ac_executable_extensions; do 2760 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2761 ac_cv_prog_ac_ct_CXX="$ac_prog" 2762 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2763 break 2 2764 fi 2765 done 2766 done 2767 2768 fi 2769 fi 2770 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX 2771 if test -n "$ac_ct_CXX"; then 2772 echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 2773 echo "${ECHO_T}$ac_ct_CXX" >&6 2774 else 2775 echo "$as_me:$LINENO: result: no" >&5 2776 echo "${ECHO_T}no" >&6 2777 fi 2778 2779 test -n "$ac_ct_CXX" && break 2780 done 2781 test -n "$ac_ct_CXX" || ac_ct_CXX="g++" 2782 2783 CXX=$ac_ct_CXX 2784 fi 2785 2786 2787 # Provide some information about the compiler. 2788 echo "$as_me:$LINENO:" \ 2789 "checking for C++ compiler version" >&5 2790 ac_compiler=`set X $ac_compile; echo $2` 2791 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 2792 (eval $ac_compiler --version </dev/null >&5) 2>&5 2793 ac_status=$? 2794 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2795 (exit $ac_status); } 2796 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 2797 (eval $ac_compiler -v </dev/null >&5) 2>&5 2798 ac_status=$? 2799 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2800 (exit $ac_status); } 2801 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 2802 (eval $ac_compiler -V </dev/null >&5) 2>&5 2803 ac_status=$? 2804 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2805 (exit $ac_status); } 2806 2807 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 2808 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 2809 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then 2810 echo $ECHO_N "(cached) $ECHO_C" >&6 2811 else 2812 cat >conftest.$ac_ext <<_ACEOF 2813 /* confdefs.h. */ 2814 _ACEOF 2815 cat confdefs.h >>conftest.$ac_ext 2816 cat >>conftest.$ac_ext <<_ACEOF 2817 /* end confdefs.h. */ 2818 2819 int 2820 main () 2821 { 2822 #ifndef __GNUC__ 2823 choke me 2824 #endif 2825 2826 ; 2827 return 0; 2828 } 2829 _ACEOF 2830 rm -f conftest.$ac_objext 2831 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2832 (eval $ac_compile) 2>conftest.er1 2833 ac_status=$? 2834 grep -v '^ *+' conftest.er1 >conftest.err 2835 rm -f conftest.er1 2836 cat conftest.err >&5 2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2838 (exit $ac_status); } && 2839 { ac_try='test -z "$ac_cxx_werror_flag" 2840 || test ! -s conftest.err' 2841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2842 (eval $ac_try) 2>&5 2843 ac_status=$? 2844 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2845 (exit $ac_status); }; } && 2846 { ac_try='test -s conftest.$ac_objext' 2847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2848 (eval $ac_try) 2>&5 2849 ac_status=$? 2850 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2851 (exit $ac_status); }; }; then 2852 ac_compiler_gnu=yes 2853 else 2854 echo "$as_me: failed program was:" >&5 2855 sed 's/^/| /' conftest.$ac_ext >&5 2856 2857 ac_compiler_gnu=no 2858 fi 2859 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 2860 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu 2861 2862 fi 2863 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 2864 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 2865 GXX=`test $ac_compiler_gnu = yes && echo yes` 2866 ac_test_CXXFLAGS=${CXXFLAGS+set} 2867 ac_save_CXXFLAGS=$CXXFLAGS 2868 CXXFLAGS="-g" 2869 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 2870 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 2871 if test "${ac_cv_prog_cxx_g+set}" = set; then 2872 echo $ECHO_N "(cached) $ECHO_C" >&6 2873 else 2874 cat >conftest.$ac_ext <<_ACEOF 2875 /* confdefs.h. */ 2876 _ACEOF 2877 cat confdefs.h >>conftest.$ac_ext 2878 cat >>conftest.$ac_ext <<_ACEOF 2879 /* end confdefs.h. */ 2880 2881 int 2882 main () 2883 { 2884 2885 ; 2886 return 0; 2887 } 2888 _ACEOF 2889 rm -f conftest.$ac_objext 2890 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2891 (eval $ac_compile) 2>conftest.er1 2892 ac_status=$? 2893 grep -v '^ *+' conftest.er1 >conftest.err 2894 rm -f conftest.er1 2895 cat conftest.err >&5 2896 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2897 (exit $ac_status); } && 2898 { ac_try='test -z "$ac_cxx_werror_flag" 2899 || test ! -s conftest.err' 2900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2901 (eval $ac_try) 2>&5 2902 ac_status=$? 2903 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2904 (exit $ac_status); }; } && 2905 { ac_try='test -s conftest.$ac_objext' 2906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2907 (eval $ac_try) 2>&5 2908 ac_status=$? 2909 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2910 (exit $ac_status); }; }; then 2911 ac_cv_prog_cxx_g=yes 2912 else 2913 echo "$as_me: failed program was:" >&5 2914 sed 's/^/| /' conftest.$ac_ext >&5 2915 2916 ac_cv_prog_cxx_g=no 2917 fi 2918 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 2919 fi 2920 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 2921 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 2922 if test "$ac_test_CXXFLAGS" = set; then 2923 CXXFLAGS=$ac_save_CXXFLAGS 2924 elif test $ac_cv_prog_cxx_g = yes; then 2925 if test "$GXX" = yes; then 2926 CXXFLAGS="-g -O2" 2927 else 2928 CXXFLAGS="-g" 2929 fi 2930 else 2931 if test "$GXX" = yes; then 2932 CXXFLAGS="-O2" 2933 else 2934 CXXFLAGS= 2935 fi 2936 fi 2937 for ac_declaration in \ 2938 '' \ 2939 'extern "C" void std::exit (int) throw (); using std::exit;' \ 2940 'extern "C" void std::exit (int); using std::exit;' \ 2941 'extern "C" void exit (int) throw ();' \ 2942 'extern "C" void exit (int);' \ 2943 'void exit (int);' 2944 do 2945 cat >conftest.$ac_ext <<_ACEOF 2946 /* confdefs.h. */ 2947 _ACEOF 2948 cat confdefs.h >>conftest.$ac_ext 2949 cat >>conftest.$ac_ext <<_ACEOF 2950 /* end confdefs.h. */ 2951 $ac_declaration 2952 #include <stdlib.h> 2953 int 2954 main () 2955 { 2956 exit (42); 2957 ; 2958 return 0; 2959 } 2960 _ACEOF 2961 rm -f conftest.$ac_objext 2962 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2963 (eval $ac_compile) 2>conftest.er1 2964 ac_status=$? 2965 grep -v '^ *+' conftest.er1 >conftest.err 2966 rm -f conftest.er1 2967 cat conftest.err >&5 2968 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2969 (exit $ac_status); } && 2970 { ac_try='test -z "$ac_cxx_werror_flag" 2971 || test ! -s conftest.err' 2972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2973 (eval $ac_try) 2>&5 2974 ac_status=$? 2975 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2976 (exit $ac_status); }; } && 2977 { ac_try='test -s conftest.$ac_objext' 2978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2979 (eval $ac_try) 2>&5 2980 ac_status=$? 2981 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2982 (exit $ac_status); }; }; then 2983 : 2984 else 2985 echo "$as_me: failed program was:" >&5 2986 sed 's/^/| /' conftest.$ac_ext >&5 2987 2988 continue 2989 fi 2990 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 2991 cat >conftest.$ac_ext <<_ACEOF 2992 /* confdefs.h. */ 2993 _ACEOF 2994 cat confdefs.h >>conftest.$ac_ext 2995 cat >>conftest.$ac_ext <<_ACEOF 2996 /* end confdefs.h. */ 2997 $ac_declaration 2998 int 2999 main () 3000 { 3001 exit (42); 3002 ; 3003 return 0; 3004 } 3005 _ACEOF 3006 rm -f conftest.$ac_objext 3007 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3008 (eval $ac_compile) 2>conftest.er1 3009 ac_status=$? 3010 grep -v '^ *+' conftest.er1 >conftest.err 3011 rm -f conftest.er1 3012 cat conftest.err >&5 3013 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3014 (exit $ac_status); } && 3015 { ac_try='test -z "$ac_cxx_werror_flag" 3016 || test ! -s conftest.err' 3017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3018 (eval $ac_try) 2>&5 3019 ac_status=$? 3020 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3021 (exit $ac_status); }; } && 3022 { ac_try='test -s conftest.$ac_objext' 3023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3024 (eval $ac_try) 2>&5 3025 ac_status=$? 3026 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3027 (exit $ac_status); }; }; then 3028 break 3029 else 3030 echo "$as_me: failed program was:" >&5 3031 sed 's/^/| /' conftest.$ac_ext >&5 3032 3033 fi 3034 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3035 done 3036 rm -f conftest* 3037 if test -n "$ac_declaration"; then 3038 echo '#ifdef __cplusplus' >>confdefs.h 3039 echo $ac_declaration >>confdefs.h 3040 echo '#endif' >>confdefs.h 3041 fi 3042 3043 ac_ext=c 3044 ac_cpp='$CPP $CPPFLAGS' 3045 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3046 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3047 ac_compiler_gnu=$ac_cv_c_compiler_gnu 3048 3049 ac_ext=c 3050 ac_cpp='$CPP $CPPFLAGS' 3051 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3052 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3053 ac_compiler_gnu=$ac_cv_c_compiler_gnu 3054 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 3055 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 3056 # On Suns, sometimes $CPP names a directory. 3057 if test -n "$CPP" && test -d "$CPP"; then 3058 CPP= 3059 fi 3060 if test -z "$CPP"; then 3061 if test "${ac_cv_prog_CPP+set}" = set; then 3062 echo $ECHO_N "(cached) $ECHO_C" >&6 3063 else 3064 # Double quotes because CPP needs to be expanded 3065 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 3066 do 3067 ac_preproc_ok=false 3068 for ac_c_preproc_warn_flag in '' yes 3069 do 3070 # Use a header file that comes with gcc, so configuring glibc 3071 # with a fresh cross-compiler works. 3072 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 3073 # <limits.h> exists even on freestanding compilers. 3074 # On the NeXT, cc -E runs the code through the compiler's parser, 3075 # not just through cpp. "Syntax error" is here to catch this case. 3076 cat >conftest.$ac_ext <<_ACEOF 3077 /* confdefs.h. */ 3078 _ACEOF 3079 cat confdefs.h >>conftest.$ac_ext 3080 cat >>conftest.$ac_ext <<_ACEOF 3081 /* end confdefs.h. */ 3082 #ifdef __STDC__ 3083 # include <limits.h> 3084 #else 3085 # include <assert.h> 3086 #endif 3087 Syntax error 3088 _ACEOF 3089 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 3090 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 3091 ac_status=$? 3092 grep -v '^ *+' conftest.er1 >conftest.err 3093 rm -f conftest.er1 3094 cat conftest.err >&5 3095 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3096 (exit $ac_status); } >/dev/null; then 3097 if test -s conftest.err; then 3098 ac_cpp_err=$ac_c_preproc_warn_flag 3099 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3100 else 3101 ac_cpp_err= 3102 fi 3103 else 3104 ac_cpp_err=yes 3105 fi 3106 if test -z "$ac_cpp_err"; then 3107 : 3108 else 3109 echo "$as_me: failed program was:" >&5 3110 sed 's/^/| /' conftest.$ac_ext >&5 3111 3112 # Broken: fails on valid input. 3113 continue 3114 fi 3115 rm -f conftest.err conftest.$ac_ext 3116 3117 # OK, works on sane cases. Now check whether non-existent headers 3118 # can be detected and how. 3119 cat >conftest.$ac_ext <<_ACEOF 3120 /* confdefs.h. */ 3121 _ACEOF 3122 cat confdefs.h >>conftest.$ac_ext 3123 cat >>conftest.$ac_ext <<_ACEOF 3124 /* end confdefs.h. */ 3125 #include <ac_nonexistent.h> 3126 _ACEOF 3127 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 3128 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 3129 ac_status=$? 3130 grep -v '^ *+' conftest.er1 >conftest.err 3131 rm -f conftest.er1 3132 cat conftest.err >&5 3133 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3134 (exit $ac_status); } >/dev/null; then 3135 if test -s conftest.err; then 3136 ac_cpp_err=$ac_c_preproc_warn_flag 3137 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3138 else 3139 ac_cpp_err= 3140 fi 3141 else 3142 ac_cpp_err=yes 3143 fi 3144 if test -z "$ac_cpp_err"; then 3145 # Broken: success on invalid input. 3146 continue 3147 else 3148 echo "$as_me: failed program was:" >&5 3149 sed 's/^/| /' conftest.$ac_ext >&5 3150 3151 # Passes both tests. 3152 ac_preproc_ok=: 3153 break 3154 fi 3155 rm -f conftest.err conftest.$ac_ext 3156 3157 done 3158 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 3159 rm -f conftest.err conftest.$ac_ext 3160 if $ac_preproc_ok; then 3161 break 3162 fi 3163 3164 done 3165 ac_cv_prog_CPP=$CPP 3166 3167 fi 3168 CPP=$ac_cv_prog_CPP 3169 else 3170 ac_cv_prog_CPP=$CPP 3171 fi 3172 echo "$as_me:$LINENO: result: $CPP" >&5 3173 echo "${ECHO_T}$CPP" >&6 3174 ac_preproc_ok=false 3175 for ac_c_preproc_warn_flag in '' yes 3176 do 3177 # Use a header file that comes with gcc, so configuring glibc 3178 # with a fresh cross-compiler works. 3179 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 3180 # <limits.h> exists even on freestanding compilers. 3181 # On the NeXT, cc -E runs the code through the compiler's parser, 3182 # not just through cpp. "Syntax error" is here to catch this case. 3183 cat >conftest.$ac_ext <<_ACEOF 3184 /* confdefs.h. */ 3185 _ACEOF 3186 cat confdefs.h >>conftest.$ac_ext 3187 cat >>conftest.$ac_ext <<_ACEOF 3188 /* end confdefs.h. */ 3189 #ifdef __STDC__ 3190 # include <limits.h> 3191 #else 3192 # include <assert.h> 3193 #endif 3194 Syntax error 3195 _ACEOF 3196 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 3197 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 3198 ac_status=$? 3199 grep -v '^ *+' conftest.er1 >conftest.err 3200 rm -f conftest.er1 3201 cat conftest.err >&5 3202 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3203 (exit $ac_status); } >/dev/null; then 3204 if test -s conftest.err; then 3205 ac_cpp_err=$ac_c_preproc_warn_flag 3206 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3207 else 3208 ac_cpp_err= 3209 fi 3210 else 3211 ac_cpp_err=yes 3212 fi 3213 if test -z "$ac_cpp_err"; then 3214 : 3215 else 3216 echo "$as_me: failed program was:" >&5 3217 sed 's/^/| /' conftest.$ac_ext >&5 3218 3219 # Broken: fails on valid input. 3220 continue 3221 fi 3222 rm -f conftest.err conftest.$ac_ext 3223 3224 # OK, works on sane cases. Now check whether non-existent headers 3225 # can be detected and how. 3226 cat >conftest.$ac_ext <<_ACEOF 3227 /* confdefs.h. */ 3228 _ACEOF 3229 cat confdefs.h >>conftest.$ac_ext 3230 cat >>conftest.$ac_ext <<_ACEOF 3231 /* end confdefs.h. */ 3232 #include <ac_nonexistent.h> 3233 _ACEOF 3234 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 3235 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 3236 ac_status=$? 3237 grep -v '^ *+' conftest.er1 >conftest.err 3238 rm -f conftest.er1 3239 cat conftest.err >&5 3240 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3241 (exit $ac_status); } >/dev/null; then 3242 if test -s conftest.err; then 3243 ac_cpp_err=$ac_c_preproc_warn_flag 3244 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3245 else 3246 ac_cpp_err= 3247 fi 3248 else 3249 ac_cpp_err=yes 3250 fi 3251 if test -z "$ac_cpp_err"; then 3252 # Broken: success on invalid input. 3253 continue 3254 else 3255 echo "$as_me: failed program was:" >&5 3256 sed 's/^/| /' conftest.$ac_ext >&5 3257 3258 # Passes both tests. 3259 ac_preproc_ok=: 3260 break 3261 fi 3262 rm -f conftest.err conftest.$ac_ext 3263 3264 done 3265 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 3266 rm -f conftest.err conftest.$ac_ext 3267 if $ac_preproc_ok; then 3268 : 3269 else 3270 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check 3271 See \`config.log' for more details." >&5 3272 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check 3273 See \`config.log' for more details." >&2;} 3274 { (exit 1); exit 1; }; } 3275 fi 3276 3277 ac_ext=c 3278 ac_cpp='$CPP $CPPFLAGS' 3279 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3280 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3281 ac_compiler_gnu=$ac_cv_c_compiler_gnu 3282 3283 3284 # Find a good install program. We prefer a C program (faster), 1890 3285 # so one script is as good as another. But avoid the broken or 1891 3286 # incompatible versions: … … 1967 3362 1968 3363 1969 #--------------------------------------------------------------------1970 # Checks to see if the make program sets the $MAKE variable.1971 #--------------------------------------------------------------------1972 1973 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&53364 #-------------------------------------------------------------------- 3365 # Checks to see if the make program sets the $MAKE variable. 3366 #-------------------------------------------------------------------- 3367 3368 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 1974 3369 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 1975 3370 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` … … 2001 3396 2002 3397 2003 #--------------------------------------------------------------------2004 # Find ranlib2005 #--------------------------------------------------------------------2006 2007 if test -n "$ac_tool_prefix"; then3398 #-------------------------------------------------------------------- 3399 # Find ranlib 3400 #-------------------------------------------------------------------- 3401 3402 if test -n "$ac_tool_prefix"; then 2008 3403 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 2009 3404 set dummy ${ac_tool_prefix}ranlib; ac_word=$2 … … 2086 3481 2087 3482 2088 #-------------------------------------------------------------------- 2089 # This macro performs additional compiler tests. 2090 #-------------------------------------------------------------------- 2091 2092 # Make sure we can run config.sub. 2093 $ac_config_sub sun4 >/dev/null 2>&1 || 2094 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 2095 echo "$as_me: error: cannot run $ac_config_sub" >&2;} 2096 { (exit 1); exit 1; }; } 2097 2098 echo "$as_me:$LINENO: checking build system type" >&5 2099 echo $ECHO_N "checking build system type... $ECHO_C" >&6 2100 if test "${ac_cv_build+set}" = set; then 3483 #-------------------------------------------------------------------- 3484 # Determines the correct binary file extension (.o, .obj, .exe etc.) 3485 #-------------------------------------------------------------------- 3486 3487 3488 3489 3490 3491 3492 echo "$as_me:$LINENO: checking for egrep" >&5 3493 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 3494 if test "${ac_cv_prog_egrep+set}" = set; then 2101 3495 echo $ECHO_N "(cached) $ECHO_C" >&6 2102 3496 else 2103 ac_cv_build_alias=$build_alias 2104 test -z "$ac_cv_build_alias" && 2105 ac_cv_build_alias=`$ac_config_guess` 2106 test -z "$ac_cv_build_alias" && 2107 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 2108 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} 2109 { (exit 1); exit 1; }; } 2110 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || 2111 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 2112 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} 2113 { (exit 1); exit 1; }; } 2114 2115 fi 2116 echo "$as_me:$LINENO: result: $ac_cv_build" >&5 2117 echo "${ECHO_T}$ac_cv_build" >&6 2118 build=$ac_cv_build 2119 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 2120 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 2121 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 2122 2123 2124 echo "$as_me:$LINENO: checking host system type" >&5 2125 echo $ECHO_N "checking host system type... $ECHO_C" >&6 2126 if test "${ac_cv_host+set}" = set; then 3497 if echo a | (grep -E '(a|b)') >/dev/null 2>&1 3498 then ac_cv_prog_egrep='grep -E' 3499 else ac_cv_prog_egrep='egrep' 3500 fi 3501 fi 3502 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 3503 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 3504 EGREP=$ac_cv_prog_egrep 3505 3506 3507 echo "$as_me:$LINENO: checking for ANSI C header files" >&5 3508 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 3509 if test "${ac_cv_header_stdc+set}" = set; then 2127 3510 echo $ECHO_N "(cached) $ECHO_C" >&6 2128 3511 else 2129 ac_cv_host_alias=$host_alias 2130 test -z "$ac_cv_host_alias" && 2131 ac_cv_host_alias=$ac_cv_build_alias 2132 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || 2133 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 2134 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} 2135 { (exit 1); exit 1; }; } 2136 2137 fi 2138 echo "$as_me:$LINENO: result: $ac_cv_host" >&5 2139 echo "${ECHO_T}$ac_cv_host" >&6 2140 host=$ac_cv_host 2141 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 2142 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 2143 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 2144 2145 2146 case $host_os in 2147 *cygwin* ) CYGWIN=yes;; 2148 * ) CYGWIN=no;; 3512 cat >conftest.$ac_ext <<_ACEOF 3513 /* confdefs.h. */ 3514 _ACEOF 3515 cat confdefs.h >>conftest.$ac_ext 3516 cat >>conftest.$ac_ext <<_ACEOF 3517 /* end confdefs.h. */ 3518 #include <stdlib.h> 3519 #include <stdarg.h> 3520 #include <string.h> 3521 #include <float.h> 3522 3523 int 3524 main () 3525 { 3526 3527 ; 3528 return 0; 3529 } 3530 _ACEOF 3531 rm -f conftest.$ac_objext 3532 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3533 (eval $ac_compile) 2>conftest.er1 3534 ac_status=$? 3535 grep -v '^ *+' conftest.er1 >conftest.err 3536 rm -f conftest.er1 3537 cat conftest.err >&5 3538 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3539 (exit $ac_status); } && 3540 { ac_try='test -z "$ac_c_werror_flag" 3541 || test ! -s conftest.err' 3542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3543 (eval $ac_try) 2>&5 3544 ac_status=$? 3545 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3546 (exit $ac_status); }; } && 3547 { ac_try='test -s conftest.$ac_objext' 3548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3549 (eval $ac_try) 2>&5 3550 ac_status=$? 3551 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3552 (exit $ac_status); }; }; then 3553 ac_cv_header_stdc=yes 3554 else 3555 echo "$as_me: failed program was:" >&5 3556 sed 's/^/| /' conftest.$ac_ext >&5 3557 3558 ac_cv_header_stdc=no 3559 fi 3560 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3561 3562 if test $ac_cv_header_stdc = yes; then 3563 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 3564 cat >conftest.$ac_ext <<_ACEOF 3565 /* confdefs.h. */ 3566 _ACEOF 3567 cat confdefs.h >>conftest.$ac_ext 3568 cat >>conftest.$ac_ext <<_ACEOF 3569 /* end confdefs.h. */ 3570 #include <string.h> 3571 3572 _ACEOF 3573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3574 $EGREP "memchr" >/dev/null 2>&1; then 3575 : 3576 else 3577 ac_cv_header_stdc=no 3578 fi 3579 rm -f conftest* 3580 3581 fi 3582 3583 if test $ac_cv_header_stdc = yes; then 3584 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 3585 cat >conftest.$ac_ext <<_ACEOF 3586 /* confdefs.h. */ 3587 _ACEOF 3588 cat confdefs.h >>conftest.$ac_ext 3589 cat >>conftest.$ac_ext <<_ACEOF 3590 /* end confdefs.h. */ 3591 #include <stdlib.h> 3592 3593 _ACEOF 3594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3595 $EGREP "free" >/dev/null 2>&1; then 3596 : 3597 else 3598 ac_cv_header_stdc=no 3599 fi 3600 rm -f conftest* 3601 3602 fi 3603 3604 if test $ac_cv_header_stdc = yes; then 3605 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 3606 if test "$cross_compiling" = yes; then 3607 : 3608 else 3609 cat >conftest.$ac_ext <<_ACEOF 3610 /* confdefs.h. */ 3611 _ACEOF 3612 cat confdefs.h >>conftest.$ac_ext 3613 cat >>conftest.$ac_ext <<_ACEOF 3614 /* end confdefs.h. */ 3615 #include <ctype.h> 3616 #if ((' ' & 0x0FF) == 0x020) 3617 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 3618 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 3619 #else 3620 # define ISLOWER(c) \ 3621 (('a' <= (c) && (c) <= 'i') \ 3622 || ('j' <= (c) && (c) <= 'r') \ 3623 || ('s' <= (c) && (c) <= 'z')) 3624 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 3625 #endif 3626 3627 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 3628 int 3629 main () 3630 { 3631 int i; 3632 for (i = 0; i < 256; i++) 3633 if (XOR (islower (i), ISLOWER (i)) 3634 || toupper (i) != TOUPPER (i)) 3635 exit(2); 3636 exit (0); 3637 } 3638 _ACEOF 3639 rm -f conftest$ac_exeext 3640 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 3641 (eval $ac_link) 2>&5 3642 ac_status=$? 3643 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3644 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 3645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3646 (eval $ac_try) 2>&5 3647 ac_status=$? 3648 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3649 (exit $ac_status); }; }; then 3650 : 3651 else 3652 echo "$as_me: program exited with status $ac_status" >&5 3653 echo "$as_me: failed program was:" >&5 3654 sed 's/^/| /' conftest.$ac_ext >&5 3655 3656 ( exit $ac_status ) 3657 ac_cv_header_stdc=no 3658 fi 3659 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 3660 fi 3661 fi 3662 fi 3663 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 3664 echo "${ECHO_T}$ac_cv_header_stdc" >&6 3665 if test $ac_cv_header_stdc = yes; then 3666 3667 cat >>confdefs.h <<\_ACEOF 3668 #define STDC_HEADERS 1 3669 _ACEOF 3670 3671 fi 3672 3673 # On IRIX 5.3, sys/types and inttypes.h are conflicting. 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 3684 inttypes.h stdint.h unistd.h 3685 do 3686 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 3687 echo "$as_me:$LINENO: checking for $ac_header" >&5 3688 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 3689 if eval "test \"\${$as_ac_Header+set}\" = set"; then 3690 echo $ECHO_N "(cached) $ECHO_C" >&6 3691 else 3692 cat >conftest.$ac_ext <<_ACEOF 3693 /* confdefs.h. */ 3694 _ACEOF 3695 cat confdefs.h >>conftest.$ac_ext 3696 cat >>conftest.$ac_ext <<_ACEOF 3697 /* end confdefs.h. */ 3698 $ac_includes_default 3699 3700 #include <$ac_header> 3701 _ACEOF 3702 rm -f conftest.$ac_objext 3703 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3704 (eval $ac_compile) 2>conftest.er1 3705 ac_status=$? 3706 grep -v '^ *+' conftest.er1 >conftest.err 3707 rm -f conftest.er1 3708 cat conftest.err >&5 3709 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3710 (exit $ac_status); } && 3711 { ac_try='test -z "$ac_c_werror_flag" 3712 || test ! -s conftest.err' 3713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3714 (eval $ac_try) 2>&5 3715 ac_status=$? 3716 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3717 (exit $ac_status); }; } && 3718 { ac_try='test -s conftest.$ac_objext' 3719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3720 (eval $ac_try) 2>&5 3721 ac_status=$? 3722 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3723 (exit $ac_status); }; }; then 3724 eval "$as_ac_Header=yes" 3725 else 3726 echo "$as_me: failed program was:" >&5 3727 sed 's/^/| /' conftest.$ac_ext >&5 3728 3729 eval "$as_ac_Header=no" 3730 fi 3731 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3732 fi 3733 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 3734 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 3735 if test `eval echo '${'$as_ac_Header'}'` = yes; then 3736 cat >>confdefs.h <<_ACEOF 3737 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 3738 _ACEOF 3739 3740 fi 3741 3742 done 3743 3744 3745 3746 # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. 3747 3748 3749 #------------------------------------------------------------------------ 3750 # If we're using GCC, see if the compiler understands -pipe. If so, use it. 3751 # It makes compiling go faster. (This is only a performance feature.) 3752 #------------------------------------------------------------------------ 3753 3754 if test -z "$no_pipe" -a -n "$GCC"; then 3755 echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 3756 echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 3757 OLDCC="$CC" 3758 CC="$CC -pipe" 3759 cat >conftest.$ac_ext <<_ACEOF 3760 /* confdefs.h. */ 3761 _ACEOF 3762 cat confdefs.h >>conftest.$ac_ext 3763 cat >>conftest.$ac_ext <<_ACEOF 3764 /* end confdefs.h. */ 3765 3766 int 3767 main () 3768 { 3769 3770 ; 3771 return 0; 3772 } 3773 _ACEOF 3774 rm -f conftest.$ac_objext 3775 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3776 (eval $ac_compile) 2>conftest.er1 3777 ac_status=$? 3778 grep -v '^ *+' conftest.er1 >conftest.err 3779 rm -f conftest.er1 3780 cat conftest.err >&5 3781 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3782 (exit $ac_status); } && 3783 { ac_try='test -z "$ac_c_werror_flag" 3784 || test ! -s conftest.err' 3785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3786 (eval $ac_try) 2>&5 3787 ac_status=$? 3788 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3789 (exit $ac_status); }; } && 3790 { ac_try='test -s conftest.$ac_objext' 3791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3792 (eval $ac_try) 2>&5 3793 ac_status=$? 3794 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3795 (exit $ac_status); }; }; then 3796 echo "$as_me:$LINENO: result: yes" >&5 3797 echo "${ECHO_T}yes" >&6 3798 else 3799 echo "$as_me: failed program was:" >&5 3800 sed 's/^/| /' conftest.$ac_ext >&5 3801 3802 CC="$OLDCC" 3803 echo "$as_me:$LINENO: result: no" >&5 3804 echo "${ECHO_T}no" >&6 3805 fi 3806 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3807 fi 3808 3809 #-------------------------------------------------------------------- 3810 # Common compiler flag setup 3811 #-------------------------------------------------------------------- 3812 3813 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 3814 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 3815 if test "${ac_cv_c_bigendian+set}" = set; then 3816 echo $ECHO_N "(cached) $ECHO_C" >&6 3817 else 3818 # See if sys/param.h defines the BYTE_ORDER macro. 3819 cat >conftest.$ac_ext <<_ACEOF 3820 /* confdefs.h. */ 3821 _ACEOF 3822 cat confdefs.h >>conftest.$ac_ext 3823 cat >>conftest.$ac_ext <<_ACEOF 3824 /* end confdefs.h. */ 3825 #include <sys/types.h> 3826 #include <sys/param.h> 3827 3828 int 3829 main () 3830 { 3831 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN 3832 bogus endian macros 3833 #endif 3834 3835 ; 3836 return 0; 3837 } 3838 _ACEOF 3839 rm -f conftest.$ac_objext 3840 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3841 (eval $ac_compile) 2>conftest.er1 3842 ac_status=$? 3843 grep -v '^ *+' conftest.er1 >conftest.err 3844 rm -f conftest.er1 3845 cat conftest.err >&5 3846 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3847 (exit $ac_status); } && 3848 { ac_try='test -z "$ac_c_werror_flag" 3849 || test ! -s conftest.err' 3850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3851 (eval $ac_try) 2>&5 3852 ac_status=$? 3853 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3854 (exit $ac_status); }; } && 3855 { ac_try='test -s conftest.$ac_objext' 3856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3857 (eval $ac_try) 2>&5 3858 ac_status=$? 3859 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3860 (exit $ac_status); }; }; then 3861 # It does; now see whether it defined to BIG_ENDIAN or not. 3862 cat >conftest.$ac_ext <<_ACEOF 3863 /* confdefs.h. */ 3864 _ACEOF 3865 cat confdefs.h >>conftest.$ac_ext 3866 cat >>conftest.$ac_ext <<_ACEOF 3867 /* end confdefs.h. */ 3868 #include <sys/types.h> 3869 #include <sys/param.h> 3870 3871 int 3872 main () 3873 { 3874 #if BYTE_ORDER != BIG_ENDIAN 3875 not big endian 3876 #endif 3877 3878 ; 3879 return 0; 3880 } 3881 _ACEOF 3882 rm -f conftest.$ac_objext 3883 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3884 (eval $ac_compile) 2>conftest.er1 3885 ac_status=$? 3886 grep -v '^ *+' conftest.er1 >conftest.err 3887 rm -f conftest.er1 3888 cat conftest.err >&5 3889 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3890 (exit $ac_status); } && 3891 { ac_try='test -z "$ac_c_werror_flag" 3892 || test ! -s conftest.err' 3893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3894 (eval $ac_try) 2>&5 3895 ac_status=$? 3896 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3897 (exit $ac_status); }; } && 3898 { ac_try='test -s conftest.$ac_objext' 3899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3900 (eval $ac_try) 2>&5 3901 ac_status=$? 3902 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3903 (exit $ac_status); }; }; then 3904 ac_cv_c_bigendian=yes 3905 else 3906 echo "$as_me: failed program was:" >&5 3907 sed 's/^/| /' conftest.$ac_ext >&5 3908 3909 ac_cv_c_bigendian=no 3910 fi 3911 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3912 else 3913 echo "$as_me: failed program was:" >&5 3914 sed 's/^/| /' conftest.$ac_ext >&5 3915 3916 # It does not; compile a test program. 3917 if test "$cross_compiling" = yes; then 3918 # try to guess the endianness by grepping values into an object file 3919 ac_cv_c_bigendian=unknown 3920 cat >conftest.$ac_ext <<_ACEOF 3921 /* confdefs.h. */ 3922 _ACEOF 3923 cat confdefs.h >>conftest.$ac_ext 3924 cat >>conftest.$ac_ext <<_ACEOF 3925 /* end confdefs.h. */ 3926 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 3927 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 3928 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } 3929 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 3930 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 3931 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } 3932 int 3933 main () 3934 { 3935 _ascii (); _ebcdic (); 3936 ; 3937 return 0; 3938 } 3939 _ACEOF 3940 rm -f conftest.$ac_objext 3941 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3942 (eval $ac_compile) 2>conftest.er1 3943 ac_status=$? 3944 grep -v '^ *+' conftest.er1 >conftest.err 3945 rm -f conftest.er1 3946 cat conftest.err >&5 3947 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3948 (exit $ac_status); } && 3949 { ac_try='test -z "$ac_c_werror_flag" 3950 || test ! -s conftest.err' 3951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3952 (eval $ac_try) 2>&5 3953 ac_status=$? 3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3955 (exit $ac_status); }; } && 3956 { ac_try='test -s conftest.$ac_objext' 3957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3958 (eval $ac_try) 2>&5 3959 ac_status=$? 3960 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3961 (exit $ac_status); }; }; then 3962 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then 3963 ac_cv_c_bigendian=yes 3964 fi 3965 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 3966 if test "$ac_cv_c_bigendian" = unknown; then 3967 ac_cv_c_bigendian=no 3968 else 3969 # finding both strings is unlikely to happen, but who knows? 3970 ac_cv_c_bigendian=unknown 3971 fi 3972 fi 3973 else 3974 echo "$as_me: failed program was:" >&5 3975 sed 's/^/| /' conftest.$ac_ext >&5 3976 3977 fi 3978 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3979 else 3980 cat >conftest.$ac_ext <<_ACEOF 3981 /* confdefs.h. */ 3982 _ACEOF 3983 cat confdefs.h >>conftest.$ac_ext 3984 cat >>conftest.$ac_ext <<_ACEOF 3985 /* end confdefs.h. */ 3986 int 3987 main () 3988 { 3989 /* Are we little or big endian? From Harbison&Steele. */ 3990 union 3991 { 3992 long l; 3993 char c[sizeof (long)]; 3994 } u; 3995 u.l = 1; 3996 exit (u.c[sizeof (long) - 1] == 1); 3997 } 3998 _ACEOF 3999 rm -f conftest$ac_exeext 4000 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4001 (eval $ac_link) 2>&5 4002 ac_status=$? 4003 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4004 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 4005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4006 (eval $ac_try) 2>&5 4007 ac_status=$? 4008 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4009 (exit $ac_status); }; }; then 4010 ac_cv_c_bigendian=no 4011 else 4012 echo "$as_me: program exited with status $ac_status" >&5 4013 echo "$as_me: failed program was:" >&5 4014 sed 's/^/| /' conftest.$ac_ext >&5 4015 4016 ( exit $ac_status ) 4017 ac_cv_c_bigendian=yes 4018 fi 4019 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 4020 fi 4021 fi 4022 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 4023 fi 4024 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 4025 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 4026 case $ac_cv_c_bigendian in 4027 yes) 4028 4029 cat >>confdefs.h <<\_ACEOF 4030 #define WORDS_BIGENDIAN 1 4031 _ACEOF 4032 ;; 4033 no) 4034 ;; 4035 *) 4036 { { echo "$as_me:$LINENO: error: unknown endianness 4037 presetting ac_cv_c_bigendian=no (or yes) will help" >&5 4038 echo "$as_me: error: unknown endianness 4039 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} 4040 { (exit 1); exit 1; }; } ;; 2149 4041 esac 2150 4042 2151 2152 #-------------------------------------------------------------------- 2153 # Determines the correct binary file extension (.o, .obj, .exe etc.) 2154 #-------------------------------------------------------------------- 2155 2156 2157 2158 2159 #-------------------------------------------------------------------- 2160 # "cygpath" is used on windows to generate native path names for include 2161 # files. 2162 # These variables should only be used with the compiler and linker since 2163 # they generate native path names. 2164 # 2165 # Unix tclConfig.sh points SRC_DIR at the top-level directory of 2166 # the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at 2167 # the win subdirectory. Hence the different usages of SRC_DIR below. 2168 # 2169 # This must be done before calling SC_PUBLIC_TCL_HEADERS 2170 #-------------------------------------------------------------------- 2171 2172 case "`uname -s`" in 2173 *win32* | *WIN32* | *CYGWIN_NT*) 2174 CYGPATH="cygpath -w" 4043 if test "${TEA_PLATFORM}" = "unix" ; then 4044 4045 #-------------------------------------------------------------------- 4046 # On a few very rare systems, all of the libm.a stuff is 4047 # already in libc.a. Set compiler flags accordingly. 4048 # Also, Linux requires the "ieee" library for math to work 4049 # right (and it must appear before "-lm"). 4050 #-------------------------------------------------------------------- 4051 4052 echo "$as_me:$LINENO: checking for sin" >&5 4053 echo $ECHO_N "checking for sin... $ECHO_C" >&6 4054 if test "${ac_cv_func_sin+set}" = set; then 4055 echo $ECHO_N "(cached) $ECHO_C" >&6 4056 else 4057 cat >conftest.$ac_ext <<_ACEOF 4058 /* confdefs.h. */ 4059 _ACEOF 4060 cat confdefs.h >>conftest.$ac_ext 4061 cat >>conftest.$ac_ext <<_ACEOF 4062 /* end confdefs.h. */ 4063 /* Define sin to an innocuous variant, in case <limits.h> declares sin. 4064 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 4065 #define sin innocuous_sin 4066 4067 /* System header to define __stub macros and hopefully few prototypes, 4068 which can conflict with char sin (); below. 4069 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 4070 <limits.h> exists even on freestanding compilers. */ 4071 4072 #ifdef __STDC__ 4073 # include <limits.h> 4074 #else 4075 # include <assert.h> 4076 #endif 4077 4078 #undef sin 4079 4080 /* Override any gcc2 internal prototype to avoid an error. */ 4081 #ifdef __cplusplus 4082 extern "C" 4083 { 4084 #endif 4085 /* We use char because int might match the return type of a gcc2 4086 builtin and then its argument prototype would still apply. */ 4087 char sin (); 4088 /* The GNU C library defines this for functions which it implements 4089 to always fail with ENOSYS. Some functions are actually named 4090 something starting with __ and the normal name is an alias. */ 4091 #if defined (__stub_sin) || defined (__stub___sin) 4092 choke me 4093 #else 4094 char (*f) () = sin; 4095 #endif 4096 #ifdef __cplusplus 4097 } 4098 #endif 4099 4100 int 4101 main () 4102 { 4103 return f != sin; 4104 ; 4105 return 0; 4106 } 4107 _ACEOF 4108 rm -f conftest.$ac_objext conftest$ac_exeext 4109 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4110 (eval $ac_link) 2>conftest.er1 4111 ac_status=$? 4112 grep -v '^ *+' conftest.er1 >conftest.err 4113 rm -f conftest.er1 4114 cat conftest.err >&5 4115 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4116 (exit $ac_status); } && 4117 { ac_try='test -z "$ac_c_werror_flag" 4118 || test ! -s conftest.err' 4119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4120 (eval $ac_try) 2>&5 4121 ac_status=$? 4122 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4123 (exit $ac_status); }; } && 4124 { ac_try='test -s conftest$ac_exeext' 4125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4126 (eval $ac_try) 2>&5 4127 ac_status=$? 4128 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4129 (exit $ac_status); }; }; then 4130 ac_cv_func_sin=yes 4131 else 4132 echo "$as_me: failed program was:" >&5 4133 sed 's/^/| /' conftest.$ac_ext >&5 4134 4135 ac_cv_func_sin=no 4136 fi 4137 rm -f conftest.err conftest.$ac_objext \ 4138 conftest$ac_exeext conftest.$ac_ext 4139 fi 4140 echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 4141 echo "${ECHO_T}$ac_cv_func_sin" >&6 4142 if test $ac_cv_func_sin = yes; then 4143 MATH_LIBS="" 4144 else 4145 MATH_LIBS="-lm" 4146 fi 4147 4148 echo "$as_me:$LINENO: checking for main in -lieee" >&5 4149 echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 4150 if test "${ac_cv_lib_ieee_main+set}" = set; then 4151 echo $ECHO_N "(cached) $ECHO_C" >&6 4152 else 4153 ac_check_lib_save_LIBS=$LIBS 4154 LIBS="-lieee $LIBS" 4155 cat >conftest.$ac_ext <<_ACEOF 4156 /* confdefs.h. */ 4157 _ACEOF 4158 cat confdefs.h >>conftest.$ac_ext 4159 cat >>conftest.$ac_ext <<_ACEOF 4160 /* end confdefs.h. */ 4161 4162 4163 int 4164 main () 4165 { 4166 main (); 4167 ; 4168 return 0; 4169 } 4170 _ACEOF 4171 rm -f conftest.$ac_objext conftest$ac_exeext 4172 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4173 (eval $ac_link) 2>conftest.er1 4174 ac_status=$? 4175 grep -v '^ *+' conftest.er1 >conftest.err 4176 rm -f conftest.er1 4177 cat conftest.err >&5 4178 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4179 (exit $ac_status); } && 4180 { ac_try='test -z "$ac_c_werror_flag" 4181 || test ! -s conftest.err' 4182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4183 (eval $ac_try) 2>&5 4184 ac_status=$? 4185 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4186 (exit $ac_status); }; } && 4187 { ac_try='test -s conftest$ac_exeext' 4188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4189 (eval $ac_try) 2>&5 4190 ac_status=$? 4191 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4192 (exit $ac_status); }; }; then 4193 ac_cv_lib_ieee_main=yes 4194 else 4195 echo "$as_me: failed program was:" >&5 4196 sed 's/^/| /' conftest.$ac_ext >&5 4197 4198 ac_cv_lib_ieee_main=no 4199 fi 4200 rm -f conftest.err conftest.$ac_objext \ 4201 conftest$ac_exeext conftest.$ac_ext 4202 LIBS=$ac_check_lib_save_LIBS 4203 fi 4204 echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 4205 echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 4206 if test $ac_cv_lib_ieee_main = yes; then 4207 MATH_LIBS="-lieee $MATH_LIBS" 4208 fi 4209 4210 4211 #-------------------------------------------------------------------- 4212 # Interactive UNIX requires -linet instead of -lsocket, plus it 4213 # needs net/errno.h to define the socket-related error codes. 4214 #-------------------------------------------------------------------- 4215 4216 echo "$as_me:$LINENO: checking for main in -linet" >&5 4217 echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 4218 if test "${ac_cv_lib_inet_main+set}" = set; then 4219 echo $ECHO_N "(cached) $ECHO_C" >&6 4220 else 4221 ac_check_lib_save_LIBS=$LIBS 4222 LIBS="-linet $LIBS" 4223 cat >conftest.$ac_ext <<_ACEOF 4224 /* confdefs.h. */ 4225 _ACEOF 4226 cat confdefs.h >>conftest.$ac_ext 4227 cat >>conftest.$ac_ext <<_ACEOF 4228 /* end confdefs.h. */ 4229 4230 4231 int 4232 main () 4233 { 4234 main (); 4235 ; 4236 return 0; 4237 } 4238 _ACEOF 4239 rm -f conftest.$ac_objext conftest$ac_exeext 4240 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4241 (eval $ac_link) 2>conftest.er1 4242 ac_status=$? 4243 grep -v '^ *+' conftest.er1 >conftest.err 4244 rm -f conftest.er1 4245 cat conftest.err >&5 4246 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4247 (exit $ac_status); } && 4248 { ac_try='test -z "$ac_c_werror_flag" 4249 || test ! -s conftest.err' 4250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4251 (eval $ac_try) 2>&5 4252 ac_status=$? 4253 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4254 (exit $ac_status); }; } && 4255 { ac_try='test -s conftest$ac_exeext' 4256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4257 (eval $ac_try) 2>&5 4258 ac_status=$? 4259 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4260 (exit $ac_status); }; }; then 4261 ac_cv_lib_inet_main=yes 4262 else 4263 echo "$as_me: failed program was:" >&5 4264 sed 's/^/| /' conftest.$ac_ext >&5 4265 4266 ac_cv_lib_inet_main=no 4267 fi 4268 rm -f conftest.err conftest.$ac_objext \ 4269 conftest$ac_exeext conftest.$ac_ext 4270 LIBS=$ac_check_lib_save_LIBS 4271 fi 4272 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 4273 echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 4274 if test $ac_cv_lib_inet_main = yes; then 4275 LIBS="$LIBS -linet" 4276 fi 4277 4278 if test "${ac_cv_header_net_errno_h+set}" = set; then 4279 echo "$as_me:$LINENO: checking for net/errno.h" >&5 4280 echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 4281 if test "${ac_cv_header_net_errno_h+set}" = set; then 4282 echo $ECHO_N "(cached) $ECHO_C" >&6 4283 fi 4284 echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 4285 echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 4286 else 4287 # Is the header compilable? 4288 echo "$as_me:$LINENO: checking net/errno.h usability" >&5 4289 echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 4290 cat >conftest.$ac_ext <<_ACEOF 4291 /* confdefs.h. */ 4292 _ACEOF 4293 cat confdefs.h >>conftest.$ac_ext 4294 cat >>conftest.$ac_ext <<_ACEOF 4295 /* end confdefs.h. */ 4296 $ac_includes_default 4297 #include <net/errno.h> 4298 _ACEOF 4299 rm -f conftest.$ac_objext 4300 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 4301 (eval $ac_compile) 2>conftest.er1 4302 ac_status=$? 4303 grep -v '^ *+' conftest.er1 >conftest.err 4304 rm -f conftest.er1 4305 cat conftest.err >&5 4306 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4307 (exit $ac_status); } && 4308 { ac_try='test -z "$ac_c_werror_flag" 4309 || test ! -s conftest.err' 4310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4311 (eval $ac_try) 2>&5 4312 ac_status=$? 4313 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4314 (exit $ac_status); }; } && 4315 { ac_try='test -s conftest.$ac_objext' 4316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4317 (eval $ac_try) 2>&5 4318 ac_status=$? 4319 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4320 (exit $ac_status); }; }; then 4321 ac_header_compiler=yes 4322 else 4323 echo "$as_me: failed program was:" >&5 4324 sed 's/^/| /' conftest.$ac_ext >&5 4325 4326 ac_header_compiler=no 4327 fi 4328 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 4329 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 4330 echo "${ECHO_T}$ac_header_compiler" >&6 4331 4332 # Is the header present? 4333 echo "$as_me:$LINENO: checking net/errno.h presence" >&5 4334 echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 4335 cat >conftest.$ac_ext <<_ACEOF 4336 /* confdefs.h. */ 4337 _ACEOF 4338 cat confdefs.h >>conftest.$ac_ext 4339 cat >>conftest.$ac_ext <<_ACEOF 4340 /* end confdefs.h. */ 4341 #include <net/errno.h> 4342 _ACEOF 4343 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 4344 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 4345 ac_status=$? 4346 grep -v '^ *+' conftest.er1 >conftest.err 4347 rm -f conftest.er1 4348 cat conftest.err >&5 4349 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4350 (exit $ac_status); } >/dev/null; then 4351 if test -s conftest.err; then 4352 ac_cpp_err=$ac_c_preproc_warn_flag 4353 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 4354 else 4355 ac_cpp_err= 4356 fi 4357 else 4358 ac_cpp_err=yes 4359 fi 4360 if test -z "$ac_cpp_err"; then 4361 ac_header_preproc=yes 4362 else 4363 echo "$as_me: failed program was:" >&5 4364 sed 's/^/| /' conftest.$ac_ext >&5 4365 4366 ac_header_preproc=no 4367 fi 4368 rm -f conftest.err conftest.$ac_ext 4369 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 4370 echo "${ECHO_T}$ac_header_preproc" >&6 4371 4372 # So? What about this header? 4373 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 4374 yes:no: ) 4375 { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5 4376 echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 4377 { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5 4378 echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;} 4379 ac_header_preproc=yes 2175 4380 ;; 2176 *) 2177 CYGPATH=echo 4381 no:yes:* ) 4382 { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5 4383 echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;} 4384 { echo "$as_me:$LINENO: WARNING: net/errno.h: check for missing prerequisite headers?" >&5 4385 echo "$as_me: WARNING: net/errno.h: check for missing prerequisite headers?" >&2;} 4386 { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5 4387 echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;} 4388 { echo "$as_me:$LINENO: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&5 4389 echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&2;} 4390 { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5 4391 echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} 4392 { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 4393 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} 4394 ( 4395 cat <<\_ASBOX 4396 ## ----------------------------------- ## 4397 ## Report this to the Rappture lists. ## 4398 ## ----------------------------------- ## 4399 _ASBOX 4400 ) | 4401 sed "s/^/$as_me: WARNING: /" >&2 2178 4402 ;; 2179 4403 esac 2180 4404 echo "$as_me:$LINENO: checking for net/errno.h" >&5 4405 echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 4406 if test "${ac_cv_header_net_errno_h+set}" = set; then 4407 echo $ECHO_N "(cached) $ECHO_C" >&6 4408 else 4409 ac_cv_header_net_errno_h=$ac_header_preproc 4410 fi 4411 echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 4412 echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 4413 4414 fi 4415 if test $ac_cv_header_net_errno_h = yes; then 4416 4417 4418 cat >>confdefs.h <<\_ACEOF 4419 #define HAVE_NET_ERRNO_H 1 4420 _ACEOF 4421 4422 fi 4423 4424 4425 4426 #-------------------------------------------------------------------- 4427 # Check for the existence of the -lsocket and -lnsl libraries. 4428 # The order here is important, so that they end up in the right 4429 # order in the command line generated by make. Here are some 4430 # special considerations: 4431 # 1. Use "connect" and "accept" to check for -lsocket, and 4432 # "gethostbyname" to check for -lnsl. 4433 # 2. Use each function name only once: can't redo a check because 4434 # autoconf caches the results of the last check and won't redo it. 4435 # 3. Use -lnsl and -lsocket only if they supply procedures that 4436 # aren't already present in the normal libraries. This is because 4437 # IRIX 5.2 has libraries, but they aren't needed and they're 4438 # bogus: they goof up name resolution if used. 4439 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. 4440 # To get around this problem, check for both libraries together 4441 # if -lsocket doesn't work by itself. 4442 #-------------------------------------------------------------------- 4443 4444 tcl_checkBoth=0 4445 echo "$as_me:$LINENO: checking for connect" >&5 4446 echo $ECHO_N "checking for connect... $ECHO_C" >&6 4447 if test "${ac_cv_func_connect+set}" = set; then 4448 echo $ECHO_N "(cached) $ECHO_C" >&6 4449 else 4450 cat >conftest.$ac_ext <<_ACEOF 4451 /* confdefs.h. */ 4452 _ACEOF 4453 cat confdefs.h >>conftest.$ac_ext 4454 cat >>conftest.$ac_ext <<_ACEOF 4455 /* end confdefs.h. */ 4456 /* Define connect to an innocuous variant, in case <limits.h> declares connect. 4457 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 4458 #define connect innocuous_connect 4459 4460 /* System header to define __stub macros and hopefully few prototypes, 4461 which can conflict with char connect (); below. 4462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 4463 <limits.h> exists even on freestanding compilers. */ 4464 4465 #ifdef __STDC__ 4466 # include <limits.h> 4467 #else 4468 # include <assert.h> 4469 #endif 4470 4471 #undef connect 4472 4473 /* Override any gcc2 internal prototype to avoid an error. */ 4474 #ifdef __cplusplus 4475 extern "C" 4476 { 4477 #endif 4478 /* We use char because int might match the return type of a gcc2 4479 builtin and then its argument prototype would still apply. */ 4480 char connect (); 4481 /* The GNU C library defines this for functions which it implements 4482 to always fail with ENOSYS. Some functions are actually named 4483 something starting with __ and the normal name is an alias. */ 4484 #if defined (__stub_connect) || defined (__stub___connect) 4485 choke me 4486 #else 4487 char (*f) () = connect; 4488 #endif 4489 #ifdef __cplusplus 4490 } 4491 #endif 4492 4493 int 4494 main () 4495 { 4496 return f != connect; 4497 ; 4498 return 0; 4499 } 4500 _ACEOF 4501 rm -f conftest.$ac_objext conftest$ac_exeext 4502 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4503 (eval $ac_link) 2>conftest.er1 4504 ac_status=$? 4505 grep -v '^ *+' conftest.er1 >conftest.err 4506 rm -f conftest.er1 4507 cat conftest.err >&5 4508 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4509 (exit $ac_status); } && 4510 { ac_try='test -z "$ac_c_werror_flag" 4511 || test ! -s conftest.err' 4512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4513 (eval $ac_try) 2>&5 4514 ac_status=$? 4515 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4516 (exit $ac_status); }; } && 4517 { ac_try='test -s conftest$ac_exeext' 4518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4519 (eval $ac_try) 2>&5 4520 ac_status=$? 4521 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4522 (exit $ac_status); }; }; then 4523 ac_cv_func_connect=yes 4524 else 4525 echo "$as_me: failed program was:" >&5 4526 sed 's/^/| /' conftest.$ac_ext >&5 4527 4528 ac_cv_func_connect=no 4529 fi 4530 rm -f conftest.err conftest.$ac_objext \ 4531 conftest$ac_exeext conftest.$ac_ext 4532 fi 4533 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 4534 echo "${ECHO_T}$ac_cv_func_connect" >&6 4535 if test $ac_cv_func_connect = yes; then 4536 tcl_checkSocket=0 4537 else 4538 tcl_checkSocket=1 4539 fi 4540 4541 if test "$tcl_checkSocket" = 1; then 4542 echo "$as_me:$LINENO: checking for setsockopt" >&5 4543 echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 4544 if test "${ac_cv_func_setsockopt+set}" = set; then 4545 echo $ECHO_N "(cached) $ECHO_C" >&6 4546 else 4547 cat >conftest.$ac_ext <<_ACEOF 4548 /* confdefs.h. */ 4549 _ACEOF 4550 cat confdefs.h >>conftest.$ac_ext 4551 cat >>conftest.$ac_ext <<_ACEOF 4552 /* end confdefs.h. */ 4553 /* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt. 4554 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 4555 #define setsockopt innocuous_setsockopt 4556 4557 /* System header to define __stub macros and hopefully few prototypes, 4558 which can conflict with char setsockopt (); below. 4559 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 4560 <limits.h> exists even on freestanding compilers. */ 4561 4562 #ifdef __STDC__ 4563 # include <limits.h> 4564 #else 4565 # include <assert.h> 4566 #endif 4567 4568 #undef setsockopt 4569 4570 /* Override any gcc2 internal prototype to avoid an error. */ 4571 #ifdef __cplusplus 4572 extern "C" 4573 { 4574 #endif 4575 /* We use char because int might match the return type of a gcc2 4576 builtin and then its argument prototype would still apply. */ 4577 char setsockopt (); 4578 /* The GNU C library defines this for functions which it implements 4579 to always fail with ENOSYS. Some functions are actually named 4580 something starting with __ and the normal name is an alias. */ 4581 #if defined (__stub_setsockopt) || defined (__stub___setsockopt) 4582 choke me 4583 #else 4584 char (*f) () = setsockopt; 4585 #endif 4586 #ifdef __cplusplus 4587 } 4588 #endif 4589 4590 int 4591 main () 4592 { 4593 return f != setsockopt; 4594 ; 4595 return 0; 4596 } 4597 _ACEOF 4598 rm -f conftest.$ac_objext conftest$ac_exeext 4599 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4600 (eval $ac_link) 2>conftest.er1 4601 ac_status=$? 4602 grep -v '^ *+' conftest.er1 >conftest.err 4603 rm -f conftest.er1 4604 cat conftest.err >&5 4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4606 (exit $ac_status); } && 4607 { ac_try='test -z "$ac_c_werror_flag" 4608 || test ! -s conftest.err' 4609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4610 (eval $ac_try) 2>&5 4611 ac_status=$? 4612 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4613 (exit $ac_status); }; } && 4614 { ac_try='test -s conftest$ac_exeext' 4615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4616 (eval $ac_try) 2>&5 4617 ac_status=$? 4618 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4619 (exit $ac_status); }; }; then 4620 ac_cv_func_setsockopt=yes 4621 else 4622 echo "$as_me: failed program was:" >&5 4623 sed 's/^/| /' conftest.$ac_ext >&5 4624 4625 ac_cv_func_setsockopt=no 4626 fi 4627 rm -f conftest.err conftest.$ac_objext \ 4628 conftest$ac_exeext conftest.$ac_ext 4629 fi 4630 echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 4631 echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 4632 if test $ac_cv_func_setsockopt = yes; then 4633 : 4634 else 4635 echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 4636 echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 4637 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then 4638 echo $ECHO_N "(cached) $ECHO_C" >&6 4639 else 4640 ac_check_lib_save_LIBS=$LIBS 4641 LIBS="-lsocket $LIBS" 4642 cat >conftest.$ac_ext <<_ACEOF 4643 /* confdefs.h. */ 4644 _ACEOF 4645 cat confdefs.h >>conftest.$ac_ext 4646 cat >>conftest.$ac_ext <<_ACEOF 4647 /* end confdefs.h. */ 4648 4649 /* Override any gcc2 internal prototype to avoid an error. */ 4650 #ifdef __cplusplus 4651 extern "C" 4652 #endif 4653 /* We use char because int might match the return type of a gcc2 4654 builtin and then its argument prototype would still apply. */ 4655 char setsockopt (); 4656 int 4657 main () 4658 { 4659 setsockopt (); 4660 ; 4661 return 0; 4662 } 4663 _ACEOF 4664 rm -f conftest.$ac_objext conftest$ac_exeext 4665 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4666 (eval $ac_link) 2>conftest.er1 4667 ac_status=$? 4668 grep -v '^ *+' conftest.er1 >conftest.err 4669 rm -f conftest.er1 4670 cat conftest.err >&5 4671 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4672 (exit $ac_status); } && 4673 { ac_try='test -z "$ac_c_werror_flag" 4674 || test ! -s conftest.err' 4675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4676 (eval $ac_try) 2>&5 4677 ac_status=$? 4678 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4679 (exit $ac_status); }; } && 4680 { ac_try='test -s conftest$ac_exeext' 4681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4682 (eval $ac_try) 2>&5 4683 ac_status=$? 4684 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4685 (exit $ac_status); }; }; then 4686 ac_cv_lib_socket_setsockopt=yes 4687 else 4688 echo "$as_me: failed program was:" >&5 4689 sed 's/^/| /' conftest.$ac_ext >&5 4690 4691 ac_cv_lib_socket_setsockopt=no 4692 fi 4693 rm -f conftest.err conftest.$ac_objext \ 4694 conftest$ac_exeext conftest.$ac_ext 4695 LIBS=$ac_check_lib_save_LIBS 4696 fi 4697 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 4698 echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 4699 if test $ac_cv_lib_socket_setsockopt = yes; then 4700 LIBS="$LIBS -lsocket" 4701 else 4702 tcl_checkBoth=1 4703 fi 4704 4705 fi 4706 4707 fi 4708 if test "$tcl_checkBoth" = 1; then 4709 tk_oldLibs=$LIBS 4710 LIBS="$LIBS -lsocket -lnsl" 4711 echo "$as_me:$LINENO: checking for accept" >&5 4712 echo $ECHO_N "checking for accept... $ECHO_C" >&6 4713 if test "${ac_cv_func_accept+set}" = set; then 4714 echo $ECHO_N "(cached) $ECHO_C" >&6 4715 else 4716 cat >conftest.$ac_ext <<_ACEOF 4717 /* confdefs.h. */ 4718 _ACEOF 4719 cat confdefs.h >>conftest.$ac_ext 4720 cat >>conftest.$ac_ext <<_ACEOF 4721 /* end confdefs.h. */ 4722 /* Define accept to an innocuous variant, in case <limits.h> declares accept. 4723 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 4724 #define accept innocuous_accept 4725 4726 /* System header to define __stub macros and hopefully few prototypes, 4727 which can conflict with char accept (); below. 4728 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 4729 <limits.h> exists even on freestanding compilers. */ 4730 4731 #ifdef __STDC__ 4732 # include <limits.h> 4733 #else 4734 # include <assert.h> 4735 #endif 4736 4737 #undef accept 4738 4739 /* Override any gcc2 internal prototype to avoid an error. */ 4740 #ifdef __cplusplus 4741 extern "C" 4742 { 4743 #endif 4744 /* We use char because int might match the return type of a gcc2 4745 builtin and then its argument prototype would still apply. */ 4746 char accept (); 4747 /* The GNU C library defines this for functions which it implements 4748 to always fail with ENOSYS. Some functions are actually named 4749 something starting with __ and the normal name is an alias. */ 4750 #if defined (__stub_accept) || defined (__stub___accept) 4751 choke me 4752 #else 4753 char (*f) () = accept; 4754 #endif 4755 #ifdef __cplusplus 4756 } 4757 #endif 4758 4759 int 4760 main () 4761 { 4762 return f != accept; 4763 ; 4764 return 0; 4765 } 4766 _ACEOF 4767 rm -f conftest.$ac_objext conftest$ac_exeext 4768 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4769 (eval $ac_link) 2>conftest.er1 4770 ac_status=$? 4771 grep -v '^ *+' conftest.er1 >conftest.err 4772 rm -f conftest.er1 4773 cat conftest.err >&5 4774 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4775 (exit $ac_status); } && 4776 { ac_try='test -z "$ac_c_werror_flag" 4777 || test ! -s conftest.err' 4778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4779 (eval $ac_try) 2>&5 4780 ac_status=$? 4781 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4782 (exit $ac_status); }; } && 4783 { ac_try='test -s conftest$ac_exeext' 4784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4785 (eval $ac_try) 2>&5 4786 ac_status=$? 4787 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4788 (exit $ac_status); }; }; then 4789 ac_cv_func_accept=yes 4790 else 4791 echo "$as_me: failed program was:" >&5 4792 sed 's/^/| /' conftest.$ac_ext >&5 4793 4794 ac_cv_func_accept=no 4795 fi 4796 rm -f conftest.err conftest.$ac_objext \ 4797 conftest$ac_exeext conftest.$ac_ext 4798 fi 4799 echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 4800 echo "${ECHO_T}$ac_cv_func_accept" >&6 4801 if test $ac_cv_func_accept = yes; then 4802 tcl_checkNsl=0 4803 else 4804 LIBS=$tk_oldLibs 4805 fi 4806 4807 fi 4808 echo "$as_me:$LINENO: checking for gethostbyname" >&5 4809 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 4810 if test "${ac_cv_func_gethostbyname+set}" = set; then 4811 echo $ECHO_N "(cached) $ECHO_C" >&6 4812 else 4813 cat >conftest.$ac_ext <<_ACEOF 4814 /* confdefs.h. */ 4815 _ACEOF 4816 cat confdefs.h >>conftest.$ac_ext 4817 cat >>conftest.$ac_ext <<_ACEOF 4818 /* end confdefs.h. */ 4819 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname. 4820 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 4821 #define gethostbyname innocuous_gethostbyname 4822 4823 /* System header to define __stub macros and hopefully few prototypes, 4824 which can conflict with char gethostbyname (); below. 4825 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 4826 <limits.h> exists even on freestanding compilers. */ 4827 4828 #ifdef __STDC__ 4829 # include <limits.h> 4830 #else 4831 # include <assert.h> 4832 #endif 4833 4834 #undef gethostbyname 4835 4836 /* Override any gcc2 internal prototype to avoid an error. */ 4837 #ifdef __cplusplus 4838 extern "C" 4839 { 4840 #endif 4841 /* We use char because int might match the return type of a gcc2 4842 builtin and then its argument prototype would still apply. */ 4843 char gethostbyname (); 4844 /* The GNU C library defines this for functions which it implements 4845 to always fail with ENOSYS. Some functions are actually named 4846 something starting with __ and the normal name is an alias. */ 4847 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) 4848 choke me 4849 #else 4850 char (*f) () = gethostbyname; 4851 #endif 4852 #ifdef __cplusplus 4853 } 4854 #endif 4855 4856 int 4857 main () 4858 { 4859 return f != gethostbyname; 4860 ; 4861 return 0; 4862 } 4863 _ACEOF 4864 rm -f conftest.$ac_objext conftest$ac_exeext 4865 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4866 (eval $ac_link) 2>conftest.er1 4867 ac_status=$? 4868 grep -v '^ *+' conftest.er1 >conftest.err 4869 rm -f conftest.er1 4870 cat conftest.err >&5 4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4872 (exit $ac_status); } && 4873 { ac_try='test -z "$ac_c_werror_flag" 4874 || test ! -s conftest.err' 4875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4876 (eval $ac_try) 2>&5 4877 ac_status=$? 4878 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4879 (exit $ac_status); }; } && 4880 { ac_try='test -s conftest$ac_exeext' 4881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4882 (eval $ac_try) 2>&5 4883 ac_status=$? 4884 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4885 (exit $ac_status); }; }; then 4886 ac_cv_func_gethostbyname=yes 4887 else 4888 echo "$as_me: failed program was:" >&5 4889 sed 's/^/| /' conftest.$ac_ext >&5 4890 4891 ac_cv_func_gethostbyname=no 4892 fi 4893 rm -f conftest.err conftest.$ac_objext \ 4894 conftest$ac_exeext conftest.$ac_ext 4895 fi 4896 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 4897 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 4898 if test $ac_cv_func_gethostbyname = yes; then 4899 : 4900 else 4901 echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 4902 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 4903 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then 4904 echo $ECHO_N "(cached) $ECHO_C" >&6 4905 else 4906 ac_check_lib_save_LIBS=$LIBS 4907 LIBS="-lnsl $LIBS" 4908 cat >conftest.$ac_ext <<_ACEOF 4909 /* confdefs.h. */ 4910 _ACEOF 4911 cat confdefs.h >>conftest.$ac_ext 4912 cat >>conftest.$ac_ext <<_ACEOF 4913 /* end confdefs.h. */ 4914 4915 /* Override any gcc2 internal prototype to avoid an error. */ 4916 #ifdef __cplusplus 4917 extern "C" 4918 #endif 4919 /* We use char because int might match the return type of a gcc2 4920 builtin and then its argument prototype would still apply. */ 4921 char gethostbyname (); 4922 int 4923 main () 4924 { 4925 gethostbyname (); 4926 ; 4927 return 0; 4928 } 4929 _ACEOF 4930 rm -f conftest.$ac_objext conftest$ac_exeext 4931 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4932 (eval $ac_link) 2>conftest.er1 4933 ac_status=$? 4934 grep -v '^ *+' conftest.er1 >conftest.err 4935 rm -f conftest.er1 4936 cat conftest.err >&5 4937 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4938 (exit $ac_status); } && 4939 { ac_try='test -z "$ac_c_werror_flag" 4940 || test ! -s conftest.err' 4941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4942 (eval $ac_try) 2>&5 4943 ac_status=$? 4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4945 (exit $ac_status); }; } && 4946 { ac_try='test -s conftest$ac_exeext' 4947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4948 (eval $ac_try) 2>&5 4949 ac_status=$? 4950 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4951 (exit $ac_status); }; }; then 4952 ac_cv_lib_nsl_gethostbyname=yes 4953 else 4954 echo "$as_me: failed program was:" >&5 4955 sed 's/^/| /' conftest.$ac_ext >&5 4956 4957 ac_cv_lib_nsl_gethostbyname=no 4958 fi 4959 rm -f conftest.err conftest.$ac_objext \ 4960 conftest$ac_exeext conftest.$ac_ext 4961 LIBS=$ac_check_lib_save_LIBS 4962 fi 4963 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 4964 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 4965 if test $ac_cv_lib_nsl_gethostbyname = yes; then 4966 LIBS="$LIBS -lnsl" 4967 fi 4968 4969 fi 4970 4971 4972 # Don't perform the eval of the libraries here because DL_LIBS 4973 # won't be set until we call TEA_CONFIG_CFLAGS 4974 4975 TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' 4976 4977 4978 4979 4980 echo "$as_me:$LINENO: checking dirent.h" >&5 4981 echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 4982 if test "${tcl_cv_dirent_h+set}" = set; then 4983 echo $ECHO_N "(cached) $ECHO_C" >&6 4984 else 4985 cat >conftest.$ac_ext <<_ACEOF 4986 /* confdefs.h. */ 4987 _ACEOF 4988 cat confdefs.h >>conftest.$ac_ext 4989 cat >>conftest.$ac_ext <<_ACEOF 4990 /* end confdefs.h. */ 4991 #include <sys/types.h> 4992 #include <dirent.h> 4993 int 4994 main () 4995 { 4996 4997 #ifndef _POSIX_SOURCE 4998 # ifdef __Lynx__ 4999 /* 5000 * Generate compilation error to make the test fail: Lynx headers 5001 * are only valid if really in the POSIX environment. 5002 */ 5003 5004 missing_procedure(); 5005 # endif 5006 #endif 5007 DIR *d; 5008 struct dirent *entryPtr; 5009 char *p; 5010 d = opendir("foobar"); 5011 entryPtr = readdir(d); 5012 p = entryPtr->d_name; 5013 closedir(d); 5014 5015 ; 5016 return 0; 5017 } 5018 _ACEOF 5019 rm -f conftest.$ac_objext conftest$ac_exeext 5020 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 5021 (eval $ac_link) 2>conftest.er1 5022 ac_status=$? 5023 grep -v '^ *+' conftest.er1 >conftest.err 5024 rm -f conftest.er1 5025 cat conftest.err >&5 5026 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5027 (exit $ac_status); } && 5028 { ac_try='test -z "$ac_c_werror_flag" 5029 || test ! -s conftest.err' 5030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5031 (eval $ac_try) 2>&5 5032 ac_status=$? 5033 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5034 (exit $ac_status); }; } && 5035 { ac_try='test -s conftest$ac_exeext' 5036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5037 (eval $ac_try) 2>&5 5038 ac_status=$? 5039 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5040 (exit $ac_status); }; }; then 5041 tcl_cv_dirent_h=yes 5042 else 5043 echo "$as_me: failed program was:" >&5 5044 sed 's/^/| /' conftest.$ac_ext >&5 5045 5046 tcl_cv_dirent_h=no 5047 fi 5048 rm -f conftest.err conftest.$ac_objext \ 5049 conftest$ac_exeext conftest.$ac_ext 5050 fi 5051 echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 5052 echo "${ECHO_T}$tcl_cv_dirent_h" >&6 5053 5054 if test $tcl_cv_dirent_h = no; then 5055 5056 cat >>confdefs.h <<\_ACEOF 5057 #define NO_DIRENT_H 1 5058 _ACEOF 5059 5060 fi 5061 5062 if test "${ac_cv_header_errno_h+set}" = set; then 5063 echo "$as_me:$LINENO: checking for errno.h" >&5 5064 echo $ECHO_N "checking for errno.h... $ECHO_C" >&6 5065 if test "${ac_cv_header_errno_h+set}" = set; then 5066 echo $ECHO_N "(cached) $ECHO_C" >&6 5067 fi 5068 echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5 5069 echo "${ECHO_T}$ac_cv_header_errno_h" >&6 5070 else 5071 # Is the header compilable? 5072 echo "$as_me:$LINENO: checking errno.h usability" >&5 5073 echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6 5074 cat >conftest.$ac_ext <<_ACEOF 5075 /* confdefs.h. */ 5076 _ACEOF 5077 cat confdefs.h >>conftest.$ac_ext 5078 cat >>conftest.$ac_ext <<_ACEOF 5079 /* end confdefs.h. */ 5080 $ac_includes_default 5081 #include <errno.h> 5082 _ACEOF 5083 rm -f conftest.$ac_objext 5084 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5085 (eval $ac_compile) 2>conftest.er1 5086 ac_status=$? 5087 grep -v '^ *+' conftest.er1 >conftest.err 5088 rm -f conftest.er1 5089 cat conftest.err >&5 5090 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5091 (exit $ac_status); } && 5092 { ac_try='test -z "$ac_c_werror_flag" 5093 || test ! -s conftest.err' 5094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5095 (eval $ac_try) 2>&5 5096 ac_status=$? 5097 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5098 (exit $ac_status); }; } && 5099 { ac_try='test -s conftest.$ac_objext' 5100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5101 (eval $ac_try) 2>&5 5102 ac_status=$? 5103 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5104 (exit $ac_status); }; }; then 5105 ac_header_compiler=yes 5106 else 5107 echo "$as_me: failed program was:" >&5 5108 sed 's/^/| /' conftest.$ac_ext >&5 5109 5110 ac_header_compiler=no 5111 fi 5112 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5113 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 5114 echo "${ECHO_T}$ac_header_compiler" >&6 5115 5116 # Is the header present? 5117 echo "$as_me:$LINENO: checking errno.h presence" >&5 5118 echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6 5119 cat >conftest.$ac_ext <<_ACEOF 5120 /* confdefs.h. */ 5121 _ACEOF 5122 cat confdefs.h >>conftest.$ac_ext 5123 cat >>conftest.$ac_ext <<_ACEOF 5124 /* end confdefs.h. */ 5125 #include <errno.h> 5126 _ACEOF 5127 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 5128 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 5129 ac_status=$? 5130 grep -v '^ *+' conftest.er1 >conftest.err 5131 rm -f conftest.er1 5132 cat conftest.err >&5 5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5134 (exit $ac_status); } >/dev/null; then 5135 if test -s conftest.err; then 5136 ac_cpp_err=$ac_c_preproc_warn_flag 5137 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 5138 else 5139 ac_cpp_err= 5140 fi 5141 else 5142 ac_cpp_err=yes 5143 fi 5144 if test -z "$ac_cpp_err"; then 5145 ac_header_preproc=yes 5146 else 5147 echo "$as_me: failed program was:" >&5 5148 sed 's/^/| /' conftest.$ac_ext >&5 5149 5150 ac_header_preproc=no 5151 fi 5152 rm -f conftest.err conftest.$ac_ext 5153 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 5154 echo "${ECHO_T}$ac_header_preproc" >&6 5155 5156 # So? What about this header? 5157 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 5158 yes:no: ) 5159 { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5 5160 echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 5161 { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5 5162 echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;} 5163 ac_header_preproc=yes 5164 ;; 5165 no:yes:* ) 5166 { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5 5167 echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;} 5168 { echo "$as_me:$LINENO: WARNING: errno.h: check for missing prerequisite headers?" >&5 5169 echo "$as_me: WARNING: errno.h: check for missing prerequisite headers?" >&2;} 5170 { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5 5171 echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;} 5172 { echo "$as_me:$LINENO: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&5 5173 echo "$as_me: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&2;} 5174 { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5 5175 echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;} 5176 { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5 5177 echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;} 5178 ( 5179 cat <<\_ASBOX 5180 ## ----------------------------------- ## 5181 ## Report this to the Rappture lists. ## 5182 ## ----------------------------------- ## 5183 _ASBOX 5184 ) | 5185 sed "s/^/$as_me: WARNING: /" >&2 5186 ;; 5187 esac 5188 echo "$as_me:$LINENO: checking for errno.h" >&5 5189 echo $ECHO_N "checking for errno.h... $ECHO_C" >&6 5190 if test "${ac_cv_header_errno_h+set}" = set; then 5191 echo $ECHO_N "(cached) $ECHO_C" >&6 5192 else 5193 ac_cv_header_errno_h=$ac_header_preproc 5194 fi 5195 echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5 5196 echo "${ECHO_T}$ac_cv_header_errno_h" >&6 5197 5198 fi 5199 if test $ac_cv_header_errno_h = yes; then 5200 : 5201 else 5202 5203 cat >>confdefs.h <<\_ACEOF 5204 #define NO_ERRNO_H 1 5205 _ACEOF 5206 5207 fi 5208 5209 5210 if test "${ac_cv_header_float_h+set}" = set; then 5211 echo "$as_me:$LINENO: checking for float.h" >&5 5212 echo $ECHO_N "checking for float.h... $ECHO_C" >&6 5213 if test "${ac_cv_header_float_h+set}" = set; then 5214 echo $ECHO_N "(cached) $ECHO_C" >&6 5215 fi 5216 echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 5217 echo "${ECHO_T}$ac_cv_header_float_h" >&6 5218 else 5219 # Is the header compilable? 5220 echo "$as_me:$LINENO: checking float.h usability" >&5 5221 echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 5222 cat >conftest.$ac_ext <<_ACEOF 5223 /* confdefs.h. */ 5224 _ACEOF 5225 cat confdefs.h >>conftest.$ac_ext 5226 cat >>conftest.$ac_ext <<_ACEOF 5227 /* end confdefs.h. */ 5228 $ac_includes_default 5229 #include <float.h> 5230 _ACEOF 5231 rm -f conftest.$ac_objext 5232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5233 (eval $ac_compile) 2>conftest.er1 5234 ac_status=$? 5235 grep -v '^ *+' conftest.er1 >conftest.err 5236 rm -f conftest.er1 5237 cat conftest.err >&5 5238 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5239 (exit $ac_status); } && 5240 { ac_try='test -z "$ac_c_werror_flag" 5241 || test ! -s conftest.err' 5242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5243 (eval $ac_try) 2>&5 5244 ac_status=$? 5245 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5246 (exit $ac_status); }; } && 5247 { ac_try='test -s conftest.$ac_objext' 5248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5249 (eval $ac_try) 2>&5 5250 ac_status=$? 5251 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5252 (exit $ac_status); }; }; then 5253 ac_header_compiler=yes 5254 else 5255 echo "$as_me: failed program was:" >&5 5256 sed 's/^/| /' conftest.$ac_ext >&5 5257 5258 ac_header_compiler=no 5259 fi 5260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5261 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 5262 echo "${ECHO_T}$ac_header_compiler" >&6 5263 5264 # Is the header present? 5265 echo "$as_me:$LINENO: checking float.h presence" >&5 5266 echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 5267 cat >conftest.$ac_ext <<_ACEOF 5268 /* confdefs.h. */ 5269 _ACEOF 5270 cat confdefs.h >>conftest.$ac_ext 5271 cat >>conftest.$ac_ext <<_ACEOF 5272 /* end confdefs.h. */ 5273 #include <float.h> 5274 _ACEOF 5275 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 5276 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 5277 ac_status=$? 5278 grep -v '^ *+' conftest.er1 >conftest.err 5279 rm -f conftest.er1 5280 cat conftest.err >&5 5281 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5282 (exit $ac_status); } >/dev/null; then 5283 if test -s conftest.err; then 5284 ac_cpp_err=$ac_c_preproc_warn_flag 5285 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 5286 else 5287 ac_cpp_err= 5288 fi 5289 else 5290 ac_cpp_err=yes 5291 fi 5292 if test -z "$ac_cpp_err"; then 5293 ac_header_preproc=yes 5294 else 5295 echo "$as_me: failed program was:" >&5 5296 sed 's/^/| /' conftest.$ac_ext >&5 5297 5298 ac_header_preproc=no 5299 fi 5300 rm -f conftest.err conftest.$ac_ext 5301 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 5302 echo "${ECHO_T}$ac_header_preproc" >&6 5303 5304 # So? What about this header? 5305 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 5306 yes:no: ) 5307 { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5 5308 echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 5309 { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5 5310 echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;} 5311 ac_header_preproc=yes 5312 ;; 5313 no:yes:* ) 5314 { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5 5315 echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;} 5316 { echo "$as_me:$LINENO: WARNING: float.h: check for missing prerequisite headers?" >&5 5317 echo "$as_me: WARNING: float.h: check for missing prerequisite headers?" >&2;} 5318 { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5 5319 echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;} 5320 { echo "$as_me:$LINENO: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&5 5321 echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&2;} 5322 { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5 5323 echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} 5324 { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 5325 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} 5326 ( 5327 cat <<\_ASBOX 5328 ## ----------------------------------- ## 5329 ## Report this to the Rappture lists. ## 5330 ## ----------------------------------- ## 5331 _ASBOX 5332 ) | 5333 sed "s/^/$as_me: WARNING: /" >&2 5334 ;; 5335 esac 5336 echo "$as_me:$LINENO: checking for float.h" >&5 5337 echo $ECHO_N "checking for float.h... $ECHO_C" >&6 5338 if test "${ac_cv_header_float_h+set}" = set; then 5339 echo $ECHO_N "(cached) $ECHO_C" >&6 5340 else 5341 ac_cv_header_float_h=$ac_header_preproc 5342 fi 5343 echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 5344 echo "${ECHO_T}$ac_cv_header_float_h" >&6 5345 5346 fi 5347 if test $ac_cv_header_float_h = yes; then 5348 : 5349 else 5350 5351 cat >>confdefs.h <<\_ACEOF 5352 #define NO_FLOAT_H 1 5353 _ACEOF 5354 5355 fi 5356 5357 5358 if test "${ac_cv_header_values_h+set}" = set; then 5359 echo "$as_me:$LINENO: checking for values.h" >&5 5360 echo $ECHO_N "checking for values.h... $ECHO_C" >&6 5361 if test "${ac_cv_header_values_h+set}" = set; then 5362 echo $ECHO_N "(cached) $ECHO_C" >&6 5363 fi 5364 echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 5365 echo "${ECHO_T}$ac_cv_header_values_h" >&6 5366 else 5367 # Is the header compilable? 5368 echo "$as_me:$LINENO: checking values.h usability" >&5 5369 echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 5370 cat >conftest.$ac_ext <<_ACEOF 5371 /* confdefs.h. */ 5372 _ACEOF 5373 cat confdefs.h >>conftest.$ac_ext 5374 cat >>conftest.$ac_ext <<_ACEOF 5375 /* end confdefs.h. */ 5376 $ac_includes_default 5377 #include <values.h> 5378 _ACEOF 5379 rm -f conftest.$ac_objext 5380 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5381 (eval $ac_compile) 2>conftest.er1 5382 ac_status=$? 5383 grep -v '^ *+' conftest.er1 >conftest.err 5384 rm -f conftest.er1 5385 cat conftest.err >&5 5386 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5387 (exit $ac_status); } && 5388 { ac_try='test -z "$ac_c_werror_flag" 5389 || test ! -s conftest.err' 5390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5391 (eval $ac_try) 2>&5 5392 ac_status=$? 5393 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5394 (exit $ac_status); }; } && 5395 { ac_try='test -s conftest.$ac_objext' 5396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5397 (eval $ac_try) 2>&5 5398 ac_status=$? 5399 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5400 (exit $ac_status); }; }; then 5401 ac_header_compiler=yes 5402 else 5403 echo "$as_me: failed program was:" >&5 5404 sed 's/^/| /' conftest.$ac_ext >&5 5405 5406 ac_header_compiler=no 5407 fi 5408 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5409 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 5410 echo "${ECHO_T}$ac_header_compiler" >&6 5411 5412 # Is the header present? 5413 echo "$as_me:$LINENO: checking values.h presence" >&5 5414 echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 5415 cat >conftest.$ac_ext <<_ACEOF 5416 /* confdefs.h. */ 5417 _ACEOF 5418 cat confdefs.h >>conftest.$ac_ext 5419 cat >>conftest.$ac_ext <<_ACEOF 5420 /* end confdefs.h. */ 5421 #include <values.h> 5422 _ACEOF 5423 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 5424 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 5425 ac_status=$? 5426 grep -v '^ *+' conftest.er1 >conftest.err 5427 rm -f conftest.er1 5428 cat conftest.err >&5 5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5430 (exit $ac_status); } >/dev/null; then 5431 if test -s conftest.err; then 5432 ac_cpp_err=$ac_c_preproc_warn_flag 5433 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 5434 else 5435 ac_cpp_err= 5436 fi 5437 else 5438 ac_cpp_err=yes 5439 fi 5440 if test -z "$ac_cpp_err"; then 5441 ac_header_preproc=yes 5442 else 5443 echo "$as_me: failed program was:" >&5 5444 sed 's/^/| /' conftest.$ac_ext >&5 5445 5446 ac_header_preproc=no 5447 fi 5448 rm -f conftest.err conftest.$ac_ext 5449 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 5450 echo "${ECHO_T}$ac_header_preproc" >&6 5451 5452 # So? What about this header? 5453 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 5454 yes:no: ) 5455 { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5 5456 echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 5457 { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5 5458 echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;} 5459 ac_header_preproc=yes 5460 ;; 5461 no:yes:* ) 5462 { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5 5463 echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;} 5464 { echo "$as_me:$LINENO: WARNING: values.h: check for missing prerequisite headers?" >&5 5465 echo "$as_me: WARNING: values.h: check for missing prerequisite headers?" >&2;} 5466 { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5 5467 echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;} 5468 { echo "$as_me:$LINENO: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&5 5469 echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&2;} 5470 { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5 5471 echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} 5472 { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 5473 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} 5474 ( 5475 cat <<\_ASBOX 5476 ## ----------------------------------- ## 5477 ## Report this to the Rappture lists. ## 5478 ## ----------------------------------- ## 5479 _ASBOX 5480 ) | 5481 sed "s/^/$as_me: WARNING: /" >&2 5482 ;; 5483 esac 5484 echo "$as_me:$LINENO: checking for values.h" >&5 5485 echo $ECHO_N "checking for values.h... $ECHO_C" >&6 5486 if test "${ac_cv_header_values_h+set}" = set; then 5487 echo $ECHO_N "(cached) $ECHO_C" >&6 5488 else 5489 ac_cv_header_values_h=$ac_header_preproc 5490 fi 5491 echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 5492 echo "${ECHO_T}$ac_cv_header_values_h" >&6 5493 5494 fi 5495 if test $ac_cv_header_values_h = yes; then 5496 : 5497 else 5498 5499 cat >>confdefs.h <<\_ACEOF 5500 #define NO_VALUES_H 1 5501 _ACEOF 5502 5503 fi 5504 5505 5506 if test "${ac_cv_header_limits_h+set}" = set; then 5507 echo "$as_me:$LINENO: checking for limits.h" >&5 5508 echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 5509 if test "${ac_cv_header_limits_h+set}" = set; then 5510 echo $ECHO_N "(cached) $ECHO_C" >&6 5511 fi 5512 echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 5513 echo "${ECHO_T}$ac_cv_header_limits_h" >&6 5514 else 5515 # Is the header compilable? 5516 echo "$as_me:$LINENO: checking limits.h usability" >&5 5517 echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 5518 cat >conftest.$ac_ext <<_ACEOF 5519 /* confdefs.h. */ 5520 _ACEOF 5521 cat confdefs.h >>conftest.$ac_ext 5522 cat >>conftest.$ac_ext <<_ACEOF 5523 /* end confdefs.h. */ 5524 $ac_includes_default 5525 #include <limits.h> 5526 _ACEOF 5527 rm -f conftest.$ac_objext 5528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5529 (eval $ac_compile) 2>conftest.er1 5530 ac_status=$? 5531 grep -v '^ *+' conftest.er1 >conftest.err 5532 rm -f conftest.er1 5533 cat conftest.err >&5 5534 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5535 (exit $ac_status); } && 5536 { ac_try='test -z "$ac_c_werror_flag" 5537 || test ! -s conftest.err' 5538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5539 (eval $ac_try) 2>&5 5540 ac_status=$? 5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5542 (exit $ac_status); }; } && 5543 { ac_try='test -s conftest.$ac_objext' 5544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5545 (eval $ac_try) 2>&5 5546 ac_status=$? 5547 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5548 (exit $ac_status); }; }; then 5549 ac_header_compiler=yes 5550 else 5551 echo "$as_me: failed program was:" >&5 5552 sed 's/^/| /' conftest.$ac_ext >&5 5553 5554 ac_header_compiler=no 5555 fi 5556 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5557 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 5558 echo "${ECHO_T}$ac_header_compiler" >&6 5559 5560 # Is the header present? 5561 echo "$as_me:$LINENO: checking limits.h presence" >&5 5562 echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 5563 cat >conftest.$ac_ext <<_ACEOF 5564 /* confdefs.h. */ 5565 _ACEOF 5566 cat confdefs.h >>conftest.$ac_ext 5567 cat >>conftest.$ac_ext <<_ACEOF 5568 /* end confdefs.h. */ 5569 #include <limits.h> 5570 _ACEOF 5571 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 5572 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 5573 ac_status=$? 5574 grep -v '^ *+' conftest.er1 >conftest.err 5575 rm -f conftest.er1 5576 cat conftest.err >&5 5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5578 (exit $ac_status); } >/dev/null; then 5579 if test -s conftest.err; then 5580 ac_cpp_err=$ac_c_preproc_warn_flag 5581 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 5582 else 5583 ac_cpp_err= 5584 fi 5585 else 5586 ac_cpp_err=yes 5587 fi 5588 if test -z "$ac_cpp_err"; then 5589 ac_header_preproc=yes 5590 else 5591 echo "$as_me: failed program was:" >&5 5592 sed 's/^/| /' conftest.$ac_ext >&5 5593 5594 ac_header_preproc=no 5595 fi 5596 rm -f conftest.err conftest.$ac_ext 5597 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 5598 echo "${ECHO_T}$ac_header_preproc" >&6 5599 5600 # So? What about this header? 5601 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 5602 yes:no: ) 5603 { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5 5604 echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 5605 { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5 5606 echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;} 5607 ac_header_preproc=yes 5608 ;; 5609 no:yes:* ) 5610 { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5 5611 echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;} 5612 { echo "$as_me:$LINENO: WARNING: limits.h: check for missing prerequisite headers?" >&5 5613 echo "$as_me: WARNING: limits.h: check for missing prerequisite headers?" >&2;} 5614 { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5 5615 echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;} 5616 { echo "$as_me:$LINENO: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&5 5617 echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&2;} 5618 { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5 5619 echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} 5620 { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 5621 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} 5622 ( 5623 cat <<\_ASBOX 5624 ## ----------------------------------- ## 5625 ## Report this to the Rappture lists. ## 5626 ## ----------------------------------- ## 5627 _ASBOX 5628 ) | 5629 sed "s/^/$as_me: WARNING: /" >&2 5630 ;; 5631 esac 5632 echo "$as_me:$LINENO: checking for limits.h" >&5 5633 echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 5634 if test "${ac_cv_header_limits_h+set}" = set; then 5635 echo $ECHO_N "(cached) $ECHO_C" >&6 5636 else 5637 ac_cv_header_limits_h=$ac_header_preproc 5638 fi 5639 echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 5640 echo "${ECHO_T}$ac_cv_header_limits_h" >&6 5641 5642 fi 5643 if test $ac_cv_header_limits_h = yes; then 5644 5645 cat >>confdefs.h <<\_ACEOF 5646 #define HAVE_LIMITS_H 1 5647 _ACEOF 5648 5649 else 5650 5651 cat >>confdefs.h <<\_ACEOF 5652 #define NO_LIMITS_H 1 5653 _ACEOF 5654 5655 fi 5656 5657 5658 if test "${ac_cv_header_stdlib_h+set}" = set; then 5659 echo "$as_me:$LINENO: checking for stdlib.h" >&5 5660 echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 5661 if test "${ac_cv_header_stdlib_h+set}" = set; then 5662 echo $ECHO_N "(cached) $ECHO_C" >&6 5663 fi 5664 echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 5665 echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 5666 else 5667 # Is the header compilable? 5668 echo "$as_me:$LINENO: checking stdlib.h usability" >&5 5669 echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 5670 cat >conftest.$ac_ext <<_ACEOF 5671 /* confdefs.h. */ 5672 _ACEOF 5673 cat confdefs.h >>conftest.$ac_ext 5674 cat >>conftest.$ac_ext <<_ACEOF 5675 /* end confdefs.h. */ 5676 $ac_includes_default 5677 #include <stdlib.h> 5678 _ACEOF 5679 rm -f conftest.$ac_objext 5680 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5681 (eval $ac_compile) 2>conftest.er1 5682 ac_status=$? 5683 grep -v '^ *+' conftest.er1 >conftest.err 5684 rm -f conftest.er1 5685 cat conftest.err >&5 5686 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5687 (exit $ac_status); } && 5688 { ac_try='test -z "$ac_c_werror_flag" 5689 || test ! -s conftest.err' 5690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5691 (eval $ac_try) 2>&5 5692 ac_status=$? 5693 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5694 (exit $ac_status); }; } && 5695 { ac_try='test -s conftest.$ac_objext' 5696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5697 (eval $ac_try) 2>&5 5698 ac_status=$? 5699 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5700 (exit $ac_status); }; }; then 5701 ac_header_compiler=yes 5702 else 5703 echo "$as_me: failed program was:" >&5 5704 sed 's/^/| /' conftest.$ac_ext >&5 5705 5706 ac_header_compiler=no 5707 fi 5708 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5709 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 5710 echo "${ECHO_T}$ac_header_compiler" >&6 5711 5712 # Is the header present? 5713 echo "$as_me:$LINENO: checking stdlib.h presence" >&5 5714 echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 5715 cat >conftest.$ac_ext <<_ACEOF 5716 /* confdefs.h. */ 5717 _ACEOF 5718 cat confdefs.h >>conftest.$ac_ext 5719 cat >>conftest.$ac_ext <<_ACEOF 5720 /* end confdefs.h. */ 5721 #include <stdlib.h> 5722 _ACEOF 5723 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 5724 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 5725 ac_status=$? 5726 grep -v '^ *+' conftest.er1 >conftest.err 5727 rm -f conftest.er1 5728 cat conftest.err >&5 5729 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5730 (exit $ac_status); } >/dev/null; then 5731 if test -s conftest.err; then 5732 ac_cpp_err=$ac_c_preproc_warn_flag 5733 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 5734 else 5735 ac_cpp_err= 5736 fi 5737 else 5738 ac_cpp_err=yes 5739 fi 5740 if test -z "$ac_cpp_err"; then 5741 ac_header_preproc=yes 5742 else 5743 echo "$as_me: failed program was:" >&5 5744 sed 's/^/| /' conftest.$ac_ext >&5 5745 5746 ac_header_preproc=no 5747 fi 5748 rm -f conftest.err conftest.$ac_ext 5749 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 5750 echo "${ECHO_T}$ac_header_preproc" >&6 5751 5752 # So? What about this header? 5753 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 5754 yes:no: ) 5755 { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 5756 echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 5757 { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 5758 echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} 5759 ac_header_preproc=yes 5760 ;; 5761 no:yes:* ) 5762 { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 5763 echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} 5764 { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5 5765 echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;} 5766 { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 5767 echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} 5768 { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5 5769 echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;} 5770 { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 5771 echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} 5772 { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 5773 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} 5774 ( 5775 cat <<\_ASBOX 5776 ## ----------------------------------- ## 5777 ## Report this to the Rappture lists. ## 5778 ## ----------------------------------- ## 5779 _ASBOX 5780 ) | 5781 sed "s/^/$as_me: WARNING: /" >&2 5782 ;; 5783 esac 5784 echo "$as_me:$LINENO: checking for stdlib.h" >&5 5785 echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 5786 if test "${ac_cv_header_stdlib_h+set}" = set; then 5787 echo $ECHO_N "(cached) $ECHO_C" >&6 5788 else 5789 ac_cv_header_stdlib_h=$ac_header_preproc 5790 fi 5791 echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 5792 echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 5793 5794 fi 5795 if test $ac_cv_header_stdlib_h = yes; then 5796 tcl_ok=1 5797 else 5798 tcl_ok=0 5799 fi 5800 5801 5802 cat >conftest.$ac_ext <<_ACEOF 5803 /* confdefs.h. */ 5804 _ACEOF 5805 cat confdefs.h >>conftest.$ac_ext 5806 cat >>conftest.$ac_ext <<_ACEOF 5807 /* end confdefs.h. */ 5808 #include <stdlib.h> 5809 5810 _ACEOF 5811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5812 $EGREP "strtol" >/dev/null 2>&1; then 5813 : 5814 else 5815 tcl_ok=0 5816 fi 5817 rm -f conftest* 5818 5819 cat >conftest.$ac_ext <<_ACEOF 5820 /* confdefs.h. */ 5821 _ACEOF 5822 cat confdefs.h >>conftest.$ac_ext 5823 cat >>conftest.$ac_ext <<_ACEOF 5824 /* end confdefs.h. */ 5825 #include <stdlib.h> 5826 5827 _ACEOF 5828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5829 $EGREP "strtoul" >/dev/null 2>&1; then 5830 : 5831 else 5832 tcl_ok=0 5833 fi 5834 rm -f conftest* 5835 5836 cat >conftest.$ac_ext <<_ACEOF 5837 /* confdefs.h. */ 5838 _ACEOF 5839 cat confdefs.h >>conftest.$ac_ext 5840 cat >>conftest.$ac_ext <<_ACEOF 5841 /* end confdefs.h. */ 5842 #include <stdlib.h> 5843 5844 _ACEOF 5845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5846 $EGREP "strtod" >/dev/null 2>&1; then 5847 : 5848 else 5849 tcl_ok=0 5850 fi 5851 rm -f conftest* 5852 5853 if test $tcl_ok = 0; then 5854 5855 cat >>confdefs.h <<\_ACEOF 5856 #define NO_STDLIB_H 1 5857 _ACEOF 5858 5859 fi 5860 if test "${ac_cv_header_string_h+set}" = set; then 5861 echo "$as_me:$LINENO: checking for string.h" >&5 5862 echo $ECHO_N "checking for string.h... $ECHO_C" >&6 5863 if test "${ac_cv_header_string_h+set}" = set; then 5864 echo $ECHO_N "(cached) $ECHO_C" >&6 5865 fi 5866 echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 5867 echo "${ECHO_T}$ac_cv_header_string_h" >&6 5868 else 5869 # Is the header compilable? 5870 echo "$as_me:$LINENO: checking string.h usability" >&5 5871 echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 5872 cat >conftest.$ac_ext <<_ACEOF 5873 /* confdefs.h. */ 5874 _ACEOF 5875 cat confdefs.h >>conftest.$ac_ext 5876 cat >>conftest.$ac_ext <<_ACEOF 5877 /* end confdefs.h. */ 5878 $ac_includes_default 5879 #include <string.h> 5880 _ACEOF 5881 rm -f conftest.$ac_objext 5882 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5883 (eval $ac_compile) 2>conftest.er1 5884 ac_status=$? 5885 grep -v '^ *+' conftest.er1 >conftest.err 5886 rm -f conftest.er1 5887 cat conftest.err >&5 5888 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5889 (exit $ac_status); } && 5890 { ac_try='test -z "$ac_c_werror_flag" 5891 || test ! -s conftest.err' 5892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5893 (eval $ac_try) 2>&5 5894 ac_status=$? 5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5896 (exit $ac_status); }; } && 5897 { ac_try='test -s conftest.$ac_objext' 5898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5899 (eval $ac_try) 2>&5 5900 ac_status=$? 5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5902 (exit $ac_status); }; }; then 5903 ac_header_compiler=yes 5904 else 5905 echo "$as_me: failed program was:" >&5 5906 sed 's/^/| /' conftest.$ac_ext >&5 5907 5908 ac_header_compiler=no 5909 fi 5910 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5911 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 5912 echo "${ECHO_T}$ac_header_compiler" >&6 5913 5914 # Is the header present? 5915 echo "$as_me:$LINENO: checking string.h presence" >&5 5916 echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 5917 cat >conftest.$ac_ext <<_ACEOF 5918 /* confdefs.h. */ 5919 _ACEOF 5920 cat confdefs.h >>conftest.$ac_ext 5921 cat >>conftest.$ac_ext <<_ACEOF 5922 /* end confdefs.h. */ 5923 #include <string.h> 5924 _ACEOF 5925 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 5926 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 5927 ac_status=$? 5928 grep -v '^ *+' conftest.er1 >conftest.err 5929 rm -f conftest.er1 5930 cat conftest.err >&5 5931 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5932 (exit $ac_status); } >/dev/null; then 5933 if test -s conftest.err; then 5934 ac_cpp_err=$ac_c_preproc_warn_flag 5935 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 5936 else 5937 ac_cpp_err= 5938 fi 5939 else 5940 ac_cpp_err=yes 5941 fi 5942 if test -z "$ac_cpp_err"; then 5943 ac_header_preproc=yes 5944 else 5945 echo "$as_me: failed program was:" >&5 5946 sed 's/^/| /' conftest.$ac_ext >&5 5947 5948 ac_header_preproc=no 5949 fi 5950 rm -f conftest.err conftest.$ac_ext 5951 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 5952 echo "${ECHO_T}$ac_header_preproc" >&6 5953 5954 # So? What about this header? 5955 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 5956 yes:no: ) 5957 { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5 5958 echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 5959 { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5 5960 echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;} 5961 ac_header_preproc=yes 5962 ;; 5963 no:yes:* ) 5964 { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5 5965 echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;} 5966 { echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5 5967 echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;} 5968 { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5 5969 echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;} 5970 { echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5 5971 echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;} 5972 { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5 5973 echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} 5974 { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 5975 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} 5976 ( 5977 cat <<\_ASBOX 5978 ## ----------------------------------- ## 5979 ## Report this to the Rappture lists. ## 5980 ## ----------------------------------- ## 5981 _ASBOX 5982 ) | 5983 sed "s/^/$as_me: WARNING: /" >&2 5984 ;; 5985 esac 5986 echo "$as_me:$LINENO: checking for string.h" >&5 5987 echo $ECHO_N "checking for string.h... $ECHO_C" >&6 5988 if test "${ac_cv_header_string_h+set}" = set; then 5989 echo $ECHO_N "(cached) $ECHO_C" >&6 5990 else 5991 ac_cv_header_string_h=$ac_header_preproc 5992 fi 5993 echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 5994 echo "${ECHO_T}$ac_cv_header_string_h" >&6 5995 5996 fi 5997 if test $ac_cv_header_string_h = yes; then 5998 tcl_ok=1 5999 else 6000 tcl_ok=0 6001 fi 6002 6003 6004 cat >conftest.$ac_ext <<_ACEOF 6005 /* confdefs.h. */ 6006 _ACEOF 6007 cat confdefs.h >>conftest.$ac_ext 6008 cat >>conftest.$ac_ext <<_ACEOF 6009 /* end confdefs.h. */ 6010 #include <string.h> 6011 6012 _ACEOF 6013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6014 $EGREP "strstr" >/dev/null 2>&1; then 6015 : 6016 else 6017 tcl_ok=0 6018 fi 6019 rm -f conftest* 6020 6021 cat >conftest.$ac_ext <<_ACEOF 6022 /* confdefs.h. */ 6023 _ACEOF 6024 cat confdefs.h >>conftest.$ac_ext 6025 cat >>conftest.$ac_ext <<_ACEOF 6026 /* end confdefs.h. */ 6027 #include <string.h> 6028 6029 _ACEOF 6030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6031 $EGREP "strerror" >/dev/null 2>&1; then 6032 : 6033 else 6034 tcl_ok=0 6035 fi 6036 rm -f conftest* 6037 6038 6039 # See also memmove check below for a place where NO_STRING_H can be 6040 # set and why. 6041 6042 if test $tcl_ok = 0; then 6043 6044 cat >>confdefs.h <<\_ACEOF 6045 #define NO_STRING_H 1 6046 _ACEOF 6047 6048 fi 6049 6050 if test "${ac_cv_header_sys_wait_h+set}" = set; then 6051 echo "$as_me:$LINENO: checking for sys/wait.h" >&5 6052 echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 6053 if test "${ac_cv_header_sys_wait_h+set}" = set; then 6054 echo $ECHO_N "(cached) $ECHO_C" >&6 6055 fi 6056 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 6057 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 6058 else 6059 # Is the header compilable? 6060 echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 6061 echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 6062 cat >conftest.$ac_ext <<_ACEOF 6063 /* confdefs.h. */ 6064 _ACEOF 6065 cat confdefs.h >>conftest.$ac_ext 6066 cat >>conftest.$ac_ext <<_ACEOF 6067 /* end confdefs.h. */ 6068 $ac_includes_default 6069 #include <sys/wait.h> 6070 _ACEOF 6071 rm -f conftest.$ac_objext 6072 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6073 (eval $ac_compile) 2>conftest.er1 6074 ac_status=$? 6075 grep -v '^ *+' conftest.er1 >conftest.err 6076 rm -f conftest.er1 6077 cat conftest.err >&5 6078 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6079 (exit $ac_status); } && 6080 { ac_try='test -z "$ac_c_werror_flag" 6081 || test ! -s conftest.err' 6082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6083 (eval $ac_try) 2>&5 6084 ac_status=$? 6085 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6086 (exit $ac_status); }; } && 6087 { ac_try='test -s conftest.$ac_objext' 6088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6089 (eval $ac_try) 2>&5 6090 ac_status=$? 6091 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6092 (exit $ac_status); }; }; then 6093 ac_header_compiler=yes 6094 else 6095 echo "$as_me: failed program was:" >&5 6096 sed 's/^/| /' conftest.$ac_ext >&5 6097 6098 ac_header_compiler=no 6099 fi 6100 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6101 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 6102 echo "${ECHO_T}$ac_header_compiler" >&6 6103 6104 # Is the header present? 6105 echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 6106 echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 6107 cat >conftest.$ac_ext <<_ACEOF 6108 /* confdefs.h. */ 6109 _ACEOF 6110 cat confdefs.h >>conftest.$ac_ext 6111 cat >>conftest.$ac_ext <<_ACEOF 6112 /* end confdefs.h. */ 6113 #include <sys/wait.h> 6114 _ACEOF 6115 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 6116 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 6117 ac_status=$? 6118 grep -v '^ *+' conftest.er1 >conftest.err 6119 rm -f conftest.er1 6120 cat conftest.err >&5 6121 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6122 (exit $ac_status); } >/dev/null; then 6123 if test -s conftest.err; then 6124 ac_cpp_err=$ac_c_preproc_warn_flag 6125 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 6126 else 6127 ac_cpp_err= 6128 fi 6129 else 6130 ac_cpp_err=yes 6131 fi 6132 if test -z "$ac_cpp_err"; then 6133 ac_header_preproc=yes 6134 else 6135 echo "$as_me: failed program was:" >&5 6136 sed 's/^/| /' conftest.$ac_ext >&5 6137 6138 ac_header_preproc=no 6139 fi 6140 rm -f conftest.err conftest.$ac_ext 6141 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 6142 echo "${ECHO_T}$ac_header_preproc" >&6 6143 6144 # So? What about this header? 6145 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 6146 yes:no: ) 6147 { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5 6148 echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 6149 { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5 6150 echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;} 6151 ac_header_preproc=yes 6152 ;; 6153 no:yes:* ) 6154 { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5 6155 echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;} 6156 { echo "$as_me:$LINENO: WARNING: sys/wait.h: check for missing prerequisite headers?" >&5 6157 echo "$as_me: WARNING: sys/wait.h: check for missing prerequisite headers?" >&2;} 6158 { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5 6159 echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;} 6160 { echo "$as_me:$LINENO: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&5 6161 echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&2;} 6162 { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5 6163 echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} 6164 { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 6165 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} 6166 ( 6167 cat <<\_ASBOX 6168 ## ----------------------------------- ## 6169 ## Report this to the Rappture lists. ## 6170 ## ----------------------------------- ## 6171 _ASBOX 6172 ) | 6173 sed "s/^/$as_me: WARNING: /" >&2 6174 ;; 6175 esac 6176 echo "$as_me:$LINENO: checking for sys/wait.h" >&5 6177 echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 6178 if test "${ac_cv_header_sys_wait_h+set}" = set; then 6179 echo $ECHO_N "(cached) $ECHO_C" >&6 6180 else 6181 ac_cv_header_sys_wait_h=$ac_header_preproc 6182 fi 6183 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 6184 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 6185 6186 fi 6187 if test $ac_cv_header_sys_wait_h = yes; then 6188 : 6189 else 6190 6191 cat >>confdefs.h <<\_ACEOF 6192 #define NO_SYS_WAIT_H 1 6193 _ACEOF 6194 6195 fi 6196 6197 6198 if test "${ac_cv_header_dlfcn_h+set}" = set; then 6199 echo "$as_me:$LINENO: checking for dlfcn.h" >&5 6200 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 6201 if test "${ac_cv_header_dlfcn_h+set}" = set; then 6202 echo $ECHO_N "(cached) $ECHO_C" >&6 6203 fi 6204 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 6205 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 6206 else 6207 # Is the header compilable? 6208 echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 6209 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 6210 cat >conftest.$ac_ext <<_ACEOF 6211 /* confdefs.h. */ 6212 _ACEOF 6213 cat confdefs.h >>conftest.$ac_ext 6214 cat >>conftest.$ac_ext <<_ACEOF 6215 /* end confdefs.h. */ 6216 $ac_includes_default 6217 #include <dlfcn.h> 6218 _ACEOF 6219 rm -f conftest.$ac_objext 6220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6221 (eval $ac_compile) 2>conftest.er1 6222 ac_status=$? 6223 grep -v '^ *+' conftest.er1 >conftest.err 6224 rm -f conftest.er1 6225 cat conftest.err >&5 6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6227 (exit $ac_status); } && 6228 { ac_try='test -z "$ac_c_werror_flag" 6229 || test ! -s conftest.err' 6230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6231 (eval $ac_try) 2>&5 6232 ac_status=$? 6233 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6234 (exit $ac_status); }; } && 6235 { ac_try='test -s conftest.$ac_objext' 6236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6237 (eval $ac_try) 2>&5 6238 ac_status=$? 6239 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6240 (exit $ac_status); }; }; then 6241 ac_header_compiler=yes 6242 else 6243 echo "$as_me: failed program was:" >&5 6244 sed 's/^/| /' conftest.$ac_ext >&5 6245 6246 ac_header_compiler=no 6247 fi 6248 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6249 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 6250 echo "${ECHO_T}$ac_header_compiler" >&6 6251 6252 # Is the header present? 6253 echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 6254 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 6255 cat >conftest.$ac_ext <<_ACEOF 6256 /* confdefs.h. */ 6257 _ACEOF 6258 cat confdefs.h >>conftest.$ac_ext 6259 cat >>conftest.$ac_ext <<_ACEOF 6260 /* end confdefs.h. */ 6261 #include <dlfcn.h> 6262 _ACEOF 6263 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 6264 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 6265 ac_status=$? 6266 grep -v '^ *+' conftest.er1 >conftest.err 6267 rm -f conftest.er1 6268 cat conftest.err >&5 6269 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6270 (exit $ac_status); } >/dev/null; then 6271 if test -s conftest.err; then 6272 ac_cpp_err=$ac_c_preproc_warn_flag 6273 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 6274 else 6275 ac_cpp_err= 6276 fi 6277 else 6278 ac_cpp_err=yes 6279 fi 6280 if test -z "$ac_cpp_err"; then 6281 ac_header_preproc=yes 6282 else 6283 echo "$as_me: failed program was:" >&5 6284 sed 's/^/| /' conftest.$ac_ext >&5 6285 6286 ac_header_preproc=no 6287 fi 6288 rm -f conftest.err conftest.$ac_ext 6289 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 6290 echo "${ECHO_T}$ac_header_preproc" >&6 6291 6292 # So? What about this header? 6293 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 6294 yes:no: ) 6295 { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5 6296 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 6297 { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5 6298 echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;} 6299 ac_header_preproc=yes 6300 ;; 6301 no:yes:* ) 6302 { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5 6303 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;} 6304 { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5 6305 echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;} 6306 { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5 6307 echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;} 6308 { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5 6309 echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;} 6310 { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 6311 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} 6312 { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 6313 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} 6314 ( 6315 cat <<\_ASBOX 6316 ## ----------------------------------- ## 6317 ## Report this to the Rappture lists. ## 6318 ## ----------------------------------- ## 6319 _ASBOX 6320 ) | 6321 sed "s/^/$as_me: WARNING: /" >&2 6322 ;; 6323 esac 6324 echo "$as_me:$LINENO: checking for dlfcn.h" >&5 6325 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 6326 if test "${ac_cv_header_dlfcn_h+set}" = set; then 6327 echo $ECHO_N "(cached) $ECHO_C" >&6 6328 else 6329 ac_cv_header_dlfcn_h=$ac_header_preproc 6330 fi 6331 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 6332 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 6333 6334 fi 6335 if test $ac_cv_header_dlfcn_h = yes; then 6336 : 6337 else 6338 6339 cat >>confdefs.h <<\_ACEOF 6340 #define NO_DLFCN_H 1 6341 _ACEOF 6342 6343 fi 6344 6345 6346 6347 # OS/390 lacks sys/param.h (and doesn't need it, by chance). 6348 6349 for ac_header in sys/param.h 6350 do 6351 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6352 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6353 echo "$as_me:$LINENO: checking for $ac_header" >&5 6354 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6355 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6356 echo $ECHO_N "(cached) $ECHO_C" >&6 6357 fi 6358 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 6359 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6360 else 6361 # Is the header compilable? 6362 echo "$as_me:$LINENO: checking $ac_header usability" >&5 6363 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 6364 cat >conftest.$ac_ext <<_ACEOF 6365 /* confdefs.h. */ 6366 _ACEOF 6367 cat confdefs.h >>conftest.$ac_ext 6368 cat >>conftest.$ac_ext <<_ACEOF 6369 /* end confdefs.h. */ 6370 $ac_includes_default 6371 #include <$ac_header> 6372 _ACEOF 6373 rm -f conftest.$ac_objext 6374 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6375 (eval $ac_compile) 2>conftest.er1 6376 ac_status=$? 6377 grep -v '^ *+' conftest.er1 >conftest.err 6378 rm -f conftest.er1 6379 cat conftest.err >&5 6380 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6381 (exit $ac_status); } && 6382 { ac_try='test -z "$ac_c_werror_flag" 6383 || test ! -s conftest.err' 6384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6385 (eval $ac_try) 2>&5 6386 ac_status=$? 6387 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6388 (exit $ac_status); }; } && 6389 { ac_try='test -s conftest.$ac_objext' 6390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6391 (eval $ac_try) 2>&5 6392 ac_status=$? 6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6394 (exit $ac_status); }; }; then 6395 ac_header_compiler=yes 6396 else 6397 echo "$as_me: failed program was:" >&5 6398 sed 's/^/| /' conftest.$ac_ext >&5 6399 6400 ac_header_compiler=no 6401 fi 6402 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6403 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 6404 echo "${ECHO_T}$ac_header_compiler" >&6 6405 6406 # Is the header present? 6407 echo "$as_me:$LINENO: checking $ac_header presence" >&5 6408 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 6409 cat >conftest.$ac_ext <<_ACEOF 6410 /* confdefs.h. */ 6411 _ACEOF 6412 cat confdefs.h >>conftest.$ac_ext 6413 cat >>conftest.$ac_ext <<_ACEOF 6414 /* end confdefs.h. */ 6415 #include <$ac_header> 6416 _ACEOF 6417 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 6418 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 6419 ac_status=$? 6420 grep -v '^ *+' conftest.er1 >conftest.err 6421 rm -f conftest.er1 6422 cat conftest.err >&5 6423 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6424 (exit $ac_status); } >/dev/null; then 6425 if test -s conftest.err; then 6426 ac_cpp_err=$ac_c_preproc_warn_flag 6427 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 6428 else 6429 ac_cpp_err= 6430 fi 6431 else 6432 ac_cpp_err=yes 6433 fi 6434 if test -z "$ac_cpp_err"; then 6435 ac_header_preproc=yes 6436 else 6437 echo "$as_me: failed program was:" >&5 6438 sed 's/^/| /' conftest.$ac_ext >&5 6439 6440 ac_header_preproc=no 6441 fi 6442 rm -f conftest.err conftest.$ac_ext 6443 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 6444 echo "${ECHO_T}$ac_header_preproc" >&6 6445 6446 # So? What about this header? 6447 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 6448 yes:no: ) 6449 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 6450 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 6451 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 6452 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 6453 ac_header_preproc=yes 6454 ;; 6455 no:yes:* ) 6456 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 6457 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 6458 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 6459 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 6460 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 6461 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 6462 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 6463 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 6464 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 6465 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 6466 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 6467 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 6468 ( 6469 cat <<\_ASBOX 6470 ## ----------------------------------- ## 6471 ## Report this to the Rappture lists. ## 6472 ## ----------------------------------- ## 6473 _ASBOX 6474 ) | 6475 sed "s/^/$as_me: WARNING: /" >&2 6476 ;; 6477 esac 6478 echo "$as_me:$LINENO: checking for $ac_header" >&5 6479 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6480 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6481 echo $ECHO_N "(cached) $ECHO_C" >&6 6482 else 6483 eval "$as_ac_Header=\$ac_header_preproc" 6484 fi 6485 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 6486 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6487 6488 fi 6489 if test `eval echo '${'$as_ac_Header'}'` = yes; then 6490 cat >>confdefs.h <<_ACEOF 6491 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6492 _ACEOF 6493 6494 fi 6495 6496 done 6497 6498 6499 # Let the user call this, because if it triggers, they will 6500 # need a compat/strtod.c that is correct. Users can also 6501 # use Tcl_GetDouble(FromObj) instead. 6502 #TEA_BUGGY_STRTOD 6503 fi 6504 6505 6506 #----------------------------------------------------------------------- 6507 # __CHANGE__ 6508 # Specify the C source files to compile in TEA_ADD_SOURCES, 6509 # public headers that need to be installed in TEA_ADD_HEADERS, 6510 # stub library C source files to compile in TEA_ADD_STUB_SOURCES, 6511 # and runtime Tcl library files in TEA_ADD_TCL_SOURCES. 6512 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS 6513 # and PKG_TCL_SOURCES. 6514 #----------------------------------------------------------------------- 6515 6516 6517 vars="Rappture_Init.cc RpLibraryTclInterface.cc RpUnitsTclInterface.cc " 6518 for i in $vars; do 6519 case $i in 6520 \$*) 6521 # allow $-var names 6522 PKG_SOURCES="$PKG_SOURCES $i" 6523 PKG_OBJECTS="$PKG_OBJECTS $i" 6524 ;; 6525 *) 6526 # check for existence - allows for generic/win/unix VPATH 6527 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/src/$i" \ 6528 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ 6529 ; then 6530 { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5 6531 echo "$as_me: error: could not find source file '$i'" >&2;} 6532 { (exit 1); exit 1; }; } 6533 fi 6534 PKG_SOURCES="$PKG_SOURCES $i" 6535 # this assumes it is in a VPATH dir 6536 i=`basename $i` 6537 # handle user calling this before or after TEA_SETUP_COMPILER 6538 if test x"${OBJEXT}" != x ; then 6539 j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" 6540 else 6541 j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" 6542 fi 6543 PKG_OBJECTS="$PKG_OBJECTS $j" 6544 ;; 6545 esac 6546 done 6547 6548 6549 6550 6551 vars="" 6552 for i in $vars; do 6553 # check for existence, be strict because it is installed 6554 if test ! -f "${srcdir}/$i" ; then 6555 { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5 6556 echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;} 6557 { (exit 1); exit 1; }; } 6558 fi 6559 PKG_HEADERS="$PKG_HEADERS $i" 6560 done 6561 6562 6563 6564 vars="" 6565 for i in $vars; do 6566 PKG_INCLUDES="$PKG_INCLUDES $i" 6567 done 6568 6569 6570 6571 vars="BLT24.lib libexpat.lib ../librappture.lib" 6572 for i in $vars; do 6573 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then 6574 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib 6575 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` 6576 fi 6577 PKG_LIBS="$PKG_LIBS $i" 6578 done 6579 6580 6581 6582 PKG_CFLAGS="$PKG_CFLAGS " 6583 6584 6585 6586 vars="" 6587 for i in $vars; do 6588 # check for existence - allows for generic/win/unix VPATH 6589 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ 6590 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ 6591 ; then 6592 { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5 6593 echo "$as_me: error: could not find stub source file '$i'" >&2;} 6594 { (exit 1); exit 1; }; } 6595 fi 6596 PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" 6597 # this assumes it is in a VPATH dir 6598 i=`basename $i` 6599 # handle user calling this before or after TEA_SETUP_COMPILER 6600 if test x"${OBJEXT}" != x ; then 6601 j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" 6602 else 6603 j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" 6604 fi 6605 PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" 6606 done 6607 6608 6609 6610 6611 vars="scripts/exec.tcl scripts/value.tcl init.tcl ../../tcl/scripts/library.tcl ../../tcl/scripts/result.tcl" 6612 for i in $vars; do 6613 # check for existence, be strict because it is installed 6614 if test ! -f "${srcdir}/$i" ; then 6615 { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5 6616 echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;} 6617 { (exit 1); exit 1; }; } 6618 fi 6619 PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" 6620 done 6621 6622 6623 6624 #-------------------------------------------------------------------- 6625 # __CHANGE__ 6626 # A few miscellaneous platform-specific items: 6627 # 6628 # Define a special symbol for Windows (BUILD_sample in this case) so 6629 # that we create the export library with the dll. 6630 # 6631 # Windows creates a few extra files that need to be cleaned up. 6632 # You can add more files to clean if your extension creates any extra 6633 # files. 6634 # 6635 # TEA_ADD_* any platform specific compiler/build info here. 6636 #-------------------------------------------------------------------- 6637 6638 if test "${TEA_PLATFORM}" = "windows" ; then 6639 6640 cat >>confdefs.h <<\_ACEOF 6641 #define BUILD_rappture 1 6642 _ACEOF 6643 6644 CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch" 6645 6646 vars="/LIBPATH:C:/opt/lib /LIBPATH:C:/Tcl/lib scew_s.lib" 6647 for i in $vars; do 6648 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then 6649 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib 6650 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` 6651 fi 6652 PKG_LIBS="$PKG_LIBS $i" 6653 done 6654 6655 6656 #TEA_ADD_SOURCES([win/winFile.c]) 6657 #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) 6658 else 6659 CLEANFILES="" 6660 #TEA_ADD_SOURCES([unix/unixFile.c]) 6661 6662 vars="scew.lib" 6663 for i in $vars; do 6664 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then 6665 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib 6666 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` 6667 fi 6668 PKG_LIBS="$PKG_LIBS $i" 6669 done 6670 6671 6672 fi 2181 6673 2182 6674 … … 2187 6679 # contain private data structures and are subject to change without 2188 6680 # notice. 2189 # This MUST be called before SC_PATH_TCLCONFIG/SC_LOAD_TCLCONFIG6681 # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG 2190 6682 #-------------------------------------------------------------------- 2191 6683 … … 2201 6693 fi; 2202 6694 2203 if test x"${with_tclinclude}" != x ; then 2204 if test -f "${with_tclinclude}/tcl.h" ; then 2205 ac_cv_c_tclh=${with_tclinclude} 2206 else 2207 { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain Tcl public header file tcl.h" >&5 2208 echo "$as_me: error: ${with_tclinclude} directory does not contain Tcl public header file tcl.h" >&2;} 2209 { (exit 1); exit 1; }; } 2210 fi 2211 else 2212 if test "${ac_cv_c_tclh+set}" = set; then 6695 if test "${ac_cv_c_tclh+set}" = set; then 2213 6696 echo $ECHO_N "(cached) $ECHO_C" >&6 2214 6697 else 2215 6698 2216 # Use the value from --with-tclinclude, if it was given 2217 2218 if test x"${with_tclinclude}" != x ; then 6699 # Use the value from --with-tclinclude, if it was given 6700 6701 if test x"${with_tclinclude}" != x ; then 6702 if test -f "${with_tclinclude}/tcl.h" ; then 2219 6703 ac_cv_c_tclh=${with_tclinclude} 2220 6704 else 2221 # Check in the includedir, if --prefix was specified 2222 2223 eval "temp_includedir=${includedir}" 2224 for i in \ 2225 `ls -d ${temp_includedir} 2>/dev/null` \ 2226 /usr/local/include /usr/include ; do 2227 if test -f "$i/tcl.h" ; then 2228 ac_cv_c_tclh=$i 2229 break 2230 fi 2231 done 6705 { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5 6706 echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;} 6707 { (exit 1); exit 1; }; } 2232 6708 fi 2233 2234 fi 2235 2236 fi 6709 else 6710 if test "`uname -s`" = "Darwin"; then 6711 # If Tcl was built as a framework, attempt to use 6712 # the framework's Headers directory 6713 case ${TCL_DEFS} in 6714 *TCL_FRAMEWORK*) 6715 list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" 6716 ;; 6717 esac 6718 fi 6719 6720 # Look in the source dir only if Tcl is not installed, 6721 # and in that situation, look there before installed locations. 6722 if test -f "${TCL_BIN_DIR}/Makefile" ; then 6723 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" 6724 fi 6725 6726 # Check order: pkg --prefix location, Tcl's --prefix location, 6727 # relative to directory of tclConfig.sh. 6728 6729 eval "temp_includedir=${includedir}" 6730 list="$list \ 6731 `ls -d ${temp_includedir} 2>/dev/null` \ 6732 `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ 6733 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" 6734 if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then 6735 list="$list /usr/local/include /usr/include" 6736 if test x"${TCL_INCLUDE_SPEC}" != x ; then 6737 d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'` 6738 list="$list `ls -d ${d} 2>/dev/null`" 6739 fi 6740 fi 6741 for i in $list ; do 6742 if test -f "$i/tcl.h" ; then 6743 ac_cv_c_tclh=$i 6744 break 6745 fi 6746 done 6747 fi 6748 6749 fi 6750 2237 6751 2238 6752 # Print a message based on how we determined the include path … … 2255 6769 2256 6770 2257 #SC_PRIVATE_TCL_HEADERS 6771 #TEA_PRIVATE_TCL_HEADERS 6772 6773 #TEA_PUBLIC_TK_HEADERS 6774 #TEA_PRIVATE_TK_HEADERS 6775 #TEA_PATH_X 2258 6776 2259 6777 #-------------------------------------------------------------------- 2260 # Load the tclConfig.sh file 6778 # Check whether --enable-threads or --disable-threads was given. 6779 # This auto-enables if Tcl was compiled threaded. 2261 6780 #-------------------------------------------------------------------- 2262 6781 2263 6782 2264 # 2265 # Ok, lets find the tcl configuration 6783 # Check whether --enable-threads or --disable-threads was given. 6784 if test "${enable_threads+set}" = set; then 6785 enableval="$enable_threads" 6786 tcl_ok=$enableval 6787 else 6788 tcl_ok=yes 6789 fi; 6790 6791 if test "${enable_threads+set}" = set; then 6792 enableval="$enable_threads" 6793 tcl_ok=$enableval 6794 else 6795 tcl_ok=yes 6796 fi 6797 6798 if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then 6799 TCL_THREADS=1 6800 6801 if test "${TEA_PLATFORM}" != "windows" ; then 6802 # We are always OK on Windows, so check what this platform wants: 6803 6804 # USE_THREAD_ALLOC tells us to try the special thread-based 6805 # allocator that significantly reduces lock contention 6806 6807 cat >>confdefs.h <<\_ACEOF 6808 #define USE_THREAD_ALLOC 1 6809 _ACEOF 6810 6811 6812 cat >>confdefs.h <<\_ACEOF 6813 #define _REENTRANT 1 6814 _ACEOF 6815 6816 if test "`uname -s`" = "SunOS" ; then 6817 6818 cat >>confdefs.h <<\_ACEOF 6819 #define _POSIX_PTHREAD_SEMANTICS 1 6820 _ACEOF 6821 6822 fi 6823 6824 cat >>confdefs.h <<\_ACEOF 6825 #define _THREAD_SAFE 1 6826 _ACEOF 6827 6828 echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 6829 echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 6830 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then 6831 echo $ECHO_N "(cached) $ECHO_C" >&6 6832 else 6833 ac_check_lib_save_LIBS=$LIBS 6834 LIBS="-lpthread $LIBS" 6835 cat >conftest.$ac_ext <<_ACEOF 6836 /* confdefs.h. */ 6837 _ACEOF 6838 cat confdefs.h >>conftest.$ac_ext 6839 cat >>conftest.$ac_ext <<_ACEOF 6840 /* end confdefs.h. */ 6841 6842 /* Override any gcc2 internal prototype to avoid an error. */ 6843 #ifdef __cplusplus 6844 extern "C" 6845 #endif 6846 /* We use char because int might match the return type of a gcc2 6847 builtin and then its argument prototype would still apply. */ 6848 char pthread_mutex_init (); 6849 int 6850 main () 6851 { 6852 pthread_mutex_init (); 6853 ; 6854 return 0; 6855 } 6856 _ACEOF 6857 rm -f conftest.$ac_objext conftest$ac_exeext 6858 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6859 (eval $ac_link) 2>conftest.er1 6860 ac_status=$? 6861 grep -v '^ *+' conftest.er1 >conftest.err 6862 rm -f conftest.er1 6863 cat conftest.err >&5 6864 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6865 (exit $ac_status); } && 6866 { ac_try='test -z "$ac_c_werror_flag" 6867 || test ! -s conftest.err' 6868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6869 (eval $ac_try) 2>&5 6870 ac_status=$? 6871 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6872 (exit $ac_status); }; } && 6873 { ac_try='test -s conftest$ac_exeext' 6874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6875 (eval $ac_try) 2>&5 6876 ac_status=$? 6877 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6878 (exit $ac_status); }; }; then 6879 ac_cv_lib_pthread_pthread_mutex_init=yes 6880 else 6881 echo "$as_me: failed program was:" >&5 6882 sed 's/^/| /' conftest.$ac_ext >&5 6883 6884 ac_cv_lib_pthread_pthread_mutex_init=no 6885 fi 6886 rm -f conftest.err conftest.$ac_objext \ 6887 conftest$ac_exeext conftest.$ac_ext 6888 LIBS=$ac_check_lib_save_LIBS 6889 fi 6890 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 6891 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 6892 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then 6893 tcl_ok=yes 6894 else 6895 tcl_ok=no 6896 fi 6897 6898 if test "$tcl_ok" = "no"; then 6899 # Check a little harder for __pthread_mutex_init in the same 6900 # library, as some systems hide it there until pthread.h is 6901 # defined. We could alternatively do an AC_TRY_COMPILE with 6902 # pthread.h, but that will work with libpthread really doesn't 6903 # exist, like AIX 4.2. [Bug: 4359] 6904 echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 6905 echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 6906 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then 6907 echo $ECHO_N "(cached) $ECHO_C" >&6 6908 else 6909 ac_check_lib_save_LIBS=$LIBS 6910 LIBS="-lpthread $LIBS" 6911 cat >conftest.$ac_ext <<_ACEOF 6912 /* confdefs.h. */ 6913 _ACEOF 6914 cat confdefs.h >>conftest.$ac_ext 6915 cat >>conftest.$ac_ext <<_ACEOF 6916 /* end confdefs.h. */ 6917 6918 /* Override any gcc2 internal prototype to avoid an error. */ 6919 #ifdef __cplusplus 6920 extern "C" 6921 #endif 6922 /* We use char because int might match the return type of a gcc2 6923 builtin and then its argument prototype would still apply. */ 6924 char __pthread_mutex_init (); 6925 int 6926 main () 6927 { 6928 __pthread_mutex_init (); 6929 ; 6930 return 0; 6931 } 6932 _ACEOF 6933 rm -f conftest.$ac_objext conftest$ac_exeext 6934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6935 (eval $ac_link) 2>conftest.er1 6936 ac_status=$? 6937 grep -v '^ *+' conftest.er1 >conftest.err 6938 rm -f conftest.er1 6939 cat conftest.err >&5 6940 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6941 (exit $ac_status); } && 6942 { ac_try='test -z "$ac_c_werror_flag" 6943 || test ! -s conftest.err' 6944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6945 (eval $ac_try) 2>&5 6946 ac_status=$? 6947 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6948 (exit $ac_status); }; } && 6949 { ac_try='test -s conftest$ac_exeext' 6950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6951 (eval $ac_try) 2>&5 6952 ac_status=$? 6953 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6954 (exit $ac_status); }; }; then 6955 ac_cv_lib_pthread___pthread_mutex_init=yes 6956 else 6957 echo "$as_me: failed program was:" >&5 6958 sed 's/^/| /' conftest.$ac_ext >&5 6959 6960 ac_cv_lib_pthread___pthread_mutex_init=no 6961 fi 6962 rm -f conftest.err conftest.$ac_objext \ 6963 conftest$ac_exeext conftest.$ac_ext 6964 LIBS=$ac_check_lib_save_LIBS 6965 fi 6966 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 6967 echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 6968 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then 6969 tcl_ok=yes 6970 else 6971 tcl_ok=no 6972 fi 6973 6974 fi 6975 6976 if test "$tcl_ok" = "yes"; then 6977 # The space is needed 6978 THREADS_LIBS=" -lpthread" 6979 else 6980 echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 6981 echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 6982 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then 6983 echo $ECHO_N "(cached) $ECHO_C" >&6 6984 else 6985 ac_check_lib_save_LIBS=$LIBS 6986 LIBS="-lpthreads $LIBS" 6987 cat >conftest.$ac_ext <<_ACEOF 6988 /* confdefs.h. */ 6989 _ACEOF 6990 cat confdefs.h >>conftest.$ac_ext 6991 cat >>conftest.$ac_ext <<_ACEOF 6992 /* end confdefs.h. */ 6993 6994 /* Override any gcc2 internal prototype to avoid an error. */ 6995 #ifdef __cplusplus 6996 extern "C" 6997 #endif 6998 /* We use char because int might match the return type of a gcc2 6999 builtin and then its argument prototype would still apply. */ 7000 char pthread_mutex_init (); 7001 int 7002 main () 7003 { 7004 pthread_mutex_init (); 7005 ; 7006 return 0; 7007 } 7008 _ACEOF 7009 rm -f conftest.$ac_objext conftest$ac_exeext 7010 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7011 (eval $ac_link) 2>conftest.er1 7012 ac_status=$? 7013 grep -v '^ *+' conftest.er1 >conftest.err 7014 rm -f conftest.er1 7015 cat conftest.err >&5 7016 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7017 (exit $ac_status); } && 7018 { ac_try='test -z "$ac_c_werror_flag" 7019 || test ! -s conftest.err' 7020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7021 (eval $ac_try) 2>&5 7022 ac_status=$? 7023 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7024 (exit $ac_status); }; } && 7025 { ac_try='test -s conftest$ac_exeext' 7026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7027 (eval $ac_try) 2>&5 7028 ac_status=$? 7029 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7030 (exit $ac_status); }; }; then 7031 ac_cv_lib_pthreads_pthread_mutex_init=yes 7032 else 7033 echo "$as_me: failed program was:" >&5 7034 sed 's/^/| /' conftest.$ac_ext >&5 7035 7036 ac_cv_lib_pthreads_pthread_mutex_init=no 7037 fi 7038 rm -f conftest.err conftest.$ac_objext \ 7039 conftest$ac_exeext conftest.$ac_ext 7040 LIBS=$ac_check_lib_save_LIBS 7041 fi 7042 echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 7043 echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 7044 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then 7045 tcl_ok=yes 7046 else 7047 tcl_ok=no 7048 fi 7049 7050 if test "$tcl_ok" = "yes"; then 7051 # The space is needed 7052 THREADS_LIBS=" -lpthreads" 7053 else 7054 echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 7055 echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 7056 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then 7057 echo $ECHO_N "(cached) $ECHO_C" >&6 7058 else 7059 ac_check_lib_save_LIBS=$LIBS 7060 LIBS="-lc $LIBS" 7061 cat >conftest.$ac_ext <<_ACEOF 7062 /* confdefs.h. */ 7063 _ACEOF 7064 cat confdefs.h >>conftest.$ac_ext 7065 cat >>conftest.$ac_ext <<_ACEOF 7066 /* end confdefs.h. */ 7067 7068 /* Override any gcc2 internal prototype to avoid an error. */ 7069 #ifdef __cplusplus 7070 extern "C" 7071 #endif 7072 /* We use char because int might match the return type of a gcc2 7073 builtin and then its argument prototype would still apply. */ 7074 char pthread_mutex_init (); 7075 int 7076 main () 7077 { 7078 pthread_mutex_init (); 7079 ; 7080 return 0; 7081 } 7082 _ACEOF 7083 rm -f conftest.$ac_objext conftest$ac_exeext 7084 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7085 (eval $ac_link) 2>conftest.er1 7086 ac_status=$? 7087 grep -v '^ *+' conftest.er1 >conftest.err 7088 rm -f conftest.er1 7089 cat conftest.err >&5 7090 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7091 (exit $ac_status); } && 7092 { ac_try='test -z "$ac_c_werror_flag" 7093 || test ! -s conftest.err' 7094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7095 (eval $ac_try) 2>&5 7096 ac_status=$? 7097 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7098 (exit $ac_status); }; } && 7099 { ac_try='test -s conftest$ac_exeext' 7100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7101 (eval $ac_try) 2>&5 7102 ac_status=$? 7103 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7104 (exit $ac_status); }; }; then 7105 ac_cv_lib_c_pthread_mutex_init=yes 7106 else 7107 echo "$as_me: failed program was:" >&5 7108 sed 's/^/| /' conftest.$ac_ext >&5 7109 7110 ac_cv_lib_c_pthread_mutex_init=no 7111 fi 7112 rm -f conftest.err conftest.$ac_objext \ 7113 conftest$ac_exeext conftest.$ac_ext 7114 LIBS=$ac_check_lib_save_LIBS 7115 fi 7116 echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 7117 echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 7118 if test $ac_cv_lib_c_pthread_mutex_init = yes; then 7119 tcl_ok=yes 7120 else 7121 tcl_ok=no 7122 fi 7123 7124 if test "$tcl_ok" = "no"; then 7125 echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 7126 echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 7127 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then 7128 echo $ECHO_N "(cached) $ECHO_C" >&6 7129 else 7130 ac_check_lib_save_LIBS=$LIBS 7131 LIBS="-lc_r $LIBS" 7132 cat >conftest.$ac_ext <<_ACEOF 7133 /* confdefs.h. */ 7134 _ACEOF 7135 cat confdefs.h >>conftest.$ac_ext 7136 cat >>conftest.$ac_ext <<_ACEOF 7137 /* end confdefs.h. */ 7138 7139 /* Override any gcc2 internal prototype to avoid an error. */ 7140 #ifdef __cplusplus 7141 extern "C" 7142 #endif 7143 /* We use char because int might match the return type of a gcc2 7144 builtin and then its argument prototype would still apply. */ 7145 char pthread_mutex_init (); 7146 int 7147 main () 7148 { 7149 pthread_mutex_init (); 7150 ; 7151 return 0; 7152 } 7153 _ACEOF 7154 rm -f conftest.$ac_objext conftest$ac_exeext 7155 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7156 (eval $ac_link) 2>conftest.er1 7157 ac_status=$? 7158 grep -v '^ *+' conftest.er1 >conftest.err 7159 rm -f conftest.er1 7160 cat conftest.err >&5 7161 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7162 (exit $ac_status); } && 7163 { ac_try='test -z "$ac_c_werror_flag" 7164 || test ! -s conftest.err' 7165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7166 (eval $ac_try) 2>&5 7167 ac_status=$? 7168 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7169 (exit $ac_status); }; } && 7170 { ac_try='test -s conftest$ac_exeext' 7171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7172 (eval $ac_try) 2>&5 7173 ac_status=$? 7174 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7175 (exit $ac_status); }; }; then 7176 ac_cv_lib_c_r_pthread_mutex_init=yes 7177 else 7178 echo "$as_me: failed program was:" >&5 7179 sed 's/^/| /' conftest.$ac_ext >&5 7180 7181 ac_cv_lib_c_r_pthread_mutex_init=no 7182 fi 7183 rm -f conftest.err conftest.$ac_objext \ 7184 conftest$ac_exeext conftest.$ac_ext 7185 LIBS=$ac_check_lib_save_LIBS 7186 fi 7187 echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 7188 echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 7189 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then 7190 tcl_ok=yes 7191 else 7192 tcl_ok=no 7193 fi 7194 7195 if test "$tcl_ok" = "yes"; then 7196 # The space is needed 7197 THREADS_LIBS=" -pthread" 7198 else 7199 TCL_THREADS=0 7200 { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5 7201 echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;} 7202 fi 7203 fi 7204 fi 7205 fi 7206 fi 7207 else 7208 TCL_THREADS=0 7209 fi 7210 # Do checking message here to not mess up interleaved configure output 7211 echo "$as_me:$LINENO: checking for building with threads" >&5 7212 echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 7213 if test "${TCL_THREADS}" = 1; then 7214 7215 cat >>confdefs.h <<\_ACEOF 7216 #define TCL_THREADS 1 7217 _ACEOF 7218 7219 echo "$as_me:$LINENO: result: yes (default)" >&5 7220 echo "${ECHO_T}yes (default)" >&6 7221 else 7222 echo "$as_me:$LINENO: result: no" >&5 7223 echo "${ECHO_T}no" >&6 7224 fi 7225 # TCL_THREADS sanity checking. See if our request for building with 7226 # threads is the same as the way Tcl was built. If not, warn the user. 7227 case ${TCL_DEFS} in 7228 *THREADS=1*) 7229 if test "${TCL_THREADS}" = "0"; then 7230 { echo "$as_me:$LINENO: WARNING: 7231 Building ${PACKAGE_NAME} without threads enabled, but building against Tcl 7232 that IS thread-enabled. It is recommended to use --enable-threads." >&5 7233 echo "$as_me: WARNING: 7234 Building ${PACKAGE_NAME} without threads enabled, but building against Tcl 7235 that IS thread-enabled. It is recommended to use --enable-threads." >&2;} 7236 fi 7237 ;; 7238 *) 7239 if test "${TCL_THREADS}" = "1"; then 7240 { echo "$as_me:$LINENO: WARNING: 7241 --enable-threads requested, but building against a Tcl that is NOT 7242 thread-enabled. This is an OK configuration that will also run in 7243 a thread-enabled core." >&5 7244 echo "$as_me: WARNING: 7245 --enable-threads requested, but building against a Tcl that is NOT 7246 thread-enabled. This is an OK configuration that will also run in 7247 a thread-enabled core." >&2;} 7248 fi 7249 ;; 7250 esac 7251 7252 7253 7254 #-------------------------------------------------------------------- 7255 # The statement below defines a collection of symbols related to 7256 # building as a shared library instead of a static library. 7257 #-------------------------------------------------------------------- 7258 7259 7260 echo "$as_me:$LINENO: checking how to build libraries" >&5 7261 echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 7262 # Check whether --enable-shared or --disable-shared was given. 7263 if test "${enable_shared+set}" = set; then 7264 enableval="$enable_shared" 7265 tcl_ok=$enableval 7266 else 7267 tcl_ok=yes 7268 fi; 7269 7270 if test "${enable_shared+set}" = set; then 7271 enableval="$enable_shared" 7272 tcl_ok=$enableval 7273 else 7274 tcl_ok=yes 7275 fi 7276 7277 if test "$tcl_ok" = "yes" ; then 7278 echo "$as_me:$LINENO: result: shared" >&5 7279 echo "${ECHO_T}shared" >&6 7280 SHARED_BUILD=1 7281 else 7282 echo "$as_me:$LINENO: result: static" >&5 7283 echo "${ECHO_T}static" >&6 7284 SHARED_BUILD=0 7285 7286 cat >>confdefs.h <<\_ACEOF 7287 #define STATIC_BUILD 1 7288 _ACEOF 7289 7290 fi 7291 7292 7293 7294 #-------------------------------------------------------------------- 7295 # This macro figures out what flags to use with the compiler/linker 7296 # when building shared/static debug/optimized objects. This information 7297 # can be taken from the tclConfig.sh file, but this figures it all out. 7298 #-------------------------------------------------------------------- 7299 7300 7301 7302 7303 # Step 0.a: Enable 64 bit support? 7304 7305 echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 7306 echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 7307 # Check whether --enable-64bit or --disable-64bit was given. 7308 if test "${enable_64bit+set}" = set; then 7309 enableval="$enable_64bit" 7310 do64bit=$enableval 7311 else 7312 do64bit=no 7313 fi; 7314 echo "$as_me:$LINENO: result: $do64bit" >&5 7315 echo "${ECHO_T}$do64bit" >&6 7316 7317 # Step 0.b: Enable Solaris 64 bit VIS support? 7318 7319 echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 7320 echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 7321 # Check whether --enable-64bit-vis or --disable-64bit-vis was given. 7322 if test "${enable_64bit_vis+set}" = set; then 7323 enableval="$enable_64bit_vis" 7324 do64bitVIS=$enableval 7325 else 7326 do64bitVIS=no 7327 fi; 7328 echo "$as_me:$LINENO: result: $do64bitVIS" >&5 7329 echo "${ECHO_T}$do64bitVIS" >&6 7330 7331 if test "$do64bitVIS" = "yes"; then 7332 # Force 64bit on with VIS 7333 do64bit=yes 7334 fi 7335 7336 # Step 0.c: Cross-compiling options for Windows/CE builds? 7337 7338 if test "${TEA_PLATFORM}" = "windows" ; then 7339 echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5 7340 echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6 7341 # Check whether --enable-wince or --disable-wince was given. 7342 if test "${enable_wince+set}" = set; then 7343 enableval="$enable_wince" 7344 doWince=$enableval 7345 else 7346 doWince=no 7347 fi; 7348 echo "$as_me:$LINENO: result: $doWince" >&5 7349 echo "${ECHO_T}$doWince" >&6 7350 fi 7351 7352 # Step 1: set the variable "system" to hold the name and version number 7353 # for the system. 7354 7355 7356 echo "$as_me:$LINENO: checking system version" >&5 7357 echo $ECHO_N "checking system version... $ECHO_C" >&6 7358 if test "${tcl_cv_sys_version+set}" = set; then 7359 echo $ECHO_N "(cached) $ECHO_C" >&6 7360 else 7361 7362 if test "${TEA_PLATFORM}" = "windows" ; then 7363 tcl_cv_sys_version=windows 7364 elif test -f /usr/lib/NextStep/software_version; then 7365 tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` 7366 else 7367 tcl_cv_sys_version=`uname -s`-`uname -r` 7368 if test "$?" -ne 0 ; then 7369 { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5 7370 echo "$as_me: WARNING: can't find uname command" >&2;} 7371 tcl_cv_sys_version=unknown 7372 else 7373 # Special check for weird MP-RAS system (uname returns weird 7374 # results, and the version is kept in special file). 7375 7376 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 7377 tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid` 7378 fi 7379 if test "`uname -s`" = "AIX" ; then 7380 tcl_cv_sys_version=AIX-`uname -v`.`uname -r` 7381 fi 7382 fi 7383 fi 7384 7385 fi 7386 echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 7387 echo "${ECHO_T}$tcl_cv_sys_version" >&6 7388 system=$tcl_cv_sys_version 7389 7390 7391 # Step 2: check for existence of -ldl library. This is needed because 7392 # Linux can use either -ldl or -ldld for dynamic loading. 7393 7394 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 7395 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 7396 if test "${ac_cv_lib_dl_dlopen+set}" = set; then 7397 echo $ECHO_N "(cached) $ECHO_C" >&6 7398 else 7399 ac_check_lib_save_LIBS=$LIBS 7400 LIBS="-ldl $LIBS" 7401 cat >conftest.$ac_ext <<_ACEOF 7402 /* confdefs.h. */ 7403 _ACEOF 7404 cat confdefs.h >>conftest.$ac_ext 7405 cat >>conftest.$ac_ext <<_ACEOF 7406 /* end confdefs.h. */ 7407 7408 /* Override any gcc2 internal prototype to avoid an error. */ 7409 #ifdef __cplusplus 7410 extern "C" 7411 #endif 7412 /* We use char because int might match the return type of a gcc2 7413 builtin and then its argument prototype would still apply. */ 7414 char dlopen (); 7415 int 7416 main () 7417 { 7418 dlopen (); 7419 ; 7420 return 0; 7421 } 7422 _ACEOF 7423 rm -f conftest.$ac_objext conftest$ac_exeext 7424 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7425 (eval $ac_link) 2>conftest.er1 7426 ac_status=$? 7427 grep -v '^ *+' conftest.er1 >conftest.err 7428 rm -f conftest.er1 7429 cat conftest.err >&5 7430 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7431 (exit $ac_status); } && 7432 { ac_try='test -z "$ac_c_werror_flag" 7433 || test ! -s conftest.err' 7434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7435 (eval $ac_try) 2>&5 7436 ac_status=$? 7437 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7438 (exit $ac_status); }; } && 7439 { ac_try='test -s conftest$ac_exeext' 7440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7441 (eval $ac_try) 2>&5 7442 ac_status=$? 7443 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7444 (exit $ac_status); }; }; then 7445 ac_cv_lib_dl_dlopen=yes 7446 else 7447 echo "$as_me: failed program was:" >&5 7448 sed 's/^/| /' conftest.$ac_ext >&5 7449 7450 ac_cv_lib_dl_dlopen=no 7451 fi 7452 rm -f conftest.err conftest.$ac_objext \ 7453 conftest$ac_exeext conftest.$ac_ext 7454 LIBS=$ac_check_lib_save_LIBS 7455 fi 7456 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 7457 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 7458 if test $ac_cv_lib_dl_dlopen = yes; then 7459 have_dl=yes 7460 else 7461 have_dl=no 7462 fi 7463 7464 7465 # Require ranlib early so we can override it in special cases below. 7466 7467 7468 7469 # Step 3: set configuration options based on system name and version. 7470 # This is similar to Tcl's unix/tcl.m4 except that we've added a 7471 # "windows" case. 7472 7473 do64bit_ok=no 7474 LDFLAGS_ORIG="$LDFLAGS" 7475 # When ld needs options to work in 64-bit mode, put them in 7476 # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] 7477 # is disabled by the user. [Bug 1016796] 7478 LDFLAGS_ARCH="" 7479 TCL_EXPORT_FILE_SUFFIX="" 7480 UNSHARED_LIB_SUFFIX="" 7481 TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' 7482 ECHO_VERSION='`echo ${PACKAGE_VERSION}`' 7483 TCL_LIB_VERSIONS_OK=ok 7484 CFLAGS_DEBUG=-g 7485 CFLAGS_OPTIMIZE=-O 7486 if test "$GCC" = "yes" ; then 7487 CFLAGS_OPTIMIZE=-O2 7488 CFLAGS_WARNING="-Wall -Wno-implicit-int" 7489 else 7490 CFLAGS_WARNING="" 7491 fi 7492 TCL_NEEDS_EXP_FILE=0 7493 TCL_BUILD_EXP_FILE="" 7494 TCL_EXP_FILE="" 7495 # Extract the first word of "ar", so it can be a program name with args. 7496 set dummy ar; ac_word=$2 7497 echo "$as_me:$LINENO: checking for $ac_word" >&5 7498 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 7499 if test "${ac_cv_prog_AR+set}" = set; then 7500 echo $ECHO_N "(cached) $ECHO_C" >&6 7501 else 7502 if test -n "$AR"; then 7503 ac_cv_prog_AR="$AR" # Let the user override the test. 7504 else 7505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7506 for as_dir in $PATH 7507 do 7508 IFS=$as_save_IFS 7509 test -z "$as_dir" && as_dir=. 7510 for ac_exec_ext in '' $ac_executable_extensions; do 7511 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7512 ac_cv_prog_AR="ar" 7513 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 7514 break 2 7515 fi 7516 done 7517 done 7518 7519 fi 7520 fi 7521 AR=$ac_cv_prog_AR 7522 if test -n "$AR"; then 7523 echo "$as_me:$LINENO: result: $AR" >&5 7524 echo "${ECHO_T}$AR" >&6 7525 else 7526 echo "$as_me:$LINENO: result: no" >&5 7527 echo "${ECHO_T}no" >&6 7528 fi 7529 7530 STLIB_LD='${AR} cr' 7531 LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" 7532 case $system in 7533 windows) 7534 # This is a 2-stage check to make sure we have the 64-bit SDK 7535 # We have to know where the SDK is installed. 7536 # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs 7537 # MACHINE is IX86 for LINK, but this is used by the manifest, 7538 # which requires x86|amd64|ia64. 7539 MACHINE="X86" 7540 if test "$do64bit" != "no" ; then 7541 if test "x${MSSDK}x" = "xx" ; then 7542 MSSDK="C:/Progra~1/Microsoft Platform SDK" 7543 fi 7544 MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` 7545 PATH64="" 7546 case "$do64bit" in 7547 amd64|x64|yes) 7548 MACHINE="AMD64" ; # default to AMD64 64-bit build 7549 PATH64="${MSSDK}/Bin/Win64/x86/AMD64" 7550 ;; 7551 ia64) 7552 MACHINE="IA64" 7553 PATH64="${MSSDK}/Bin/Win64" 7554 ;; 7555 esac 7556 if test ! -d "${PATH64}" ; then 7557 { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5 7558 echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;} 7559 { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5 7560 echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} 7561 do64bit="no" 7562 else 7563 echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5 7564 echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 7565 do64bit_ok="yes" 7566 fi 7567 fi 7568 7569 if test "$doWince" != "no" ; then 7570 if test "$do64bit" != "no" ; then 7571 { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5 7572 echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;} 7573 { (exit 1); exit 1; }; } 7574 fi 7575 if test "$GCC" = "yes" ; then 7576 { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5 7577 echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;} 7578 { (exit 1); exit 1; }; } 7579 fi 7580 2266 7581 # First, look for one uninstalled. 2267 # the alternative search directory is invoked by --with-tcl 2268 # 2269 2270 if test x"${no_tcl}" = x ; then 2271 # we reset no_tcl in case something fails here 2272 no_tcl=true 2273 2274 # Check whether --with-tcl or --without-tcl was given. 2275 if test "${with_tcl+set}" = set; then 2276 withval="$with_tcl" 2277 with_tclconfig=${withval} 7582 # the alternative search directory is invoked by --with-celib 7583 7584 if test x"${no_celib}" = x ; then 7585 # we reset no_celib in case something fails here 7586 no_celib=true 7587 7588 # Check whether --with-celib or --without-celib was given. 7589 if test "${with_celib+set}" = set; then 7590 withval="$with_celib" 7591 with_celibconfig=${withval} 2278 7592 fi; 2279 echo "$as_me:$LINENO: checking for Tcl configuration" >&52280 echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&62281 if test "${ac_cv_c_ tclconfig+set}" = set; then7593 echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5 7594 echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6 7595 if test "${ac_cv_c_celibconfig+set}" = set; then 2282 7596 echo $ECHO_N "(cached) $ECHO_C" >&6 2283 7597 else 2284 7598 2285 2286 # First check to see if --with-tcl was specified. 2287 if test x"${with_tclconfig}" != x ; then 2288 if test -f "${with_tclconfig}/tclConfig.sh" ; then 2289 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` 7599 # First check to see if --with-celibconfig was specified. 7600 if test x"${with_celibconfig}" != x ; then 7601 if test -d "${with_celibconfig}/inc" ; then 7602 ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` 2290 7603 else 2291 { { echo "$as_me:$LINENO: error: ${with_ tclconfig} directory doesn't contain tclConfig.sh" >&52292 echo "$as_me: error: ${with_ tclconfig} directory doesn't contain tclConfig.sh" >&2;}7604 { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5 7605 echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;} 2293 7606 { (exit 1); exit 1; }; } 2294 7607 fi 2295 7608 fi 2296 7609 2297 # then check for a private Tcl installation2298 if test x"${ac_cv_c_ tclconfig}" = x ; then7610 # then check for a celib library 7611 if test x"${ac_cv_c_celibconfig}" = x ; then 2299 7612 for i in \ 2300 ../tcl \ 2301 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ 2302 ../../tcl \ 2303 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ 2304 ../../../tcl \ 2305 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do 2306 if test -f "$i/unix/tclConfig.sh" ; then 2307 ac_cv_c_tclconfig=`(cd $i/unix; pwd)` 7613 ../celib-palm-3.0 \ 7614 ../celib \ 7615 ../../celib-palm-3.0 \ 7616 ../../celib \ 7617 `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \ 7618 ${srcdir}/../celib-palm-3.0 \ 7619 ${srcdir}/../celib \ 7620 `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \ 7621 ; do 7622 if test -d "$i/inc" ; then 7623 ac_cv_c_celibconfig=`(cd $i; pwd)` 2308 7624 break 2309 7625 fi … … 2311 7627 fi 2312 7628 2313 # check in a few common install locations 2314 if test x"${ac_cv_c_tclconfig}" = x ; then 2315 for i in `ls -d ${prefix}/lib 2>/dev/null` \ 2316 `ls -d /usr/local/lib 2>/dev/null` ; do 2317 if test -f "$i/tclConfig.sh" ; then 2318 ac_cv_c_tclconfig=`(cd $i; pwd)` 2319 break 2320 fi 2321 done 2322 fi 2323 2324 # check in a few other private locations 2325 if test x"${ac_cv_c_tclconfig}" = x ; then 2326 for i in \ 2327 ${srcdir}/../tcl \ 2328 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do 2329 if test -f "$i/unix/tclConfig.sh" ; then 2330 ac_cv_c_tclconfig=`(cd $i/unix; pwd)` 2331 break 2332 fi 2333 done 2334 fi 2335 2336 fi 2337 2338 2339 if test x"${ac_cv_c_tclconfig}" = x ; then 2340 TCL_BIN_DIR="# no Tcl configs found" 2341 { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5 2342 echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} 2343 exit 0 7629 fi 7630 7631 if test x"${ac_cv_c_celibconfig}" = x ; then 7632 { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5 7633 echo "$as_me: error: Cannot find celib support library directory" >&2;} 7634 { (exit 1); exit 1; }; } 2344 7635 else 2345 no_tcl= 2346 TCL_BIN_DIR=${ac_cv_c_tclconfig} 2347 echo "$as_me:$LINENO: result: found $TCL_BIN_DIR/tclConfig.sh" >&5 2348 echo "${ECHO_T}found $TCL_BIN_DIR/tclConfig.sh" >&6 7636 no_celib= 7637 CELIB_DIR=${ac_cv_c_celibconfig} 7638 CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` 7639 echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5 7640 echo "${ECHO_T}found $CELIB_DIR" >&6 2349 7641 fi 2350 7642 fi 2351 7643 2352 2353 echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 2354 echo $ECHO_N "checking for existence of $TCL_BIN_DIR/tclConfig.sh... $ECHO_C" >&6 2355 2356 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then 2357 echo "$as_me:$LINENO: result: loading" >&5 2358 echo "${ECHO_T}loading" >&6 2359 . $TCL_BIN_DIR/tclConfig.sh 7644 # Set defaults for common evc4/PPC2003 setup 7645 # Currently Tcl requires 300+, possibly 420+ for sockets 7646 CEVERSION=420; # could be 211 300 301 400 420 ... 7647 TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... 7648 ARCH=ARM; # could be ARM MIPS X86EM ... 7649 PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" 7650 if test "$doWince" != "yes"; then 7651 # If !yes then the user specified something 7652 # Reset ARCH to allow user to skip specifying it 7653 ARCH= 7654 eval `echo $doWince | awk -F, '{ \ 7655 if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \ 7656 if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ 7657 if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \ 7658 if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \ 7659 if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \ 7660 }'` 7661 if test "x${ARCH}" = "x" ; then 7662 ARCH=$TARGETCPU; 7663 fi 7664 fi 7665 OSVERSION=WCE$CEVERSION; 7666 if test "x${WCEROOT}" = "x" ; then 7667 WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" 7668 if test ! -d "${WCEROOT}" ; then 7669 WCEROOT="C:/Program Files/Microsoft eMbedded Tools" 7670 fi 7671 fi 7672 if test "x${SDKROOT}" = "x" ; then 7673 SDKROOT="C:/Program Files/Windows CE Tools" 7674 if test ! -d "${SDKROOT}" ; then 7675 SDKROOT="C:/Windows CE Tools" 7676 fi 7677 fi 7678 WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` 7679 SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` 7680 if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ 7681 -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then 7682 { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5 7683 echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;} 7684 { (exit 1); exit 1; }; } 7685 doWince="no" 7686 else 7687 # We could PATH_NOSPACE these, but that's not important, 7688 # as long as we quote them when used. 7689 CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" 7690 if test -d "${CEINCLUDE}/${TARGETCPU}" ; then 7691 CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" 7692 fi 7693 CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" 7694 fi 7695 fi 7696 7697 if test "$GCC" != "yes" ; then 7698 if test "${SHARED_BUILD}" = "0" ; then 7699 runtime=-MT 7700 else 7701 runtime=-MD 7702 fi 7703 7704 if test "$do64bit" != "no" ; then 7705 # All this magic is necessary for the Win64 SDK RC1 - hobbs 7706 CC="\"${PATH64}/cl.exe\"" 7707 CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" 7708 RC="\"${MSSDK}/bin/rc.exe\"" 7709 lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" 7710 LINKBIN="\"${PATH64}/link.exe\"" 7711 CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" 7712 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" 7713 # Avoid 'unresolved external symbol __security_cookie' 7714 # errors, c.f. http://support.microsoft.com/?id=894573 7715 7716 vars="bufferoverflowU.lib" 7717 for i in $vars; do 7718 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then 7719 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib 7720 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` 7721 fi 7722 PKG_LIBS="$PKG_LIBS $i" 7723 done 7724 7725 7726 elif test "$doWince" != "no" ; then 7727 CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" 7728 if test "${TARGETCPU}" = "X86"; then 7729 CC="\"${CEBINROOT}/cl.exe\"" 7730 else 7731 CC="\"${CEBINROOT}/cl${ARCH}.exe\"" 7732 fi 7733 CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" 7734 RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" 7735 arch=`echo ${ARCH} | awk '{print tolower($0)}'` 7736 defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS" 7737 if test "${SHARED_BUILD}" = "1" ; then 7738 # Static CE builds require static celib as well 7739 defs="${defs} _DLL" 7740 fi 7741 for i in $defs ; do 7742 7743 cat >>confdefs.h <<_ACEOF 7744 #define $i 1 7745 _ACEOF 7746 7747 done 7748 7749 cat >>confdefs.h <<_ACEOF 7750 #define _WIN32_WCE $CEVERSION 7751 _ACEOF 7752 7753 7754 cat >>confdefs.h <<_ACEOF 7755 #define UNDER_CE $CEVERSION 7756 _ACEOF 7757 7758 CFLAGS_DEBUG="-nologo -Zi -Od" 7759 CFLAGS_OPTIMIZE="-nologo -Ox" 7760 lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` 7761 lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" 7762 LINKBIN="\"${CEBINROOT}/link.exe\"" 7763 7764 else 7765 RC="rc" 7766 lflags="-nologo" 7767 LINKBIN="link" 7768 CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" 7769 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" 7770 fi 7771 fi 7772 7773 if test "$GCC" = "yes"; then 7774 # mingw gcc mode 7775 RC="windres" 7776 CFLAGS_DEBUG="-g" 7777 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" 7778 SHLIB_LD="$CC -shared" 7779 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 7780 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" 7781 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" 7782 else 7783 SHLIB_LD="${LINKBIN} -dll ${lflags}" 7784 # link -lib only works when -lib is the first arg 7785 STLIB_LD="${LINKBIN} -lib ${lflags}" 7786 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' 7787 PATHTYPE=-w 7788 # For information on what debugtype is most useful, see: 7789 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp 7790 # This essentially turns it all on. 7791 LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2" 7792 LDFLAGS_OPTIMIZE="-release" 7793 if test "$doWince" != "no" ; then 7794 LDFLAGS_CONSOLE="-link ${lflags}" 7795 LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} 7796 else 7797 LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" 7798 LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" 7799 fi 7800 fi 7801 7802 SHLIB_LD_LIBS='${LIBS}' 7803 SHLIB_SUFFIX=".dll" 7804 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' 7805 7806 TCL_LIB_VERSIONS_OK=nodots 7807 # Bogus to avoid getting this turned off 7808 DL_OBJS="tclLoadNone.obj" 7809 ;; 7810 AIX-*) 7811 if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then 7812 # AIX requires the _r compiler when gcc isn't being used 7813 case "${CC}" in 7814 *_r) 7815 # ok ... 7816 ;; 7817 *) 7818 CC=${CC}_r 7819 ;; 7820 esac 7821 echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 7822 echo "${ECHO_T}Using $CC for compiling with threads" >&6 7823 fi 7824 LIBS="$LIBS -lc" 7825 SHLIB_CFLAGS="" 7826 SHLIB_LD_LIBS='${LIBS}' 7827 SHLIB_SUFFIX=".so" 7828 7829 DL_OBJS="tclLoadDl.o" 7830 LD_LIBRARY_PATH_VAR="LIBPATH" 7831 7832 # Check to enable 64-bit flags for compiler/linker on AIX 4+ 7833 if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then 7834 if test "$GCC" = "yes" ; then 7835 { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 7836 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} 7837 else 7838 do64bit_ok=yes 7839 CFLAGS="$CFLAGS -q64" 7840 LDFLAGS_ARCH="-q64" 7841 RANLIB="${RANLIB} -X64" 7842 AR="${AR} -X64" 7843 SHLIB_LD_FLAGS="-b64" 7844 fi 7845 fi 7846 7847 if test "`uname -m`" = "ia64" ; then 7848 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC 7849 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 7850 # AIX-5 has dl* in libc.so 7851 DL_LIBS="" 7852 if test "$GCC" = "yes" ; then 7853 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 7854 else 7855 CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' 7856 fi 7857 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 7858 else 7859 if test "$GCC" = "yes" ; then 7860 SHLIB_LD="gcc -shared" 7861 else 7862 SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" 7863 fi 7864 SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" 7865 DL_LIBS="-ldl" 7866 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 7867 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 7868 TCL_NEEDS_EXP_FILE=1 7869 TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp' 7870 fi 7871 7872 # AIX v<=4.1 has some different flags than 4.2+ 7873 if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then 7874 case $LIBOBJS in 7875 "tclLoadAix.$ac_objext" | \ 7876 *" tclLoadAix.$ac_objext" | \ 7877 "tclLoadAix.$ac_objext "* | \ 7878 *" tclLoadAix.$ac_objext "* ) ;; 7879 *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; 7880 esac 7881 7882 DL_LIBS="-lld" 7883 fi 7884 7885 # On AIX <=v4 systems, libbsd.a has to be linked in to support 7886 # non-blocking file IO. This library has to be linked in after 7887 # the MATH_LIBS or it breaks the pow() function. The way to 7888 # insure proper sequencing, is to add it to the tail of MATH_LIBS. 7889 # This library also supplies gettimeofday. 7890 # 7891 # AIX does not have a timezone field in struct tm. When the AIX 7892 # bsd library is used, the timezone global and the gettimeofday 7893 # methods are to be avoided for timezone deduction instead, we 7894 # deduce the timezone by comparing the localtime result on a 7895 # known GMT value. 7896 7897 echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 7898 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 7899 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then 7900 echo $ECHO_N "(cached) $ECHO_C" >&6 7901 else 7902 ac_check_lib_save_LIBS=$LIBS 7903 LIBS="-lbsd $LIBS" 7904 cat >conftest.$ac_ext <<_ACEOF 7905 /* confdefs.h. */ 7906 _ACEOF 7907 cat confdefs.h >>conftest.$ac_ext 7908 cat >>conftest.$ac_ext <<_ACEOF 7909 /* end confdefs.h. */ 7910 7911 /* Override any gcc2 internal prototype to avoid an error. */ 7912 #ifdef __cplusplus 7913 extern "C" 7914 #endif 7915 /* We use char because int might match the return type of a gcc2 7916 builtin and then its argument prototype would still apply. */ 7917 char gettimeofday (); 7918 int 7919 main () 7920 { 7921 gettimeofday (); 7922 ; 7923 return 0; 7924 } 7925 _ACEOF 7926 rm -f conftest.$ac_objext conftest$ac_exeext 7927 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7928 (eval $ac_link) 2>conftest.er1 7929 ac_status=$? 7930 grep -v '^ *+' conftest.er1 >conftest.err 7931 rm -f conftest.er1 7932 cat conftest.err >&5 7933 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7934 (exit $ac_status); } && 7935 { ac_try='test -z "$ac_c_werror_flag" 7936 || test ! -s conftest.err' 7937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7938 (eval $ac_try) 2>&5 7939 ac_status=$? 7940 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7941 (exit $ac_status); }; } && 7942 { ac_try='test -s conftest$ac_exeext' 7943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7944 (eval $ac_try) 2>&5 7945 ac_status=$? 7946 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7947 (exit $ac_status); }; }; then 7948 ac_cv_lib_bsd_gettimeofday=yes 7949 else 7950 echo "$as_me: failed program was:" >&5 7951 sed 's/^/| /' conftest.$ac_ext >&5 7952 7953 ac_cv_lib_bsd_gettimeofday=no 7954 fi 7955 rm -f conftest.err conftest.$ac_objext \ 7956 conftest$ac_exeext conftest.$ac_ext 7957 LIBS=$ac_check_lib_save_LIBS 7958 fi 7959 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 7960 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 7961 if test $ac_cv_lib_bsd_gettimeofday = yes; then 7962 libbsd=yes 7963 else 7964 libbsd=no 7965 fi 7966 7967 if test $libbsd = yes; then 7968 MATH_LIBS="$MATH_LIBS -lbsd" 7969 7970 cat >>confdefs.h <<\_ACEOF 7971 #define USE_DELTA_FOR_TZ 1 7972 _ACEOF 7973 7974 fi 7975 ;; 7976 BeOS*) 7977 SHLIB_CFLAGS="-fPIC" 7978 SHLIB_LD="${CC} -nostart" 7979 SHLIB_LD_LIBS='${LIBS}' 7980 SHLIB_SUFFIX=".so" 7981 DL_OBJS="tclLoadDl.o" 7982 DL_LIBS="-ldl" 7983 7984 #----------------------------------------------------------- 7985 # Check for inet_ntoa in -lbind, for BeOS (which also needs 7986 # -lsocket, even if the network functions are in -lnet which 7987 # is always linked to, for compatibility. 7988 #----------------------------------------------------------- 7989 echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 7990 echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 7991 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then 7992 echo $ECHO_N "(cached) $ECHO_C" >&6 7993 else 7994 ac_check_lib_save_LIBS=$LIBS 7995 LIBS="-lbind $LIBS" 7996 cat >conftest.$ac_ext <<_ACEOF 7997 /* confdefs.h. */ 7998 _ACEOF 7999 cat confdefs.h >>conftest.$ac_ext 8000 cat >>conftest.$ac_ext <<_ACEOF 8001 /* end confdefs.h. */ 8002 8003 /* Override any gcc2 internal prototype to avoid an error. */ 8004 #ifdef __cplusplus 8005 extern "C" 8006 #endif 8007 /* We use char because int might match the return type of a gcc2 8008 builtin and then its argument prototype would still apply. */ 8009 char inet_ntoa (); 8010 int 8011 main () 8012 { 8013 inet_ntoa (); 8014 ; 8015 return 0; 8016 } 8017 _ACEOF 8018 rm -f conftest.$ac_objext conftest$ac_exeext 8019 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8020 (eval $ac_link) 2>conftest.er1 8021 ac_status=$? 8022 grep -v '^ *+' conftest.er1 >conftest.err 8023 rm -f conftest.er1 8024 cat conftest.err >&5 8025 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8026 (exit $ac_status); } && 8027 { ac_try='test -z "$ac_c_werror_flag" 8028 || test ! -s conftest.err' 8029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8030 (eval $ac_try) 2>&5 8031 ac_status=$? 8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8033 (exit $ac_status); }; } && 8034 { ac_try='test -s conftest$ac_exeext' 8035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8036 (eval $ac_try) 2>&5 8037 ac_status=$? 8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8039 (exit $ac_status); }; }; then 8040 ac_cv_lib_bind_inet_ntoa=yes 8041 else 8042 echo "$as_me: failed program was:" >&5 8043 sed 's/^/| /' conftest.$ac_ext >&5 8044 8045 ac_cv_lib_bind_inet_ntoa=no 8046 fi 8047 rm -f conftest.err conftest.$ac_objext \ 8048 conftest$ac_exeext conftest.$ac_ext 8049 LIBS=$ac_check_lib_save_LIBS 8050 fi 8051 echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 8052 echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 8053 if test $ac_cv_lib_bind_inet_ntoa = yes; then 8054 LIBS="$LIBS -lbind -lsocket" 8055 fi 8056 8057 ;; 8058 BSD/OS-2.1*|BSD/OS-3*) 8059 SHLIB_CFLAGS="" 8060 SHLIB_LD="shlicc -r" 8061 SHLIB_LD_LIBS='${LIBS}' 8062 SHLIB_SUFFIX=".so" 8063 DL_OBJS="tclLoadDl.o" 8064 DL_LIBS="-ldl" 8065 CC_SEARCH_FLAGS="" 8066 LD_SEARCH_FLAGS="" 8067 ;; 8068 BSD/OS-4.*) 8069 SHLIB_CFLAGS="-export-dynamic -fPIC" 8070 SHLIB_LD="cc -shared" 8071 SHLIB_LD_LIBS='${LIBS}' 8072 SHLIB_SUFFIX=".so" 8073 DL_OBJS="tclLoadDl.o" 8074 DL_LIBS="-ldl" 8075 LDFLAGS="$LDFLAGS -export-dynamic" 8076 CC_SEARCH_FLAGS="" 8077 LD_SEARCH_FLAGS="" 8078 ;; 8079 dgux*) 8080 SHLIB_CFLAGS="-K PIC" 8081 SHLIB_LD="cc -G" 8082 SHLIB_LD_LIBS="" 8083 SHLIB_SUFFIX=".so" 8084 DL_OBJS="tclLoadDl.o" 8085 DL_LIBS="-ldl" 8086 CC_SEARCH_FLAGS="" 8087 LD_SEARCH_FLAGS="" 8088 ;; 8089 HP-UX-*.11.*) 8090 # Use updated header definitions where possible 8091 8092 cat >>confdefs.h <<\_ACEOF 8093 #define _XOPEN_SOURCE_EXTENDED 1 8094 _ACEOF 8095 8096 # Needed by Tcl, but not most extensions 8097 #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?]) 8098 #LIBS="$LIBS -lxnet" # Use the XOPEN network library 8099 8100 SHLIB_SUFFIX=".sl" 8101 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 8102 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 8103 if test "${ac_cv_lib_dld_shl_load+set}" = set; then 8104 echo $ECHO_N "(cached) $ECHO_C" >&6 8105 else 8106 ac_check_lib_save_LIBS=$LIBS 8107 LIBS="-ldld $LIBS" 8108 cat >conftest.$ac_ext <<_ACEOF 8109 /* confdefs.h. */ 8110 _ACEOF 8111 cat confdefs.h >>conftest.$ac_ext 8112 cat >>conftest.$ac_ext <<_ACEOF 8113 /* end confdefs.h. */ 8114 8115 /* Override any gcc2 internal prototype to avoid an error. */ 8116 #ifdef __cplusplus 8117 extern "C" 8118 #endif 8119 /* We use char because int might match the return type of a gcc2 8120 builtin and then its argument prototype would still apply. */ 8121 char shl_load (); 8122 int 8123 main () 8124 { 8125 shl_load (); 8126 ; 8127 return 0; 8128 } 8129 _ACEOF 8130 rm -f conftest.$ac_objext conftest$ac_exeext 8131 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8132 (eval $ac_link) 2>conftest.er1 8133 ac_status=$? 8134 grep -v '^ *+' conftest.er1 >conftest.err 8135 rm -f conftest.er1 8136 cat conftest.err >&5 8137 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8138 (exit $ac_status); } && 8139 { ac_try='test -z "$ac_c_werror_flag" 8140 || test ! -s conftest.err' 8141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8142 (eval $ac_try) 2>&5 8143 ac_status=$? 8144 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8145 (exit $ac_status); }; } && 8146 { ac_try='test -s conftest$ac_exeext' 8147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8148 (eval $ac_try) 2>&5 8149 ac_status=$? 8150 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8151 (exit $ac_status); }; }; then 8152 ac_cv_lib_dld_shl_load=yes 8153 else 8154 echo "$as_me: failed program was:" >&5 8155 sed 's/^/| /' conftest.$ac_ext >&5 8156 8157 ac_cv_lib_dld_shl_load=no 8158 fi 8159 rm -f conftest.err conftest.$ac_objext \ 8160 conftest$ac_exeext conftest.$ac_ext 8161 LIBS=$ac_check_lib_save_LIBS 8162 fi 8163 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 8164 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 8165 if test $ac_cv_lib_dld_shl_load = yes; then 8166 tcl_ok=yes 8167 else 8168 tcl_ok=no 8169 fi 8170 8171 if test "$tcl_ok" = yes; then 8172 SHLIB_CFLAGS="+z" 8173 SHLIB_LD="ld -b" 8174 SHLIB_LD_LIBS='${LIBS}' 8175 DL_OBJS="tclLoadShl.o" 8176 DL_LIBS="-ldld" 8177 LDFLAGS="$LDFLAGS -Wl,-E" 8178 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' 8179 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' 8180 LD_LIBRARY_PATH_VAR="SHLIB_PATH" 8181 fi 8182 if test "$GCC" = "yes" ; then 8183 SHLIB_LD="gcc -shared" 8184 SHLIB_LD_LIBS='${LIBS}' 8185 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 8186 fi 8187 8188 # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc 8189 #CFLAGS="$CFLAGS +DAportable" 8190 8191 # Check to enable 64-bit flags for compiler/linker 8192 if test "$do64bit" = "yes" ; then 8193 if test "$GCC" = "yes" ; then 8194 hpux_arch=`${CC} -dumpmachine` 8195 case $hpux_arch in 8196 hppa64*) 8197 # 64-bit gcc in use. Fix flags for GNU ld. 8198 do64bit_ok=yes 8199 SHLIB_LD="${CC} -shared" 8200 SHLIB_LD_LIBS='${LIBS}' 8201 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8202 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 8203 ;; 8204 *) 8205 { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 8206 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} 8207 ;; 8208 esac 8209 else 8210 do64bit_ok=yes 8211 CFLAGS="$CFLAGS +DD64" 8212 LDFLAGS_ARCH="+DD64" 8213 fi 8214 fi 8215 ;; 8216 HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) 8217 SHLIB_SUFFIX=".sl" 8218 echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 8219 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 8220 if test "${ac_cv_lib_dld_shl_load+set}" = set; then 8221 echo $ECHO_N "(cached) $ECHO_C" >&6 8222 else 8223 ac_check_lib_save_LIBS=$LIBS 8224 LIBS="-ldld $LIBS" 8225 cat >conftest.$ac_ext <<_ACEOF 8226 /* confdefs.h. */ 8227 _ACEOF 8228 cat confdefs.h >>conftest.$ac_ext 8229 cat >>conftest.$ac_ext <<_ACEOF 8230 /* end confdefs.h. */ 8231 8232 /* Override any gcc2 internal prototype to avoid an error. */ 8233 #ifdef __cplusplus 8234 extern "C" 8235 #endif 8236 /* We use char because int might match the return type of a gcc2 8237 builtin and then its argument prototype would still apply. */ 8238 char shl_load (); 8239 int 8240 main () 8241 { 8242 shl_load (); 8243 ; 8244 return 0; 8245 } 8246 _ACEOF 8247 rm -f conftest.$ac_objext conftest$ac_exeext 8248 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8249 (eval $ac_link) 2>conftest.er1 8250 ac_status=$? 8251 grep -v '^ *+' conftest.er1 >conftest.err 8252 rm -f conftest.er1 8253 cat conftest.err >&5 8254 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8255 (exit $ac_status); } && 8256 { ac_try='test -z "$ac_c_werror_flag" 8257 || test ! -s conftest.err' 8258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8259 (eval $ac_try) 2>&5 8260 ac_status=$? 8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8262 (exit $ac_status); }; } && 8263 { ac_try='test -s conftest$ac_exeext' 8264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8265 (eval $ac_try) 2>&5 8266 ac_status=$? 8267 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8268 (exit $ac_status); }; }; then 8269 ac_cv_lib_dld_shl_load=yes 8270 else 8271 echo "$as_me: failed program was:" >&5 8272 sed 's/^/| /' conftest.$ac_ext >&5 8273 8274 ac_cv_lib_dld_shl_load=no 8275 fi 8276 rm -f conftest.err conftest.$ac_objext \ 8277 conftest$ac_exeext conftest.$ac_ext 8278 LIBS=$ac_check_lib_save_LIBS 8279 fi 8280 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 8281 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 8282 if test $ac_cv_lib_dld_shl_load = yes; then 8283 tcl_ok=yes 8284 else 8285 tcl_ok=no 8286 fi 8287 8288 if test "$tcl_ok" = yes; then 8289 SHLIB_CFLAGS="+z" 8290 SHLIB_LD="ld -b" 8291 SHLIB_LD_LIBS="" 8292 DL_OBJS="tclLoadShl.o" 8293 DL_LIBS="-ldld" 8294 LDFLAGS="$LDFLAGS -Wl,-E" 8295 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' 8296 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' 8297 LD_LIBRARY_PATH_VAR="SHLIB_PATH" 8298 fi 8299 ;; 8300 IRIX-5.*) 8301 SHLIB_CFLAGS="" 8302 SHLIB_LD="ld -shared -rdata_shared" 8303 SHLIB_LD_LIBS='${LIBS}' 8304 SHLIB_SUFFIX=".so" 8305 DL_OBJS="tclLoadDl.o" 8306 DL_LIBS="" 8307 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8308 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 8309 ;; 8310 IRIX-6.*) 8311 SHLIB_CFLAGS="" 8312 SHLIB_LD="ld -n32 -shared -rdata_shared" 8313 SHLIB_LD_LIBS='${LIBS}' 8314 SHLIB_SUFFIX=".so" 8315 DL_OBJS="tclLoadDl.o" 8316 DL_LIBS="" 8317 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8318 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 8319 if test "$GCC" = "yes" ; then 8320 CFLAGS="$CFLAGS -mabi=n32" 8321 LDFLAGS="$LDFLAGS -mabi=n32" 8322 else 8323 case $system in 8324 IRIX-6.3) 8325 # Use to build 6.2 compatible binaries on 6.3. 8326 CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" 8327 ;; 8328 *) 8329 CFLAGS="$CFLAGS -n32" 8330 ;; 8331 esac 8332 LDFLAGS="$LDFLAGS -n32" 8333 fi 8334 ;; 8335 IRIX64-6.*) 8336 SHLIB_CFLAGS="" 8337 SHLIB_LD="ld -n32 -shared -rdata_shared" 8338 SHLIB_LD_LIBS='${LIBS}' 8339 SHLIB_SUFFIX=".so" 8340 DL_OBJS="tclLoadDl.o" 8341 DL_LIBS="" 8342 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8343 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 8344 8345 # Check to enable 64-bit flags for compiler/linker 8346 8347 if test "$do64bit" = "yes" ; then 8348 if test "$GCC" = "yes" ; then 8349 { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5 8350 echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} 8351 else 8352 do64bit_ok=yes 8353 SHLIB_LD="ld -64 -shared -rdata_shared" 8354 CFLAGS="$CFLAGS -64" 8355 LDFLAGS_ARCH="-64" 8356 fi 8357 fi 8358 ;; 8359 Linux*) 8360 SHLIB_CFLAGS="-fPIC" 8361 SHLIB_LD_LIBS='${LIBS}' 8362 SHLIB_SUFFIX=".so" 8363 8364 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" 8365 # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 8366 # when you inline the string and math operations. Turn this off to 8367 # get rid of the warnings. 8368 #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" 8369 8370 SHLIB_LD="${CC} -shared" 8371 DL_OBJS="tclLoadDl.o" 8372 DL_LIBS="-ldl" 8373 LDFLAGS="$LDFLAGS -Wl,--export-dynamic" 8374 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8375 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 8376 if test "`uname -m`" = "alpha" ; then 8377 CFLAGS="$CFLAGS -mieee" 8378 fi 8379 8380 # The combo of gcc + glibc has a bug related 8381 # to inlining of functions like strtod(). The 8382 # -fno-builtin flag should address this problem 8383 # but it does not work. The -fno-inline flag 8384 # is kind of overkill but it works. 8385 # Disable inlining only when one of the 8386 # files in compat/*.c is being linked in. 8387 if test x"${USE_COMPAT}" != x ; then 8388 CFLAGS="$CFLAGS -fno-inline" 8389 fi 8390 8391 ;; 8392 GNU*) 8393 SHLIB_CFLAGS="-fPIC" 8394 SHLIB_LD_LIBS='${LIBS}' 8395 SHLIB_SUFFIX=".so" 8396 8397 SHLIB_LD="${CC} -shared" 8398 DL_OBJS="" 8399 DL_LIBS="-ldl" 8400 LDFLAGS="$LDFLAGS -Wl,--export-dynamic" 8401 CC_SEARCH_FLAGS="" 8402 LD_SEARCH_FLAGS="" 8403 if test "`uname -m`" = "alpha" ; then 8404 CFLAGS="$CFLAGS -mieee" 8405 fi 8406 ;; 8407 Lynx*) 8408 SHLIB_CFLAGS="-fPIC" 8409 SHLIB_LD_LIBS='${LIBS}' 8410 SHLIB_SUFFIX=".so" 8411 CFLAGS_OPTIMIZE=-02 8412 SHLIB_LD="${CC} -shared " 8413 DL_OBJS="tclLoadDl.o" 8414 DL_LIBS="-mshared -ldl" 8415 LD_FLAGS="-Wl,--export-dynamic" 8416 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8417 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8418 ;; 8419 MP-RAS-02*) 8420 SHLIB_CFLAGS="-K PIC" 8421 SHLIB_LD="cc -G" 8422 SHLIB_LD_LIBS="" 8423 SHLIB_SUFFIX=".so" 8424 DL_OBJS="tclLoadDl.o" 8425 DL_LIBS="-ldl" 8426 CC_SEARCH_FLAGS="" 8427 LD_SEARCH_FLAGS="" 8428 ;; 8429 MP-RAS-*) 8430 SHLIB_CFLAGS="-K PIC" 8431 SHLIB_LD="cc -G" 8432 SHLIB_LD_LIBS="" 8433 SHLIB_SUFFIX=".so" 8434 DL_OBJS="tclLoadDl.o" 8435 DL_LIBS="-ldl" 8436 LDFLAGS="$LDFLAGS -Wl,-Bexport" 8437 CC_SEARCH_FLAGS="" 8438 LD_SEARCH_FLAGS="" 8439 ;; 8440 NetBSD-*|FreeBSD-[1-2].*) 8441 # NetBSD/SPARC needs -fPIC, -fpic will not do. 8442 SHLIB_CFLAGS="-fPIC" 8443 SHLIB_LD="ld -Bshareable -x" 8444 SHLIB_LD_LIBS='${LIBS}' 8445 SHLIB_SUFFIX=".so" 8446 DL_OBJS="tclLoadDl.o" 8447 DL_LIBS="" 8448 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8449 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 8450 echo "$as_me:$LINENO: checking for ELF" >&5 8451 echo $ECHO_N "checking for ELF... $ECHO_C" >&6 8452 if test "${tcl_cv_ld_elf+set}" = set; then 8453 echo $ECHO_N "(cached) $ECHO_C" >&6 8454 else 8455 8456 cat >conftest.$ac_ext <<_ACEOF 8457 /* confdefs.h. */ 8458 _ACEOF 8459 cat confdefs.h >>conftest.$ac_ext 8460 cat >>conftest.$ac_ext <<_ACEOF 8461 /* end confdefs.h. */ 8462 8463 #ifdef __ELF__ 8464 yes 8465 #endif 8466 8467 _ACEOF 8468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8469 $EGREP "yes" >/dev/null 2>&1; then 8470 tcl_cv_ld_elf=yes 8471 else 8472 tcl_cv_ld_elf=no 8473 fi 8474 rm -f conftest* 8475 8476 fi 8477 echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 8478 echo "${ECHO_T}$tcl_cv_ld_elf" >&6 8479 if test $tcl_cv_ld_elf = yes; then 8480 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' 8481 else 8482 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' 8483 fi 8484 8485 # Ancient FreeBSD doesn't handle version numbers with dots. 8486 8487 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 8488 TCL_LIB_VERSIONS_OK=nodots 8489 ;; 8490 OpenBSD-*) 8491 # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do. 8492 case `machine` in 8493 sparc|sparc64) 8494 SHLIB_CFLAGS="-fPIC";; 8495 *) 8496 SHLIB_CFLAGS="-fpic";; 8497 esac 8498 SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" 8499 SHLIB_LD_LIBS='${LIBS}' 8500 SHLIB_SUFFIX=".so" 8501 DL_OBJS="tclLoadDl.o" 8502 DL_LIBS="" 8503 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8504 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 8505 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' 8506 echo "$as_me:$LINENO: checking for ELF" >&5 8507 echo $ECHO_N "checking for ELF... $ECHO_C" >&6 8508 if test "${tcl_cv_ld_elf+set}" = set; then 8509 echo $ECHO_N "(cached) $ECHO_C" >&6 8510 else 8511 8512 cat >conftest.$ac_ext <<_ACEOF 8513 /* confdefs.h. */ 8514 _ACEOF 8515 cat confdefs.h >>conftest.$ac_ext 8516 cat >>conftest.$ac_ext <<_ACEOF 8517 /* end confdefs.h. */ 8518 8519 #ifdef __ELF__ 8520 yes 8521 #endif 8522 8523 _ACEOF 8524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8525 $EGREP "yes" >/dev/null 2>&1; then 8526 tcl_cv_ld_elf=yes 8527 else 8528 tcl_cv_ld_elf=no 8529 fi 8530 rm -f conftest* 8531 8532 fi 8533 echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 8534 echo "${ECHO_T}$tcl_cv_ld_elf" >&6 8535 if test $tcl_cv_ld_elf = yes; then 8536 LDFLAGS=-Wl,-export-dynamic 8537 else 8538 LDFLAGS="" 8539 fi 8540 8541 # OpenBSD doesn't do version numbers with dots. 8542 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 8543 TCL_LIB_VERSIONS_OK=nodots 8544 ;; 8545 FreeBSD-*) 8546 # FreeBSD 3.* and greater have ELF. 8547 SHLIB_CFLAGS="-fPIC" 8548 SHLIB_LD="ld -Bshareable -x" 8549 SHLIB_LD_LIBS='${LIBS}' 8550 SHLIB_SUFFIX=".so" 8551 DL_OBJS="tclLoadDl.o" 8552 DL_LIBS="" 8553 LDFLAGS="$LDFLAGS -export-dynamic" 8554 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8555 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 8556 if test "${TCL_THREADS}" = "1" ; then 8557 # The -pthread needs to go in the CFLAGS, not LIBS 8558 LIBS=`echo $LIBS | sed s/-pthread//` 8559 CFLAGS="$CFLAGS -pthread" 8560 LDFLAGS="$LDFLAGS -pthread" 8561 fi 8562 case $system in 8563 FreeBSD-3.*) 8564 # FreeBSD-3 doesn't handle version numbers with dots. 8565 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 8566 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' 8567 TCL_LIB_VERSIONS_OK=nodots 8568 ;; 8569 esac 8570 ;; 8571 Darwin-*) 8572 CFLAGS_OPTIMIZE="-Os" 8573 SHLIB_CFLAGS="-fno-common" 8574 if test $do64bit = yes; then 8575 do64bit_ok=yes 8576 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" 8577 fi 8578 # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here: 8579 SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' 8580 echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 8581 echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 8582 if test "${tcl_cv_ld_single_module+set}" = set; then 8583 echo $ECHO_N "(cached) $ECHO_C" >&6 8584 else 8585 8586 hold_ldflags=$LDFLAGS 8587 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" 8588 cat >conftest.$ac_ext <<_ACEOF 8589 /* confdefs.h. */ 8590 _ACEOF 8591 cat confdefs.h >>conftest.$ac_ext 8592 cat >>conftest.$ac_ext <<_ACEOF 8593 /* end confdefs.h. */ 8594 8595 int 8596 main () 8597 { 8598 int i; 8599 ; 8600 return 0; 8601 } 8602 _ACEOF 8603 rm -f conftest.$ac_objext conftest$ac_exeext 8604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8605 (eval $ac_link) 2>conftest.er1 8606 ac_status=$? 8607 grep -v '^ *+' conftest.er1 >conftest.err 8608 rm -f conftest.er1 8609 cat conftest.err >&5 8610 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8611 (exit $ac_status); } && 8612 { ac_try='test -z "$ac_c_werror_flag" 8613 || test ! -s conftest.err' 8614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8615 (eval $ac_try) 2>&5 8616 ac_status=$? 8617 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8618 (exit $ac_status); }; } && 8619 { ac_try='test -s conftest$ac_exeext' 8620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8621 (eval $ac_try) 2>&5 8622 ac_status=$? 8623 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8624 (exit $ac_status); }; }; then 8625 tcl_cv_ld_single_module=yes 8626 else 8627 echo "$as_me: failed program was:" >&5 8628 sed 's/^/| /' conftest.$ac_ext >&5 8629 8630 tcl_cv_ld_single_module=no 8631 fi 8632 rm -f conftest.err conftest.$ac_objext \ 8633 conftest$ac_exeext conftest.$ac_ext 8634 LDFLAGS=$hold_ldflags 8635 fi 8636 echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 8637 echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 8638 if test $tcl_cv_ld_single_module = yes; then 8639 SHLIB_LD="${SHLIB_LD} -Wl,-single_module" 8640 fi 8641 SHLIB_LD_LIBS='${LIBS}' 8642 SHLIB_SUFFIX=".dylib" 8643 DL_OBJS="tclLoadDyld.o" 8644 DL_LIBS="" 8645 # Don't use -prebind when building for Mac OS X 10.4 or later only: 8646 test -z "${MACOSX_DEPLOYMENT_TARGET}" || \ 8647 test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print $2}'`" -lt 4 && \ 8648 LDFLAGS="$LDFLAGS -prebind" 8649 LDFLAGS="$LDFLAGS -headerpad_max_install_names" 8650 echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 8651 echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 8652 if test "${tcl_cv_ld_search_paths_first+set}" = set; then 8653 echo $ECHO_N "(cached) $ECHO_C" >&6 8654 else 8655 8656 hold_ldflags=$LDFLAGS 8657 LDFLAGS="$LDFLAGS -Wl,-search_paths_first" 8658 cat >conftest.$ac_ext <<_ACEOF 8659 /* confdefs.h. */ 8660 _ACEOF 8661 cat confdefs.h >>conftest.$ac_ext 8662 cat >>conftest.$ac_ext <<_ACEOF 8663 /* end confdefs.h. */ 8664 8665 int 8666 main () 8667 { 8668 int i; 8669 ; 8670 return 0; 8671 } 8672 _ACEOF 8673 rm -f conftest.$ac_objext conftest$ac_exeext 8674 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8675 (eval $ac_link) 2>conftest.er1 8676 ac_status=$? 8677 grep -v '^ *+' conftest.er1 >conftest.err 8678 rm -f conftest.er1 8679 cat conftest.err >&5 8680 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8681 (exit $ac_status); } && 8682 { ac_try='test -z "$ac_c_werror_flag" 8683 || test ! -s conftest.err' 8684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8685 (eval $ac_try) 2>&5 8686 ac_status=$? 8687 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8688 (exit $ac_status); }; } && 8689 { ac_try='test -s conftest$ac_exeext' 8690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8691 (eval $ac_try) 2>&5 8692 ac_status=$? 8693 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8694 (exit $ac_status); }; }; then 8695 tcl_cv_ld_search_paths_first=yes 8696 else 8697 echo "$as_me: failed program was:" >&5 8698 sed 's/^/| /' conftest.$ac_ext >&5 8699 8700 tcl_cv_ld_search_paths_first=no 8701 fi 8702 rm -f conftest.err conftest.$ac_objext \ 8703 conftest$ac_exeext conftest.$ac_ext 8704 LDFLAGS=$hold_ldflags 8705 fi 8706 echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 8707 echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 8708 if test $tcl_cv_ld_search_paths_first = yes; then 8709 LDFLAGS="$LDFLAGS -Wl,-search_paths_first" 8710 fi 8711 CC_SEARCH_FLAGS="" 8712 LD_SEARCH_FLAGS="" 8713 LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" 8714 8715 # TEA specific: for Tk extensions, remove -arch ppc64 from CFLAGS 8716 # for fat builds, as neither TkAqua nor TkX11 can be built for 64bit 8717 # at present (no 64bit GUI libraries). 8718 test $do64bit_ok = no && test -n "${TK_BIN_DIR}" && \ 8719 CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`" 8720 ;; 8721 NEXTSTEP-*) 8722 SHLIB_CFLAGS="" 8723 SHLIB_LD="cc -nostdlib -r" 8724 SHLIB_LD_LIBS="" 8725 SHLIB_SUFFIX=".so" 8726 DL_OBJS="tclLoadNext.o" 8727 DL_LIBS="" 8728 CC_SEARCH_FLAGS="" 8729 LD_SEARCH_FLAGS="" 8730 ;; 8731 OS/390-*) 8732 CFLAGS_OPTIMIZE="" # Optimizer is buggy 8733 8734 cat >>confdefs.h <<\_ACEOF 8735 #define _OE_SOCKETS 1 8736 _ACEOF 8737 8738 ;; 8739 OSF1-1.0|OSF1-1.1|OSF1-1.2) 8740 # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 8741 SHLIB_CFLAGS="" 8742 # Hack: make package name same as library name 8743 SHLIB_LD='ld -R -export :' 8744 SHLIB_LD_LIBS="" 8745 SHLIB_SUFFIX=".so" 8746 DL_OBJS="tclLoadOSF.o" 8747 DL_LIBS="" 8748 CC_SEARCH_FLAGS="" 8749 LD_SEARCH_FLAGS="" 8750 ;; 8751 OSF1-1.*) 8752 # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 8753 SHLIB_CFLAGS="-fPIC" 8754 if test "$SHARED_BUILD" = "1" ; then 8755 SHLIB_LD="ld -shared" 8756 else 8757 SHLIB_LD="ld -non_shared" 8758 fi 8759 SHLIB_LD_LIBS="" 8760 SHLIB_SUFFIX=".so" 8761 DL_OBJS="tclLoadDl.o" 8762 DL_LIBS="" 8763 CC_SEARCH_FLAGS="" 8764 LD_SEARCH_FLAGS="" 8765 ;; 8766 OSF1-V*) 8767 # Digital OSF/1 8768 SHLIB_CFLAGS="" 8769 if test "$SHARED_BUILD" = "1" ; then 8770 SHLIB_LD='ld -shared -expect_unresolved "*"' 8771 else 8772 SHLIB_LD='ld -non_shared -expect_unresolved "*"' 8773 fi 8774 SHLIB_LD_LIBS="" 8775 SHLIB_SUFFIX=".so" 8776 DL_OBJS="tclLoadDl.o" 8777 DL_LIBS="" 8778 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 8779 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 8780 if test "$GCC" = "yes" ; then 8781 CFLAGS="$CFLAGS -mieee" 8782 else 8783 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" 8784 fi 8785 # see pthread_intro(3) for pthread support on osf1, k.furukawa 8786 if test "${TCL_THREADS}" = "1" ; then 8787 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" 8788 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" 8789 LIBS=`echo $LIBS | sed s/-lpthreads//` 8790 if test "$GCC" = "yes" ; then 8791 LIBS="$LIBS -lpthread -lmach -lexc" 8792 else 8793 CFLAGS="$CFLAGS -pthread" 8794 LDFLAGS="$LDFLAGS -pthread" 8795 fi 8796 fi 8797 8798 ;; 8799 QNX-6*) 8800 # QNX RTP 8801 # This may work for all QNX, but it was only reported for v6. 8802 SHLIB_CFLAGS="-fPIC" 8803 SHLIB_LD="ld -Bshareable -x" 8804 SHLIB_LD_LIBS="" 8805 SHLIB_SUFFIX=".so" 8806 DL_OBJS="tclLoadDl.o" 8807 # dlopen is in -lc on QNX 8808 DL_LIBS="" 8809 CC_SEARCH_FLAGS="" 8810 LD_SEARCH_FLAGS="" 8811 ;; 8812 SCO_SV-3.2*) 8813 # Note, dlopen is available only on SCO 3.2.5 and greater. However, 8814 # this test works, since "uname -s" was non-standard in 3.2.4 and 8815 # below. 8816 if test "$GCC" = "yes" ; then 8817 SHLIB_CFLAGS="-fPIC -melf" 8818 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" 8819 else 8820 SHLIB_CFLAGS="-Kpic -belf" 8821 LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" 8822 fi 8823 SHLIB_LD="ld -G" 8824 SHLIB_LD_LIBS="" 8825 SHLIB_SUFFIX=".so" 8826 DL_OBJS="tclLoadDl.o" 8827 DL_LIBS="" 8828 CC_SEARCH_FLAGS="" 8829 LD_SEARCH_FLAGS="" 8830 ;; 8831 SINIX*5.4*) 8832 SHLIB_CFLAGS="-K PIC" 8833 SHLIB_LD="cc -G" 8834 SHLIB_LD_LIBS="" 8835 SHLIB_SUFFIX=".so" 8836 DL_OBJS="tclLoadDl.o" 8837 DL_LIBS="-ldl" 8838 CC_SEARCH_FLAGS="" 8839 LD_SEARCH_FLAGS="" 8840 ;; 8841 SunOS-4*) 8842 SHLIB_CFLAGS="-PIC" 8843 SHLIB_LD="ld" 8844 SHLIB_LD_LIBS="" 8845 SHLIB_SUFFIX=".so" 8846 DL_OBJS="tclLoadDl.o" 8847 DL_LIBS="-ldl" 8848 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 8849 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 8850 8851 # SunOS can't handle version numbers with dots in them in library 8852 # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it 8853 # requires an extra version number at the end of .so file names. 8854 # So, the library has to have a name like libtcl75.so.1.0 8855 8856 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' 8857 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 8858 TCL_LIB_VERSIONS_OK=nodots 8859 ;; 8860 SunOS-5.[0-6]) 8861 # Careful to not let 5.10+ fall into this case 8862 8863 # Note: If _REENTRANT isn't defined, then Solaris 8864 # won't define thread-safe library routines. 8865 8866 8867 cat >>confdefs.h <<\_ACEOF 8868 #define _REENTRANT 1 8869 _ACEOF 8870 8871 8872 cat >>confdefs.h <<\_ACEOF 8873 #define _POSIX_PTHREAD_SEMANTICS 1 8874 _ACEOF 8875 8876 8877 SHLIB_CFLAGS="-KPIC" 8878 8879 # Note: need the LIBS below, otherwise Tk won't find Tcl's 8880 # symbols when dynamically loaded into tclsh. 8881 8882 SHLIB_LD_LIBS='${LIBS}' 8883 SHLIB_SUFFIX=".so" 8884 DL_OBJS="tclLoadDl.o" 8885 DL_LIBS="-ldl" 8886 if test "$GCC" = "yes" ; then 8887 SHLIB_LD="$CC -shared" 8888 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 8889 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 8890 else 8891 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 8892 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 8893 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 8894 fi 8895 ;; 8896 SunOS-5*) 8897 # Note: If _REENTRANT isn't defined, then Solaris 8898 # won't define thread-safe library routines. 8899 8900 8901 cat >>confdefs.h <<\_ACEOF 8902 #define _REENTRANT 1 8903 _ACEOF 8904 8905 8906 cat >>confdefs.h <<\_ACEOF 8907 #define _POSIX_PTHREAD_SEMANTICS 1 8908 _ACEOF 8909 8910 8911 SHLIB_CFLAGS="-KPIC" 8912 8913 # Check to enable 64-bit flags for compiler/linker 8914 if test "$do64bit" = "yes" ; then 8915 arch=`isainfo` 8916 if test "$arch" = "sparcv9 sparc" ; then 8917 if test "$GCC" = "yes" ; then 8918 if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then 8919 { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 8920 echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} 8921 else 8922 do64bit_ok=yes 8923 CFLAGS="$CFLAGS -m64 -mcpu=v9" 8924 LDFLAGS="$LDFLAGS -m64 -mcpu=v9" 8925 SHLIB_CFLAGS="-fPIC" 8926 fi 8927 else 8928 do64bit_ok=yes 8929 if test "$do64bitVIS" = "yes" ; then 8930 CFLAGS="$CFLAGS -xarch=v9a" 8931 LDFLAGS_ARCH="-xarch=v9a" 8932 else 8933 CFLAGS="$CFLAGS -xarch=v9" 8934 LDFLAGS_ARCH="-xarch=v9" 8935 fi 8936 # Solaris 64 uses this as well 8937 #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" 8938 fi 8939 elif test "$arch" = "amd64 i386" ; then 8940 if test "$GCC" = "yes" ; then 8941 { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 8942 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} 8943 else 8944 do64bit_ok=yes 8945 CFLAGS="$CFLAGS -xarch=amd64" 8946 LDFLAGS="$LDFLAGS -xarch=amd64" 8947 fi 8948 else 8949 { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5 8950 echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} 8951 fi 8952 fi 8953 8954 # Note: need the LIBS below, otherwise Tk won't find Tcl's 8955 # symbols when dynamically loaded into tclsh. 8956 8957 SHLIB_LD_LIBS='${LIBS}' 8958 SHLIB_SUFFIX=".so" 8959 DL_OBJS="tclLoadDl.o" 8960 DL_LIBS="-ldl" 8961 if test "$GCC" = "yes" ; then 8962 SHLIB_LD="$CC -shared" 8963 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 8964 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 8965 if test "$do64bit_ok" = "yes" ; then 8966 # We need to specify -static-libgcc or we need to 8967 # add the path to the sparv9 libgcc. 8968 # JH: static-libgcc is necessary for core Tcl, but may 8969 # not be necessary for extensions. 8970 SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" 8971 # for finding sparcv9 libgcc, get the regular libgcc 8972 # path, remove so name and append 'sparcv9' 8973 #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." 8974 #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" 8975 fi 8976 else 8977 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 8978 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 8979 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 8980 fi 8981 ;; 8982 UNIX_SV* | UnixWare-5*) 8983 SHLIB_CFLAGS="-KPIC" 8984 SHLIB_LD="cc -G" 8985 SHLIB_LD_LIBS="" 8986 SHLIB_SUFFIX=".so" 8987 DL_OBJS="tclLoadDl.o" 8988 DL_LIBS="-ldl" 8989 # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers 8990 # that don't grok the -Bexport option. Test that it does. 8991 echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 8992 echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 8993 if test "${tcl_cv_ld_Bexport+set}" = set; then 8994 echo $ECHO_N "(cached) $ECHO_C" >&6 8995 else 8996 8997 hold_ldflags=$LDFLAGS 8998 LDFLAGS="$LDFLAGS -Wl,-Bexport" 8999 cat >conftest.$ac_ext <<_ACEOF 9000 /* confdefs.h. */ 9001 _ACEOF 9002 cat confdefs.h >>conftest.$ac_ext 9003 cat >>conftest.$ac_ext <<_ACEOF 9004 /* end confdefs.h. */ 9005 9006 int 9007 main () 9008 { 9009 int i; 9010 ; 9011 return 0; 9012 } 9013 _ACEOF 9014 rm -f conftest.$ac_objext conftest$ac_exeext 9015 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9016 (eval $ac_link) 2>conftest.er1 9017 ac_status=$? 9018 grep -v '^ *+' conftest.er1 >conftest.err 9019 rm -f conftest.er1 9020 cat conftest.err >&5 9021 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9022 (exit $ac_status); } && 9023 { ac_try='test -z "$ac_c_werror_flag" 9024 || test ! -s conftest.err' 9025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9026 (eval $ac_try) 2>&5 9027 ac_status=$? 9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9029 (exit $ac_status); }; } && 9030 { ac_try='test -s conftest$ac_exeext' 9031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9032 (eval $ac_try) 2>&5 9033 ac_status=$? 9034 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9035 (exit $ac_status); }; }; then 9036 tcl_cv_ld_Bexport=yes 9037 else 9038 echo "$as_me: failed program was:" >&5 9039 sed 's/^/| /' conftest.$ac_ext >&5 9040 9041 tcl_cv_ld_Bexport=no 9042 fi 9043 rm -f conftest.err conftest.$ac_objext \ 9044 conftest$ac_exeext conftest.$ac_ext 9045 LDFLAGS=$hold_ldflags 9046 fi 9047 echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 9048 echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 9049 if test $tcl_cv_ld_Bexport = yes; then 9050 LDFLAGS="$LDFLAGS -Wl,-Bexport" 9051 fi 9052 CC_SEARCH_FLAGS="" 9053 LD_SEARCH_FLAGS="" 9054 ;; 9055 esac 9056 9057 if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then 9058 { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 9059 echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} 9060 fi 9061 9062 # Step 4: disable dynamic loading if requested via a command-line switch. 9063 9064 # Check whether --enable-load or --disable-load was given. 9065 if test "${enable_load+set}" = set; then 9066 enableval="$enable_load" 9067 tcl_ok=$enableval 9068 else 9069 tcl_ok=yes 9070 fi; 9071 if test "$tcl_ok" = "no"; then 9072 DL_OBJS="" 9073 fi 9074 9075 if test "x$DL_OBJS" != "x" ; then 9076 BUILD_DLTEST="\$(DLTEST_TARGETS)" 2360 9077 else 2361 echo "$as_me:$LINENO: result: file not found" >&5 2362 echo "${ECHO_T}file not found" >&6 9078 echo "Can't figure out how to do dynamic loading or shared libraries" 9079 echo "on this system." 9080 SHLIB_CFLAGS="" 9081 SHLIB_LD="" 9082 SHLIB_SUFFIX="" 9083 DL_OBJS="tclLoadNone.o" 9084 DL_LIBS="" 9085 LDFLAGS="$LDFLAGS_ORIG" 9086 CC_SEARCH_FLAGS="" 9087 LD_SEARCH_FLAGS="" 9088 BUILD_DLTEST="" 2363 9089 fi 2364 2365 # 2366 # The eval is required to do the TCL_DBGX substitution in the 2367 # TCL_LIB_FILE variable 2368 # 2369 2370 eval TCL_LIB_FILE=${TCL_LIB_FILE} 2371 eval TCL_LIB_FLAG=${TCL_LIB_FLAG} 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 9090 LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" 9091 9092 # If we're running gcc, then change the C flags for compiling shared 9093 # libraries to the right flags for gcc, instead of those for the 9094 # standard manufacturer compiler. 9095 9096 if test "$DL_OBJS" != "tclLoadNone.o" ; then 9097 if test "$GCC" = "yes" ; then 9098 case $system in 9099 AIX-*) 9100 ;; 9101 BSD/OS*) 9102 ;; 9103 IRIX*) 9104 ;; 9105 NetBSD-*|FreeBSD-*) 9106 ;; 9107 Darwin-*) 9108 ;; 9109 SCO_SV-3.2*) 9110 ;; 9111 windows) 9112 ;; 9113 *) 9114 SHLIB_CFLAGS="-fPIC" 9115 ;; 9116 esac 9117 fi 9118 fi 9119 9120 if test "$SHARED_LIB_SUFFIX" = "" ; then 9121 SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}' 9122 fi 9123 if test "$UNSHARED_LIB_SUFFIX" = "" ; then 9124 UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' 9125 fi 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 # These must be called after we do the basic CFLAGS checks and 9142 # verify any possible 64-bit or similar switches are necessary 9143 9144 echo "$as_me:$LINENO: checking for required early compiler flags" >&5 9145 echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 9146 tcl_flags="" 9147 9148 if test "${tcl_cv_flag__isoc99_source+set}" = set; then 9149 echo $ECHO_N "(cached) $ECHO_C" >&6 9150 else 9151 cat >conftest.$ac_ext <<_ACEOF 9152 /* confdefs.h. */ 9153 _ACEOF 9154 cat confdefs.h >>conftest.$ac_ext 9155 cat >>conftest.$ac_ext <<_ACEOF 9156 /* end confdefs.h. */ 9157 #include <stdlib.h> 9158 int 9159 main () 9160 { 9161 char *p = (char *)strtoll; char *q = (char *)strtoull; 9162 ; 9163 return 0; 9164 } 9165 _ACEOF 9166 rm -f conftest.$ac_objext 9167 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9168 (eval $ac_compile) 2>conftest.er1 9169 ac_status=$? 9170 grep -v '^ *+' conftest.er1 >conftest.err 9171 rm -f conftest.er1 9172 cat conftest.err >&5 9173 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9174 (exit $ac_status); } && 9175 { ac_try='test -z "$ac_c_werror_flag" 9176 || test ! -s conftest.err' 9177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9178 (eval $ac_try) 2>&5 9179 ac_status=$? 9180 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9181 (exit $ac_status); }; } && 9182 { ac_try='test -s conftest.$ac_objext' 9183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9184 (eval $ac_try) 2>&5 9185 ac_status=$? 9186 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9187 (exit $ac_status); }; }; then 9188 tcl_cv_flag__isoc99_source=no 9189 else 9190 echo "$as_me: failed program was:" >&5 9191 sed 's/^/| /' conftest.$ac_ext >&5 9192 9193 cat >conftest.$ac_ext <<_ACEOF 9194 /* confdefs.h. */ 9195 _ACEOF 9196 cat confdefs.h >>conftest.$ac_ext 9197 cat >>conftest.$ac_ext <<_ACEOF 9198 /* end confdefs.h. */ 9199 #define _ISOC99_SOURCE 1 9200 #include <stdlib.h> 9201 int 9202 main () 9203 { 9204 char *p = (char *)strtoll; char *q = (char *)strtoull; 9205 ; 9206 return 0; 9207 } 9208 _ACEOF 9209 rm -f conftest.$ac_objext 9210 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9211 (eval $ac_compile) 2>conftest.er1 9212 ac_status=$? 9213 grep -v '^ *+' conftest.er1 >conftest.err 9214 rm -f conftest.er1 9215 cat conftest.err >&5 9216 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9217 (exit $ac_status); } && 9218 { ac_try='test -z "$ac_c_werror_flag" 9219 || test ! -s conftest.err' 9220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9221 (eval $ac_try) 2>&5 9222 ac_status=$? 9223 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9224 (exit $ac_status); }; } && 9225 { ac_try='test -s conftest.$ac_objext' 9226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9227 (eval $ac_try) 2>&5 9228 ac_status=$? 9229 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9230 (exit $ac_status); }; }; then 9231 tcl_cv_flag__isoc99_source=yes 9232 else 9233 echo "$as_me: failed program was:" >&5 9234 sed 's/^/| /' conftest.$ac_ext >&5 9235 9236 tcl_cv_flag__isoc99_source=no 9237 fi 9238 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9239 fi 9240 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9241 fi 9242 9243 if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then 9244 9245 cat >>confdefs.h <<\_ACEOF 9246 #define _ISOC99_SOURCE 1 9247 _ACEOF 9248 9249 tcl_flags="$tcl_flags _ISOC99_SOURCE" 9250 fi 9251 9252 9253 if test "${tcl_cv_flag__largefile64_source+set}" = set; then 9254 echo $ECHO_N "(cached) $ECHO_C" >&6 9255 else 9256 cat >conftest.$ac_ext <<_ACEOF 9257 /* confdefs.h. */ 9258 _ACEOF 9259 cat confdefs.h >>conftest.$ac_ext 9260 cat >>conftest.$ac_ext <<_ACEOF 9261 /* end confdefs.h. */ 9262 #include <sys/stat.h> 9263 int 9264 main () 9265 { 9266 struct stat64 buf; int i = stat64("/", &buf); 9267 ; 9268 return 0; 9269 } 9270 _ACEOF 9271 rm -f conftest.$ac_objext 9272 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9273 (eval $ac_compile) 2>conftest.er1 9274 ac_status=$? 9275 grep -v '^ *+' conftest.er1 >conftest.err 9276 rm -f conftest.er1 9277 cat conftest.err >&5 9278 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9279 (exit $ac_status); } && 9280 { ac_try='test -z "$ac_c_werror_flag" 9281 || test ! -s conftest.err' 9282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9283 (eval $ac_try) 2>&5 9284 ac_status=$? 9285 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9286 (exit $ac_status); }; } && 9287 { ac_try='test -s conftest.$ac_objext' 9288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9289 (eval $ac_try) 2>&5 9290 ac_status=$? 9291 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9292 (exit $ac_status); }; }; then 9293 tcl_cv_flag__largefile64_source=no 9294 else 9295 echo "$as_me: failed program was:" >&5 9296 sed 's/^/| /' conftest.$ac_ext >&5 9297 9298 cat >conftest.$ac_ext <<_ACEOF 9299 /* confdefs.h. */ 9300 _ACEOF 9301 cat confdefs.h >>conftest.$ac_ext 9302 cat >>conftest.$ac_ext <<_ACEOF 9303 /* end confdefs.h. */ 9304 #define _LARGEFILE64_SOURCE 1 9305 #include <sys/stat.h> 9306 int 9307 main () 9308 { 9309 struct stat64 buf; int i = stat64("/", &buf); 9310 ; 9311 return 0; 9312 } 9313 _ACEOF 9314 rm -f conftest.$ac_objext 9315 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9316 (eval $ac_compile) 2>conftest.er1 9317 ac_status=$? 9318 grep -v '^ *+' conftest.er1 >conftest.err 9319 rm -f conftest.er1 9320 cat conftest.err >&5 9321 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9322 (exit $ac_status); } && 9323 { ac_try='test -z "$ac_c_werror_flag" 9324 || test ! -s conftest.err' 9325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9326 (eval $ac_try) 2>&5 9327 ac_status=$? 9328 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9329 (exit $ac_status); }; } && 9330 { ac_try='test -s conftest.$ac_objext' 9331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9332 (eval $ac_try) 2>&5 9333 ac_status=$? 9334 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9335 (exit $ac_status); }; }; then 9336 tcl_cv_flag__largefile64_source=yes 9337 else 9338 echo "$as_me: failed program was:" >&5 9339 sed 's/^/| /' conftest.$ac_ext >&5 9340 9341 tcl_cv_flag__largefile64_source=no 9342 fi 9343 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9344 fi 9345 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9346 fi 9347 9348 if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then 9349 9350 cat >>confdefs.h <<\_ACEOF 9351 #define _LARGEFILE64_SOURCE 1 9352 _ACEOF 9353 9354 tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" 9355 fi 9356 9357 9358 if test "${tcl_cv_flag__largefile_source64+set}" = set; then 9359 echo $ECHO_N "(cached) $ECHO_C" >&6 9360 else 9361 cat >conftest.$ac_ext <<_ACEOF 9362 /* confdefs.h. */ 9363 _ACEOF 9364 cat confdefs.h >>conftest.$ac_ext 9365 cat >>conftest.$ac_ext <<_ACEOF 9366 /* end confdefs.h. */ 9367 #include <sys/stat.h> 9368 int 9369 main () 9370 { 9371 char *p = (char *)open64; 9372 ; 9373 return 0; 9374 } 9375 _ACEOF 9376 rm -f conftest.$ac_objext 9377 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9378 (eval $ac_compile) 2>conftest.er1 9379 ac_status=$? 9380 grep -v '^ *+' conftest.er1 >conftest.err 9381 rm -f conftest.er1 9382 cat conftest.err >&5 9383 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9384 (exit $ac_status); } && 9385 { ac_try='test -z "$ac_c_werror_flag" 9386 || test ! -s conftest.err' 9387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9388 (eval $ac_try) 2>&5 9389 ac_status=$? 9390 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9391 (exit $ac_status); }; } && 9392 { ac_try='test -s conftest.$ac_objext' 9393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9394 (eval $ac_try) 2>&5 9395 ac_status=$? 9396 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9397 (exit $ac_status); }; }; then 9398 tcl_cv_flag__largefile_source64=no 9399 else 9400 echo "$as_me: failed program was:" >&5 9401 sed 's/^/| /' conftest.$ac_ext >&5 9402 9403 cat >conftest.$ac_ext <<_ACEOF 9404 /* confdefs.h. */ 9405 _ACEOF 9406 cat confdefs.h >>conftest.$ac_ext 9407 cat >>conftest.$ac_ext <<_ACEOF 9408 /* end confdefs.h. */ 9409 #define _LARGEFILE_SOURCE64 1 9410 #include <sys/stat.h> 9411 int 9412 main () 9413 { 9414 char *p = (char *)open64; 9415 ; 9416 return 0; 9417 } 9418 _ACEOF 9419 rm -f conftest.$ac_objext 9420 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9421 (eval $ac_compile) 2>conftest.er1 9422 ac_status=$? 9423 grep -v '^ *+' conftest.er1 >conftest.err 9424 rm -f conftest.er1 9425 cat conftest.err >&5 9426 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9427 (exit $ac_status); } && 9428 { ac_try='test -z "$ac_c_werror_flag" 9429 || test ! -s conftest.err' 9430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9431 (eval $ac_try) 2>&5 9432 ac_status=$? 9433 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9434 (exit $ac_status); }; } && 9435 { ac_try='test -s conftest.$ac_objext' 9436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9437 (eval $ac_try) 2>&5 9438 ac_status=$? 9439 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9440 (exit $ac_status); }; }; then 9441 tcl_cv_flag__largefile_source64=yes 9442 else 9443 echo "$as_me: failed program was:" >&5 9444 sed 's/^/| /' conftest.$ac_ext >&5 9445 9446 tcl_cv_flag__largefile_source64=no 9447 fi 9448 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9449 fi 9450 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9451 fi 9452 9453 if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then 9454 9455 cat >>confdefs.h <<\_ACEOF 9456 #define _LARGEFILE_SOURCE64 1 9457 _ACEOF 9458 9459 tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" 9460 fi 9461 9462 if test "x${tcl_flags}" = "x" ; then 9463 echo "$as_me:$LINENO: result: none" >&5 9464 echo "${ECHO_T}none" >&6 9465 else 9466 echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 9467 echo "${ECHO_T}${tcl_flags}" >&6 9468 fi 9469 9470 9471 echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 9472 echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 9473 if test "${tcl_cv_type_64bit+set}" = set; then 9474 echo $ECHO_N "(cached) $ECHO_C" >&6 9475 else 9476 9477 tcl_cv_type_64bit=none 9478 # See if the compiler knows natively about __int64 9479 cat >conftest.$ac_ext <<_ACEOF 9480 /* confdefs.h. */ 9481 _ACEOF 9482 cat confdefs.h >>conftest.$ac_ext 9483 cat >>conftest.$ac_ext <<_ACEOF 9484 /* end confdefs.h. */ 9485 9486 int 9487 main () 9488 { 9489 __int64 value = (__int64) 0; 9490 ; 9491 return 0; 9492 } 9493 _ACEOF 9494 rm -f conftest.$ac_objext 9495 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9496 (eval $ac_compile) 2>conftest.er1 9497 ac_status=$? 9498 grep -v '^ *+' conftest.er1 >conftest.err 9499 rm -f conftest.er1 9500 cat conftest.err >&5 9501 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9502 (exit $ac_status); } && 9503 { ac_try='test -z "$ac_c_werror_flag" 9504 || test ! -s conftest.err' 9505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9506 (eval $ac_try) 2>&5 9507 ac_status=$? 9508 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9509 (exit $ac_status); }; } && 9510 { ac_try='test -s conftest.$ac_objext' 9511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9512 (eval $ac_try) 2>&5 9513 ac_status=$? 9514 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9515 (exit $ac_status); }; }; then 9516 tcl_type_64bit=__int64 9517 else 9518 echo "$as_me: failed program was:" >&5 9519 sed 's/^/| /' conftest.$ac_ext >&5 9520 9521 tcl_type_64bit="long long" 9522 fi 9523 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9524 # See if we should use long anyway Note that we substitute in the 9525 # type that is our current guess for a 64-bit type inside this check 9526 # program, so it should be modified only carefully... 9527 cat >conftest.$ac_ext <<_ACEOF 9528 /* confdefs.h. */ 9529 _ACEOF 9530 cat confdefs.h >>conftest.$ac_ext 9531 cat >>conftest.$ac_ext <<_ACEOF 9532 /* end confdefs.h. */ 9533 9534 int 9535 main () 9536 { 9537 switch (0) { 9538 case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; 9539 } 9540 ; 9541 return 0; 9542 } 9543 _ACEOF 9544 rm -f conftest.$ac_objext 9545 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9546 (eval $ac_compile) 2>conftest.er1 9547 ac_status=$? 9548 grep -v '^ *+' conftest.er1 >conftest.err 9549 rm -f conftest.er1 9550 cat conftest.err >&5 9551 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9552 (exit $ac_status); } && 9553 { ac_try='test -z "$ac_c_werror_flag" 9554 || test ! -s conftest.err' 9555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9556 (eval $ac_try) 2>&5 9557 ac_status=$? 9558 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9559 (exit $ac_status); }; } && 9560 { ac_try='test -s conftest.$ac_objext' 9561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9562 (eval $ac_try) 2>&5 9563 ac_status=$? 9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9565 (exit $ac_status); }; }; then 9566 tcl_cv_type_64bit=${tcl_type_64bit} 9567 else 9568 echo "$as_me: failed program was:" >&5 9569 sed 's/^/| /' conftest.$ac_ext >&5 9570 9571 fi 9572 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9573 fi 9574 9575 if test "${tcl_cv_type_64bit}" = none ; then 9576 9577 cat >>confdefs.h <<\_ACEOF 9578 #define TCL_WIDE_INT_IS_LONG 1 9579 _ACEOF 9580 9581 echo "$as_me:$LINENO: result: using long" >&5 9582 echo "${ECHO_T}using long" >&6 9583 elif test "${tcl_cv_type_64bit}" = "__int64" \ 9584 -a "${TEA_PLATFORM}" = "windows" ; then 9585 # We actually want to use the default tcl.h checks in this 9586 # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* 9587 echo "$as_me:$LINENO: result: using Tcl header defaults" >&5 9588 echo "${ECHO_T}using Tcl header defaults" >&6 9589 else 9590 9591 cat >>confdefs.h <<_ACEOF 9592 #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} 9593 _ACEOF 9594 9595 echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 9596 echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 9597 9598 # Now check for auxiliary declarations 9599 echo "$as_me:$LINENO: checking for struct dirent64" >&5 9600 echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 9601 if test "${tcl_cv_struct_dirent64+set}" = set; then 9602 echo $ECHO_N "(cached) $ECHO_C" >&6 9603 else 9604 9605 cat >conftest.$ac_ext <<_ACEOF 9606 /* confdefs.h. */ 9607 _ACEOF 9608 cat confdefs.h >>conftest.$ac_ext 9609 cat >>conftest.$ac_ext <<_ACEOF 9610 /* end confdefs.h. */ 9611 #include <sys/types.h> 9612 #include <sys/dirent.h> 9613 int 9614 main () 9615 { 9616 struct dirent64 p; 9617 ; 9618 return 0; 9619 } 9620 _ACEOF 9621 rm -f conftest.$ac_objext 9622 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9623 (eval $ac_compile) 2>conftest.er1 9624 ac_status=$? 9625 grep -v '^ *+' conftest.er1 >conftest.err 9626 rm -f conftest.er1 9627 cat conftest.err >&5 9628 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9629 (exit $ac_status); } && 9630 { ac_try='test -z "$ac_c_werror_flag" 9631 || test ! -s conftest.err' 9632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9633 (eval $ac_try) 2>&5 9634 ac_status=$? 9635 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9636 (exit $ac_status); }; } && 9637 { ac_try='test -s conftest.$ac_objext' 9638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9639 (eval $ac_try) 2>&5 9640 ac_status=$? 9641 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9642 (exit $ac_status); }; }; then 9643 tcl_cv_struct_dirent64=yes 9644 else 9645 echo "$as_me: failed program was:" >&5 9646 sed 's/^/| /' conftest.$ac_ext >&5 9647 9648 tcl_cv_struct_dirent64=no 9649 fi 9650 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9651 fi 9652 echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 9653 echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 9654 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then 9655 9656 cat >>confdefs.h <<\_ACEOF 9657 #define HAVE_STRUCT_DIRENT64 1 9658 _ACEOF 9659 9660 fi 9661 9662 echo "$as_me:$LINENO: checking for struct stat64" >&5 9663 echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 9664 if test "${tcl_cv_struct_stat64+set}" = set; then 9665 echo $ECHO_N "(cached) $ECHO_C" >&6 9666 else 9667 9668 cat >conftest.$ac_ext <<_ACEOF 9669 /* confdefs.h. */ 9670 _ACEOF 9671 cat confdefs.h >>conftest.$ac_ext 9672 cat >>conftest.$ac_ext <<_ACEOF 9673 /* end confdefs.h. */ 9674 #include <sys/stat.h> 9675 int 9676 main () 9677 { 9678 struct stat64 p; 9679 9680 ; 9681 return 0; 9682 } 9683 _ACEOF 9684 rm -f conftest.$ac_objext 9685 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9686 (eval $ac_compile) 2>conftest.er1 9687 ac_status=$? 9688 grep -v '^ *+' conftest.er1 >conftest.err 9689 rm -f conftest.er1 9690 cat conftest.err >&5 9691 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9692 (exit $ac_status); } && 9693 { ac_try='test -z "$ac_c_werror_flag" 9694 || test ! -s conftest.err' 9695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9696 (eval $ac_try) 2>&5 9697 ac_status=$? 9698 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9699 (exit $ac_status); }; } && 9700 { ac_try='test -s conftest.$ac_objext' 9701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9702 (eval $ac_try) 2>&5 9703 ac_status=$? 9704 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9705 (exit $ac_status); }; }; then 9706 tcl_cv_struct_stat64=yes 9707 else 9708 echo "$as_me: failed program was:" >&5 9709 sed 's/^/| /' conftest.$ac_ext >&5 9710 9711 tcl_cv_struct_stat64=no 9712 fi 9713 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9714 fi 9715 echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 9716 echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 9717 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then 9718 9719 cat >>confdefs.h <<\_ACEOF 9720 #define HAVE_STRUCT_STAT64 1 9721 _ACEOF 9722 9723 fi 9724 9725 9726 9727 for ac_func in open64 lseek64 9728 do 9729 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9730 echo "$as_me:$LINENO: checking for $ac_func" >&5 9731 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 9732 if eval "test \"\${$as_ac_var+set}\" = set"; then 9733 echo $ECHO_N "(cached) $ECHO_C" >&6 9734 else 9735 cat >conftest.$ac_ext <<_ACEOF 9736 /* confdefs.h. */ 9737 _ACEOF 9738 cat confdefs.h >>conftest.$ac_ext 9739 cat >>conftest.$ac_ext <<_ACEOF 9740 /* end confdefs.h. */ 9741 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. 9742 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 9743 #define $ac_func innocuous_$ac_func 9744 9745 /* System header to define __stub macros and hopefully few prototypes, 9746 which can conflict with char $ac_func (); below. 9747 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 9748 <limits.h> exists even on freestanding compilers. */ 9749 9750 #ifdef __STDC__ 9751 # include <limits.h> 9752 #else 9753 # include <assert.h> 9754 #endif 9755 9756 #undef $ac_func 9757 9758 /* Override any gcc2 internal prototype to avoid an error. */ 9759 #ifdef __cplusplus 9760 extern "C" 9761 { 9762 #endif 9763 /* We use char because int might match the return type of a gcc2 9764 builtin and then its argument prototype would still apply. */ 9765 char $ac_func (); 9766 /* The GNU C library defines this for functions which it implements 9767 to always fail with ENOSYS. Some functions are actually named 9768 something starting with __ and the normal name is an alias. */ 9769 #if defined (__stub_$ac_func) || defined (__stub___$ac_func) 9770 choke me 9771 #else 9772 char (*f) () = $ac_func; 9773 #endif 9774 #ifdef __cplusplus 9775 } 9776 #endif 9777 9778 int 9779 main () 9780 { 9781 return f != $ac_func; 9782 ; 9783 return 0; 9784 } 9785 _ACEOF 9786 rm -f conftest.$ac_objext conftest$ac_exeext 9787 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9788 (eval $ac_link) 2>conftest.er1 9789 ac_status=$? 9790 grep -v '^ *+' conftest.er1 >conftest.err 9791 rm -f conftest.er1 9792 cat conftest.err >&5 9793 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9794 (exit $ac_status); } && 9795 { ac_try='test -z "$ac_c_werror_flag" 9796 || test ! -s conftest.err' 9797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9798 (eval $ac_try) 2>&5 9799 ac_status=$? 9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9801 (exit $ac_status); }; } && 9802 { ac_try='test -s conftest$ac_exeext' 9803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9804 (eval $ac_try) 2>&5 9805 ac_status=$? 9806 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9807 (exit $ac_status); }; }; then 9808 eval "$as_ac_var=yes" 9809 else 9810 echo "$as_me: failed program was:" >&5 9811 sed 's/^/| /' conftest.$ac_ext >&5 9812 9813 eval "$as_ac_var=no" 9814 fi 9815 rm -f conftest.err conftest.$ac_objext \ 9816 conftest$ac_exeext conftest.$ac_ext 9817 fi 9818 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 9819 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 9820 if test `eval echo '${'$as_ac_var'}'` = yes; then 9821 cat >>confdefs.h <<_ACEOF 9822 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9823 _ACEOF 9824 9825 fi 9826 done 9827 9828 echo "$as_me:$LINENO: checking for off64_t" >&5 9829 echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 9830 if test "${tcl_cv_type_off64_t+set}" = set; then 9831 echo $ECHO_N "(cached) $ECHO_C" >&6 9832 else 9833 9834 cat >conftest.$ac_ext <<_ACEOF 9835 /* confdefs.h. */ 9836 _ACEOF 9837 cat confdefs.h >>conftest.$ac_ext 9838 cat >>conftest.$ac_ext <<_ACEOF 9839 /* end confdefs.h. */ 9840 #include <sys/types.h> 9841 int 9842 main () 9843 { 9844 off64_t offset; 9845 9846 ; 9847 return 0; 9848 } 9849 _ACEOF 9850 rm -f conftest.$ac_objext 9851 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9852 (eval $ac_compile) 2>conftest.er1 9853 ac_status=$? 9854 grep -v '^ *+' conftest.er1 >conftest.err 9855 rm -f conftest.er1 9856 cat conftest.err >&5 9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9858 (exit $ac_status); } && 9859 { ac_try='test -z "$ac_c_werror_flag" 9860 || test ! -s conftest.err' 9861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9862 (eval $ac_try) 2>&5 9863 ac_status=$? 9864 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9865 (exit $ac_status); }; } && 9866 { ac_try='test -s conftest.$ac_objext' 9867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9868 (eval $ac_try) 2>&5 9869 ac_status=$? 9870 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9871 (exit $ac_status); }; }; then 9872 tcl_cv_type_off64_t=yes 9873 else 9874 echo "$as_me: failed program was:" >&5 9875 sed 's/^/| /' conftest.$ac_ext >&5 9876 9877 tcl_cv_type_off64_t=no 9878 fi 9879 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9880 fi 9881 9882 if test "x${tcl_cv_type_off64_t}" = "xyes" && \ 9883 test "x${ac_cv_func_lseek64}" = "xyes" && \ 9884 test "x${ac_cv_func_open64}" = "xyes" ; then 9885 9886 cat >>confdefs.h <<\_ACEOF 9887 #define HAVE_TYPE_OFF64_T 1 9888 _ACEOF 9889 9890 echo "$as_me:$LINENO: result: yes" >&5 9891 echo "${ECHO_T}yes" >&6 9892 else 9893 echo "$as_me:$LINENO: result: no" >&5 9894 echo "${ECHO_T}no" >&6 9895 fi 9896 fi 9897 9898 9899 9900 #-------------------------------------------------------------------- 9901 # Set the default compiler switches based on the --enable-symbols option. 9902 #-------------------------------------------------------------------- 9903 9904 9905 9906 echo "$as_me:$LINENO: checking for build with symbols" >&5 9907 echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 9908 # Check whether --enable-symbols or --disable-symbols was given. 9909 if test "${enable_symbols+set}" = set; then 9910 enableval="$enable_symbols" 9911 tcl_ok=$enableval 9912 else 9913 tcl_ok=no 9914 fi; 9915 DBGX="" 9916 if test "$tcl_ok" = "no"; then 9917 CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" 9918 LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" 9919 echo "$as_me:$LINENO: result: no" >&5 9920 echo "${ECHO_T}no" >&6 9921 else 9922 CFLAGS_DEFAULT="${CFLAGS_DEBUG}" 9923 LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" 9924 if test "$tcl_ok" = "yes"; then 9925 echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 9926 echo "${ECHO_T}yes (standard debugging)" >&6 9927 fi 9928 fi 9929 if test "${TEA_PLATFORM}" != "windows" ; then 9930 LDFLAGS_DEFAULT="${LDFLAGS}" 9931 fi 9932 9933 9934 9935 9936 9937 if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then 9938 9939 cat >>confdefs.h <<\_ACEOF 9940 #define TCL_MEM_DEBUG 1 9941 _ACEOF 9942 9943 fi 9944 9945 if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then 9946 if test "$tcl_ok" = "all"; then 9947 echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5 9948 echo "${ECHO_T}enabled symbols mem debugging" >&6 9949 else 9950 echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 9951 echo "${ECHO_T}enabled $tcl_ok debugging" >&6 9952 fi 9953 fi 9954 9955 9956 #-------------------------------------------------------------------- 9957 # Everyone should be linking against the Tcl stub library. If you 9958 # can't for some reason, remove this definition. If you aren't using 9959 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to 9960 # link against the non-stubbed Tcl library. Add Tk too if necessary. 9961 #-------------------------------------------------------------------- 9962 9963 9964 cat >>confdefs.h <<\_ACEOF 9965 #define USE_TCL_STUBS 1 9966 _ACEOF 9967 9968 #AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs]) 9969 9970 #-------------------------------------------------------------------- 9971 # This macro generates a line to use when building a library. It 9972 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, 9973 # and TEA_LOAD_TCLCONFIG macros above. 9974 #-------------------------------------------------------------------- 9975 9976 9977 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then 9978 MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)" 9979 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)" 9980 MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)" 9981 else 9982 MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)" 9983 MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" 9984 MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)" 9985 fi 9986 9987 if test "${SHARED_BUILD}" = "1" ; then 9988 MAKE_LIB="${MAKE_SHARED_LIB} " 9989 else 9990 MAKE_LIB="${MAKE_STATIC_LIB} " 9991 fi 9992 9993 #-------------------------------------------------------------------- 9994 # Shared libraries and static libraries have different names. 9995 # Use the double eval to make sure any variables in the suffix is 9996 # substituted. (@@@ Might not be necessary anymore) 9997 #-------------------------------------------------------------------- 9998 9999 if test "${TEA_PLATFORM}" = "windows" ; then 10000 if test "${SHARED_BUILD}" = "1" ; then 10001 # We force the unresolved linking of symbols that are really in 10002 # the private libraries of Tcl and Tk. 10003 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" 10004 if test x"${TK_BIN_DIR}" != x ; then 10005 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" 10006 fi 10007 eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" 10008 else 10009 eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" 10010 fi 10011 # Some packages build their own stubs libraries 10012 eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" 10013 if test "$GCC" = "yes"; then 10014 PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} 10015 fi 10016 # These aren't needed on Windows (either MSVC or gcc) 10017 RANLIB="mt -manifest ${PKG_LIB_FILE}.manifest -outputresource:${PKG_LIB_FILE}\;2 ; test -f" 10018 RANLIB_STUB=: 10019 else 10020 RANLIB_STUB="${RANLIB}" 10021 if test "${SHARED_BUILD}" = "1" ; then 10022 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" 10023 if test x"${TK_BIN_DIR}" != x ; then 10024 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" 10025 fi 10026 eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" 10027 RANLIB=: 10028 else 10029 eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" 10030 fi 10031 # Some packages build their own stubs libraries 10032 eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" 10033 fi 10034 10035 # These are escaped so that only CFLAGS is picked up at configure time. 10036 # The other values will be substituted at make time. 10037 CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" 10038 if test "${SHARED_BUILD}" = "1" ; then 10039 CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" 10040 fi 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 #-------------------------------------------------------------------- 10051 # Determine the name of the tclsh and/or wish executables in the 10052 # Tcl and Tk build directories or the location they were installed 10053 # into. These paths are used to support running test cases only, 10054 # the Makefile should not be making use of these paths to generate 10055 # a pkgIndex.tcl file or anything else at extension build time. 10056 #-------------------------------------------------------------------- 10057 10058 10059 echo "$as_me:$LINENO: checking for tclsh" >&5 10060 echo $ECHO_N "checking for tclsh... $ECHO_C" >&6 10061 if test -f "${TCL_BIN_DIR}/Makefile" ; then 10062 # tclConfig.sh is in Tcl build directory 10063 if test "${TEA_PLATFORM}" = "windows"; then 10064 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" 10065 else 10066 TCLSH_PROG="${TCL_BIN_DIR}/tclsh" 10067 fi 10068 else 10069 # tclConfig.sh is in install location 10070 if test "${TEA_PLATFORM}" = "windows"; then 10071 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" 10072 else 10073 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" 10074 fi 10075 list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \ 10076 `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \ 10077 `ls -d ${TCL_PREFIX}/bin 2>/dev/null`" 10078 for i in $list ; do 10079 if test -f "$i/${TCLSH_PROG}" ; then 10080 REAL_TCL_BIN_DIR="`cd "$i"; pwd`" 10081 break 10082 fi 10083 done 10084 TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}" 10085 fi 10086 echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5 10087 echo "${ECHO_T}${TCLSH_PROG}" >&6 10088 10089 10090 #TEA_PROG_WISH 2387 10091 2388 10092 … … 2417 10121 break 2418 10122 elif test -r "$dir/include/bltInt.h" ; then 2419 BLT_SRC_DIR="$dir/ lib"10123 BLT_SRC_DIR="$dir/include" 2420 10124 break 2421 10125 fi … … 2431 10135 ../../blt \ 2432 10136 `ls -dr ../../../blt[2-3].[0-9]* 2>/dev/null` \ 2433 ../../../blt 10137 ../../../blt \ 10138 `ls -dr c:/opt/blt[2-3].[0-9]* 2>/dev/null` \ 10139 c\:/opt/blt 2434 10140 do 2435 if test -r "$dir/ bltInt.h" ; then2436 tclConfigFile="$dir/bltInt.h"2437 10141 if test -r "$dir/src/bltInt.h" ; then 10142 BLT_SRC_DIR="$dir/src" 10143 break 2438 10144 fi 2439 10145 done 2440 10146 fi 2441 10147 fi 2442 2443 10148 echo "$as_me:$LINENO: result: ${BLT_SRC_DIR}" >&5 2444 10149 echo "${ECHO_T}${BLT_SRC_DIR}" >&6 … … 2451 10156 2452 10157 2453 2454 10158 #-------------------------------------------------------------------- 2455 # __CHANGE__ 2456 # A few miscellaneous platform-specific items: 2457 # 2458 # Define a special symbol for Windows (BUILD_exampleA in this case) so 2459 # that we create the export library with the dll. See sha1.h on how 2460 # to use this. 2461 # 2462 # Windows creates a few extra files that need to be cleaned up. 2463 # You can add more files to clean if your extension creates any extra 2464 # files. 2465 # 2466 # Define any extra compiler flags in the PACKAGE_CFLAGS variable. 2467 # These will be appended to the current set of compiler flags for 2468 # your system. 10159 # Look for rappture.h on the normal include path. If not found, look 10160 # for it in the --with-rappture directory. 2469 10161 #-------------------------------------------------------------------- 2470 2471 case "`uname -s`" in 2472 *win32* | *WIN32* | *CYGWIN_NT*) 2473 cat >>confdefs.h <<\_ACEOF 2474 #define BUILD_Rappture 1 2475 _ACEOF 2476 2477 CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch" 2478 2479 ;; 2480 *) 2481 CLEANFILES= 2482 ;; 2483 esac 10162 echo "$as_me:$LINENO: checking for rappture.h" >&5 10163 echo $ECHO_N "checking for rappture.h... $ECHO_C" >&6 10164 RAPPTURE_DIR="" 10165 if test "x$rappture_source_dir" != "x" ; then 10166 # 10167 # Verify that a rappture.h file exists in the directory specified 10168 # by --with-rappture. 10169 # 10170 if test -r "$rappture_dir/include/core/rappture.h" ; then 10171 RAPPTURE_DIR="$rappture_dir" 10172 fi 10173 else 10174 # 10175 # Otherwise, search for the rappture.h include file... 10176 # 1. Search previously named locations. 10177 # 10178 for dir in \ 10179 $prefix \ 10180 $exec_prefix 10181 do 10182 if test -r "$dir/include/core/rappture.h" ; then 10183 RAPPTURE_DIR="$dir" 10184 break 10185 fi 10186 done 10187 # 10188 # 2. Search source directories. 10189 # 10190 if test "x$RAPPTURE_DIR" = "x" ; then 10191 for dir in \ 10192 `ls -dr ../rappture 2>/dev/null` \ 10193 `ls -dr ../../rappture 2>/dev/null` \ 10194 `ls -dr ../../../rappture 2>/dev/null` \ 10195 `ls -dr C\:/opt/rappture 2>/dev/null` \ 10196 `ls -dr /opt/rappture 2>/dev/null` 10197 do 10198 if test -r "$dir/include/core/rappture.h" ; then 10199 RAPPTURE_DIR="$dir" 10200 break 10201 fi 10202 done 10203 fi 10204 fi 10205 echo "$as_me:$LINENO: result: ${RAPPTURE_DIR}" >&5 10206 echo "${ECHO_T}${RAPPTURE_DIR}" >&6 10207 10208 if test "x$RAPPTURE_DIR" = "x" ; then 10209 echo "can't find RAPPTURE include file \"rappture.h\"" 10210 echo "use --with-rappture=DIR to specify the location of rappture" 10211 exit 1 10212 fi 10213 10214 2484 10215 2485 10216 #-------------------------------------------------------------------- 2486 # Check whether --enable-threads or --disable-threads was given.2487 # So far only Tcl responds to this one.10217 # Look for scew.h on the normal include path. If not found, look 10218 # for it in the --with-scew directory. 2488 10219 #-------------------------------------------------------------------- 2489 2490 ac_ext=c 2491 ac_cpp='$CPP $CPPFLAGS' 2492 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2493 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2494 ac_compiler_gnu=$ac_cv_c_compiler_gnu 2495 if test -n "$ac_tool_prefix"; then 2496 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 2497 set dummy ${ac_tool_prefix}gcc; ac_word=$2 2498 echo "$as_me:$LINENO: checking for $ac_word" >&5 2499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2500 if test "${ac_cv_prog_CC+set}" = set; then 2501 echo $ECHO_N "(cached) $ECHO_C" >&6 2502 else 2503 if test -n "$CC"; then 2504 ac_cv_prog_CC="$CC" # Let the user override the test. 2505 else 2506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2507 for as_dir in $PATH 2508 do 2509 IFS=$as_save_IFS 2510 test -z "$as_dir" && as_dir=. 2511 for ac_exec_ext in '' $ac_executable_extensions; do 2512 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2513 ac_cv_prog_CC="${ac_tool_prefix}gcc" 2514 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2515 break 2 10220 echo "$as_me:$LINENO: checking for alternate paths" >&5 10221 echo $ECHO_N "checking for alternate paths... $ECHO_C" >&6 10222 ALT_DIR="" 10223 if test "x$alt_dir" != "x" ; then 10224 # 10225 # Verify that a include and lib directories exist in the directory specified 10226 # by --with-altpath. 10227 # 10228 if test -d "$alt_dir/include" -a -d "$alt_dir/lib" ; then 10229 ALT_DIR="$rappture_dir" 2516 10230 fi 2517 done 2518 done 2519 2520 fi 2521 fi 2522 CC=$ac_cv_prog_CC 2523 if test -n "$CC"; then 2524 echo "$as_me:$LINENO: result: $CC" >&5 2525 echo "${ECHO_T}$CC" >&6 2526 else 2527 echo "$as_me:$LINENO: result: no" >&5 2528 echo "${ECHO_T}no" >&6 2529 fi 2530 2531 fi 2532 if test -z "$ac_cv_prog_CC"; then 2533 ac_ct_CC=$CC 2534 # Extract the first word of "gcc", so it can be a program name with args. 2535 set dummy gcc; ac_word=$2 2536 echo "$as_me:$LINENO: checking for $ac_word" >&5 2537 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2538 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 2539 echo $ECHO_N "(cached) $ECHO_C" >&6 2540 else 2541 if test -n "$ac_ct_CC"; then 2542 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 2543 else 2544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2545 for as_dir in $PATH 2546 do 2547 IFS=$as_save_IFS 2548 test -z "$as_dir" && as_dir=. 2549 for ac_exec_ext in '' $ac_executable_extensions; do 2550 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2551 ac_cv_prog_ac_ct_CC="gcc" 2552 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2553 break 2 10231 else 10232 if test "x$ALT_DIR" = "x" ; then 10233 for dir in \ 10234 C\:/opt /opt 10235 do 10236 if test -r "$dir/include" -a -d "$dir/lib" ; then 10237 ALT_DIR="$dir" 10238 break 10239 fi 10240 done 2554 10241 fi 2555 done 2556 done 2557 2558 fi 2559 fi 2560 ac_ct_CC=$ac_cv_prog_ac_ct_CC 2561 if test -n "$ac_ct_CC"; then 2562 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 2563 echo "${ECHO_T}$ac_ct_CC" >&6 2564 else 2565 echo "$as_me:$LINENO: result: no" >&5 2566 echo "${ECHO_T}no" >&6 2567 fi 2568 2569 CC=$ac_ct_CC 2570 else 2571 CC="$ac_cv_prog_CC" 2572 fi 2573 2574 if test -z "$CC"; then 2575 if test -n "$ac_tool_prefix"; then 2576 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 2577 set dummy ${ac_tool_prefix}cc; ac_word=$2 2578 echo "$as_me:$LINENO: checking for $ac_word" >&5 2579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2580 if test "${ac_cv_prog_CC+set}" = set; then 2581 echo $ECHO_N "(cached) $ECHO_C" >&6 2582 else 2583 if test -n "$CC"; then 2584 ac_cv_prog_CC="$CC" # Let the user override the test. 2585 else 2586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2587 for as_dir in $PATH 2588 do 2589 IFS=$as_save_IFS 2590 test -z "$as_dir" && as_dir=. 2591 for ac_exec_ext in '' $ac_executable_extensions; do 2592 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2593 ac_cv_prog_CC="${ac_tool_prefix}cc" 2594 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2595 break 2 2596 fi 2597 done 2598 done 2599 2600 fi 2601 fi 2602 CC=$ac_cv_prog_CC 2603 if test -n "$CC"; then 2604 echo "$as_me:$LINENO: result: $CC" >&5 2605 echo "${ECHO_T}$CC" >&6 2606 else 2607 echo "$as_me:$LINENO: result: no" >&5 2608 echo "${ECHO_T}no" >&6 2609 fi 2610 2611 fi 2612 if test -z "$ac_cv_prog_CC"; then 2613 ac_ct_CC=$CC 2614 # Extract the first word of "cc", so it can be a program name with args. 2615 set dummy cc; ac_word=$2 2616 echo "$as_me:$LINENO: checking for $ac_word" >&5 2617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2618 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 2619 echo $ECHO_N "(cached) $ECHO_C" >&6 2620 else 2621 if test -n "$ac_ct_CC"; then 2622 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 2623 else 2624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2625 for as_dir in $PATH 2626 do 2627 IFS=$as_save_IFS 2628 test -z "$as_dir" && as_dir=. 2629 for ac_exec_ext in '' $ac_executable_extensions; do 2630 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2631 ac_cv_prog_ac_ct_CC="cc" 2632 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2633 break 2 2634 fi 2635 done 2636 done 2637 2638 fi 2639 fi 2640 ac_ct_CC=$ac_cv_prog_ac_ct_CC 2641 if test -n "$ac_ct_CC"; then 2642 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 2643 echo "${ECHO_T}$ac_ct_CC" >&6 2644 else 2645 echo "$as_me:$LINENO: result: no" >&5 2646 echo "${ECHO_T}no" >&6 2647 fi 2648 2649 CC=$ac_ct_CC 2650 else 2651 CC="$ac_cv_prog_CC" 2652 fi 2653 2654 fi 2655 if test -z "$CC"; then 2656 # Extract the first word of "cc", so it can be a program name with args. 2657 set dummy cc; ac_word=$2 2658 echo "$as_me:$LINENO: checking for $ac_word" >&5 2659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2660 if test "${ac_cv_prog_CC+set}" = set; then 2661 echo $ECHO_N "(cached) $ECHO_C" >&6 2662 else 2663 if test -n "$CC"; then 2664 ac_cv_prog_CC="$CC" # Let the user override the test. 2665 else 2666 ac_prog_rejected=no 2667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2668 for as_dir in $PATH 2669 do 2670 IFS=$as_save_IFS 2671 test -z "$as_dir" && as_dir=. 2672 for ac_exec_ext in '' $ac_executable_extensions; do 2673 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2674 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 2675 ac_prog_rejected=yes 2676 continue 2677 fi 2678 ac_cv_prog_CC="cc" 2679 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2680 break 2 2681 fi 2682 done 2683 done 2684 2685 if test $ac_prog_rejected = yes; then 2686 # We found a bogon in the path, so make sure we never use it. 2687 set dummy $ac_cv_prog_CC 2688 shift 2689 if test $# != 0; then 2690 # We chose a different compiler from the bogus one. 2691 # However, it has the same basename, so the bogon will be chosen 2692 # first if we set CC to just the basename; use the full file name. 2693 shift 2694 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" 2695 fi 2696 fi 2697 fi 2698 fi 2699 CC=$ac_cv_prog_CC 2700 if test -n "$CC"; then 2701 echo "$as_me:$LINENO: result: $CC" >&5 2702 echo "${ECHO_T}$CC" >&6 2703 else 2704 echo "$as_me:$LINENO: result: no" >&5 2705 echo "${ECHO_T}no" >&6 2706 fi 2707 2708 fi 2709 if test -z "$CC"; then 2710 if test -n "$ac_tool_prefix"; then 2711 for ac_prog in cl 2712 do 2713 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 2714 set dummy $ac_tool_prefix$ac_prog; ac_word=$2 2715 echo "$as_me:$LINENO: checking for $ac_word" >&5 2716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2717 if test "${ac_cv_prog_CC+set}" = set; then 2718 echo $ECHO_N "(cached) $ECHO_C" >&6 2719 else 2720 if test -n "$CC"; then 2721 ac_cv_prog_CC="$CC" # Let the user override the test. 2722 else 2723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2724 for as_dir in $PATH 2725 do 2726 IFS=$as_save_IFS 2727 test -z "$as_dir" && as_dir=. 2728 for ac_exec_ext in '' $ac_executable_extensions; do 2729 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2730 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 2731 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2732 break 2 2733 fi 2734 done 2735 done 2736 2737 fi 2738 fi 2739 CC=$ac_cv_prog_CC 2740 if test -n "$CC"; then 2741 echo "$as_me:$LINENO: result: $CC" >&5 2742 echo "${ECHO_T}$CC" >&6 2743 else 2744 echo "$as_me:$LINENO: result: no" >&5 2745 echo "${ECHO_T}no" >&6 2746 fi 2747 2748 test -n "$CC" && break 2749 done 2750 fi 2751 if test -z "$CC"; then 2752 ac_ct_CC=$CC 2753 for ac_prog in cl 2754 do 2755 # Extract the first word of "$ac_prog", so it can be a program name with args. 2756 set dummy $ac_prog; ac_word=$2 2757 echo "$as_me:$LINENO: checking for $ac_word" >&5 2758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2759 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 2760 echo $ECHO_N "(cached) $ECHO_C" >&6 2761 else 2762 if test -n "$ac_ct_CC"; then 2763 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 2764 else 2765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2766 for as_dir in $PATH 2767 do 2768 IFS=$as_save_IFS 2769 test -z "$as_dir" && as_dir=. 2770 for ac_exec_ext in '' $ac_executable_extensions; do 2771 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2772 ac_cv_prog_ac_ct_CC="$ac_prog" 2773 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2774 break 2 2775 fi 2776 done 2777 done 2778 2779 fi 2780 fi 2781 ac_ct_CC=$ac_cv_prog_ac_ct_CC 2782 if test -n "$ac_ct_CC"; then 2783 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 2784 echo "${ECHO_T}$ac_ct_CC" >&6 2785 else 2786 echo "$as_me:$LINENO: result: no" >&5 2787 echo "${ECHO_T}no" >&6 2788 fi 2789 2790 test -n "$ac_ct_CC" && break 2791 done 2792 2793 CC=$ac_ct_CC 2794 fi 2795 2796 fi 2797 2798 2799 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH 2800 See \`config.log' for more details." >&5 2801 echo "$as_me: error: no acceptable C compiler found in \$PATH 2802 See \`config.log' for more details." >&2;} 2803 { (exit 1); exit 1; }; } 2804 2805 # Provide some information about the compiler. 2806 echo "$as_me:$LINENO:" \ 2807 "checking for C compiler version" >&5 2808 ac_compiler=`set X $ac_compile; echo $2` 2809 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 2810 (eval $ac_compiler --version </dev/null >&5) 2>&5 2811 ac_status=$? 2812 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2813 (exit $ac_status); } 2814 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 2815 (eval $ac_compiler -v </dev/null >&5) 2>&5 2816 ac_status=$? 2817 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2818 (exit $ac_status); } 2819 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 2820 (eval $ac_compiler -V </dev/null >&5) 2>&5 2821 ac_status=$? 2822 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2823 (exit $ac_status); } 2824 2825 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 2826 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 2827 if test "${ac_cv_c_compiler_gnu+set}" = set; then 2828 echo $ECHO_N "(cached) $ECHO_C" >&6 2829 else 2830 cat >conftest.$ac_ext <<_ACEOF 2831 /* confdefs.h. */ 2832 _ACEOF 2833 cat confdefs.h >>conftest.$ac_ext 2834 cat >>conftest.$ac_ext <<_ACEOF 2835 /* end confdefs.h. */ 2836 2837 int 2838 main () 2839 { 2840 #ifndef __GNUC__ 2841 choke me 2842 #endif 2843 2844 ; 2845 return 0; 2846 } 2847 _ACEOF 2848 rm -f conftest.$ac_objext 2849 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2850 (eval $ac_compile) 2>conftest.er1 2851 ac_status=$? 2852 grep -v '^ *+' conftest.er1 >conftest.err 2853 rm -f conftest.er1 2854 cat conftest.err >&5 2855 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2856 (exit $ac_status); } && 2857 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 2858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2859 (eval $ac_try) 2>&5 2860 ac_status=$? 2861 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2862 (exit $ac_status); }; } && 2863 { ac_try='test -s conftest.$ac_objext' 2864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2865 (eval $ac_try) 2>&5 2866 ac_status=$? 2867 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2868 (exit $ac_status); }; }; then 2869 ac_compiler_gnu=yes 2870 else 2871 echo "$as_me: failed program was:" >&5 2872 sed 's/^/| /' conftest.$ac_ext >&5 2873 2874 ac_compiler_gnu=no 2875 fi 2876 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 2877 ac_cv_c_compiler_gnu=$ac_compiler_gnu 2878 2879 fi 2880 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 2881 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 2882 GCC=`test $ac_compiler_gnu = yes && echo yes` 2883 ac_test_CFLAGS=${CFLAGS+set} 2884 ac_save_CFLAGS=$CFLAGS 2885 CFLAGS="-g" 2886 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 2887 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 2888 if test "${ac_cv_prog_cc_g+set}" = set; then 2889 echo $ECHO_N "(cached) $ECHO_C" >&6 2890 else 2891 cat >conftest.$ac_ext <<_ACEOF 2892 /* confdefs.h. */ 2893 _ACEOF 2894 cat confdefs.h >>conftest.$ac_ext 2895 cat >>conftest.$ac_ext <<_ACEOF 2896 /* end confdefs.h. */ 2897 2898 int 2899 main () 2900 { 2901 2902 ; 2903 return 0; 2904 } 2905 _ACEOF 2906 rm -f conftest.$ac_objext 2907 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2908 (eval $ac_compile) 2>conftest.er1 2909 ac_status=$? 2910 grep -v '^ *+' conftest.er1 >conftest.err 2911 rm -f conftest.er1 2912 cat conftest.err >&5 2913 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2914 (exit $ac_status); } && 2915 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 2916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2917 (eval $ac_try) 2>&5 2918 ac_status=$? 2919 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2920 (exit $ac_status); }; } && 2921 { ac_try='test -s conftest.$ac_objext' 2922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2923 (eval $ac_try) 2>&5 2924 ac_status=$? 2925 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2926 (exit $ac_status); }; }; then 2927 ac_cv_prog_cc_g=yes 2928 else 2929 echo "$as_me: failed program was:" >&5 2930 sed 's/^/| /' conftest.$ac_ext >&5 2931 2932 ac_cv_prog_cc_g=no 2933 fi 2934 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 2935 fi 2936 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 2937 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 2938 if test "$ac_test_CFLAGS" = set; then 2939 CFLAGS=$ac_save_CFLAGS 2940 elif test $ac_cv_prog_cc_g = yes; then 2941 if test "$GCC" = yes; then 2942 CFLAGS="-g -O2" 10242 fi 10243 if test "x$ALT_DIR" = "x" ; then 10244 echo "$as_me:$LINENO: result: none" >&5 10245 echo "${ECHO_T}none" >&6 2943 10246 else 2944 CFLAGS="-g" 2945 fi 2946 else 2947 if test "$GCC" = yes; then 2948 CFLAGS="-O2" 2949 else 2950 CFLAGS= 2951 fi 2952 fi 2953 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 2954 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 2955 if test "${ac_cv_prog_cc_stdc+set}" = set; then 2956 echo $ECHO_N "(cached) $ECHO_C" >&6 2957 else 2958 ac_cv_prog_cc_stdc=no 2959 ac_save_CC=$CC 2960 cat >conftest.$ac_ext <<_ACEOF 2961 /* confdefs.h. */ 2962 _ACEOF 2963 cat confdefs.h >>conftest.$ac_ext 2964 cat >>conftest.$ac_ext <<_ACEOF 2965 /* end confdefs.h. */ 2966 #include <stdarg.h> 2967 #include <stdio.h> 2968 #include <sys/types.h> 2969 #include <sys/stat.h> 2970 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 2971 struct buf { int x; }; 2972 FILE * (*rcsopen) (struct buf *, struct stat *, int); 2973 static char *e (p, i) 2974 char **p; 2975 int i; 2976 { 2977 return p[i]; 2978 } 2979 static char *f (char * (*g) (char **, int), char **p, ...) 2980 { 2981 char *s; 2982 va_list v; 2983 va_start (v,p); 2984 s = g (p, va_arg (v,int)); 2985 va_end (v); 2986 return s; 2987 } 2988 2989 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 2990 function prototypes and stuff, but not '\xHH' hex character constants. 2991 These don't provoke an error unfortunately, instead are silently treated 2992 as 'x'. The following induces an error, until -std1 is added to get 2993 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 2994 array size at least. It's necessary to write '\x00'==0 to get something 2995 that's true only with -std1. */ 2996 int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 2997 2998 int test (int i, double x); 2999 struct s1 {int (*f) (int a);}; 3000 struct s2 {int (*f) (double a);}; 3001 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 3002 int argc; 3003 char **argv; 3004 int 3005 main () 3006 { 3007 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 3008 ; 3009 return 0; 3010 } 3011 _ACEOF 3012 # Don't try gcc -ansi; that turns off useful extensions and 3013 # breaks some systems' header files. 3014 # AIX -qlanglvl=ansi 3015 # Ultrix and OSF/1 -std1 3016 # HP-UX 10.20 and later -Ae 3017 # HP-UX older versions -Aa -D_HPUX_SOURCE 3018 # SVR4 -Xc -D__EXTENSIONS__ 3019 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 3020 do 3021 CC="$ac_save_CC $ac_arg" 3022 rm -f conftest.$ac_objext 3023 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3024 (eval $ac_compile) 2>conftest.er1 3025 ac_status=$? 3026 grep -v '^ *+' conftest.er1 >conftest.err 3027 rm -f conftest.er1 3028 cat conftest.err >&5 3029 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3030 (exit $ac_status); } && 3031 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3033 (eval $ac_try) 2>&5 3034 ac_status=$? 3035 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3036 (exit $ac_status); }; } && 3037 { ac_try='test -s conftest.$ac_objext' 3038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3039 (eval $ac_try) 2>&5 3040 ac_status=$? 3041 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3042 (exit $ac_status); }; }; then 3043 ac_cv_prog_cc_stdc=$ac_arg 3044 break 3045 else 3046 echo "$as_me: failed program was:" >&5 3047 sed 's/^/| /' conftest.$ac_ext >&5 3048 3049 fi 3050 rm -f conftest.err conftest.$ac_objext 3051 done 3052 rm -f conftest.$ac_ext conftest.$ac_objext 3053 CC=$ac_save_CC 3054 3055 fi 3056 3057 case "x$ac_cv_prog_cc_stdc" in 3058 x|xno) 3059 echo "$as_me:$LINENO: result: none needed" >&5 3060 echo "${ECHO_T}none needed" >&6 ;; 3061 *) 3062 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 3063 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 3064 CC="$CC $ac_cv_prog_cc_stdc" ;; 3065 esac 3066 3067 # Some people use a C++ compiler to compile C. Since we use `exit', 3068 # in C++ we need to declare it. In case someone uses the same compiler 3069 # for both compiling C and C++ we need to have the C++ compiler decide 3070 # the declaration of exit, since it's the most demanding environment. 3071 cat >conftest.$ac_ext <<_ACEOF 3072 #ifndef __cplusplus 3073 choke me 3074 #endif 3075 _ACEOF 3076 rm -f conftest.$ac_objext 3077 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3078 (eval $ac_compile) 2>conftest.er1 3079 ac_status=$? 3080 grep -v '^ *+' conftest.er1 >conftest.err 3081 rm -f conftest.er1 3082 cat conftest.err >&5 3083 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3084 (exit $ac_status); } && 3085 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3087 (eval $ac_try) 2>&5 3088 ac_status=$? 3089 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3090 (exit $ac_status); }; } && 3091 { ac_try='test -s conftest.$ac_objext' 3092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3093 (eval $ac_try) 2>&5 3094 ac_status=$? 3095 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3096 (exit $ac_status); }; }; then 3097 for ac_declaration in \ 3098 '' \ 3099 'extern "C" void std::exit (int) throw (); using std::exit;' \ 3100 'extern "C" void std::exit (int); using std::exit;' \ 3101 'extern "C" void exit (int) throw ();' \ 3102 'extern "C" void exit (int);' \ 3103 'void exit (int);' 3104 do 3105 cat >conftest.$ac_ext <<_ACEOF 3106 /* confdefs.h. */ 3107 _ACEOF 3108 cat confdefs.h >>conftest.$ac_ext 3109 cat >>conftest.$ac_ext <<_ACEOF 3110 /* end confdefs.h. */ 3111 $ac_declaration 3112 #include <stdlib.h> 3113 int 3114 main () 3115 { 3116 exit (42); 3117 ; 3118 return 0; 3119 } 3120 _ACEOF 3121 rm -f conftest.$ac_objext 3122 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3123 (eval $ac_compile) 2>conftest.er1 3124 ac_status=$? 3125 grep -v '^ *+' conftest.er1 >conftest.err 3126 rm -f conftest.er1 3127 cat conftest.err >&5 3128 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3129 (exit $ac_status); } && 3130 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3132 (eval $ac_try) 2>&5 3133 ac_status=$? 3134 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3135 (exit $ac_status); }; } && 3136 { ac_try='test -s conftest.$ac_objext' 3137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3138 (eval $ac_try) 2>&5 3139 ac_status=$? 3140 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3141 (exit $ac_status); }; }; then 3142 : 3143 else 3144 echo "$as_me: failed program was:" >&5 3145 sed 's/^/| /' conftest.$ac_ext >&5 3146 3147 continue 3148 fi 3149 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3150 cat >conftest.$ac_ext <<_ACEOF 3151 /* confdefs.h. */ 3152 _ACEOF 3153 cat confdefs.h >>conftest.$ac_ext 3154 cat >>conftest.$ac_ext <<_ACEOF 3155 /* end confdefs.h. */ 3156 $ac_declaration 3157 int 3158 main () 3159 { 3160 exit (42); 3161 ; 3162 return 0; 3163 } 3164 _ACEOF 3165 rm -f conftest.$ac_objext 3166 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3167 (eval $ac_compile) 2>conftest.er1 3168 ac_status=$? 3169 grep -v '^ *+' conftest.er1 >conftest.err 3170 rm -f conftest.er1 3171 cat conftest.err >&5 3172 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3173 (exit $ac_status); } && 3174 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3176 (eval $ac_try) 2>&5 3177 ac_status=$? 3178 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3179 (exit $ac_status); }; } && 3180 { ac_try='test -s conftest.$ac_objext' 3181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3182 (eval $ac_try) 2>&5 3183 ac_status=$? 3184 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3185 (exit $ac_status); }; }; then 3186 break 3187 else 3188 echo "$as_me: failed program was:" >&5 3189 sed 's/^/| /' conftest.$ac_ext >&5 3190 3191 fi 3192 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3193 done 3194 rm -f conftest* 3195 if test -n "$ac_declaration"; then 3196 echo '#ifdef __cplusplus' >>confdefs.h 3197 echo $ac_declaration >>confdefs.h 3198 echo '#endif' >>confdefs.h 3199 fi 3200 3201 else 3202 echo "$as_me: failed program was:" >&5 3203 sed 's/^/| /' conftest.$ac_ext >&5 3204 3205 fi 3206 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3207 ac_ext=c 3208 ac_cpp='$CPP $CPPFLAGS' 3209 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3210 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3211 ac_compiler_gnu=$ac_cv_c_compiler_gnu 3212 3213 3214 3215 echo "$as_me:$LINENO: checking for building with threads" >&5 3216 echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 3217 # Check whether --enable-threads or --disable-threads was given. 3218 if test "${enable_threads+set}" = set; then 3219 enableval="$enable_threads" 3220 tcl_ok=$enableval 3221 else 3222 tcl_ok=no 3223 fi; 3224 3225 if test "$tcl_ok" = "yes"; then 3226 echo "$as_me:$LINENO: result: yes" >&5 3227 echo "${ECHO_T}yes" >&6 3228 TCL_THREADS=1 3229 cat >>confdefs.h <<\_ACEOF 3230 #define TCL_THREADS 1 3231 _ACEOF 3232 3233 cat >>confdefs.h <<\_ACEOF 3234 #define _REENTRANT 1 3235 _ACEOF 3236 3237 3238 echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 3239 echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 3240 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then 3241 echo $ECHO_N "(cached) $ECHO_C" >&6 3242 else 3243 ac_check_lib_save_LIBS=$LIBS 3244 LIBS="-lpthread $LIBS" 3245 cat >conftest.$ac_ext <<_ACEOF 3246 /* confdefs.h. */ 3247 _ACEOF 3248 cat confdefs.h >>conftest.$ac_ext 3249 cat >>conftest.$ac_ext <<_ACEOF 3250 /* end confdefs.h. */ 3251 3252 /* Override any gcc2 internal prototype to avoid an error. */ 3253 #ifdef __cplusplus 3254 extern "C" 3255 #endif 3256 /* We use char because int might match the return type of a gcc2 3257 builtin and then its argument prototype would still apply. */ 3258 char pthread_mutex_init (); 3259 int 3260 main () 3261 { 3262 pthread_mutex_init (); 3263 ; 3264 return 0; 3265 } 3266 _ACEOF 3267 rm -f conftest.$ac_objext conftest$ac_exeext 3268 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 3269 (eval $ac_link) 2>conftest.er1 3270 ac_status=$? 3271 grep -v '^ *+' conftest.er1 >conftest.err 3272 rm -f conftest.er1 3273 cat conftest.err >&5 3274 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3275 (exit $ac_status); } && 3276 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' 3277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3278 (eval $ac_try) 2>&5 3279 ac_status=$? 3280 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3281 (exit $ac_status); }; } && 3282 { ac_try='test -s conftest$ac_exeext' 3283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3284 (eval $ac_try) 2>&5 3285 ac_status=$? 3286 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3287 (exit $ac_status); }; }; then 3288 ac_cv_lib_pthread_pthread_mutex_init=yes 3289 else 3290 echo "$as_me: failed program was:" >&5 3291 sed 's/^/| /' conftest.$ac_ext >&5 3292 3293 ac_cv_lib_pthread_pthread_mutex_init=no 3294 fi 3295 rm -f conftest.err conftest.$ac_objext \ 3296 conftest$ac_exeext conftest.$ac_ext 3297 LIBS=$ac_check_lib_save_LIBS 3298 fi 3299 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 3300 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 3301 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then 3302 tcl_ok=yes 3303 else 3304 tcl_ok=no 3305 fi 3306 3307 if test "$tcl_ok" = "yes"; then 3308 # The space is needed 3309 THREADS_LIBS=" -lpthread" 3310 else 3311 TCL_THREADS=0 3312 { echo "$as_me:$LINENO: WARNING: \"Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...\"" >&5 3313 echo "$as_me: WARNING: \"Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...\"" >&2;} 3314 fi 3315 else 3316 TCL_THREADS=0 3317 echo "$as_me:$LINENO: result: no (default)" >&5 3318 echo "${ECHO_T}no (default)" >&6 3319 fi 3320 3321 3322 3323 #-------------------------------------------------------------------- 3324 # The statement below defines a collection of symbols related to 3325 # building as a shared library instead of a static library. 3326 #-------------------------------------------------------------------- 3327 3328 3329 echo "$as_me:$LINENO: checking how to build libraries" >&5 3330 echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 3331 # Check whether --enable-shared or --disable-shared was given. 3332 if test "${enable_shared+set}" = set; then 3333 enableval="$enable_shared" 3334 tcl_ok=$enableval 3335 else 3336 tcl_ok=yes 3337 fi; 3338 3339 if test "${enable_shared+set}" = set; then 3340 enableval="$enable_shared" 3341 tcl_ok=$enableval 3342 else 3343 tcl_ok=yes 3344 fi 3345 3346 if test "$tcl_ok" = "yes" ; then 3347 echo "$as_me:$LINENO: result: shared" >&5 3348 echo "${ECHO_T}shared" >&6 3349 SHARED_BUILD=1 3350 else 3351 echo "$as_me:$LINENO: result: static" >&5 3352 echo "${ECHO_T}static" >&6 3353 SHARED_BUILD=0 3354 cat >>confdefs.h <<\_ACEOF 3355 #define STATIC_BUILD 1 3356 _ACEOF 3357 3358 fi 3359 3360 3361 #-------------------------------------------------------------------- 3362 # This macro figures out what flags to use with the compiler/linker 3363 # when building shared/static debug/optimized objects. This information 3364 # is all taken from the tclConfig.sh file. 3365 #-------------------------------------------------------------------- 3366 3367 CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG} 3368 CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE} 3369 LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG} 3370 LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE} 3371 SHLIB_LD=${TCL_SHLIB_LD} 3372 STLIB_LD=${TCL_STLIB_LD} 3373 SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS} 3374 3375 3376 3377 3378 3379 3380 3381 3382 #-------------------------------------------------------------------- 3383 # Set the default compiler switches based on the --enable-symbols 3384 # option. 3385 #-------------------------------------------------------------------- 3386 3387 3388 case "`uname -s`" in 3389 *win32* | *WIN32* | *CYGWIN_NT*) 3390 tcl_dbgx=d 3391 ;; 3392 *) 3393 tcl_dbgx=g 3394 ;; 3395 esac 3396 3397 echo "$as_me:$LINENO: checking for build with symbols" >&5 3398 echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 3399 # Check whether --enable-symbols or --disable-symbols was given. 3400 if test "${enable_symbols+set}" = set; then 3401 enableval="$enable_symbols" 3402 tcl_ok=$enableval 3403 else 3404 tcl_ok=no 3405 fi; 3406 if test "$tcl_ok" = "yes"; then 3407 CFLAGS_DEFAULT="${CFLAGS_DEBUG}" 3408 LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" 3409 DBGX=${tcl_dbgx} 3410 TCL_DBGX=${tcl_dbgx} 3411 echo "$as_me:$LINENO: result: yes" >&5 3412 echo "${ECHO_T}yes" >&6 3413 else 3414 CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" 3415 LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" 3416 DBGX="" 3417 TCL_DBGX="" 3418 echo "$as_me:$LINENO: result: no" >&5 3419 echo "${ECHO_T}no" >&6 3420 fi 3421 3422 3423 3424 3425 3426 3427 if test "${SHARED_BUILD}" = "1" ; then 3428 CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}' 3429 else 3430 CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}' 3431 fi 3432 3433 #-------------------------------------------------------------------- 3434 # Everyone should be linking against the Tcl stub library. If you 3435 # can't for some reason, remove this definition. If you aren't using 3436 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to 3437 # link against the non-stubbed Tcl library. 3438 #-------------------------------------------------------------------- 3439 3440 cat >>confdefs.h <<\_ACEOF 3441 #define USE_TCL_STUBS 1 3442 _ACEOF 3443 3444 3445 #-------------------------------------------------------------------- 3446 # This macro generates a line to use when building a library. It 3447 # depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS, 3448 # and SC_LOAD_TCLCONFIG macros above. 3449 #-------------------------------------------------------------------- 3450 3451 3452 case "`uname -s`" in 3453 *win32* | *WIN32* | *CYGWIN_NT*) 3454 if test "${CC-cc}" = "cl"; then 3455 MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$@_OBJECTS) " 3456 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$@_OBJECTS) " 3457 fi 3458 ;; 3459 *) 3460 MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$@_OBJECTS)" 3461 MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" 3462 ;; 3463 esac 3464 3465 if test "${SHARED_BUILD}" = "1" ; then 3466 MAKE_LIB=${MAKE_SHARED_LIB} 3467 else 3468 MAKE_LIB=${MAKE_STATIC_LIB} 3469 fi 3470 3471 3472 3473 3474 3475 3476 #-------------------------------------------------------------------- 3477 # eval these two values to dereference the ${DBGX} variable. 3478 #-------------------------------------------------------------------- 3479 3480 eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}" 3481 eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}" 3482 3483 #-------------------------------------------------------------------- 3484 # Shared libraries and static libraries have different names. 3485 #-------------------------------------------------------------------- 3486 3487 case "`uname -s`" in 3488 *win32* | *WIN32* | *CYGWIN_NT*) 3489 if test "${SHARED_BUILD}" = "1" ; then 3490 SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS}" 3491 eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}" 3492 RANLIB=: 3493 else 3494 eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}" 3495 fi 3496 ;; 3497 *) 3498 if test "${SHARED_BUILD}" = "1" ; then 3499 SHLIB_LD_LIBS="${TCL_STUB_LIB_SPEC}" 3500 eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}" 3501 RANLIB=: 3502 else 3503 eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}" 3504 fi 3505 ;; 3506 esac 3507 3508 #-------------------------------------------------------------------- 3509 # __CHANGE__ 3510 # Change the name from exampeA_LIB_FILE to match your package name. 3511 #-------------------------------------------------------------------- 3512 3513 3514 3515 3516 #-------------------------------------------------------------------- 3517 # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl 3518 # file during the install process. Don't run the TCLSH_PROG through 3519 # ${CYGPATH} because it's being used directly by make. 3520 # Require that we use a tclsh shell version 8.2 or later since earlier 3521 # versions have bugs in the pkg_mkIndex routine. 3522 #-------------------------------------------------------------------- 3523 3524 for ac_prog in tclsh8.4${EXEEXT} tclsh84${EXEEXT} tclsh${EXEEXT} 3525 do 3526 # Extract the first word of "$ac_prog", so it can be a program name with args. 3527 set dummy $ac_prog; ac_word=$2 3528 echo "$as_me:$LINENO: checking for $ac_word" >&5 3529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 3530 if test "${ac_cv_path_TCLSH_PROG+set}" = set; then 3531 echo $ECHO_N "(cached) $ECHO_C" >&6 3532 else 3533 case $TCLSH_PROG in 3534 [\\/]* | ?:[\\/]*) 3535 ac_cv_path_TCLSH_PROG="$TCLSH_PROG" # Let the user override the test with a path. 3536 ;; 3537 *) 3538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3539 as_dummy="${exec_prefix}:${PATH}" 3540 for as_dir in $as_dummy 3541 do 3542 IFS=$as_save_IFS 3543 test -z "$as_dir" && as_dir=. 3544 for ac_exec_ext in '' $ac_executable_extensions; do 3545 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3546 ac_cv_path_TCLSH_PROG="$as_dir/$ac_word$ac_exec_ext" 3547 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 3548 break 2 3549 fi 3550 done 3551 done 3552 3553 ;; 3554 esac 3555 fi 3556 TCLSH_PROG=$ac_cv_path_TCLSH_PROG 3557 3558 if test -n "$TCLSH_PROG"; then 3559 echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5 3560 echo "${ECHO_T}$TCLSH_PROG" >&6 3561 else 3562 echo "$as_me:$LINENO: result: no" >&5 3563 echo "${ECHO_T}no" >&6 3564 fi 3565 3566 test -n "$TCLSH_PROG" && break 3567 done 3568 test -n "$TCLSH_PROG" || TCLSH_PROG=":" 3569 3570 3571 if test "x${TCLSH_PROG}" = "x:" ; then 3572 { echo "$as_me:$LINENO: WARNING: No tclsh executable found. You will have to build the pkgIndex.tcl file manually." >&5 3573 echo "$as_me: WARNING: No tclsh executable found. You will have to build the pkgIndex.tcl file manually." >&2;} 3574 fi 3575 3576 3577 #-------------------------------------------------------------------- 3578 # Finalize patchlevel and version info 3579 #-------------------------------------------------------------------- 10247 echo "$as_me:$LINENO: result: ${ALT_DIR}" >&5 10248 echo "${ECHO_T}${ALT_DIR}" >&6 10249 fi 10250 10251 10252 3580 10253 PATCHLEVEL=`${TCLSH_PROG} cf/patchlevel.tcl` 3581 10254 EXACT_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}-${PATCHLEVEL} … … 3586 10259 3587 10260 3588 3589 3590 3591 10261 #-------------------------------------------------------------------- 3592 10262 # Finally, substitute all of the various values into the Makefile. 10263 # You may alternatively have a special pkgIndex.tcl.in or other files 10264 # which require substituting th AC variables in. Include these here. 3593 10265 #-------------------------------------------------------------------- 3594 10266 … … 3987 10659 cat >&5 <<_CSEOF 3988 10660 3989 This file was extended by $as_me, which was10661 This file was extended by Rappture $as_me 1.1, which was 3990 10662 generated by GNU Autoconf 2.59. Invocation command line was 3991 10663 … … 4042 10714 cat >>$CONFIG_STATUS <<_ACEOF 4043 10715 ac_cs_version="\\ 4044 config.status 10716 Rappture config.status 1.1 4045 10717 configured by $0, generated by GNU Autoconf 2.59, 4046 10718 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" … … 4231 10903 s,@ECHO_T@,$ECHO_T,;t t 4232 10904 s,@LIBS@,$LIBS,;t t 10905 s,@CYGPATH@,$CYGPATH,;t t 10906 s,@EXEEXT@,$EXEEXT,;t t 10907 s,@PKG_LIB_FILE@,$PKG_LIB_FILE,;t t 10908 s,@PKG_STUB_LIB_FILE@,$PKG_STUB_LIB_FILE,;t t 10909 s,@PKG_STUB_SOURCES@,$PKG_STUB_SOURCES,;t t 10910 s,@PKG_STUB_OBJECTS@,$PKG_STUB_OBJECTS,;t t 10911 s,@PKG_TCL_SOURCES@,$PKG_TCL_SOURCES,;t t 10912 s,@PKG_HEADERS@,$PKG_HEADERS,;t t 10913 s,@PKG_INCLUDES@,$PKG_INCLUDES,;t t 10914 s,@PKG_LIBS@,$PKG_LIBS,;t t 10915 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t 10916 s,@TCL_VERSION@,$TCL_VERSION,;t t 10917 s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t 10918 s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t 10919 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t 10920 s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t 10921 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t 10922 s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t 10923 s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t 10924 s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t 10925 s,@TCL_LIBS@,$TCL_LIBS,;t t 10926 s,@TCL_DEFS@,$TCL_DEFS,;t t 10927 s,@TCL_EXTRA_CFLAGS@,$TCL_EXTRA_CFLAGS,;t t 10928 s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t 10929 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t 10930 s,@CC@,$CC,;t t 10931 s,@CFLAGS@,$CFLAGS,;t t 10932 s,@LDFLAGS@,$LDFLAGS,;t t 10933 s,@CPPFLAGS@,$CPPFLAGS,;t t 10934 s,@ac_ct_CC@,$ac_ct_CC,;t t 10935 s,@OBJEXT@,$OBJEXT,;t t 4233 10936 s,@CXX@,$CXX,;t t 4234 10937 s,@CXXFLAGS@,$CXXFLAGS,;t t 4235 s,@LDFLAGS@,$LDFLAGS,;t t4236 s,@CPPFLAGS@,$CPPFLAGS,;t t4237 10938 s,@ac_ct_CXX@,$ac_ct_CXX,;t t 4238 s,@EXEEXT@,$EXEEXT,;t t 4239 s,@OBJEXT@,$OBJEXT,;t t 10939 s,@CPP@,$CPP,;t t 4240 10940 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t 4241 10941 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t … … 4244 10944 s,@RANLIB@,$RANLIB,;t t 4245 10945 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t 4246 s,@build@,$build,;t t 4247 s,@build_cpu@,$build_cpu,;t t 4248 s,@build_vendor@,$build_vendor,;t t 4249 s,@build_os@,$build_os,;t t 4250 s,@host@,$host,;t t 4251 s,@host_cpu@,$host_cpu,;t t 4252 s,@host_vendor@,$host_vendor,;t t 4253 s,@host_os@,$host_os,;t t 4254 s,@CYGPATH@,$CYGPATH,;t t 10946 s,@EGREP@,$EGREP,;t t 10947 s,@MATH_LIBS@,$MATH_LIBS,;t t 10948 s,@PKG_SOURCES@,$PKG_SOURCES,;t t 10949 s,@PKG_OBJECTS@,$PKG_OBJECTS,;t t 10950 s,@CLEANFILES@,$CLEANFILES,;t t 4255 10951 s,@TCL_INCLUDES@,$TCL_INCLUDES,;t t 4256 s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t 4257 s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t 4258 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t 4259 s,@TCL_LIBS@,$TCL_LIBS,;t t 4260 s,@TCL_DEFS@,$TCL_DEFS,;t t 4261 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t 4262 s,@TCL_EXTRA_CFLAGS@,$TCL_EXTRA_CFLAGS,;t t 4263 s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t 4264 s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t 4265 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t 4266 s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t 4267 s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t 4268 s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t 4269 s,@BLT_SRC_DIR@,$BLT_SRC_DIR,;t t 4270 s,@CLEANFILES@,$CLEANFILES,;t t 4271 s,@CC@,$CC,;t t 4272 s,@CFLAGS@,$CFLAGS,;t t 4273 s,@ac_ct_CC@,$ac_ct_CC,;t t 10952 s,@TCL_THREADS@,$TCL_THREADS,;t t 10953 s,@SHARED_BUILD@,$SHARED_BUILD,;t t 10954 s,@AR@,$AR,;t t 10955 s,@CELIB_DIR@,$CELIB_DIR,;t t 10956 s,@LIBOBJS@,$LIBOBJS,;t t 10957 s,@DL_LIBS@,$DL_LIBS,;t t 4274 10958 s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t 4275 10959 s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t 10960 s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t 4276 10961 s,@STLIB_LD@,$STLIB_LD,;t t 4277 10962 s,@SHLIB_LD@,$SHLIB_LD,;t t 10963 s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t 4278 10964 s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t 4279 s,@ SHLIB_LDFLAGS@,$SHLIB_LDFLAGS,;t t10965 s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t 4280 10966 s,@TCL_DBGX@,$TCL_DBGX,;t t 4281 10967 s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t … … 4284 10970 s,@MAKE_SHARED_LIB@,$MAKE_SHARED_LIB,;t t 4285 10971 s,@MAKE_STATIC_LIB@,$MAKE_STATIC_LIB,;t t 4286 s,@ Rappture_LIB_FILE@,$Rappture_LIB_FILE,;t t4287 s,@ SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t10972 s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t 10973 s,@RANLIB_STUB@,$RANLIB_STUB,;t t 4288 10974 s,@TCLSH_PROG@,$TCLSH_PROG,;t t 4289 s,@PACKAGE@,$PACKAGE,;t t 4290 s,@VERSION@,$VERSION,;t t 10975 s,@BLT_SRC_DIR@,$BLT_SRC_DIR,;t t 10976 s,@RAPPTURE_DIR@,$RAPPTURE_DIR,;t t 10977 s,@ALT_DIR@,$ALT_DIR,;t t 4291 10978 s,@PATCHLEVEL@,$PATCHLEVEL,;t t 4292 10979 s,@EXACT_VERSION@,$EXACT_VERSION,;t t 4293 10980 s,@NODOT_VERSION@,$NODOT_VERSION,;t t 4294 s,@LIBOBJS@,$LIBOBJS,;t t4295 10981 s,@LTLIBOBJS@,$LTLIBOBJS,;t t 4296 10982 CEOF … … 4460 11146 esac 4461 11147 11148 if test x"$ac_file" != x-; then 11149 { echo "$as_me:$LINENO: creating $ac_file" >&5 11150 echo "$as_me: creating $ac_file" >&6;} 11151 rm -f "$ac_file" 11152 fi 4462 11153 # Let's still pretend it is `configure' which instantiates (i.e., don't 4463 11154 # use $as_me), people would be surprised to read: … … 4498 11189 esac 4499 11190 done` || { (exit 1); exit 1; } 4500 4501 if test x"$ac_file" != x-; then4502 { echo "$as_me:$LINENO: creating $ac_file" >&54503 echo "$as_me: creating $ac_file" >&6;}4504 rm -f "$ac_file"4505 fi4506 11191 _ACEOF 4507 11192 cat >>$CONFIG_STATUS <<_ACEOF … … 4563 11248 fi 4564 11249 11250 11251 -
trunk/src/tcl/configure.in
r225 r527 1 #-------------------------------------------------------------------- 1 #!/bin/bash -norc 2 dnl This file is an input file used by the GNU "autoconf" program to 3 dnl generate the file "configure", which is run during Tcl installation 4 dnl to configure the system for the local environment. 5 # 6 # RCS: @(#) $Id: configure.in,v 1.46 2006/01/23 19:18:55 hobbs Exp $ 7 8 #----------------------------------------------------------------------- 2 9 # Sample configure.in for Tcl Extensions. The only places you should 3 10 # need to modify this file are marked by the string __CHANGE__ 4 #-------------------------------------------------------------------- 5 6 #-------------------------------------------------------------------- 11 #----------------------------------------------------------------------- 12 13 #----------------------------------------------------------------------- 7 14 # __CHANGE__ 8 # This very first macro is used to verify that the configure script can 9 # find the sources. The argument to AC_INIT should be a unique filename 10 # for this package, and can be a relative path, such as: 11 # 12 # AC_INIT(../generic/tcl.h) 13 #-------------------------------------------------------------------- 14 15 AC_INIT(src/RpLibraryTclInterface.cc) 16 AC_CONFIG_AUX_DIR(cf) 17 18 #-------------------------------------------------------------------- 15 # Set your package name and version numbers here. 16 # 17 # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION 18 # set as provided. These will also be added as -D defs in your Makefile 19 # so you can encode the package version directly into the source files. 20 #----------------------------------------------------------------------- 21 22 AC_INIT([Rappture], [1.1]) 23 24 #-------------------------------------------------------------------- 25 # Call TEA_INIT as the first TEA_ macro to set up initial vars. 26 # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" 27 # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. 28 #-------------------------------------------------------------------- 29 30 TEA_INIT([3.5]) 31 32 AC_CONFIG_AUX_DIR(tclconfig) 33 34 #-------------------------------------------------------------------- 35 # Extra build options 36 #-------------------------------------------------------------------- 37 AC_ARG_WITH(blt, [ --with-blt=DIR Find bltInt.h in DIR], 38 blt_source_dir=$withval) 39 40 AC_ARG_WITH(rappture, [ --with-rappture=DIR Find include/core/rappture.h in DIR], 41 rappture_dir=$withval) 42 43 AC_ARG_WITH(altpath, [ --with-altpath=DIR Alternate path to search for required packages], 44 alt_dir=$withval) 45 46 #-------------------------------------------------------------------- 47 # Load the tclConfig.sh file 48 #-------------------------------------------------------------------- 49 50 TEA_PATH_TCLCONFIG 51 TEA_LOAD_TCLCONFIG 52 53 #-------------------------------------------------------------------- 54 # Load the tkConfig.sh file if necessary (Tk extension) 55 #-------------------------------------------------------------------- 56 57 #TEA_PATH_TKCONFIG 58 #TEA_LOAD_TKCONFIG 59 60 #----------------------------------------------------------------------- 61 # Handle the --prefix=... option by defaulting to what Tcl gave. 62 # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. 63 #----------------------------------------------------------------------- 64 65 TEA_PREFIX 66 67 #----------------------------------------------------------------------- 68 # Standard compiler checks. 69 # This sets up CC by using the CC env var, or looks for gcc otherwise. 70 # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create 71 # the basic setup necessary to compile executables. 72 #----------------------------------------------------------------------- 73 74 TEA_SETUP_COMPILER 75 76 #----------------------------------------------------------------------- 19 77 # __CHANGE__ 20 # Set your package name and version numbers here. The NODOT_VERSION is 21 # required for constructing the library name on systems that don't like 22 # dots in library names (Windows). The VERSION variable is used on the 23 # other systems. 24 #-------------------------------------------------------------------- 25 26 PACKAGE=Rappture 27 28 MAJOR_VERSION=1 29 MINOR_VERSION=1 30 VERSION=${MAJOR_VERSION}.${MINOR_VERSION} 31 32 #-------------------------------------------------------------------- 33 # Extra build options 34 #-------------------------------------------------------------------- 35 #AC_ARG_WITH(blt, [ --with-blt=DIR Find bltInt.h in DIR], 36 # blt_source_dir=$withval) 37 38 #-------------------------------------------------------------------- 39 # We put this here so that you can compile with -DVERSION="1.2" to 40 # encode the package version directly into the source files. 41 #-------------------------------------------------------------------- 42 43 eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}") 44 45 #-------------------------------------------------------------------- 46 # Check whether --enable-gcc or --disable-gcc was given. Do this 47 # before AC_CYGWIN is called so the compiler can 48 # be fully tested by built-in autoconf tools. 49 # This macro also calls AC_PROG_CC to set the compiler if --enable-gcc 50 # was not used. 51 #-------------------------------------------------------------------- 52 53 #SC_ENABLE_GCC 54 AC_PROG_CXX 55 AC_PROG_INSTALL 56 57 #-------------------------------------------------------------------- 58 # Checks to see if the make program sets the $MAKE variable. 59 #-------------------------------------------------------------------- 60 61 AC_PROG_MAKE_SET 62 63 #-------------------------------------------------------------------- 64 # Find ranlib 65 #-------------------------------------------------------------------- 66 67 AC_PROG_RANLIB 68 69 #-------------------------------------------------------------------- 70 # This macro performs additional compiler tests. 71 #-------------------------------------------------------------------- 72 73 AC_CYGWIN 74 75 #-------------------------------------------------------------------- 76 # Determines the correct binary file extension (.o, .obj, .exe etc.) 77 #-------------------------------------------------------------------- 78 79 AC_OBJEXT 80 AC_EXEEXT 81 82 #-------------------------------------------------------------------- 83 # "cygpath" is used on windows to generate native path names for include 78 # Specify the C source files to compile in TEA_ADD_SOURCES, 79 # public headers that need to be installed in TEA_ADD_HEADERS, 80 # stub library C source files to compile in TEA_ADD_STUB_SOURCES, 81 # and runtime Tcl library files in TEA_ADD_TCL_SOURCES. 82 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS 83 # and PKG_TCL_SOURCES. 84 #----------------------------------------------------------------------- 85 86 TEA_ADD_SOURCES([Rappture_Init.cc RpLibraryTclInterface.cc RpUnitsTclInterface.cc ]) 87 TEA_ADD_HEADERS([]) 88 TEA_ADD_INCLUDES([]) 89 TEA_ADD_LIBS(BLT24.lib libexpat.lib ../librappture.lib) 90 TEA_ADD_CFLAGS([]) 91 TEA_ADD_STUB_SOURCES([]) 92 TEA_ADD_TCL_SOURCES([scripts/exec.tcl scripts/value.tcl init.tcl ../../tcl/scripts/library.tcl ../../tcl/scripts/result.tcl]) 93 94 #-------------------------------------------------------------------- 95 # __CHANGE__ 96 # A few miscellaneous platform-specific items: 97 # 98 # Define a special symbol for Windows (BUILD_sample in this case) so 99 # that we create the export library with the dll. 100 # 101 # Windows creates a few extra files that need to be cleaned up. 102 # You can add more files to clean if your extension creates any extra 84 103 # files. 85 # These variables should only be used with the compiler and linker since 86 # they generate native path names. 87 # 88 # Unix tclConfig.sh points SRC_DIR at the top-level directory of 89 # the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at 90 # the win subdirectory. Hence the different usages of SRC_DIR below. 91 # 92 # This must be done before calling SC_PUBLIC_TCL_HEADERS 93 #-------------------------------------------------------------------- 94 95 case "`uname -s`" in 96 *win32* | *WIN32* | *CYGWIN_NT*) 97 CYGPATH="cygpath -w" 98 ;; 99 *) 100 CYGPATH=echo 101 ;; 102 esac 103 104 AC_SUBST(CYGPATH) 104 # 105 # TEA_ADD_* any platform specific compiler/build info here. 106 #-------------------------------------------------------------------- 107 108 if test "${TEA_PLATFORM}" = "windows" ; then 109 AC_DEFINE(BUILD_rappture, 1, [Build windows export dll]) 110 CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch" 111 TEA_ADD_LIBS(/LIBPATH:C:/opt/lib /LIBPATH:C:/Tcl/lib scew_s.lib) 112 #TEA_ADD_SOURCES([win/winFile.c]) 113 #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) 114 else 115 CLEANFILES="" 116 #TEA_ADD_SOURCES([unix/unixFile.c]) 117 TEA_ADD_LIBS([scew.lib]) 118 fi 119 AC_SUBST(CLEANFILES) 105 120 106 121 #-------------------------------------------------------------------- … … 110 125 # contain private data structures and are subject to change without 111 126 # notice. 112 # This MUST be called before SC_PATH_TCLCONFIG/SC_LOAD_TCLCONFIG 113 #-------------------------------------------------------------------- 114 115 SC_PUBLIC_TCL_HEADERS 116 #SC_PRIVATE_TCL_HEADERS 117 118 #-------------------------------------------------------------------- 119 # Load the tclConfig.sh file 120 #-------------------------------------------------------------------- 121 122 SC_PATH_TCLCONFIG 123 SC_LOAD_TCLCONFIG 127 # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG 128 #-------------------------------------------------------------------- 129 130 TEA_PUBLIC_TCL_HEADERS 131 #TEA_PRIVATE_TCL_HEADERS 132 133 #TEA_PUBLIC_TK_HEADERS 134 #TEA_PRIVATE_TK_HEADERS 135 #TEA_PATH_X 136 137 #-------------------------------------------------------------------- 138 # Check whether --enable-threads or --disable-threads was given. 139 # This auto-enables if Tcl was compiled threaded. 140 #-------------------------------------------------------------------- 141 142 TEA_ENABLE_THREADS 143 144 #-------------------------------------------------------------------- 145 # The statement below defines a collection of symbols related to 146 # building as a shared library instead of a static library. 147 #-------------------------------------------------------------------- 148 149 TEA_ENABLE_SHARED 150 151 #-------------------------------------------------------------------- 152 # This macro figures out what flags to use with the compiler/linker 153 # when building shared/static debug/optimized objects. This information 154 # can be taken from the tclConfig.sh file, but this figures it all out. 155 #-------------------------------------------------------------------- 156 157 TEA_CONFIG_CFLAGS 158 159 #-------------------------------------------------------------------- 160 # Set the default compiler switches based on the --enable-symbols option. 161 #-------------------------------------------------------------------- 162 163 TEA_ENABLE_SYMBOLS 164 165 #-------------------------------------------------------------------- 166 # Everyone should be linking against the Tcl stub library. If you 167 # can't for some reason, remove this definition. If you aren't using 168 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to 169 # link against the non-stubbed Tcl library. Add Tk too if necessary. 170 #-------------------------------------------------------------------- 171 172 AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs]) 173 #AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs]) 174 175 #-------------------------------------------------------------------- 176 # This macro generates a line to use when building a library. It 177 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, 178 # and TEA_LOAD_TCLCONFIG macros above. 179 #-------------------------------------------------------------------- 180 181 TEA_MAKE_LIB 182 183 #-------------------------------------------------------------------- 184 # Determine the name of the tclsh and/or wish executables in the 185 # Tcl and Tk build directories or the location they were installed 186 # into. These paths are used to support running test cases only, 187 # the Makefile should not be making use of these paths to generate 188 # a pkgIndex.tcl file or anything else at extension build time. 189 #-------------------------------------------------------------------- 190 191 TEA_PROG_TCLSH 192 #TEA_PROG_WISH 193 124 194 125 195 #-------------------------------------------------------------------- … … 131 201 if test "x$blt_source_dir" != "x" ; then 132 202 # 133 # Verify that a tclConfig.sh file exists in the directory specified 134 # by --with-blt. 203 # Verify that a tclConfig.sh file exists in the directory specified 204 # by --with-blt. 135 205 # 136 206 if test -r "$blt_source_dir/bltInt.h" ; then … … 139 209 BLT_SRC_DIR="$blt_source_dir/src" 140 210 fi 141 else 211 else 142 212 # 143 213 # Otherwise, search for the bltInt.h include file... 144 214 # 1. Search previously named locations. 145 # 215 # 146 216 for dir in \ 147 217 $prefix \ … … 152 222 break 153 223 elif test -r "$dir/include/bltInt.h" ; then 154 BLT_SRC_DIR="$dir/ lib"224 BLT_SRC_DIR="$dir/include" 155 225 break 156 226 fi … … 158 228 # 159 229 # 2. Search source directories. 160 # 230 # 161 231 if test "x$BLT_SRC_DIR" = "x" ; then 162 232 for dir in \ … … 166 236 ../../blt \ 167 237 `ls -dr ../../../blt[[2-3]].[[0-9]]* 2>/dev/null` \ 168 ../../../blt 238 ../../../blt \ 239 `ls -dr c:/opt/blt[[2-3]].[[0-9]]* 2>/dev/null` \ 240 c\:/opt/blt 169 241 do 170 if test -r "$dir/ bltInt.h" ; then171 tclConfigFile="$dir/bltInt.h"172 242 if test -r "$dir/src/bltInt.h" ; then 243 BLT_SRC_DIR="$dir/src" 244 break 173 245 fi 174 246 done 175 247 fi 176 248 fi 177 178 249 AC_MSG_RESULT([${BLT_SRC_DIR}]) 179 250 … … 185 256 186 257 AC_SUBST(BLT_SRC_DIR) 187 188 #-------------------------------------------------------------------- 189 # __CHANGE__ 190 # A few miscellaneous platform-specific items: 191 # 192 # Define a special symbol for Windows (BUILD_exampleA in this case) so 193 # that we create the export library with the dll. See sha1.h on how 194 # to use this. 195 # 196 # Windows creates a few extra files that need to be cleaned up. 197 # You can add more files to clean if your extension creates any extra 198 # files. 199 # 200 # Define any extra compiler flags in the PACKAGE_CFLAGS variable. 201 # These will be appended to the current set of compiler flags for 202 # your system. 203 #-------------------------------------------------------------------- 204 205 case "`uname -s`" in 206 *win32* | *WIN32* | *CYGWIN_NT*) 207 AC_DEFINE(BUILD_Rappture) 208 CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch" 209 AC_SUBST(CLEANFILES) 210 ;; 211 *) 212 CLEANFILES= 213 ;; 214 esac 215 216 #-------------------------------------------------------------------- 217 # Check whether --enable-threads or --disable-threads was given. 218 # So far only Tcl responds to this one. 219 #-------------------------------------------------------------------- 220 221 SC_ENABLE_THREADS 222 223 #-------------------------------------------------------------------- 224 # The statement below defines a collection of symbols related to 225 # building as a shared library instead of a static library. 226 #-------------------------------------------------------------------- 227 228 SC_ENABLE_SHARED 229 230 #-------------------------------------------------------------------- 231 # This macro figures out what flags to use with the compiler/linker 232 # when building shared/static debug/optimized objects. This information 233 # is all taken from the tclConfig.sh file. 234 #-------------------------------------------------------------------- 235 236 CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG} 237 CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE} 238 LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG} 239 LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE} 240 SHLIB_LD=${TCL_SHLIB_LD} 241 STLIB_LD=${TCL_STLIB_LD} 242 SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS} 243 244 AC_SUBST(CFLAGS_DEBUG) 245 AC_SUBST(CFLAGS_OPTIMIZE) 246 AC_SUBST(STLIB_LD) 247 AC_SUBST(SHLIB_LD) 248 AC_SUBST(SHLIB_CFLAGS) 249 AC_SUBST(SHLIB_LDFLAGS) 250 251 #-------------------------------------------------------------------- 252 # Set the default compiler switches based on the --enable-symbols 253 # option. 254 #-------------------------------------------------------------------- 255 256 SC_ENABLE_SYMBOLS 257 258 if test "${SHARED_BUILD}" = "1" ; then 259 CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}' 258 #-------------------------------------------------------------------- 259 # Look for rappture.h on the normal include path. If not found, look 260 # for it in the --with-rappture directory. 261 #-------------------------------------------------------------------- 262 AC_MSG_CHECKING([for rappture.h]) 263 RAPPTURE_DIR="" 264 if test "x$rappture_source_dir" != "x" ; then 265 # 266 # Verify that a rappture.h file exists in the directory specified 267 # by --with-rappture. 268 # 269 if test -r "$rappture_dir/include/core/rappture.h" ; then 270 RAPPTURE_DIR="$rappture_dir" 271 fi 260 272 else 261 CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}' 262 fi 263 264 #-------------------------------------------------------------------- 265 # Everyone should be linking against the Tcl stub library. If you 266 # can't for some reason, remove this definition. If you aren't using 267 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to 268 # link against the non-stubbed Tcl library. 269 #-------------------------------------------------------------------- 270 271 AC_DEFINE(USE_TCL_STUBS) 272 273 #-------------------------------------------------------------------- 274 # This macro generates a line to use when building a library. It 275 # depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS, 276 # and SC_LOAD_TCLCONFIG macros above. 277 #-------------------------------------------------------------------- 278 279 SC_MAKE_LIB 280 281 #-------------------------------------------------------------------- 282 # eval these two values to dereference the ${DBGX} variable. 283 #-------------------------------------------------------------------- 284 285 eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}" 286 eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}" 287 288 #-------------------------------------------------------------------- 289 # Shared libraries and static libraries have different names. 290 #-------------------------------------------------------------------- 291 292 case "`uname -s`" in 293 *win32* | *WIN32* | *CYGWIN_NT*) 294 if test "${SHARED_BUILD}" = "1" ; then 295 SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS}" 296 eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}" 297 RANLIB=: 298 else 299 eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}" 300 fi 301 ;; 302 *) 303 if test "${SHARED_BUILD}" = "1" ; then 304 SHLIB_LD_LIBS="${TCL_STUB_LIB_SPEC}" 305 eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}" 306 RANLIB=: 307 else 308 eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}" 309 fi 310 ;; 311 esac 312 313 #-------------------------------------------------------------------- 314 # __CHANGE__ 315 # Change the name from exampeA_LIB_FILE to match your package name. 316 #-------------------------------------------------------------------- 317 318 AC_SUBST(Rappture_LIB_FILE) 319 AC_SUBST(SHLIB_LD_LIBS) 320 321 #-------------------------------------------------------------------- 322 # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl 323 # file during the install process. Don't run the TCLSH_PROG through 324 # ${CYGPATH} because it's being used directly by make. 325 # Require that we use a tclsh shell version 8.2 or later since earlier 326 # versions have bugs in the pkg_mkIndex routine. 327 #-------------------------------------------------------------------- 328 329 AC_PATH_PROGS(TCLSH_PROG, tclsh8.4${EXEEXT} tclsh84${EXEEXT} tclsh${EXEEXT}, :, ${exec_prefix}:${PATH}) 330 331 if test "x${TCLSH_PROG}" = "x:" ; then 332 AC_MSG_WARN(No tclsh executable found. You will have to build the pkgIndex.tcl file manually.) 333 fi 334 AC_SUBST(TCLSH_PROG) 335 336 #-------------------------------------------------------------------- 337 # Finalize patchlevel and version info 338 #-------------------------------------------------------------------- 273 # 274 # Otherwise, search for the rappture.h include file... 275 # 1. Search previously named locations. 276 # 277 for dir in \ 278 $prefix \ 279 $exec_prefix 280 do 281 if test -r "$dir/include/core/rappture.h" ; then 282 RAPPTURE_DIR="$dir" 283 break 284 fi 285 done 286 # 287 # 2. Search source directories. 288 # 289 if test "x$RAPPTURE_DIR" = "x" ; then 290 for dir in \ 291 `ls -dr ../rappture 2>/dev/null` \ 292 `ls -dr ../../rappture 2>/dev/null` \ 293 `ls -dr ../../../rappture 2>/dev/null` \ 294 `ls -dr C\:/opt/rappture 2>/dev/null` \ 295 `ls -dr /opt/rappture 2>/dev/null` 296 do 297 if test -r "$dir/include/core/rappture.h" ; then 298 RAPPTURE_DIR="$dir" 299 break 300 fi 301 done 302 fi 303 fi 304 AC_MSG_RESULT([${RAPPTURE_DIR}]) 305 306 if test "x$RAPPTURE_DIR" = "x" ; then 307 echo "can't find RAPPTURE include file \"rappture.h\"" 308 echo "use --with-rappture=DIR to specify the location of rappture" 309 exit 1 310 fi 311 312 AC_SUBST(RAPPTURE_DIR) 313 314 #-------------------------------------------------------------------- 315 # Look for scew.h on the normal include path. If not found, look 316 # for it in the --with-scew directory. 317 #-------------------------------------------------------------------- 318 AC_MSG_CHECKING([for alternate paths]) 319 ALT_DIR="" 320 if test "x$alt_dir" != "x" ; then 321 # 322 # Verify that a include and lib directories exist in the directory specified 323 # by --with-altpath. 324 # 325 if test -d "$alt_dir/include" -a -d "$alt_dir/lib" ; then 326 ALT_DIR="$rappture_dir" 327 fi 328 else 329 if test "x$ALT_DIR" = "x" ; then 330 for dir in \ 331 C\:/opt /opt 332 do 333 if test -r "$dir/include" -a -d "$dir/lib" ; then 334 ALT_DIR="$dir" 335 break 336 fi 337 done 338 fi 339 fi 340 if test "x$ALT_DIR" = "x" ; then 341 AC_MSG_RESULT(none) 342 else 343 AC_MSG_RESULT([${ALT_DIR}]) 344 fi 345 346 AC_SUBST(ALT_DIR) 347 339 348 PATCHLEVEL=`${TCLSH_PROG} cf/patchlevel.tcl` 340 349 EXACT_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}-${PATCHLEVEL} 341 350 NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} 342 351 343 AC_SUBST(PACKAGE)344 AC_SUBST(VERSION)345 352 AC_SUBST(PATCHLEVEL) 346 353 AC_SUBST(EXACT_VERSION) 347 354 AC_SUBST(NODOT_VERSION) 348 355 349 350 356 #-------------------------------------------------------------------- 351 357 # Finally, substitute all of the various values into the Makefile. 358 # You may alternatively have a special pkgIndex.tcl.in or other files 359 # which require substituting th AC variables in. Include these here. 352 360 #-------------------------------------------------------------------- 353 361 354 362 AC_OUTPUT([Makefile pkgIndex.tcl init.tcl]) 363 364 -
trunk/src/tcl/init.tcl.in
r394 r527 24 24 25 25 set suffix [info sharedlibextension] 26 set library [file join $dir .. libRappture@VERSION@${suffix}]27 load $library 26 set library [file join $dir @PKG_LIB_FILE@] 27 load $library @PACKAGE_NAME@ 28 28 29 29 namespace eval Rappture { … … 34 34 namespace eval Rappture::LibraryObj {} 35 35 36 package provide Rappture @ VERSION@36 package provide Rappture @PACKAGE_VERSION@ 37 37 rename Rappture_init "" 38 38 } -
trunk/src/tcl/pkgIndex.tcl.in
r399 r527 1 1 # this file identifies Rappture as a Tcl package 2 package ifneeded Rappture @ VERSION@ [list source [file join $dir init.tcl]]2 package ifneeded Rappture @PACKAGE_VERSION@ [list source [file join $dir init.tcl]] 3 3 namespace eval Rappture {} 4 4 set Rappture::installdir [file join $dir] -
trunk/src/tcl/src/Rappture_Init.cc
r225 r527 19 19 #endif 20 20 21 int Rappture_Init _ANSI_ARGS_((Tcl_Interp *interp)); 21 #ifdef BUILD_rappture 22 #undef TCL_STORAGE_CLASS 23 #define TCL_STORAGE_CLASS DLLEXPORT 24 #endif 25 26 EXTERN int Rappture_Init _ANSI_ARGS_((Tcl_Interp *interp)); 22 27 23 28 #include "RpLibraryTclInterface.h" … … 31 36 Rappture_Init( Tcl_Interp * interp) 32 37 { 38 if (Tcl_InitStubs(interp, "8.4", 0) == NULL) { 39 return TCL_ERROR; 40 } 41 42 if (Tcl_PkgProvide(interp, "Rappture", PACKAGE_VERSION) != TCL_OK) { 43 return TCL_ERROR; 44 } 45 33 46 if (Rappturelibrary_Init(interp) != TCL_OK) { 34 47 return TCL_ERROR; -
trunk/src/tcl/src/RpLibraryTclInterface.cc
r424 r527 66 66 67 67 68 static std::string rpLib2command _ANSI_ARGS_(( Tcl_Interp *interp,69 RpLibrary* newRpLibObj ));70 68 void appendExpectErr _ANSI_ARGS_(( Tcl_Interp *interp, 71 69 const char* errTxt, … … 98 96 } 99 97 #endif 98 static std::string rpLib2command _ANSI_ARGS_(( Tcl_Interp *interp, 99 RpLibrary* newRpLibObj )); 100 100 101 101 /* -
trunk/src/tcl/tclconfig/tcl.m4
r521 r527 4 4 # a Tcl extension. 5 5 # 6 # Copyright (c) 1999 Scriptics Corporation. 6 # Copyright (c) 1999-2000 Ajuba Solutions. 7 # Copyright (c) 2002-2005 ActiveState Corporation. 7 8 # 8 9 # See the file "license.terms" for information on usage and redistribution 9 10 # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 10 11 #------------------------------------------------------------------------ 12 # SC_PATH_TCLCONFIG -- 11 # 12 # RCS: @(#) $Id: tcl.m4,v 1.92 2006/05/26 19:15:38 das Exp $ 13 14 AC_PREREQ(2.50) 15 16 dnl TEA extensions pass this us the version of TEA they think they 17 dnl are compatible with (must be set in TEA_INIT below) 18 dnl TEA_VERSION="3.5" 19 20 # Possible values for key variables defined: 21 # 22 # TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem') 23 # TEA_PLATFORM - windows unix 24 # 25 26 #------------------------------------------------------------------------ 27 # TEA_PATH_TCLCONFIG -- 13 28 # 14 29 # Locate the tclConfig.sh file and perform a sanity check on … … 28 43 #------------------------------------------------------------------------ 29 44 30 AC_DEFUN(SC_PATH_TCLCONFIG, [ 45 AC_DEFUN([TEA_PATH_TCLCONFIG], [ 46 dnl Make sure we are initialized 47 AC_REQUIRE([TEA_INIT]) 31 48 # 32 49 # Ok, lets find the tcl configuration … … 38 55 # we reset no_tcl in case something fails here 39 56 no_tcl=true 40 AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval}) 57 AC_ARG_WITH(tcl, 58 AC_HELP_STRING([--with-tcl], 59 [directory containing tcl configuration (tclConfig.sh)]), 60 with_tclconfig=${withval}) 41 61 AC_MSG_CHECKING([for Tcl configuration]) 42 62 AC_CACHE_VAL(ac_cv_c_tclconfig,[ … … 44 64 # First check to see if --with-tcl was specified. 45 65 if test x"${with_tclconfig}" != x ; then 66 case ${with_tclconfig} in 67 */tclConfig.sh ) 68 if test -f ${with_tclconfig}; then 69 AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself]) 70 with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'` 71 fi ;; 72 esac 46 73 if test -f "${with_tclconfig}/tclConfig.sh" ; then 47 74 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` … … 55 82 for i in \ 56 83 ../tcl \ 84 `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 85 `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ 57 86 `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ 58 87 ../../tcl \ 88 `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 89 `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ 59 90 `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ 60 91 ../../../tcl \ 92 `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 93 `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ 61 94 `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do 62 95 if test -f "$i/unix/tclConfig.sh" ; then … … 67 100 fi 68 101 69 # check in a few common install locations 70 if test x"${ac_cv_c_tclconfig}" = x ; then 71 for i in `ls -d ${prefix}/lib 2>/dev/null` \ 72 `ls -d /usr/local/lib 2>/dev/null` ; do 102 # on Darwin, check in Framework installation locations 103 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then 104 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ 105 `ls -d /Library/Frameworks 2>/dev/null` \ 106 `ls -d /Network/Library/Frameworks 2>/dev/null` \ 107 `ls -d /System/Library/Frameworks 2>/dev/null` \ 108 ; do 109 if test -f "$i/Tcl.framework/tclConfig.sh" ; then 110 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` 111 break 112 fi 113 done 114 fi 115 116 # on Windows, check in common installation locations 117 if test "${TEA_PLATFORM}" = "windows" \ 118 -a x"${ac_cv_c_tclconfig}" = x ; then 119 for i in `ls -d C:/Tcl/lib 2>/dev/null` \ 120 `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ 121 ; do 73 122 if test -f "$i/tclConfig.sh" ; then 74 123 ac_cv_c_tclconfig=`(cd $i; pwd)` … … 78 127 fi 79 128 129 # check in a few common install locations 130 if test x"${ac_cv_c_tclconfig}" = x ; then 131 for i in `ls -d ${libdir} 2>/dev/null` \ 132 `ls -d ${exec_prefix}/lib 2>/dev/null` \ 133 `ls -d ${prefix}/lib 2>/dev/null` \ 134 `ls -d /usr/local/lib 2>/dev/null` \ 135 `ls -d /usr/contrib/lib 2>/dev/null` \ 136 `ls -d /usr/lib 2>/dev/null` \ 137 ; do 138 if test -f "$i/tclConfig.sh" ; then 139 ac_cv_c_tclconfig=`(cd $i; pwd)` 140 break 141 fi 142 done 143 fi 144 80 145 # check in a few other private locations 81 146 if test x"${ac_cv_c_tclconfig}" = x ; then 82 147 for i in \ 83 148 ${srcdir}/../tcl \ 149 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 150 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ 84 151 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do 85 152 if test -f "$i/unix/tclConfig.sh" ; then … … 93 160 if test x"${ac_cv_c_tclconfig}" = x ; then 94 161 TCL_BIN_DIR="# no Tcl configs found" 95 AC_MSG_WARN( Can't find Tcl configuration definitions)162 AC_MSG_WARN([Can't find Tcl configuration definitions]) 96 163 exit 0 97 164 else 98 165 no_tcl= 99 166 TCL_BIN_DIR=${ac_cv_c_tclconfig} 100 AC_MSG_RESULT( found $TCL_BIN_DIR/tclConfig.sh)167 AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh]) 101 168 fi 102 169 fi … … 104 171 105 172 #------------------------------------------------------------------------ 106 # SC_PATH_TKCONFIG --173 # TEA_PATH_TKCONFIG -- 107 174 # 108 175 # Locate the tkConfig.sh file … … 121 188 #------------------------------------------------------------------------ 122 189 123 AC_DEFUN( SC_PATH_TKCONFIG, [190 AC_DEFUN([TEA_PATH_TKCONFIG], [ 124 191 # 125 192 # Ok, lets find the tk configuration … … 131 198 # we reset no_tk in case something fails here 132 199 no_tk=true 133 AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval}) 200 AC_ARG_WITH(tk, 201 AC_HELP_STRING([--with-tk], 202 [directory containing tk configuration (tkConfig.sh)]), 203 with_tkconfig=${withval}) 134 204 AC_MSG_CHECKING([for Tk configuration]) 135 205 AC_CACHE_VAL(ac_cv_c_tkconfig,[ … … 137 207 # First check to see if --with-tkconfig was specified. 138 208 if test x"${with_tkconfig}" != x ; then 209 case ${with_tkconfig} in 210 */tkConfig.sh ) 211 if test -f ${with_tkconfig}; then 212 AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself]) 213 with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'` 214 fi ;; 215 esac 139 216 if test -f "${with_tkconfig}/tkConfig.sh" ; then 140 217 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` … … 148 225 for i in \ 149 226 ../tk \ 227 `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 228 `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \ 150 229 `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ 151 230 ../../tk \ 231 `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 232 `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \ 152 233 `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ 153 234 ../../../tk \ 235 `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 236 `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \ 154 237 `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do 155 238 if test -f "$i/unix/tkConfig.sh" ; then … … 159 242 done 160 243 fi 244 245 # on Darwin, check in Framework installation locations 246 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then 247 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ 248 `ls -d /Library/Frameworks 2>/dev/null` \ 249 `ls -d /Network/Library/Frameworks 2>/dev/null` \ 250 `ls -d /System/Library/Frameworks 2>/dev/null` \ 251 ; do 252 if test -f "$i/Tk.framework/tkConfig.sh" ; then 253 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` 254 break 255 fi 256 done 257 fi 258 161 259 # check in a few common install locations 162 260 if test x"${ac_cv_c_tkconfig}" = x ; then 163 for i in `ls -d ${prefix}/lib 2>/dev/null` \ 164 `ls -d /usr/local/lib 2>/dev/null` ; do 261 for i in `ls -d ${libdir} 2>/dev/null` \ 262 `ls -d ${exec_prefix}/lib 2>/dev/null` \ 263 `ls -d ${prefix}/lib 2>/dev/null` \ 264 `ls -d /usr/local/lib 2>/dev/null` \ 265 `ls -d /usr/contrib/lib 2>/dev/null` \ 266 `ls -d /usr/lib 2>/dev/null` \ 267 ; do 165 268 if test -f "$i/tkConfig.sh" ; then 166 269 ac_cv_c_tkconfig=`(cd $i; pwd)` … … 169 272 done 170 273 fi 274 275 # on Windows, check in common installation locations 276 if test "${TEA_PLATFORM}" = "windows" \ 277 -a x"${ac_cv_c_tkconfig}" = x ; then 278 for i in `ls -d C:/Tcl/lib 2>/dev/null` \ 279 `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ 280 ; do 281 if test -f "$i/tkConfig.sh" ; then 282 ac_cv_c_tkconfig=`(cd $i; pwd)` 283 break 284 fi 285 done 286 fi 287 171 288 # check in a few other private locations 172 289 if test x"${ac_cv_c_tkconfig}" = x ; then 173 290 for i in \ 174 291 ${srcdir}/../tk \ 292 `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 293 `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \ 175 294 `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do 176 295 if test -f "$i/unix/tkConfig.sh" ; then … … 181 300 fi 182 301 ]) 302 183 303 if test x"${ac_cv_c_tkconfig}" = x ; then 184 304 TK_BIN_DIR="# no Tk configs found" 185 AC_MSG_WARN( Can't find Tk configuration definitions)305 AC_MSG_WARN([Can't find Tk configuration definitions]) 186 306 exit 0 187 307 else 188 308 no_tk= 189 309 TK_BIN_DIR=${ac_cv_c_tkconfig} 190 AC_MSG_RESULT( found $TK_BIN_DIR/tkConfig.sh)310 AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh]) 191 311 fi 192 312 fi 193 194 ]) 195 196 #------------------------------------------------------------------------ 197 # SC_LOAD_TCLCONFIG -- 313 ]) 314 315 #------------------------------------------------------------------------ 316 # TEA_LOAD_TCLCONFIG -- 198 317 # 199 318 # Load the tclConfig.sh file … … 213 332 #------------------------------------------------------------------------ 214 333 215 AC_DEFUN( SC_LOAD_TCLCONFIG, [216 AC_MSG_CHECKING([for existence of $ TCL_BIN_DIR/tclConfig.sh])217 218 if test -f "$ TCL_BIN_DIR/tclConfig.sh" ; then334 AC_DEFUN([TEA_LOAD_TCLCONFIG], [ 335 AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh]) 336 337 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then 219 338 AC_MSG_RESULT([loading]) 220 . $ TCL_BIN_DIR/tclConfig.sh339 . ${TCL_BIN_DIR}/tclConfig.sh 221 340 else 222 AC_MSG_RESULT([file not found]) 223 fi 224 225 # 226 # The eval is required to do the TCL_DBGX substitution in the 227 # TCL_LIB_FILE variable 228 # 229 230 eval TCL_LIB_FILE=${TCL_LIB_FILE} 231 eval TCL_LIB_FLAG=${TCL_LIB_FLAG} 232 341 AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) 342 fi 343 344 # eval is required to do the TCL_DBGX substitution 345 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" 346 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" 347 348 # If the TCL_BIN_DIR is the build directory (not the install directory), 349 # then set the common variable name to the value of the build variables. 350 # For example, the variable TCL_LIB_SPEC will be set to the value 351 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC 352 # instead of TCL_BUILD_LIB_SPEC since it will work with both an 353 # installed and uninstalled version of Tcl. 354 if test -f ${TCL_BIN_DIR}/Makefile ; then 355 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} 356 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} 357 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} 358 elif test "`uname -s`" = "Darwin"; then 359 # If Tcl was built as a framework, attempt to use the libraries 360 # from the framework at the given location so that linking works 361 # against Tcl.framework installed in an arbitary location. 362 case ${TCL_DEFS} in 363 *TCL_FRAMEWORK*) 364 if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then 365 for i in "`cd ${TCL_BIN_DIR}; pwd`" \ 366 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do 367 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then 368 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" 369 break 370 fi 371 done 372 fi 373 if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then 374 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" 375 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" 376 fi 377 ;; 378 esac 379 fi 380 381 # eval is required to do the TCL_DBGX substitution 382 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" 383 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" 384 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" 385 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" 386 387 AC_SUBST(TCL_VERSION) 233 388 AC_SUBST(TCL_BIN_DIR) 234 389 AC_SUBST(TCL_SRC_DIR) 390 235 391 AC_SUBST(TCL_LIB_FILE) 392 AC_SUBST(TCL_LIB_FLAG) 393 AC_SUBST(TCL_LIB_SPEC) 394 395 AC_SUBST(TCL_STUB_LIB_FILE) 396 AC_SUBST(TCL_STUB_LIB_FLAG) 397 AC_SUBST(TCL_STUB_LIB_SPEC) 398 236 399 AC_SUBST(TCL_LIBS) 237 400 AC_SUBST(TCL_DEFS) 238 AC_SUBST(TCL_SHLIB_LD_LIBS)239 401 AC_SUBST(TCL_EXTRA_CFLAGS) 240 402 AC_SUBST(TCL_LD_FLAGS) 241 AC_SUBST(TCL_LIB_FILE) 242 AC_SUBST(TCL_STUB_LIB_FILE) 243 AC_SUBST(TCL_LIB_SPEC) 244 AC_SUBST(TCL_BUILD_LIB_SPEC) 245 AC_SUBST(TCL_STUB_LIB_SPEC) 246 AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) 247 ]) 248 249 #------------------------------------------------------------------------ 250 # SC_LOAD_TKCONFIG -- 403 AC_SUBST(TCL_SHLIB_LD_LIBS) 404 ]) 405 406 #------------------------------------------------------------------------ 407 # TEA_LOAD_TKCONFIG -- 251 408 # 252 409 # Load the tkConfig.sh file … … 263 420 #------------------------------------------------------------------------ 264 421 265 AC_DEFUN( SC_LOAD_TKCONFIG, [266 AC_MSG_CHECKING([for existence of $ TCLCONFIG])267 268 if test -f "$ TK_BIN_DIR/tkConfig.sh" ; then269 AC_MSG_ CHECKING([loading $TK_BIN_DIR/tkConfig.sh])270 . $ TK_BIN_DIR/tkConfig.sh422 AC_DEFUN([TEA_LOAD_TKCONFIG], [ 423 AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh]) 424 425 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then 426 AC_MSG_RESULT([loading]) 427 . ${TK_BIN_DIR}/tkConfig.sh 271 428 else 272 AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh]) 273 fi 274 429 AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) 430 fi 431 432 # eval is required to do the TK_DBGX substitution 433 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" 434 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" 435 436 # If the TK_BIN_DIR is the build directory (not the install directory), 437 # then set the common variable name to the value of the build variables. 438 # For example, the variable TK_LIB_SPEC will be set to the value 439 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC 440 # instead of TK_BUILD_LIB_SPEC since it will work with both an 441 # installed and uninstalled version of Tcl. 442 if test -f ${TK_BIN_DIR}/Makefile ; then 443 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} 444 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} 445 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} 446 elif test "`uname -s`" = "Darwin"; then 447 # If Tk was built as a framework, attempt to use the libraries 448 # from the framework at the given location so that linking works 449 # against Tk.framework installed in an arbitary location. 450 case ${TK_DEFS} in 451 *TK_FRAMEWORK*) 452 if test -f ${TK_BIN_DIR}/${TK_LIB_FILE}; then 453 for i in "`cd ${TK_BIN_DIR}; pwd`" \ 454 "`cd ${TK_BIN_DIR}/../..; pwd`"; do 455 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then 456 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" 457 break 458 fi 459 done 460 fi 461 if test -f ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}; then 462 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" 463 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" 464 fi 465 ;; 466 esac 467 fi 468 469 # eval is required to do the TK_DBGX substitution 470 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" 471 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" 472 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" 473 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" 474 475 # Ensure windowingsystem is defined 476 if test "${TEA_PLATFORM}" = "unix" ; then 477 case ${TK_DEFS} in 478 *MAC_OSX_TK*) 479 AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?]) 480 TEA_WINDOWINGSYSTEM="aqua" 481 ;; 482 *) 483 TEA_WINDOWINGSYSTEM="x11" 484 ;; 485 esac 486 elif test "${TEA_PLATFORM}" = "windows" ; then 487 TEA_WINDOWINGSYSTEM="win32" 488 fi 489 490 AC_SUBST(TK_VERSION) 275 491 AC_SUBST(TK_BIN_DIR) 276 492 AC_SUBST(TK_SRC_DIR) 493 277 494 AC_SUBST(TK_LIB_FILE) 278 ]) 279 280 #------------------------------------------------------------------------ 281 # SC_ENABLE_GCC -- 282 # 283 # Allows the use of GCC if available 495 AC_SUBST(TK_LIB_FLAG) 496 AC_SUBST(TK_LIB_SPEC) 497 498 AC_SUBST(TK_STUB_LIB_FILE) 499 AC_SUBST(TK_STUB_LIB_FLAG) 500 AC_SUBST(TK_STUB_LIB_SPEC) 501 502 AC_SUBST(TK_LIBS) 503 AC_SUBST(TK_XINCLUDES) 504 ]) 505 506 #------------------------------------------------------------------------ 507 # TEA_ENABLE_SHARED -- 508 # 509 # Allows the building of shared libraries 284 510 # 285 511 # Arguments: … … 289 515 # 290 516 # Adds the following arguments to configure: 291 # --enable-gcc292 #293 # Sets the following vars:294 # CC Command to use for the compiler295 #------------------------------------------------------------------------296 297 AC_DEFUN(SC_ENABLE_GCC, [298 AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]],299 [ok=$enableval], [ok=no])300 if test "$ok" = "yes"; then301 CC=gcc302 else303 case "`uname -s`" in304 *win32* | *WIN32* | *CYGWIN_NT*)305 CC=cl306 ;;307 *)308 CC=${CC-cc}309 ;;310 esac311 fi312 AC_PROG_CC313 ])314 315 #------------------------------------------------------------------------316 # SC_ENABLE_SHARED --317 #318 # Allows the building of shared libraries319 #320 # Arguments:321 # none322 #323 # Results:324 #325 # Adds the following arguments to configure:326 517 # --enable-shared=yes|no 327 518 # … … 334 525 #------------------------------------------------------------------------ 335 526 336 AC_DEFUN( SC_ENABLE_SHARED, [527 AC_DEFUN([TEA_ENABLE_SHARED], [ 337 528 AC_MSG_CHECKING([how to build libraries]) 338 529 AC_ARG_ENABLE(shared, 339 [ --enable-shared build and link with shared libraries [--enable-shared]], 530 AC_HELP_STRING([--enable-shared], 531 [build and link with shared libraries (default: on)]), 340 532 [tcl_ok=$enableval], [tcl_ok=yes]) 341 533 … … 353 545 AC_MSG_RESULT([static]) 354 546 SHARED_BUILD=0 355 AC_DEFINE(STATIC_BUILD) 356 fi 357 ]) 358 359 #------------------------------------------------------------------------ 360 # SC_ENABLE_THREADS -- 361 # 362 # Specify if thread support should be enabled 547 AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?]) 548 fi 549 AC_SUBST(SHARED_BUILD) 550 ]) 551 552 #------------------------------------------------------------------------ 553 # TEA_ENABLE_THREADS -- 554 # 555 # Specify if thread support should be enabled. If "yes" is specified 556 # as an arg (optional), threads are enabled by default, "no" means 557 # threads are disabled. "yes" is the default. 558 # 559 # TCL_THREADS is checked so that if you are compiling an extension 560 # against a threaded core, your extension must be compiled threaded 561 # as well. 562 # 563 # Note that it is legal to have a thread enabled extension run in a 564 # threaded or non-threaded Tcl core, but a non-threaded extension may 565 # only run in a non-threaded Tcl core. 363 566 # 364 567 # Arguments: … … 376 579 # TCL_THREADS 377 580 # _REENTRANT 378 # 379 #------------------------------------------------------------------------ 380 381 AC_DEFUN(SC_ENABLE_THREADS, [ 382 AC_MSG_CHECKING(for building with threads) 383 AC_ARG_ENABLE(threads, [ --enable-threads build with threads], 384 [tcl_ok=$enableval], [tcl_ok=no]) 385 386 if test "$tcl_ok" = "yes"; then 387 AC_MSG_RESULT(yes) 581 # _THREAD_SAFE 582 # 583 #------------------------------------------------------------------------ 584 585 AC_DEFUN([TEA_ENABLE_THREADS], [ 586 AC_ARG_ENABLE(threads, 587 AC_HELP_STRING([--enable-threads], 588 [build with threads]), 589 [tcl_ok=$enableval], [tcl_ok=yes]) 590 591 if test "${enable_threads+set}" = set; then 592 enableval="$enable_threads" 593 tcl_ok=$enableval 594 else 595 tcl_ok=yes 596 fi 597 598 if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then 388 599 TCL_THREADS=1 389 AC_DEFINE(TCL_THREADS) 390 AC_DEFINE(_REENTRANT) 391 392 AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) 393 if test "$tcl_ok" = "yes"; then 394 # The space is needed 395 THREADS_LIBS=" -lpthread" 396 else 397 TCL_THREADS=0 398 AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...") 600 601 if test "${TEA_PLATFORM}" != "windows" ; then 602 # We are always OK on Windows, so check what this platform wants: 603 604 # USE_THREAD_ALLOC tells us to try the special thread-based 605 # allocator that significantly reduces lock contention 606 AC_DEFINE(USE_THREAD_ALLOC, 1, 607 [Do we want to use the threaded memory allocator?]) 608 AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) 609 if test "`uname -s`" = "SunOS" ; then 610 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, 611 [Do we really want to follow the standard? Yes we do!]) 612 fi 613 AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?]) 614 AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) 615 if test "$tcl_ok" = "no"; then 616 # Check a little harder for __pthread_mutex_init in the same 617 # library, as some systems hide it there until pthread.h is 618 # defined. We could alternatively do an AC_TRY_COMPILE with 619 # pthread.h, but that will work with libpthread really doesn't 620 # exist, like AIX 4.2. [Bug: 4359] 621 AC_CHECK_LIB(pthread, __pthread_mutex_init, 622 tcl_ok=yes, tcl_ok=no) 623 fi 624 625 if test "$tcl_ok" = "yes"; then 626 # The space is needed 627 THREADS_LIBS=" -lpthread" 628 else 629 AC_CHECK_LIB(pthreads, pthread_mutex_init, 630 tcl_ok=yes, tcl_ok=no) 631 if test "$tcl_ok" = "yes"; then 632 # The space is needed 633 THREADS_LIBS=" -lpthreads" 634 else 635 AC_CHECK_LIB(c, pthread_mutex_init, 636 tcl_ok=yes, tcl_ok=no) 637 if test "$tcl_ok" = "no"; then 638 AC_CHECK_LIB(c_r, pthread_mutex_init, 639 tcl_ok=yes, tcl_ok=no) 640 if test "$tcl_ok" = "yes"; then 641 # The space is needed 642 THREADS_LIBS=" -pthread" 643 else 644 TCL_THREADS=0 645 AC_MSG_WARN([Do not know how to find pthread lib on your system - thread support disabled]) 646 fi 647 fi 648 fi 649 fi 399 650 fi 400 651 else 401 652 TCL_THREADS=0 402 AC_MSG_RESULT(no (default)) 403 fi 404 405 ]) 406 407 #------------------------------------------------------------------------ 408 # SC_ENABLE_SYMBOLS -- 409 # 410 # Specify if debugging symbols should be used 653 fi 654 # Do checking message here to not mess up interleaved configure output 655 AC_MSG_CHECKING([for building with threads]) 656 if test "${TCL_THREADS}" = 1; then 657 AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?]) 658 AC_MSG_RESULT([yes (default)]) 659 else 660 AC_MSG_RESULT([no]) 661 fi 662 # TCL_THREADS sanity checking. See if our request for building with 663 # threads is the same as the way Tcl was built. If not, warn the user. 664 case ${TCL_DEFS} in 665 *THREADS=1*) 666 if test "${TCL_THREADS}" = "0"; then 667 AC_MSG_WARN([ 668 Building ${PACKAGE_NAME} without threads enabled, but building against Tcl 669 that IS thread-enabled. It is recommended to use --enable-threads.]) 670 fi 671 ;; 672 *) 673 if test "${TCL_THREADS}" = "1"; then 674 AC_MSG_WARN([ 675 --enable-threads requested, but building against a Tcl that is NOT 676 thread-enabled. This is an OK configuration that will also run in 677 a thread-enabled core.]) 678 fi 679 ;; 680 esac 681 AC_SUBST(TCL_THREADS) 682 ]) 683 684 #------------------------------------------------------------------------ 685 # TEA_ENABLE_SYMBOLS -- 686 # 687 # Specify if debugging symbols should be used. 688 # Memory (TCL_MEM_DEBUG) debugging can also be enabled. 411 689 # 412 690 # Arguments: 413 691 # none 414 692 # 415 # Requires the following vars to be set:416 # CFLAGS_DEBUG417 # CFLAGS_OPTIMIZE418 # LDFLAGS_DEBUG419 # LDFLAGS_ OPTIMIZE693 # TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives 694 # the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted. 695 # Requires the following vars to be set in the Makefile: 696 # CFLAGS_DEFAULT 697 # LDFLAGS_DEFAULT 420 698 # 421 699 # Results: … … 425 703 # 426 704 # Defines the following vars: 427 # CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true 428 # Sets to CFLAGS_OPTIMIZE if false 429 # LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true 430 # Sets to LDFLAGS_OPTIMIZE if false 431 # DBGX Debug library extension 432 # 433 #------------------------------------------------------------------------ 434 435 AC_DEFUN(SC_ENABLE_SYMBOLS, [ 436 case "`uname -s`" in 437 *win32* | *WIN32* | *CYGWIN_NT*) 438 tcl_dbgx=d 439 ;; 440 *) 441 tcl_dbgx=g 442 ;; 443 esac 444 705 # CFLAGS_DEFAULT Sets to $(CFLAGS_DEBUG) if true 706 # Sets to $(CFLAGS_OPTIMIZE) if false 707 # LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true 708 # Sets to $(LDFLAGS_OPTIMIZE) if false 709 # DBGX Formerly used as debug library extension; 710 # always blank now. 711 # 712 #------------------------------------------------------------------------ 713 714 AC_DEFUN([TEA_ENABLE_SYMBOLS], [ 715 dnl Make sure we are initialized 716 AC_REQUIRE([TEA_CONFIG_CFLAGS]) 445 717 AC_MSG_CHECKING([for build with symbols]) 446 AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) 447 if test "$tcl_ok" = "yes"; then 718 AC_ARG_ENABLE(symbols, 719 AC_HELP_STRING([--enable-symbols], 720 [build with debugging symbols (default: off)]), 721 [tcl_ok=$enableval], [tcl_ok=no]) 722 DBGX="" 723 if test "$tcl_ok" = "no"; then 724 CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" 725 LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" 726 AC_MSG_RESULT([no]) 727 else 448 728 CFLAGS_DEFAULT="${CFLAGS_DEBUG}" 449 729 LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" 450 DBGX=${tcl_dbgx} 451 TCL_DBGX=${tcl_dbgx} 452 AC_MSG_RESULT([yes]) 453 else 454 CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" 455 LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" 456 DBGX="" 457 TCL_DBGX="" 458 AC_MSG_RESULT([no]) 730 if test "$tcl_ok" = "yes"; then 731 AC_MSG_RESULT([yes (standard debugging)]) 732 fi 733 fi 734 if test "${TEA_PLATFORM}" != "windows" ; then 735 LDFLAGS_DEFAULT="${LDFLAGS}" 459 736 fi 460 737 … … 462 739 AC_SUBST(CFLAGS_DEFAULT) 463 740 AC_SUBST(LDFLAGS_DEFAULT) 741 742 if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then 743 AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?]) 744 fi 745 746 if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then 747 if test "$tcl_ok" = "all"; then 748 AC_MSG_RESULT([enabled symbols mem debugging]) 749 else 750 AC_MSG_RESULT([enabled $tcl_ok debugging]) 751 fi 752 fi 753 ]) 754 755 #------------------------------------------------------------------------ 756 # TEA_ENABLE_LANGINFO -- 757 # 758 # Allows use of modern nl_langinfo check for better l10n. 759 # This is only relevant for Unix. 760 # 761 # Arguments: 762 # none 763 # 764 # Results: 765 # 766 # Adds the following arguments to configure: 767 # --enable-langinfo=yes|no (default is yes) 768 # 769 # Defines the following vars: 770 # HAVE_LANGINFO Triggers use of nl_langinfo if defined. 771 # 772 #------------------------------------------------------------------------ 773 774 AC_DEFUN([TEA_ENABLE_LANGINFO], [ 775 AC_ARG_ENABLE(langinfo, 776 AC_HELP_STRING([--enable-langinfo], 777 [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]), 778 [langinfo_ok=$enableval], [langinfo_ok=yes]) 779 780 HAVE_LANGINFO=0 781 if test "$langinfo_ok" = "yes"; then 782 AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no]) 783 fi 784 AC_MSG_CHECKING([whether to use nl_langinfo]) 785 if test "$langinfo_ok" = "yes"; then 786 AC_CACHE_VAL(tcl_cv_langinfo_h, 787 AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);], 788 [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])) 789 AC_MSG_RESULT([$tcl_cv_langinfo_h]) 790 if test $tcl_cv_langinfo_h = yes; then 791 AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) 792 fi 793 else 794 AC_MSG_RESULT([$langinfo_ok]) 795 fi 464 796 ]) 465 797 466 798 #-------------------------------------------------------------------- 467 # SC_CONFIG_CFLAGS 799 # TEA_CONFIG_SYSTEM 800 # 801 # Determine what the system is (some things cannot be easily checked 802 # on a feature-driven basis, alas). This can usually be done via the 803 # "uname" command, but there are a few systems, like Next, where 804 # this doesn't work. 805 # 806 # Arguments: 807 # none 808 # 809 # Results: 810 # Defines the following var: 811 # 812 # system - System/platform/version identification code. 813 # 814 #-------------------------------------------------------------------- 815 816 AC_DEFUN([TEA_CONFIG_SYSTEM], [ 817 AC_CACHE_CHECK([system version], tcl_cv_sys_version, [ 818 if test "${TEA_PLATFORM}" = "windows" ; then 819 tcl_cv_sys_version=windows 820 elif test -f /usr/lib/NextStep/software_version; then 821 tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` 822 else 823 tcl_cv_sys_version=`uname -s`-`uname -r` 824 if test "$?" -ne 0 ; then 825 AC_MSG_WARN([can't find uname command]) 826 tcl_cv_sys_version=unknown 827 else 828 # Special check for weird MP-RAS system (uname returns weird 829 # results, and the version is kept in special file). 830 831 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 832 tcl_cv_sys_version=MP-RAS-`awk '{print [$]3}' /etc/.relid` 833 fi 834 if test "`uname -s`" = "AIX" ; then 835 tcl_cv_sys_version=AIX-`uname -v`.`uname -r` 836 fi 837 fi 838 fi 839 ]) 840 system=$tcl_cv_sys_version 841 ]) 842 843 #-------------------------------------------------------------------- 844 # TEA_CONFIG_CFLAGS 468 845 # 469 846 # Try to determine the proper flags to pass to the compiler … … 475 852 # Results: 476 853 # 477 # Defines the following vars:854 # Defines and substitutes the following vars: 478 855 # 479 856 # DL_OBJS - Name of the object file that implements dynamic … … 487 864 # that tell the run-time dynamic linker where to look 488 865 # for shared libraries such as libtcl.so. Depends on 866 # the variable LIB_RUNTIME_DIR in the Makefile. Could 867 # be the same as CC_SEARCH_FLAGS if ${CC} is used to link. 868 # CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/usr/local/tcl/lib", 869 # that tell the run-time dynamic linker where to look 870 # for shared libraries such as libtcl.so. Depends on 489 871 # the variable LIB_RUNTIME_DIR in the Makefile. 490 # MAKE_LIB - Command to execute to build the Tcl library;491 # differs depending on whether or not Tcl is being492 # compiled as a shared library.493 872 # SHLIB_CFLAGS - Flags to pass to cc when compiling the components 494 873 # of a shared library (may request position-independent … … 510 889 # extensions. An empty string means we don't know how 511 890 # to use shared libraries on this platform. 512 # TCL_LIB_FILE - Name of the file that contains the Tcl library, such 513 # as libtcl7.8.so or libtcl7.8.a. 514 # TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl" 515 # in the shared library name, using the $VERSION variable 891 # LIB_SUFFIX - Specifies everything that comes after the "libfoo" 892 # in a static or shared library name, using the $VERSION variable 516 893 # to put the version in the right place. This is used 517 894 # by platforms that need non-standard library names. 518 895 # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs 519 896 # to have a version after the .so, and ${VERSION}.a 520 # on AIX, since the Tclshared library needs to have897 # on AIX, since a shared library needs to have 521 898 # a .a extension whereas shared objects for loadable 522 899 # extensions have a .so extension. Defaults to … … 536 913 # CFLAGS_OPTIMIZE - 537 914 # Flags used when running the compiler in optimize mode 538 # 539 # EXTRA_CFLAGS 540 # 541 # Subst's the following vars: 542 # DL_LIBS 543 # CFLAGS_DEBUG 544 # CFLAGS_OPTIMIZE 915 # CFLAGS - Additional CFLAGS added as necessary (usually 64-bit) 916 # 545 917 #-------------------------------------------------------------------- 546 918 547 AC_DEFUN(SC_CONFIG_CFLAGS, [ 548 549 # Step 0: Enable 64 bit support? 550 551 AC_MSG_CHECKING([if 64bit support is enabled]) 552 AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support],,enableval="no") 553 554 if test "$enableval" = "yes"; then 555 AC_MSG_RESULT(Will compile with 64bit support) 919 AC_DEFUN([TEA_CONFIG_CFLAGS], [ 920 dnl Make sure we are initialized 921 AC_REQUIRE([TEA_INIT]) 922 923 # Step 0.a: Enable 64 bit support? 924 925 AC_MSG_CHECKING([if 64bit support is requested]) 926 AC_ARG_ENABLE(64bit, 927 AC_HELP_STRING([--enable-64bit], 928 [enable 64bit support (default: off)]), 929 [do64bit=$enableval], [do64bit=no]) 930 AC_MSG_RESULT([$do64bit]) 931 932 # Step 0.b: Enable Solaris 64 bit VIS support? 933 934 AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) 935 AC_ARG_ENABLE(64bit-vis, 936 AC_HELP_STRING([--enable-64bit-vis], 937 [enable 64bit Sparc VIS support (default: off)]), 938 [do64bitVIS=$enableval], [do64bitVIS=no]) 939 AC_MSG_RESULT([$do64bitVIS]) 940 941 if test "$do64bitVIS" = "yes"; then 942 # Force 64bit on with VIS 556 943 do64bit=yes 557 else 558 do64bit=no 559 fi 560 AC_MSG_RESULT($do64bit) 561 944 fi 945 946 # Step 0.c: Cross-compiling options for Windows/CE builds? 947 948 if test "${TEA_PLATFORM}" = "windows" ; then 949 AC_MSG_CHECKING([if Windows/CE build is requested]) 950 AC_ARG_ENABLE(wince,[ --enable-wince enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no]) 951 AC_MSG_RESULT([$doWince]) 952 fi 953 562 954 # Step 1: set the variable "system" to hold the name and version number 563 # for the system. This can usually be done via the "uname" command, but 564 # there are a few systems, like Next, where this doesn't work. 565 566 AC_MSG_CHECKING([system version (for dynamic loading)]) 567 if test -f /usr/lib/NextStep/software_version; then 568 system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` 569 else 570 system=`uname -s`-`uname -r` 571 if test "$?" -ne 0 ; then 572 AC_MSG_RESULT([unknown (can't find uname command)]) 573 system=unknown 574 else 575 # Special check for weird MP-RAS system (uname returns weird 576 # results, and the version is kept in special file). 577 578 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then 579 system=MP-RAS-`awk '{print $3}' /etc/.relid'` 580 fi 581 if test "`uname -s`" = "AIX" ; then 582 system=AIX-`uname -v`.`uname -r` 583 fi 584 AC_MSG_RESULT($system) 585 fi 586 fi 955 # for the system. 956 957 TEA_CONFIG_SYSTEM 587 958 588 959 # Step 2: check for existence of -ldl library. This is needed because … … 591 962 AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) 592 963 964 # Require ranlib early so we can override it in special cases below. 965 966 AC_REQUIRE([AC_PROG_RANLIB]) 967 593 968 # Step 3: set configuration options based on system name and version. 969 # This is similar to Tcl's unix/tcl.m4 except that we've added a 970 # "windows" case. 594 971 595 972 do64bit_ok=no 596 fullSrcDir=`cd $srcdir; pwd` 597 EXTRA_CFLAGS="" 973 LDFLAGS_ORIG="$LDFLAGS" 974 # When ld needs options to work in 64-bit mode, put them in 975 # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] 976 # is disabled by the user. [Bug 1016796] 977 LDFLAGS_ARCH="" 598 978 TCL_EXPORT_FILE_SUFFIX="" 599 979 UNSHARED_LIB_SUFFIX="" 600 TCL_TRIM_DOTS='`echo ${ VERSION} | tr -d .`'601 ECHO_VERSION='`echo ${ VERSION}`'980 TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' 981 ECHO_VERSION='`echo ${PACKAGE_VERSION}`' 602 982 TCL_LIB_VERSIONS_OK=ok 603 983 CFLAGS_DEBUG=-g 604 984 CFLAGS_OPTIMIZE=-O 985 if test "$GCC" = "yes" ; then 986 CFLAGS_OPTIMIZE=-O2 987 CFLAGS_WARNING="-Wall -Wno-implicit-int" 988 else 989 CFLAGS_WARNING="" 990 fi 605 991 TCL_NEEDS_EXP_FILE=0 606 992 TCL_BUILD_EXP_FILE="" 607 993 TCL_EXP_FILE="" 608 STLIB_LD="ar cr" 994 dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed. 995 dnl AC_CHECK_TOOL(AR, ar) 996 AC_CHECK_PROG(AR, ar, ar) 997 STLIB_LD='${AR} cr' 998 LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" 609 999 case $system in 610 AIX-4.[[2-9]]) 1000 windows) 1001 # This is a 2-stage check to make sure we have the 64-bit SDK 1002 # We have to know where the SDK is installed. 1003 # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs 1004 # MACHINE is IX86 for LINK, but this is used by the manifest, 1005 # which requires x86|amd64|ia64. 1006 MACHINE="X86" 1007 if test "$do64bit" != "no" ; then 1008 if test "x${MSSDK}x" = "xx" ; then 1009 MSSDK="C:/Progra~1/Microsoft Platform SDK" 1010 fi 1011 MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` 1012 PATH64="" 1013 case "$do64bit" in 1014 amd64|x64|yes) 1015 MACHINE="AMD64" ; # default to AMD64 64-bit build 1016 PATH64="${MSSDK}/Bin/Win64/x86/AMD64" 1017 ;; 1018 ia64) 1019 MACHINE="IA64" 1020 PATH64="${MSSDK}/Bin/Win64" 1021 ;; 1022 esac 1023 if test ! -d "${PATH64}" ; then 1024 AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode]) 1025 AC_MSG_WARN([Ensure latest Platform SDK is installed]) 1026 do64bit="no" 1027 else 1028 AC_MSG_RESULT([ Using 64-bit $MACHINE mode]) 1029 do64bit_ok="yes" 1030 fi 1031 fi 1032 1033 if test "$doWince" != "no" ; then 1034 if test "$do64bit" != "no" ; then 1035 AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible]) 1036 fi 1037 if test "$GCC" = "yes" ; then 1038 AC_MSG_ERROR([Windows/CE and GCC builds incompatible]) 1039 fi 1040 TEA_PATH_CELIB 1041 # Set defaults for common evc4/PPC2003 setup 1042 # Currently Tcl requires 300+, possibly 420+ for sockets 1043 CEVERSION=420; # could be 211 300 301 400 420 ... 1044 TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... 1045 ARCH=ARM; # could be ARM MIPS X86EM ... 1046 PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" 1047 if test "$doWince" != "yes"; then 1048 # If !yes then the user specified something 1049 # Reset ARCH to allow user to skip specifying it 1050 ARCH= 1051 eval `echo $doWince | awk -F, '{ \ 1052 if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \ 1053 if ([$]1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ 1054 if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \ 1055 if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \ 1056 if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \ 1057 }'` 1058 if test "x${ARCH}" = "x" ; then 1059 ARCH=$TARGETCPU; 1060 fi 1061 fi 1062 OSVERSION=WCE$CEVERSION; 1063 if test "x${WCEROOT}" = "x" ; then 1064 WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" 1065 if test ! -d "${WCEROOT}" ; then 1066 WCEROOT="C:/Program Files/Microsoft eMbedded Tools" 1067 fi 1068 fi 1069 if test "x${SDKROOT}" = "x" ; then 1070 SDKROOT="C:/Program Files/Windows CE Tools" 1071 if test ! -d "${SDKROOT}" ; then 1072 SDKROOT="C:/Windows CE Tools" 1073 fi 1074 fi 1075 WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` 1076 SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` 1077 if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ 1078 -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then 1079 AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]]) 1080 doWince="no" 1081 else 1082 # We could PATH_NOSPACE these, but that's not important, 1083 # as long as we quote them when used. 1084 CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" 1085 if test -d "${CEINCLUDE}/${TARGETCPU}" ; then 1086 CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" 1087 fi 1088 CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" 1089 fi 1090 fi 1091 1092 if test "$GCC" != "yes" ; then 1093 if test "${SHARED_BUILD}" = "0" ; then 1094 runtime=-MT 1095 else 1096 runtime=-MD 1097 fi 1098 1099 if test "$do64bit" != "no" ; then 1100 # All this magic is necessary for the Win64 SDK RC1 - hobbs 1101 CC="\"${PATH64}/cl.exe\"" 1102 CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" 1103 RC="\"${MSSDK}/bin/rc.exe\"" 1104 lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" 1105 LINKBIN="\"${PATH64}/link.exe\"" 1106 CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" 1107 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" 1108 # Avoid 'unresolved external symbol __security_cookie' 1109 # errors, c.f. http://support.microsoft.com/?id=894573 1110 TEA_ADD_LIBS([bufferoverflowU.lib]) 1111 elif test "$doWince" != "no" ; then 1112 CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" 1113 if test "${TARGETCPU}" = "X86"; then 1114 CC="\"${CEBINROOT}/cl.exe\"" 1115 else 1116 CC="\"${CEBINROOT}/cl${ARCH}.exe\"" 1117 fi 1118 CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" 1119 RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" 1120 arch=`echo ${ARCH} | awk '{print tolower([$]0)}'` 1121 defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS" 1122 if test "${SHARED_BUILD}" = "1" ; then 1123 # Static CE builds require static celib as well 1124 defs="${defs} _DLL" 1125 fi 1126 for i in $defs ; do 1127 AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i) 1128 done 1129 AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version]) 1130 AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version]) 1131 CFLAGS_DEBUG="-nologo -Zi -Od" 1132 CFLAGS_OPTIMIZE="-nologo -Ox" 1133 lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` 1134 lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" 1135 LINKBIN="\"${CEBINROOT}/link.exe\"" 1136 AC_SUBST(CELIB_DIR) 1137 else 1138 RC="rc" 1139 lflags="-nologo" 1140 LINKBIN="link" 1141 CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" 1142 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" 1143 fi 1144 fi 1145 1146 if test "$GCC" = "yes"; then 1147 # mingw gcc mode 1148 RC="windres" 1149 CFLAGS_DEBUG="-g" 1150 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" 1151 SHLIB_LD="$CC -shared" 1152 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 1153 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" 1154 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" 1155 else 1156 SHLIB_LD="${LINKBIN} -dll ${lflags}" 1157 # link -lib only works when -lib is the first arg 1158 STLIB_LD="${LINKBIN} -lib ${lflags}" 1159 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' 1160 PATHTYPE=-w 1161 # For information on what debugtype is most useful, see: 1162 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp 1163 # This essentially turns it all on. 1164 LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2" 1165 LDFLAGS_OPTIMIZE="-release" 1166 if test "$doWince" != "no" ; then 1167 LDFLAGS_CONSOLE="-link ${lflags}" 1168 LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} 1169 else 1170 LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" 1171 LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" 1172 fi 1173 fi 1174 1175 SHLIB_LD_LIBS='${LIBS}' 1176 SHLIB_SUFFIX=".dll" 1177 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' 1178 1179 TCL_LIB_VERSIONS_OK=nodots 1180 # Bogus to avoid getting this turned off 1181 DL_OBJS="tclLoadNone.obj" 1182 ;; 1183 AIX-*) 1184 if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then 1185 # AIX requires the _r compiler when gcc isn't being used 1186 case "${CC}" in 1187 *_r) 1188 # ok ... 1189 ;; 1190 *) 1191 CC=${CC}_r 1192 ;; 1193 esac 1194 AC_MSG_RESULT([Using $CC for compiling with threads]) 1195 fi 1196 LIBS="$LIBS -lc" 611 1197 SHLIB_CFLAGS="" 612 SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" 1198 SHLIB_LD_LIBS='${LIBS}' 1199 SHLIB_SUFFIX=".so" 1200 1201 DL_OBJS="tclLoadDl.o" 1202 LD_LIBRARY_PATH_VAR="LIBPATH" 1203 1204 # Check to enable 64-bit flags for compiler/linker on AIX 4+ 1205 if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then 1206 if test "$GCC" = "yes" ; then 1207 AC_MSG_WARN([64bit mode not supported with GCC on $system]) 1208 else 1209 do64bit_ok=yes 1210 CFLAGS="$CFLAGS -q64" 1211 LDFLAGS_ARCH="-q64" 1212 RANLIB="${RANLIB} -X64" 1213 AR="${AR} -X64" 1214 SHLIB_LD_FLAGS="-b64" 1215 fi 1216 fi 1217 1218 if test "`uname -m`" = "ia64" ; then 1219 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC 1220 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 1221 # AIX-5 has dl* in libc.so 1222 DL_LIBS="" 1223 if test "$GCC" = "yes" ; then 1224 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 1225 else 1226 CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' 1227 fi 1228 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 1229 else 1230 if test "$GCC" = "yes" ; then 1231 SHLIB_LD="gcc -shared" 1232 else 1233 SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" 1234 fi 1235 SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" 1236 DL_LIBS="-ldl" 1237 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 1238 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1239 TCL_NEEDS_EXP_FILE=1 1240 TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp' 1241 fi 1242 1243 # AIX v<=4.1 has some different flags than 4.2+ 1244 if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then 1245 AC_LIBOBJ([tclLoadAix]) 1246 DL_LIBS="-lld" 1247 fi 1248 1249 # On AIX <=v4 systems, libbsd.a has to be linked in to support 1250 # non-blocking file IO. This library has to be linked in after 1251 # the MATH_LIBS or it breaks the pow() function. The way to 1252 # insure proper sequencing, is to add it to the tail of MATH_LIBS. 1253 # This library also supplies gettimeofday. 1254 # 1255 # AIX does not have a timezone field in struct tm. When the AIX 1256 # bsd library is used, the timezone global and the gettimeofday 1257 # methods are to be avoided for timezone deduction instead, we 1258 # deduce the timezone by comparing the localtime result on a 1259 # known GMT value. 1260 1261 AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) 1262 if test $libbsd = yes; then 1263 MATH_LIBS="$MATH_LIBS -lbsd" 1264 AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?]) 1265 fi 1266 ;; 1267 BeOS*) 1268 SHLIB_CFLAGS="-fPIC" 1269 SHLIB_LD="${CC} -nostart" 613 1270 SHLIB_LD_LIBS='${LIBS}' 614 1271 SHLIB_SUFFIX=".so" 615 1272 DL_OBJS="tclLoadDl.o" 616 1273 DL_LIBS="-ldl" 617 LDFLAGS="" 618 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 619 TCL_NEEDS_EXP_FILE=1 620 TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' 621 ;; 622 AIX-*) 623 SHLIB_CFLAGS="" 624 SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512" 625 SHLIB_LD_LIBS='${LIBS}' 626 SHLIB_SUFFIX=".so" 627 DL_OBJS="tclLoadDl.o" 628 LIBOBJS="$LIBOBJS tclLoadAix.o" 629 DL_LIBS="-lld" 630 LDFLAGS="" 631 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 632 TCL_NEEDS_EXP_FILE=1 633 TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' 1274 1275 #----------------------------------------------------------- 1276 # Check for inet_ntoa in -lbind, for BeOS (which also needs 1277 # -lsocket, even if the network functions are in -lnet which 1278 # is always linked to, for compatibility. 1279 #----------------------------------------------------------- 1280 AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"]) 634 1281 ;; 635 1282 BSD/OS-2.1*|BSD/OS-3*) … … 640 1287 DL_OBJS="tclLoadDl.o" 641 1288 DL_LIBS="-ldl" 642 LDFLAGS=""1289 CC_SEARCH_FLAGS="" 643 1290 LD_SEARCH_FLAGS="" 644 1291 ;; … … 650 1297 DL_OBJS="tclLoadDl.o" 651 1298 DL_LIBS="-ldl" 652 LDFLAGS="-export-dynamic" 1299 LDFLAGS="$LDFLAGS -export-dynamic" 1300 CC_SEARCH_FLAGS="" 653 1301 LD_SEARCH_FLAGS="" 654 ;;655 *win32*|*WIN32*|CYGWIN_NT*|cygwin_nt*)656 CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"657 CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}"658 LDFLAGS_CONSOLE="-subsystem:console"659 LDFLAGS_WINDOW="-subsystem:windows"660 LDFLAGS_DEBUG="-debug:full -debugtype:cv"661 LDFLAGS_OPTIMIZE="-release"662 EXTRA_CFLAGS="-YX"663 PATHTYPE=-w664 STLIB_LD="lib -nologo"665 SHLIB_LD="link -dll -nologo"666 SHLIB_LD_LIBS="user32.lib advapi32.lib"667 RC="rc"668 1302 ;; 669 1303 dgux*) … … 674 1308 DL_OBJS="tclLoadDl.o" 675 1309 DL_LIBS="-ldl" 676 LDFLAGS=""1310 CC_SEARCH_FLAGS="" 677 1311 LD_SEARCH_FLAGS="" 678 1312 ;; 679 HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*|HP-UX-*.11.*) 1313 HP-UX-*.11.*) 1314 # Use updated header definitions where possible 1315 AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?]) 1316 # Needed by Tcl, but not most extensions 1317 #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?]) 1318 #LIBS="$LIBS -lxnet" # Use the XOPEN network library 1319 1320 SHLIB_SUFFIX=".sl" 1321 AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) 1322 if test "$tcl_ok" = yes; then 1323 SHLIB_CFLAGS="+z" 1324 SHLIB_LD="ld -b" 1325 SHLIB_LD_LIBS='${LIBS}' 1326 DL_OBJS="tclLoadShl.o" 1327 DL_LIBS="-ldld" 1328 LDFLAGS="$LDFLAGS -Wl,-E" 1329 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' 1330 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' 1331 LD_LIBRARY_PATH_VAR="SHLIB_PATH" 1332 fi 1333 if test "$GCC" = "yes" ; then 1334 SHLIB_LD="gcc -shared" 1335 SHLIB_LD_LIBS='${LIBS}' 1336 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1337 fi 1338 1339 # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc 1340 #CFLAGS="$CFLAGS +DAportable" 1341 1342 # Check to enable 64-bit flags for compiler/linker 1343 if test "$do64bit" = "yes" ; then 1344 if test "$GCC" = "yes" ; then 1345 hpux_arch=`${CC} -dumpmachine` 1346 case $hpux_arch in 1347 hppa64*) 1348 # 64-bit gcc in use. Fix flags for GNU ld. 1349 do64bit_ok=yes 1350 SHLIB_LD="${CC} -shared" 1351 SHLIB_LD_LIBS='${LIBS}' 1352 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1353 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1354 ;; 1355 *) 1356 AC_MSG_WARN([64bit mode not supported with GCC on $system]) 1357 ;; 1358 esac 1359 else 1360 do64bit_ok=yes 1361 CFLAGS="$CFLAGS +DD64" 1362 LDFLAGS_ARCH="+DD64" 1363 fi 1364 fi 1365 ;; 1366 HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) 680 1367 SHLIB_SUFFIX=".sl" 681 1368 AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) … … 686 1373 DL_OBJS="tclLoadShl.o" 687 1374 DL_LIBS="-ldld" 688 LDFLAGS="-Wl,-E" 689 LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' 1375 LDFLAGS="$LDFLAGS -Wl,-E" 1376 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' 1377 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' 1378 LD_LIBRARY_PATH_VAR="SHLIB_PATH" 690 1379 fi 691 1380 ;; 692 IRIX-4.*) 693 SHLIB_CFLAGS="-G 0" 694 SHLIB_SUFFIX=".a" 695 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" 1381 IRIX-5.*) 1382 SHLIB_CFLAGS="" 1383 SHLIB_LD="ld -shared -rdata_shared" 696 1384 SHLIB_LD_LIBS='${LIBS}' 697 DL_OBJS="tclLoadAout.o"698 DL_LIBS=""699 LDFLAGS="-Wl,-D,08000000"700 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'701 SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'702 ;;703 IRIX-5.*|IRIX-6.*|IRIX64-6.5*)704 SHLIB_CFLAGS=""705 SHLIB_LD="ld -n32 -shared -rdata_shared"706 SHLIB_LD_LIBS=""707 1385 SHLIB_SUFFIX=".so" 708 1386 DL_OBJS="tclLoadDl.o" 709 1387 DL_LIBS="" 710 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 711 if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then 712 EXTRA_CFLAGS="-mabi=n32" 713 LDFLAGS="-mabi=n32" 1388 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1389 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1390 ;; 1391 IRIX-6.*) 1392 SHLIB_CFLAGS="" 1393 SHLIB_LD="ld -n32 -shared -rdata_shared" 1394 SHLIB_LD_LIBS='${LIBS}' 1395 SHLIB_SUFFIX=".so" 1396 DL_OBJS="tclLoadDl.o" 1397 DL_LIBS="" 1398 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1399 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1400 if test "$GCC" = "yes" ; then 1401 CFLAGS="$CFLAGS -mabi=n32" 1402 LDFLAGS="$LDFLAGS -mabi=n32" 714 1403 else 715 1404 case $system in 716 1405 IRIX-6.3) 717 1406 # Use to build 6.2 compatible binaries on 6.3. 718 EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"1407 CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" 719 1408 ;; 720 1409 *) 721 EXTRA_CFLAGS="-n32"1410 CFLAGS="$CFLAGS -n32" 722 1411 ;; 723 1412 esac 724 LDFLAGS=" -n32"1413 LDFLAGS="$LDFLAGS -n32" 725 1414 fi 726 1415 ;; 727 1416 IRIX64-6.*) 728 1417 SHLIB_CFLAGS="" 729 SHLIB_LD="ld - 32 -shared -rdata_shared"1418 SHLIB_LD="ld -n32 -shared -rdata_shared" 730 1419 SHLIB_LD_LIBS='${LIBS}' 731 1420 SHLIB_SUFFIX=".so" 732 1421 DL_OBJS="tclLoadDl.o" 733 1422 DL_LIBS="" 734 LDFLAGS="" 735 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1423 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1424 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1425 1426 # Check to enable 64-bit flags for compiler/linker 1427 1428 if test "$do64bit" = "yes" ; then 1429 if test "$GCC" = "yes" ; then 1430 AC_MSG_WARN([64bit mode not supported by gcc]) 1431 else 1432 do64bit_ok=yes 1433 SHLIB_LD="ld -64 -shared -rdata_shared" 1434 CFLAGS="$CFLAGS -64" 1435 LDFLAGS_ARCH="-64" 1436 fi 1437 fi 736 1438 ;; 737 1439 Linux*) … … 740 1442 SHLIB_SUFFIX=".so" 741 1443 1444 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" 742 1445 # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 743 1446 # when you inline the string and math operations. Turn this off to 744 1447 # get rid of the warnings. 745 746 CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" 747 748 if test "$have_dl" = yes; then 749 SHLIB_LD="${CC} -shared" 750 DL_OBJS="tclLoadDl.o" 751 DL_LIBS="-ldl" 752 LDFLAGS="-rdynamic" 753 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 754 else 755 AC_CHECK_HEADER(dld.h, [ 756 SHLIB_LD="ld -shared" 757 DL_OBJS="tclLoadDld.o" 758 DL_LIBS="-ldld" 759 LDFLAGS="" 760 LD_SEARCH_FLAGS=""]) 761 fi 1448 #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" 1449 1450 SHLIB_LD="${CC} -shared" 1451 DL_OBJS="tclLoadDl.o" 1452 DL_LIBS="-ldl" 1453 LDFLAGS="$LDFLAGS -Wl,--export-dynamic" 1454 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1455 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 762 1456 if test "`uname -m`" = "alpha" ; then 763 EXTRA_CFLAGS="-mieee" 764 fi 1457 CFLAGS="$CFLAGS -mieee" 1458 fi 1459 1460 # The combo of gcc + glibc has a bug related 1461 # to inlining of functions like strtod(). The 1462 # -fno-builtin flag should address this problem 1463 # but it does not work. The -fno-inline flag 1464 # is kind of overkill but it works. 1465 # Disable inlining only when one of the 1466 # files in compat/*.c is being linked in. 1467 if test x"${USE_COMPAT}" != x ; then 1468 CFLAGS="$CFLAGS -fno-inline" 1469 fi 1470 1471 ;; 1472 GNU*) 1473 SHLIB_CFLAGS="-fPIC" 1474 SHLIB_LD_LIBS='${LIBS}' 1475 SHLIB_SUFFIX=".so" 1476 1477 SHLIB_LD="${CC} -shared" 1478 DL_OBJS="" 1479 DL_LIBS="-ldl" 1480 LDFLAGS="$LDFLAGS -Wl,--export-dynamic" 1481 CC_SEARCH_FLAGS="" 1482 LD_SEARCH_FLAGS="" 1483 if test "`uname -m`" = "alpha" ; then 1484 CFLAGS="$CFLAGS -mieee" 1485 fi 1486 ;; 1487 Lynx*) 1488 SHLIB_CFLAGS="-fPIC" 1489 SHLIB_LD_LIBS='${LIBS}' 1490 SHLIB_SUFFIX=".so" 1491 CFLAGS_OPTIMIZE=-02 1492 SHLIB_LD="${CC} -shared " 1493 DL_OBJS="tclLoadDl.o" 1494 DL_LIBS="-mshared -ldl" 1495 LD_FLAGS="-Wl,--export-dynamic" 1496 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1497 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 765 1498 ;; 766 1499 MP-RAS-02*) … … 771 1504 DL_OBJS="tclLoadDl.o" 772 1505 DL_LIBS="-ldl" 773 LDFLAGS=""1506 CC_SEARCH_FLAGS="" 774 1507 LD_SEARCH_FLAGS="" 775 1508 ;; … … 781 1514 DL_OBJS="tclLoadDl.o" 782 1515 DL_LIBS="-ldl" 783 LDFLAGS="-Wl,-Bexport" 1516 LDFLAGS="$LDFLAGS -Wl,-Bexport" 1517 CC_SEARCH_FLAGS="" 784 1518 LD_SEARCH_FLAGS="" 785 1519 ;; 786 NetBSD-*|FreeBSD-[[12]].*|OpenBSD-*) 787 # Not available on all versions: check for include file. 788 AC_CHECK_HEADER(dlfcn.h, [ 789 SHLIB_CFLAGS="-fpic" 790 SHLIB_LD="ld -Bshareable -x" 791 SHLIB_LD_LIBS="" 792 SHLIB_SUFFIX=".so" 793 DL_OBJS="tclLoadDl.o" 794 DL_LIBS="" 1520 NetBSD-*|FreeBSD-[[1-2]].*) 1521 # NetBSD/SPARC needs -fPIC, -fpic will not do. 1522 SHLIB_CFLAGS="-fPIC" 1523 SHLIB_LD="ld -Bshareable -x" 1524 SHLIB_LD_LIBS='${LIBS}' 1525 SHLIB_SUFFIX=".so" 1526 DL_OBJS="tclLoadDl.o" 1527 DL_LIBS="" 1528 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1529 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1530 AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ 1531 AC_EGREP_CPP(yes, [ 1532 #ifdef __ELF__ 1533 yes 1534 #endif 1535 ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) 1536 if test $tcl_cv_ld_elf = yes; then 1537 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' 1538 else 1539 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' 1540 fi 1541 1542 # Ancient FreeBSD doesn't handle version numbers with dots. 1543 1544 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 1545 TCL_LIB_VERSIONS_OK=nodots 1546 ;; 1547 OpenBSD-*) 1548 # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do. 1549 case `machine` in 1550 sparc|sparc64) 1551 SHLIB_CFLAGS="-fPIC";; 1552 *) 1553 SHLIB_CFLAGS="-fpic";; 1554 esac 1555 SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" 1556 SHLIB_LD_LIBS='${LIBS}' 1557 SHLIB_SUFFIX=".so" 1558 DL_OBJS="tclLoadDl.o" 1559 DL_LIBS="" 1560 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1561 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1562 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' 1563 AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ 1564 AC_EGREP_CPP(yes, [ 1565 #ifdef __ELF__ 1566 yes 1567 #endif 1568 ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) 1569 if test $tcl_cv_ld_elf = yes; then 1570 LDFLAGS=-Wl,-export-dynamic 1571 else 795 1572 LDFLAGS="" 796 LD_SEARCH_FLAGS="" 797 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' 798 ], [ 799 SHLIB_CFLAGS="" 800 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" 801 SHLIB_LD_LIBS='${LIBS}' 802 SHLIB_SUFFIX=".a" 803 DL_OBJS="tclLoadAout.o" 804 DL_LIBS="" 805 LDFLAGS="" 806 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 807 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' 808 ]) 809 810 # FreeBSD doesn't handle version numbers with dots. 811 812 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' 1573 fi 1574 1575 # OpenBSD doesn't do version numbers with dots. 1576 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 813 1577 TCL_LIB_VERSIONS_OK=nodots 814 1578 ;; 815 1579 FreeBSD-*) 816 1580 # FreeBSD 3.* and greater have ELF. 817 SHLIB_CFLAGS="-f pic"1581 SHLIB_CFLAGS="-fPIC" 818 1582 SHLIB_LD="ld -Bshareable -x" 819 SHLIB_LD_LIBS= ""1583 SHLIB_LD_LIBS='${LIBS}' 820 1584 SHLIB_SUFFIX=".so" 821 1585 DL_OBJS="tclLoadDl.o" 822 1586 DL_LIBS="" 823 LDFLAGS="" 1587 LDFLAGS="$LDFLAGS -export-dynamic" 1588 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1589 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1590 if test "${TCL_THREADS}" = "1" ; then 1591 # The -pthread needs to go in the CFLAGS, not LIBS 1592 LIBS=`echo $LIBS | sed s/-pthread//` 1593 CFLAGS="$CFLAGS -pthread" 1594 LDFLAGS="$LDFLAGS -pthread" 1595 fi 1596 case $system in 1597 FreeBSD-3.*) 1598 # FreeBSD-3 doesn't handle version numbers with dots. 1599 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 1600 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' 1601 TCL_LIB_VERSIONS_OK=nodots 1602 ;; 1603 esac 1604 ;; 1605 Darwin-*) 1606 CFLAGS_OPTIMIZE="-Os" 1607 SHLIB_CFLAGS="-fno-common" 1608 if test $do64bit = yes; then 1609 do64bit_ok=yes 1610 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" 1611 fi 1612 # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here: 1613 SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' 1614 AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ 1615 hold_ldflags=$LDFLAGS 1616 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" 1617 AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no) 1618 LDFLAGS=$hold_ldflags]) 1619 if test $tcl_cv_ld_single_module = yes; then 1620 SHLIB_LD="${SHLIB_LD} -Wl,-single_module" 1621 fi 1622 SHLIB_LD_LIBS='${LIBS}' 1623 SHLIB_SUFFIX=".dylib" 1624 DL_OBJS="tclLoadDyld.o" 1625 DL_LIBS="" 1626 # Don't use -prebind when building for Mac OS X 10.4 or later only: 1627 test -z "${MACOSX_DEPLOYMENT_TARGET}" || \ 1628 test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print [$]2}'`" -lt 4 && \ 1629 LDFLAGS="$LDFLAGS -prebind" 1630 LDFLAGS="$LDFLAGS -headerpad_max_install_names" 1631 AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ 1632 hold_ldflags=$LDFLAGS 1633 LDFLAGS="$LDFLAGS -Wl,-search_paths_first" 1634 AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no) 1635 LDFLAGS=$hold_ldflags]) 1636 if test $tcl_cv_ld_search_paths_first = yes; then 1637 LDFLAGS="$LDFLAGS -Wl,-search_paths_first" 1638 fi 1639 CC_SEARCH_FLAGS="" 824 1640 LD_SEARCH_FLAGS="" 1641 LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" 1642 1643 # TEA specific: for Tk extensions, remove -arch ppc64 from CFLAGS 1644 # for fat builds, as neither TkAqua nor TkX11 can be built for 64bit 1645 # at present (no 64bit GUI libraries). 1646 test $do64bit_ok = no && test -n "${TK_BIN_DIR}" && \ 1647 CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`" 825 1648 ;; 826 1649 NEXTSTEP-*) … … 831 1654 DL_OBJS="tclLoadNext.o" 832 1655 DL_LIBS="" 833 LDFLAGS=""1656 CC_SEARCH_FLAGS="" 834 1657 LD_SEARCH_FLAGS="" 835 1658 ;; 836 1659 OS/390-*) 837 CFLAGS_OPTIMIZE="" # Optimizer is buggy 838 AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h 1660 CFLAGS_OPTIMIZE="" # Optimizer is buggy 1661 AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h 1662 [Should OS/390 do the right thing with sockets?]) 839 1663 ;; 840 1664 OSF1-1.0|OSF1-1.1|OSF1-1.2) … … 847 1671 DL_OBJS="tclLoadOSF.o" 848 1672 DL_LIBS="" 849 LDFLAGS=""1673 CC_SEARCH_FLAGS="" 850 1674 LD_SEARCH_FLAGS="" 851 1675 ;; 852 1676 OSF1-1.*) 853 1677 # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 854 SHLIB_CFLAGS="-fpic" 855 SHLIB_LD="ld -shared" 1678 SHLIB_CFLAGS="-fPIC" 1679 if test "$SHARED_BUILD" = "1" ; then 1680 SHLIB_LD="ld -shared" 1681 else 1682 SHLIB_LD="ld -non_shared" 1683 fi 856 1684 SHLIB_LD_LIBS="" 857 1685 SHLIB_SUFFIX=".so" 858 1686 DL_OBJS="tclLoadDl.o" 859 1687 DL_LIBS="" 860 LDFLAGS=""1688 CC_SEARCH_FLAGS="" 861 1689 LD_SEARCH_FLAGS="" 862 1690 ;; … … 864 1692 # Digital OSF/1 865 1693 SHLIB_CFLAGS="" 866 SHLIB_LD='ld -shared -expect_unresolved "*"' 1694 if test "$SHARED_BUILD" = "1" ; then 1695 SHLIB_LD='ld -shared -expect_unresolved "*"' 1696 else 1697 SHLIB_LD='ld -non_shared -expect_unresolved "*"' 1698 fi 867 1699 SHLIB_LD_LIBS="" 868 1700 SHLIB_SUFFIX=".so" 869 1701 DL_OBJS="tclLoadDl.o" 870 1702 DL_LIBS="" 871 LDFLAGS="" 872 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1703 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' 1704 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' 1705 if test "$GCC" = "yes" ; then 1706 CFLAGS="$CFLAGS -mieee" 1707 else 1708 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" 1709 fi 1710 # see pthread_intro(3) for pthread support on osf1, k.furukawa 1711 if test "${TCL_THREADS}" = "1" ; then 1712 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" 1713 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" 1714 LIBS=`echo $LIBS | sed s/-lpthreads//` 1715 if test "$GCC" = "yes" ; then 1716 LIBS="$LIBS -lpthread -lmach -lexc" 1717 else 1718 CFLAGS="$CFLAGS -pthread" 1719 LDFLAGS="$LDFLAGS -pthread" 1720 fi 1721 fi 1722 873 1723 ;; 874 RISCos-*) 875 SHLIB_CFLAGS="-G 0" 876 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" 877 SHLIB_LD_LIBS='${LIBS}' 878 SHLIB_SUFFIX=".a" 879 DL_OBJS="tclLoadAout.o" 1724 QNX-6*) 1725 # QNX RTP 1726 # This may work for all QNX, but it was only reported for v6. 1727 SHLIB_CFLAGS="-fPIC" 1728 SHLIB_LD="ld -Bshareable -x" 1729 SHLIB_LD_LIBS="" 1730 SHLIB_SUFFIX=".so" 1731 DL_OBJS="tclLoadDl.o" 1732 # dlopen is in -lc on QNX 880 1733 DL_LIBS="" 881 LDFLAGS="-Wl,-D,08000000"882 LD_SEARCH_FLAGS= '-L${LIB_RUNTIME_DIR}'1734 CC_SEARCH_FLAGS="" 1735 LD_SEARCH_FLAGS="" 883 1736 ;; 884 1737 SCO_SV-3.2*) 885 # Note, dlopen is available only on SCO 3.2.5 and greater. 1738 # Note, dlopen is available only on SCO 3.2.5 and greater. However, 886 1739 # this test works, since "uname -s" was non-standard in 3.2.4 and 887 1740 # below. 888 SHLIB_CFLAGS="-Kpic -belf" 1741 if test "$GCC" = "yes" ; then 1742 SHLIB_CFLAGS="-fPIC -melf" 1743 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" 1744 else 1745 SHLIB_CFLAGS="-Kpic -belf" 1746 LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" 1747 fi 889 1748 SHLIB_LD="ld -G" 890 1749 SHLIB_LD_LIBS="" … … 892 1751 DL_OBJS="tclLoadDl.o" 893 1752 DL_LIBS="" 894 LDFLAGS="-belf -Wl,-Bexport"1753 CC_SEARCH_FLAGS="" 895 1754 LD_SEARCH_FLAGS="" 896 1755 ;; … … 902 1761 DL_OBJS="tclLoadDl.o" 903 1762 DL_LIBS="-ldl" 904 LDFLAGS=""1763 CC_SEARCH_FLAGS="" 905 1764 LD_SEARCH_FLAGS="" 906 1765 ;; … … 912 1771 DL_OBJS="tclLoadDl.o" 913 1772 DL_LIBS="-ldl" 914 LDFLAGS=""915 LD_SEARCH_FLAGS= '-L${LIB_RUNTIME_DIR}'1773 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' 1774 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 916 1775 917 1776 # SunOS can't handle version numbers with dots in them in library … … 920 1779 # So, the library has to have a name like libtcl75.so.1.0 921 1780 922 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS} \$\{DBGX\}.so.1.0'923 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS} \$\{DBGX\}.a'1781 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' 1782 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' 924 1783 TCL_LIB_VERSIONS_OK=nodots 925 1784 ;; 926 SunOS-5.[[0-6]]*) 1785 SunOS-5.[[0-6]]) 1786 # Careful to not let 5.10+ fall into this case 1787 1788 # Note: If _REENTRANT isn't defined, then Solaris 1789 # won't define thread-safe library routines. 1790 1791 AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) 1792 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, 1793 [Do we really want to follow the standard? Yes we do!]) 1794 927 1795 SHLIB_CFLAGS="-KPIC" 928 SHLIB_LD="/usr/ccs/bin/ld -G -z text"929 1796 930 1797 # Note: need the LIBS below, otherwise Tk won't find Tcl's … … 935 1802 DL_OBJS="tclLoadDl.o" 936 1803 DL_LIBS="-ldl" 937 LDFLAGS="" 938 LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 1804 if test "$GCC" = "yes" ; then 1805 SHLIB_LD="$CC -shared" 1806 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 1807 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1808 else 1809 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 1810 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 1811 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1812 fi 939 1813 ;; 940 1814 SunOS-5*) 1815 # Note: If _REENTRANT isn't defined, then Solaris 1816 # won't define thread-safe library routines. 1817 1818 AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) 1819 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, 1820 [Do we really want to follow the standard? Yes we do!]) 1821 941 1822 SHLIB_CFLAGS="-KPIC" 942 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 943 LDFLAGS="" 944 945 do64bit_ok=no 1823 1824 # Check to enable 64-bit flags for compiler/linker 946 1825 if test "$do64bit" = "yes" ; then 947 arch=`isainfo` 948 if test "$arch" = "sparcv9 sparc" ; then 949 if test "$CC" != "gcc" -a `$CC -v 2>&1 | grep -c gcc` = "0" ; then 950 do64bit_ok=yes 951 EXTRA_CFLAGS="-xarch=v9" 952 LDFLAGS="-xarch=v9" 953 else 954 AC_MSG_WARN("64bit mode not supported using GCC on $system") 1826 arch=`isainfo` 1827 if test "$arch" = "sparcv9 sparc" ; then 1828 if test "$GCC" = "yes" ; then 1829 if test "`gcc -dumpversion | awk -F. '{print [$]1}'`" -lt "3" ; then 1830 AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system]) 1831 else 1832 do64bit_ok=yes 1833 CFLAGS="$CFLAGS -m64 -mcpu=v9" 1834 LDFLAGS="$LDFLAGS -m64 -mcpu=v9" 1835 SHLIB_CFLAGS="-fPIC" 1836 fi 1837 else 1838 do64bit_ok=yes 1839 if test "$do64bitVIS" = "yes" ; then 1840 CFLAGS="$CFLAGS -xarch=v9a" 1841 LDFLAGS_ARCH="-xarch=v9a" 1842 else 1843 CFLAGS="$CFLAGS -xarch=v9" 1844 LDFLAGS_ARCH="-xarch=v9" 1845 fi 1846 # Solaris 64 uses this as well 1847 #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" 1848 fi 1849 elif test "$arch" = "amd64 i386" ; then 1850 if test "$GCC" = "yes" ; then 1851 AC_MSG_WARN([64bit mode not supported with GCC on $system]) 1852 else 1853 do64bit_ok=yes 1854 CFLAGS="$CFLAGS -xarch=amd64" 1855 LDFLAGS="$LDFLAGS -xarch=amd64" 1856 fi 1857 else 1858 AC_MSG_WARN([64bit mode not supported for $arch]) 955 1859 fi 956 else957 AC_MSG_WARN("64bit mode only supported sparcv9 system")958 fi959 1860 fi 960 1861 … … 966 1867 DL_OBJS="tclLoadDl.o" 967 1868 DL_LIBS="-ldl" 968 if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then 969 LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 1869 if test "$GCC" = "yes" ; then 1870 SHLIB_LD="$CC -shared" 1871 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 1872 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} 1873 if test "$do64bit_ok" = "yes" ; then 1874 # We need to specify -static-libgcc or we need to 1875 # add the path to the sparv9 libgcc. 1876 # JH: static-libgcc is necessary for core Tcl, but may 1877 # not be necessary for extensions. 1878 SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" 1879 # for finding sparcv9 libgcc, get the regular libgcc 1880 # path, remove so name and append 'sparcv9' 1881 #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." 1882 #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" 1883 fi 970 1884 else 1885 SHLIB_LD="/usr/ccs/bin/ld -G -z text" 1886 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' 971 1887 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' 972 1888 fi 973 ;;974 ULTRIX-4.*)975 SHLIB_CFLAGS="-G 0"976 SHLIB_SUFFIX=".a"977 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"978 SHLIB_LD_LIBS='${LIBS}'979 DL_OBJS="tclLoadAout.o"980 DL_LIBS=""981 LDFLAGS="-Wl,-D,08000000"982 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'983 1889 ;; 984 1890 UNIX_SV* | UnixWare-5*) … … 991 1897 # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers 992 1898 # that don't grok the -Bexport option. Test that it does. 993 hold_ldflags=$LDFLAGS 994 AC_MSG_CHECKING(for ld accepts -Bexport flag) 995 LDFLAGS="${LDFLAGS} -Wl,-Bexport" 996 AC_TRY_LINK(, [int i;], found=yes, found=no) 997 LDFLAGS=$hold_ldflags 998 AC_MSG_RESULT($found) 999 if test $found = yes; then 1000 LDFLAGS="-Wl,-Bexport" 1001 else 1002 LDFLAGS="" 1003 fi 1899 AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [ 1900 hold_ldflags=$LDFLAGS 1901 LDFLAGS="$LDFLAGS -Wl,-Bexport" 1902 AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no) 1903 LDFLAGS=$hold_ldflags]) 1904 if test $tcl_cv_ld_Bexport = yes; then 1905 LDFLAGS="$LDFLAGS -Wl,-Bexport" 1906 fi 1907 CC_SEARCH_FLAGS="" 1004 1908 LD_SEARCH_FLAGS="" 1005 1909 ;; … … 1007 1911 1008 1912 if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then 1009 AC_MSG_WARN("64bit support being disabled -- not supported on this platform") 1010 fi 1011 1012 # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic 1013 # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, 1014 # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need 1015 # to determine which of several header files defines the a.out file 1016 # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we 1017 # support only a file format that is more or less version-7-compatible. 1018 # In particular, 1019 # - a.out files must begin with `struct exec'. 1020 # - the N_TXTOFF on the `struct exec' must compute the seek address 1021 # of the text segment 1022 # - The `struct exec' must contain a_magic, a_text, a_data, a_bss 1023 # and a_entry fields. 1024 # The following compilation should succeed if and only if either sys/exec.h 1025 # or a.out.h is usable for the purpose. 1026 # 1027 # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the 1028 # `struct exec' includes a second header that contains information that 1029 # duplicates the v7 fields that are needed. 1030 1031 if test "x$DL_OBJS" = "xtclLoadAout.o" ; then 1032 AC_MSG_CHECKING(sys/exec.h) 1033 AC_TRY_COMPILE([#include <sys/exec.h>],[ 1034 struct exec foo; 1035 unsigned long seek; 1036 int flag; 1037 #if defined(__mips) || defined(mips) 1038 seek = N_TXTOFF (foo.ex_f, foo.ex_o); 1039 #else 1040 seek = N_TXTOFF (foo); 1041 #endif 1042 flag = (foo.a_magic == OMAGIC); 1043 return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; 1044 ], tcl_ok=usable, tcl_ok=unusable) 1045 AC_MSG_RESULT($tcl_ok) 1046 if test $tcl_ok = usable; then 1047 AC_DEFINE(USE_SYS_EXEC_H) 1048 else 1049 AC_MSG_CHECKING(a.out.h) 1050 AC_TRY_COMPILE([#include <a.out.h>],[ 1051 struct exec foo; 1052 unsigned long seek; 1053 int flag; 1054 #if defined(__mips) || defined(mips) 1055 seek = N_TXTOFF (foo.ex_f, foo.ex_o); 1056 #else 1057 seek = N_TXTOFF (foo); 1058 #endif 1059 flag = (foo.a_magic == OMAGIC); 1060 return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; 1061 ], tcl_ok=usable, tcl_ok=unusable) 1062 AC_MSG_RESULT($tcl_ok) 1063 if test $tcl_ok = usable; then 1064 AC_DEFINE(USE_A_OUT_H) 1065 else 1066 AC_MSG_CHECKING(sys/exec_aout.h) 1067 AC_TRY_COMPILE([#include <sys/exec_aout.h>],[ 1068 struct exec foo; 1069 unsigned long seek; 1070 int flag; 1071 #if defined(__mips) || defined(mips) 1072 seek = N_TXTOFF (foo.ex_f, foo.ex_o); 1073 #else 1074 seek = N_TXTOFF (foo); 1075 #endif 1076 flag = (foo.a_midmag == OMAGIC); 1077 return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; 1078 ], tcl_ok=usable, tcl_ok=unusable) 1079 AC_MSG_RESULT($tcl_ok) 1080 if test $tcl_ok = usable; then 1081 AC_DEFINE(USE_SYS_EXEC_AOUT_H) 1082 else 1083 DL_OBJS="" 1084 fi 1085 fi 1086 fi 1087 fi 1088 1089 # Step 5: disable dynamic loading if requested via a command-line switch. 1090 1091 AC_ARG_ENABLE(load, [ --disable-load disallow dynamic loading and "load" command], 1913 AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform]) 1914 fi 1915 1916 # Step 4: disable dynamic loading if requested via a command-line switch. 1917 1918 AC_ARG_ENABLE(load, 1919 AC_HELP_STRING([--disable-load], 1920 [disallow dynamic loading and "load" command (default: enabled)]), 1092 1921 [tcl_ok=$enableval], [tcl_ok=yes]) 1093 1922 if test "$tcl_ok" = "no"; then … … 1105 1934 DL_OBJS="tclLoadNone.o" 1106 1935 DL_LIBS="" 1107 LDFLAGS="" 1936 LDFLAGS="$LDFLAGS_ORIG" 1937 CC_SEARCH_FLAGS="" 1108 1938 LD_SEARCH_FLAGS="" 1109 1939 BUILD_DLTEST="" 1110 1940 fi 1941 LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" 1111 1942 1112 1943 # If we're running gcc, then change the C flags for compiling shared … … 1115 1946 1116 1947 if test "$DL_OBJS" != "tclLoadNone.o" ; then 1117 if test "$ CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then1948 if test "$GCC" = "yes" ; then 1118 1949 case $system in 1119 1950 AIX-*) … … 1123 1954 IRIX*) 1124 1955 ;; 1125 NetBSD-*|FreeBSD-* |OpenBSD-*)1956 NetBSD-*|FreeBSD-*) 1126 1957 ;; 1127 RISCos-*)1958 Darwin-*) 1128 1959 ;; 1129 ULTRIX-4.*) 1960 SCO_SV-3.2*) 1961 ;; 1962 windows) 1130 1963 ;; 1131 1964 *) … … 1137 1970 1138 1971 if test "$SHARED_LIB_SUFFIX" = "" ; then 1139 SHARED_LIB_SUFFIX='${ VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'1972 SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}' 1140 1973 fi 1141 1974 if test "$UNSHARED_LIB_SUFFIX" = "" ; then 1142 UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' 1143 fi 1975 UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' 1976 fi 1977 1978 AC_SUBST(DL_LIBS) 1979 1980 AC_SUBST(CFLAGS_DEBUG) 1981 AC_SUBST(CFLAGS_OPTIMIZE) 1982 AC_SUBST(CFLAGS_WARNING) 1144 1983 1145 1984 AC_SUBST(STLIB_LD) 1146 1985 AC_SUBST(SHLIB_LD) 1986 1987 AC_SUBST(SHLIB_LD_LIBS) 1147 1988 AC_SUBST(SHLIB_CFLAGS) 1148 AC_SUBST(SHLIB_LDFLAGS) 1149 AC_SUBST(DL_LIBS) 1150 AC_SUBST(CFLAGS_DEBUG) 1151 AC_SUBST(CFLAGS_OPTIMIZE) 1152 AC_SUBST(LDFLAGS_DEBUG) 1153 AC_SUBST(LDFLAGS_OPTIMIZE) 1989 1990 AC_SUBST(LD_LIBRARY_PATH_VAR) 1991 1992 # These must be called after we do the basic CFLAGS checks and 1993 # verify any possible 64-bit or similar switches are necessary 1994 TEA_TCL_EARLY_FLAGS 1995 TEA_TCL_64BIT_FLAGS 1154 1996 ]) 1155 1997 1156 1998 #-------------------------------------------------------------------- 1157 # SC_SERIAL_PORT1999 # TEA_SERIAL_PORT 1158 2000 # 1159 2001 # Determine which interface to use to talk to the serial port. 1160 2002 # Note that #include lines must begin in leftmost column for 1161 # some compilers to recognize them as preprocessor directives. 2003 # some compilers to recognize them as preprocessor directives, 2004 # and some build environments have stdin not pointing at a 2005 # pseudo-terminal (usually /dev/null instead.) 1162 2006 # 1163 2007 # Arguments: … … 1167 2011 # 1168 2012 # Defines only one of the following vars: 2013 # HAVE_SYS_MODEM_H 1169 2014 # USE_TERMIOS 1170 2015 # USE_TERMIO … … 1173 2018 #-------------------------------------------------------------------- 1174 2019 1175 AC_DEFUN( SC_SERIAL_PORT, [1176 AC_ MSG_CHECKING([termios vs. termio vs. sgtty])1177 2020 AC_DEFUN([TEA_SERIAL_PORT], [ 2021 AC_CHECK_HEADERS(sys/modem.h) 2022 AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [ 1178 2023 AC_TRY_RUN([ 1179 2024 #include <termios.h> 1180 2025 1181 main() 1182 { 2026 int main() { 1183 2027 struct termios t; 1184 2028 if (tcgetattr(0, &t) == 0) { … … 1188 2032 } 1189 2033 return 1; 1190 }], tk_ok=termios, tk_ok=no, tk_ok=no) 1191 1192 if test $tk_ok = termios; then 1193 AC_DEFINE(USE_TERMIOS) 1194 else 2034 }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) 2035 if test $tcl_cv_api_serial = no ; then 1195 2036 AC_TRY_RUN([ 1196 2037 #include <termio.h> 1197 2038 1198 main() 1199 { 2039 int main() { 1200 2040 struct termio t; 1201 2041 if (ioctl(0, TCGETA, &t) == 0) { … … 1204 2044 } 1205 2045 return 1; 1206 }], tk_ok=termio, tk_ok=no, tk_ok=no) 1207 1208 if test $tk_ok = termio; then 1209 AC_DEFINE(USE_TERMIO) 1210 else 2046 }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) 2047 fi 2048 if test $tcl_cv_api_serial = no ; then 1211 2049 AC_TRY_RUN([ 1212 2050 #include <sgtty.h> 1213 2051 1214 main() 1215 { 2052 int main() { 1216 2053 struct sgttyb t; 1217 2054 if (ioctl(0, TIOCGETP, &t) == 0) { … … 1221 2058 } 1222 2059 return 1; 1223 }], tk_ok=sgtty, tk_ok=none, tk_ok=none) 1224 if test $tk_ok = sgtty; then 1225 AC_DEFINE(USE_SGTTY) 1226 fi 1227 fi 1228 fi 1229 AC_MSG_RESULT($tk_ok) 2060 }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no) 2061 fi 2062 if test $tcl_cv_api_serial = no ; then 2063 AC_TRY_RUN([ 2064 #include <termios.h> 2065 #include <errno.h> 2066 2067 int main() { 2068 struct termios t; 2069 if (tcgetattr(0, &t) == 0 2070 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { 2071 cfsetospeed(&t, 0); 2072 t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; 2073 return 0; 2074 } 2075 return 1; 2076 }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) 2077 fi 2078 if test $tcl_cv_api_serial = no; then 2079 AC_TRY_RUN([ 2080 #include <termio.h> 2081 #include <errno.h> 2082 2083 int main() { 2084 struct termio t; 2085 if (ioctl(0, TCGETA, &t) == 0 2086 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { 2087 t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; 2088 return 0; 2089 } 2090 return 1; 2091 }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) 2092 fi 2093 if test $tcl_cv_api_serial = no; then 2094 AC_TRY_RUN([ 2095 #include <sgtty.h> 2096 #include <errno.h> 2097 2098 int main() { 2099 struct sgttyb t; 2100 if (ioctl(0, TIOCGETP, &t) == 0 2101 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { 2102 t.sg_ospeed = 0; 2103 t.sg_flags |= ODDP | EVENP | RAW; 2104 return 0; 2105 } 2106 return 1; 2107 }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none) 2108 fi]) 2109 case $tcl_cv_api_serial in 2110 termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);; 2111 termio) AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);; 2112 sgtty) AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);; 2113 esac 1230 2114 ]) 1231 2115 1232 2116 #-------------------------------------------------------------------- 1233 # SC_MISSING_POSIX_HEADERS2117 # TEA_MISSING_POSIX_HEADERS 1234 2118 # 1235 2119 # Supply substitutes for missing POSIX header files. Special … … 1249 2133 # NO_ERRNO_H 1250 2134 # NO_VALUES_H 1251 # NO_LIMITS_H2135 # HAVE_LIMITS_H or NO_LIMITS_H 1252 2136 # NO_STDLIB_H 1253 2137 # NO_STRING_H 1254 2138 # NO_SYS_WAIT_H 1255 2139 # NO_DLFCN_H 1256 # HAVE_UNISTD_H1257 2140 # HAVE_SYS_PARAM_H 1258 2141 # 1259 2142 # HAVE_STRING_H ? 1260 2143 # 2144 # tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and 2145 # CHECK on limits.h 1261 2146 #-------------------------------------------------------------------- 1262 2147 1263 AC_DEFUN(SC_MISSING_POSIX_HEADERS, [ 1264 1265 AC_MSG_CHECKING(dirent.h) 2148 AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [ 2149 AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, 1266 2150 AC_TRY_LINK([#include <sys/types.h> 1267 2151 #include <dirent.h>], [ … … 1283 2167 p = entryPtr->d_name; 1284 2168 closedir(d); 1285 ], tcl_ok=yes, tcl_ok=no) 1286 1287 if test $tcl_ok = no; then 1288 AC_DEFINE(NO_DIRENT_H) 1289 fi 1290 1291 AC_MSG_RESULT($tcl_ok) 1292 AC_CHECK_HEADER(errno.h, , AC_DEFINE(NO_ERRNO_H)) 1293 AC_CHECK_HEADER(float.h, , AC_DEFINE(NO_FLOAT_H)) 1294 AC_CHECK_HEADER(values.h, , AC_DEFINE(NO_VALUES_H)) 1295 AC_CHECK_HEADER(limits.h, , AC_DEFINE(NO_LIMITS_H)) 2169 ], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)) 2170 2171 if test $tcl_cv_dirent_h = no; then 2172 AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?]) 2173 fi 2174 2175 AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])]) 2176 AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])]) 2177 AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])]) 2178 AC_CHECK_HEADER(limits.h, 2179 [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])], 2180 [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])]) 1296 2181 AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) 1297 2182 AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) … … 1299 2184 AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) 1300 2185 if test $tcl_ok = 0; then 1301 AC_DEFINE(NO_STDLIB_H )2186 AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?]) 1302 2187 fi 1303 2188 AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) … … 1309 2194 1310 2195 if test $tcl_ok = 0; then 1311 AC_DEFINE(NO_STRING_H )1312 fi 1313 1314 AC_CHECK_HEADER(sys/wait.h, , AC_DEFINE(NO_SYS_WAIT_H))1315 AC_CHECK_HEADER(dlfcn.h, , AC_DEFINE(NO_DLFCN_H))2196 AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?]) 2197 fi 2198 2199 AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])]) 2200 AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])]) 1316 2201 1317 2202 # OS/390 lacks sys/param.h (and doesn't need it, by chance). 1318 1319 AC_HAVE_HEADERS(unistd.h sys/param.h) 1320 2203 AC_HAVE_HEADERS(sys/param.h) 1321 2204 ]) 1322 2205 1323 2206 #-------------------------------------------------------------------- 1324 # SC_PATH_X2207 # TEA_PATH_X 1325 2208 # 1326 2209 # Locate the X11 header files and the X11 library archive. Try … … 1331 2214 # no include files, so double-check its result just to be safe. 1332 2215 # 2216 # This should be called after TEA_CONFIG_CFLAGS as setting the 2217 # LIBS line can confuse some configure macro magic. 2218 # 1333 2219 # Arguments: 1334 2220 # none … … 1336 2222 # Results: 1337 2223 # 1338 # Sets the thefollowing vars:2224 # Sets the following vars: 1339 2225 # XINCLUDES 1340 2226 # XLIBSW 2227 # PKG_LIBS (appends to) 1341 2228 # 1342 2229 #-------------------------------------------------------------------- 1343 2230 1344 AC_DEFUN(SC_PATH_X, [ 2231 AC_DEFUN([TEA_PATH_X], [ 2232 if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then 2233 TEA_PATH_UNIX_X 2234 fi 2235 ]) 2236 2237 AC_DEFUN([TEA_PATH_UNIX_X], [ 1345 2238 AC_PATH_X 1346 2239 not_really_there="" … … 1355 2248 fi 1356 2249 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then 1357 AC_MSG_CHECKING( for X11 header files)1358 XINCLUDES="# no special path needed"1359 AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope")1360 if test "$ XINCLUDES" = nope; then2250 AC_MSG_CHECKING([for X11 header files]) 2251 found_xincludes="no" 2252 AC_TRY_CPP([#include <X11/Intrinsic.h>], found_xincludes="yes", found_xincludes="no") 2253 if test "$found_xincludes" = "no"; then 1361 2254 dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" 1362 2255 for i in $dirs ; do 1363 2256 if test -r $i/X11/Intrinsic.h; then 1364 AC_MSG_RESULT( $i)2257 AC_MSG_RESULT([$i]) 1365 2258 XINCLUDES=" -I$i" 2259 found_xincludes="yes" 1366 2260 break 1367 2261 fi … … 1370 2264 else 1371 2265 if test "$x_includes" != ""; then 1372 XINCLUDES=-I$x_includes 1373 else 1374 XINCLUDES="# no special path needed" 2266 XINCLUDES="-I$x_includes" 2267 found_xincludes="yes" 1375 2268 fi 1376 2269 fi 1377 if test "$XINCLUDES" = nope; then 1378 AC_MSG_RESULT(couldn't find any!) 1379 XINCLUDES="# no include files found" 2270 if test found_xincludes = "no"; then 2271 AC_MSG_RESULT([couldn't find any!]) 1380 2272 fi 1381 2273 1382 2274 if test "$no_x" = yes; then 1383 AC_MSG_CHECKING( for X11 libraries)2275 AC_MSG_CHECKING([for X11 libraries]) 1384 2276 XLIBSW=nope 1385 2277 dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" 1386 2278 for i in $dirs ; do 1387 2279 if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then 1388 AC_MSG_RESULT( $i)2280 AC_MSG_RESULT([$i]) 1389 2281 XLIBSW="-L$i -lX11" 1390 2282 x_libraries="$i" … … 1403 2295 fi 1404 2296 if test "$XLIBSW" = nope ; then 1405 AC_MSG_RESULT( couldn't find any! Using -lX11.)2297 AC_MSG_RESULT([could not find any! Using -lX11.]) 1406 2298 XLIBSW=-lX11 1407 2299 fi 1408 ]) 2300 if test x"${XLIBSW}" != x ; then 2301 PKG_LIBS="${PKG_LIBS} ${XLIBSW}" 2302 fi 2303 ]) 2304 1409 2305 #-------------------------------------------------------------------- 1410 # SC_BLOCKING_STYLE2306 # TEA_BLOCKING_STYLE 1411 2307 # 1412 2308 # The statements below check for systems where POSIX-style … … 1428 2324 #-------------------------------------------------------------------- 1429 2325 1430 AC_DEFUN( SC_BLOCKING_STYLE, [2326 AC_DEFUN([TEA_BLOCKING_STYLE], [ 1431 2327 AC_CHECK_HEADERS(sys/ioctl.h) 1432 2328 AC_CHECK_HEADERS(sys/filio.h) 2329 TEA_CONFIG_SYSTEM 1433 2330 AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) 1434 if test -f /usr/lib/NextStep/software_version; then1435 system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`1436 else1437 system=`uname -s`-`uname -r`1438 if test "$?" -ne 0 ; then1439 system=unknown1440 else1441 # Special check for weird MP-RAS system (uname returns weird1442 # results, and the version is kept in special file).1443 1444 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then1445 system=MP-RAS-`awk '{print $3}' /etc/.relid'`1446 fi1447 if test "`uname -s`" = "AIX" ; then1448 system=AIX-`uname -v`.`uname -r`1449 fi1450 fi1451 fi1452 2331 case $system in 1453 2332 # There used to be code here to use FIONBIO under AIX. However, it … … 1457 2336 1458 2337 OSF*) 1459 AC_DEFINE(USE_FIONBIO )1460 AC_MSG_RESULT( FIONBIO)2338 AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) 2339 AC_MSG_RESULT([FIONBIO]) 1461 2340 ;; 1462 2341 SunOS-4*) 1463 AC_DEFINE(USE_FIONBIO) 1464 AC_MSG_RESULT(FIONBIO) 1465 ;; 1466 ULTRIX-4.*) 1467 AC_DEFINE(USE_FIONBIO) 1468 AC_MSG_RESULT(FIONBIO) 2342 AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) 2343 AC_MSG_RESULT([FIONBIO]) 1469 2344 ;; 1470 2345 *) 1471 AC_MSG_RESULT( O_NONBLOCK)2346 AC_MSG_RESULT([O_NONBLOCK]) 1472 2347 ;; 1473 2348 esac … … 1475 2350 1476 2351 #-------------------------------------------------------------------- 1477 # SC_HAVE_VFORK 1478 # 1479 # Check to see whether the system provides a vfork kernel call. 1480 # If not, then use fork instead. Also, check for a problem with 1481 # vforks and signals that can cause core dumps if a vforked child 1482 # resets a signal handler. If the problem exists, then use fork 1483 # instead of vfork. 1484 # 1485 # Arguments: 1486 # none 1487 # 1488 # Results: 1489 # 1490 # Defines some of the following vars: 1491 # vfork (=fork) 1492 # 1493 #-------------------------------------------------------------------- 1494 1495 AC_DEFUN(SC_HAVE_VFORK, [ 1496 AC_TYPE_SIGNAL() 1497 AC_CHECK_FUNC(vfork, tcl_ok=1, tcl_ok=0) 1498 if test "$tcl_ok" = 1; then 1499 AC_MSG_CHECKING([vfork/signal bug]); 1500 AC_TRY_RUN([ 1501 #include <stdio.h> 1502 #include <signal.h> 1503 #include <sys/wait.h> 1504 int gotSignal = 0; 1505 sigProc(sig) 1506 int sig; 1507 { 1508 gotSignal = 1; 1509 } 1510 main() 1511 { 1512 int pid, sts; 1513 (void) signal(SIGCHLD, sigProc); 1514 pid = vfork(); 1515 if (pid < 0) { 1516 exit(1); 1517 } else if (pid == 0) { 1518 (void) signal(SIGCHLD, SIG_DFL); 1519 _exit(0); 1520 } else { 1521 (void) wait(&sts); 1522 } 1523 exit((gotSignal) ? 0 : 1); 1524 }], tcl_ok=1, tcl_ok=0, tcl_ok=0) 1525 1526 if test "$tcl_ok" = 1; then 1527 AC_MSG_RESULT(ok) 1528 else 1529 AC_MSG_RESULT([buggy, using fork instead]) 1530 fi 1531 fi 1532 rm -f core 1533 if test "$tcl_ok" = 0; then 1534 AC_DEFINE(vfork, fork) 1535 fi 1536 ]) 1537 1538 #-------------------------------------------------------------------- 1539 # SC_TIME_HANLDER 2352 # TEA_TIME_HANLDER 1540 2353 # 1541 2354 # Checks how the system deals with time.h, what time structures … … 1555 2368 #-------------------------------------------------------------------- 1556 2369 1557 AC_DEFUN( SC_TIME_HANDLER, [2370 AC_DEFUN([TEA_TIME_HANDLER], [ 1558 2371 AC_CHECK_HEADERS(sys/time.h) 1559 2372 AC_HEADER_TIME 1560 2373 AC_STRUCT_TIMEZONE 1561 2374 1562 AC_MSG_CHECKING([tm_tzadj in struct tm]) 1563 AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;], 1564 [AC_DEFINE(HAVE_TM_TZADJ) 1565 AC_MSG_RESULT(yes)], 1566 AC_MSG_RESULT(no)) 1567 1568 AC_MSG_CHECKING([tm_gmtoff in struct tm]) 1569 AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;], 1570 [AC_DEFINE(HAVE_TM_GMTOFF) 1571 AC_MSG_RESULT(yes)], 1572 AC_MSG_RESULT(no)) 2375 AC_CHECK_FUNCS(gmtime_r localtime_r) 2376 2377 AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, 2378 AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;], 2379 tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)) 2380 if test $tcl_cv_member_tm_tzadj = yes ; then 2381 AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?]) 2382 fi 2383 2384 AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, 2385 AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;], 2386 tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)) 2387 if test $tcl_cv_member_tm_gmtoff = yes ; then 2388 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?]) 2389 fi 1573 2390 1574 2391 # … … 1576 2393 # (like convex) have timezone functions, etc. 1577 2394 # 1578 have_timezone=no 1579 AC_MSG_CHECKING([long timezone variable]) 1580 AC_TRY_COMPILE([#include <time.h>], 2395 AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, 2396 AC_TRY_COMPILE([#include <time.h>], 1581 2397 [extern long timezone; 1582 2398 timezone += 1; 1583 2399 exit (0);], 1584 [have_timezone=yes 1585 AC_DEFINE(HAVE_TIMEZONE_VAR) 1586 AC_MSG_RESULT(yes)], 1587 AC_MSG_RESULT(no)) 1588 1589 # 1590 # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. 1591 # 1592 if test "$have_timezone" = no; then 1593 AC_MSG_CHECKING([time_t timezone variable]) 1594 AC_TRY_COMPILE([#include <time.h>], 1595 [extern time_t timezone; 1596 timezone += 1; 1597 exit (0);], 1598 [AC_DEFINE(HAVE_TIMEZONE_VAR) 1599 AC_MSG_RESULT(yes)], 1600 AC_MSG_RESULT(no)) 1601 fi 1602 1603 # 1604 # AIX does not have a timezone field in struct tm. When the AIX bsd 1605 # library is used, the timezone global and the gettimeofday methods are 1606 # to be avoided for timezone deduction instead, we deduce the timezone 1607 # by comparing the localtime result on a known GMT value. 1608 # 1609 1610 if test "`uname -s`" = "AIX" ; then 1611 AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes) 1612 if test $libbsd = yes; then 1613 AC_DEFINE(USE_DELTA_FOR_TZ) 2400 tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)) 2401 if test $tcl_cv_timezone_long = yes ; then 2402 AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) 2403 else 2404 # 2405 # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. 2406 # 2407 AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, 2408 AC_TRY_COMPILE([#include <time.h>], 2409 [extern time_t timezone; 2410 timezone += 1; 2411 exit (0);], 2412 tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)) 2413 if test $tcl_cv_timezone_time = yes ; then 2414 AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) 1614 2415 fi 1615 2416 fi … … 1617 2418 1618 2419 #-------------------------------------------------------------------- 1619 # SC_BUGGY_STRTOD2420 # TEA_BUGGY_STRTOD 1620 2421 # 1621 2422 # Under Solaris 2.4, strtod returns the wrong value for the … … 1623 2424 # and if the problem exists use a substitute procedure 1624 2425 # "fixstrtod" (provided by Tcl) that corrects the error. 2426 # Also, on Compaq's Tru64 Unix 5.0, 2427 # strtod(" ") returns 0.0 instead of a failure to convert. 1625 2428 # 1626 2429 # Arguments: … … 1634 2437 #-------------------------------------------------------------------- 1635 2438 1636 AC_DEFUN(SC_BUGGY_STRTOD, [ 1637 AC_CHECK_FUNC(strtod, tk_strtod=1, tk_strtod=0) 1638 if test "$tk_strtod" = 1; then 1639 AC_MSG_CHECKING([for Solaris 2.4 strtod bug]) 1640 AC_TRY_RUN([ 1641 extern double strtod(); 1642 int main() 1643 { 1644 char *string = "NaN"; 1645 char *term; 1646 strtod(string, &term); 1647 if ((term != string) && (term[-1] == 0)) { 1648 exit(1); 1649 } 1650 exit(0); 1651 }], tk_ok=1, tk_ok=0, tk_ok=0) 1652 if test "$tk_ok" = 1; then 1653 AC_MSG_RESULT(ok) 1654 else 1655 AC_MSG_RESULT(buggy) 1656 AC_DEFINE(strtod, fixstrtod) 2439 AC_DEFUN([TEA_BUGGY_STRTOD], [ 2440 AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) 2441 if test "$tcl_strtod" = 1; then 2442 AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ 2443 AC_TRY_RUN([ 2444 extern double strtod(); 2445 int main() { 2446 char *infString="Inf", *nanString="NaN", *spaceString=" "; 2447 char *term; 2448 double value; 2449 value = strtod(infString, &term); 2450 if ((term != infString) && (term[-1] == 0)) { 2451 exit(1); 2452 } 2453 value = strtod(nanString, &term); 2454 if ((term != nanString) && (term[-1] == 0)) { 2455 exit(1); 2456 } 2457 value = strtod(spaceString, &term); 2458 if (term == (spaceString+1)) { 2459 exit(1); 2460 } 2461 exit(0); 2462 }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, 2463 tcl_cv_strtod_buggy=buggy)]) 2464 if test "$tcl_cv_strtod_buggy" = buggy; then 2465 AC_LIBOBJ([fixstrtod]) 2466 USE_COMPAT=1 2467 AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?]) 1657 2468 fi 1658 2469 fi … … 1660 2471 1661 2472 #-------------------------------------------------------------------- 1662 # SC_TCL_LINK_LIBS2473 # TEA_TCL_LINK_LIBS 1663 2474 # 1664 2475 # Search for the libraries needed to link the Tcl shell. … … 1686 2497 #-------------------------------------------------------------------- 1687 2498 1688 AC_DEFUN( SC_TCL_LINK_LIBS, [2499 AC_DEFUN([TEA_TCL_LINK_LIBS], [ 1689 2500 #-------------------------------------------------------------------- 1690 2501 # On a few very rare systems, all of the libm.a stuff is … … 1698 2509 1699 2510 #-------------------------------------------------------------------- 1700 # On AIX systems, libbsd.a has to be linked in to support1701 # non-blocking file IO. This library has to be linked in after1702 # the MATH_LIBS or it breaks the pow() function. The way to1703 # insure proper sequencing, is to add it to the tail of MATH_LIBS.1704 # This library also supplies gettimeofday.1705 #--------------------------------------------------------------------1706 1707 libbsd=no1708 if test "`uname -s`" = "AIX" ; then1709 AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes)1710 if test $libbsd = yes; then1711 MATH_LIBS="$MATH_LIBS -lbsd"1712 fi1713 fi1714 1715 1716 #--------------------------------------------------------------------1717 2511 # Interactive UNIX requires -linet instead of -lsocket, plus it 1718 2512 # needs net/errno.h to define the socket-related error codes. … … 1720 2514 1721 2515 AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) 1722 AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H)) 2516 AC_CHECK_HEADER(net/errno.h, [ 2517 AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have <net/errno.h>?])]) 1723 2518 1724 2519 #-------------------------------------------------------------------- … … 1743 2538 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) 1744 2539 if test "$tcl_checkSocket" = 1; then 1745 AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", tcl_checkBoth=1) 2540 AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt, 2541 LIBS="$LIBS -lsocket", tcl_checkBoth=1)]) 1746 2542 fi 1747 2543 if test "$tcl_checkBoth" = 1; then … … 1750 2546 AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) 1751 2547 fi 1752 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main,1753 [LIBS="$LIBS -lnsl"]) )2548 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, 2549 [LIBS="$LIBS -lnsl"])]) 1754 2550 1755 2551 # Don't perform the eval of the libraries here because DL_LIBS 1756 # won't be set until we call SC_CONFIG_CFLAGS2552 # won't be set until we call TEA_CONFIG_CFLAGS 1757 2553 1758 2554 TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' … … 1761 2557 ]) 1762 2558 1763 #------------------------------------------------------------------------ 1764 # SC_MAKE_LIB -- 2559 #-------------------------------------------------------------------- 2560 # TEA_TCL_EARLY_FLAGS 2561 # 2562 # Check for what flags are needed to be passed so the correct OS 2563 # features are available. 2564 # 2565 # Arguments: 2566 # None 2567 # 2568 # Results: 2569 # 2570 # Might define the following vars: 2571 # _ISOC99_SOURCE 2572 # _LARGEFILE64_SOURCE 2573 # _LARGEFILE_SOURCE64 2574 # 2575 #-------------------------------------------------------------------- 2576 2577 AC_DEFUN([TEA_TCL_EARLY_FLAG],[ 2578 AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]), 2579 AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no, 2580 AC_TRY_COMPILE([[#define ]$1[ 1 2581 ]$2], $3, 2582 [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes, 2583 [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no))) 2584 if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then 2585 AC_DEFINE($1, 1, [Add the ]$1[ flag when building]) 2586 tcl_flags="$tcl_flags $1" 2587 fi 2588 ]) 2589 2590 AC_DEFUN([TEA_TCL_EARLY_FLAGS],[ 2591 AC_MSG_CHECKING([for required early compiler flags]) 2592 tcl_flags="" 2593 TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>], 2594 [char *p = (char *)strtoll; char *q = (char *)strtoull;]) 2595 TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>], 2596 [struct stat64 buf; int i = stat64("/", &buf);]) 2597 TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>], 2598 [char *p = (char *)open64;]) 2599 if test "x${tcl_flags}" = "x" ; then 2600 AC_MSG_RESULT([none]) 2601 else 2602 AC_MSG_RESULT([${tcl_flags}]) 2603 fi 2604 ]) 2605 2606 #-------------------------------------------------------------------- 2607 # TEA_TCL_64BIT_FLAGS 2608 # 2609 # Check for what is defined in the way of 64-bit features. 2610 # 2611 # Arguments: 2612 # None 2613 # 2614 # Results: 2615 # 2616 # Might define the following vars: 2617 # TCL_WIDE_INT_IS_LONG 2618 # TCL_WIDE_INT_TYPE 2619 # HAVE_STRUCT_DIRENT64 2620 # HAVE_STRUCT_STAT64 2621 # HAVE_TYPE_OFF64_T 2622 # 2623 #-------------------------------------------------------------------- 2624 2625 AC_DEFUN([TEA_TCL_64BIT_FLAGS], [ 2626 AC_MSG_CHECKING([for 64-bit integer type]) 2627 AC_CACHE_VAL(tcl_cv_type_64bit,[ 2628 tcl_cv_type_64bit=none 2629 # See if the compiler knows natively about __int64 2630 AC_TRY_COMPILE(,[__int64 value = (__int64) 0;], 2631 tcl_type_64bit=__int64, tcl_type_64bit="long long") 2632 # See if we should use long anyway Note that we substitute in the 2633 # type that is our current guess for a 64-bit type inside this check 2634 # program, so it should be modified only carefully... 2635 AC_TRY_COMPILE(,[switch (0) { 2636 case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; 2637 }],tcl_cv_type_64bit=${tcl_type_64bit})]) 2638 if test "${tcl_cv_type_64bit}" = none ; then 2639 AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) 2640 AC_MSG_RESULT([using long]) 2641 elif test "${tcl_cv_type_64bit}" = "__int64" \ 2642 -a "${TEA_PLATFORM}" = "windows" ; then 2643 # We actually want to use the default tcl.h checks in this 2644 # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* 2645 AC_MSG_RESULT([using Tcl header defaults]) 2646 else 2647 AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}, 2648 [What type should be used to define wide integers?]) 2649 AC_MSG_RESULT([${tcl_cv_type_64bit}]) 2650 2651 # Now check for auxiliary declarations 2652 AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[ 2653 AC_TRY_COMPILE([#include <sys/types.h> 2654 #include <sys/dirent.h>],[struct dirent64 p;], 2655 tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)]) 2656 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then 2657 AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?]) 2658 fi 2659 2660 AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[ 2661 AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p; 2662 ], 2663 tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)]) 2664 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then 2665 AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?]) 2666 fi 2667 2668 AC_CHECK_FUNCS(open64 lseek64) 2669 AC_MSG_CHECKING([for off64_t]) 2670 AC_CACHE_VAL(tcl_cv_type_off64_t,[ 2671 AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset; 2672 ], 2673 tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)]) 2674 dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the 2675 dnl functions lseek64 and open64 are defined. 2676 if test "x${tcl_cv_type_off64_t}" = "xyes" && \ 2677 test "x${ac_cv_func_lseek64}" = "xyes" && \ 2678 test "x${ac_cv_func_open64}" = "xyes" ; then 2679 AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?]) 2680 AC_MSG_RESULT([yes]) 2681 else 2682 AC_MSG_RESULT([no]) 2683 fi 2684 fi 2685 ]) 2686 2687 ## 2688 ## Here ends the standard Tcl configuration bits and starts the 2689 ## TEA specific functions 2690 ## 2691 2692 #------------------------------------------------------------------------ 2693 # TEA_INIT -- 2694 # 2695 # Init various Tcl Extension Architecture (TEA) variables. 2696 # This should be the first called TEA_* macro. 2697 # 2698 # Arguments: 2699 # none 2700 # 2701 # Results: 2702 # 2703 # Defines and substs the following vars: 2704 # CYGPATH 2705 # EXEEXT 2706 # Defines only: 2707 # TEA_VERSION 2708 # TEA_INITED 2709 # TEA_PLATFORM (windows or unix) 2710 # 2711 # "cygpath" is used on windows to generate native path names for include 2712 # files. These variables should only be used with the compiler and linker 2713 # since they generate native path names. 2714 # 2715 # EXEEXT 2716 # Select the executable extension based on the host type. This 2717 # is a lightweight replacement for AC_EXEEXT that doesn't require 2718 # a compiler. 2719 #------------------------------------------------------------------------ 2720 2721 AC_DEFUN([TEA_INIT], [ 2722 # TEA extensions pass this us the version of TEA they think they 2723 # are compatible with. 2724 TEA_VERSION="3.5" 2725 2726 AC_MSG_CHECKING([for correct TEA configuration]) 2727 if test x"${PACKAGE_NAME}" = x ; then 2728 AC_MSG_ERROR([ 2729 The PACKAGE_NAME variable must be defined by your TEA configure.in]) 2730 fi 2731 if test x"$1" = x ; then 2732 AC_MSG_ERROR([ 2733 TEA version not specified.]) 2734 elif test "$1" != "${TEA_VERSION}" ; then 2735 AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"]) 2736 else 2737 AC_MSG_RESULT([ok (TEA ${TEA_VERSION})]) 2738 fi 2739 case "`uname -s`" in 2740 *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) 2741 AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) 2742 EXEEXT=".exe" 2743 TEA_PLATFORM="windows" 2744 ;; 2745 *) 2746 CYGPATH=echo 2747 EXEEXT="" 2748 TEA_PLATFORM="unix" 2749 ;; 2750 esac 2751 2752 # Check if exec_prefix is set. If not use fall back to prefix. 2753 # Note when adjusted, so that TEA_PREFIX can correct for this. 2754 # This is needed for recursive configures, since autoconf propagates 2755 # $prefix, but not $exec_prefix (doh!). 2756 if test x$exec_prefix = xNONE ; then 2757 exec_prefix_default=yes 2758 exec_prefix=$prefix 2759 fi 2760 2761 AC_SUBST(EXEEXT) 2762 AC_SUBST(CYGPATH) 2763 2764 # This package name must be replaced statically for AC_SUBST to work 2765 AC_SUBST(PKG_LIB_FILE) 2766 # Substitute STUB_LIB_FILE in case package creates a stub library too. 2767 AC_SUBST(PKG_STUB_LIB_FILE) 2768 2769 # We AC_SUBST these here to ensure they are subst'ed, 2770 # in case the user doesn't call TEA_ADD_... 2771 AC_SUBST(PKG_STUB_SOURCES) 2772 AC_SUBST(PKG_STUB_OBJECTS) 2773 AC_SUBST(PKG_TCL_SOURCES) 2774 AC_SUBST(PKG_HEADERS) 2775 AC_SUBST(PKG_INCLUDES) 2776 AC_SUBST(PKG_LIBS) 2777 AC_SUBST(PKG_CFLAGS) 2778 ]) 2779 2780 #------------------------------------------------------------------------ 2781 # TEA_ADD_SOURCES -- 2782 # 2783 # Specify one or more source files. Users should check for 2784 # the right platform before adding to their list. 2785 # It is not important to specify the directory, as long as it is 2786 # in the generic, win or unix subdirectory of $(srcdir). 2787 # 2788 # Arguments: 2789 # one or more file names 2790 # 2791 # Results: 2792 # 2793 # Defines and substs the following vars: 2794 # PKG_SOURCES 2795 # PKG_OBJECTS 2796 #------------------------------------------------------------------------ 2797 AC_DEFUN([TEA_ADD_SOURCES], [ 2798 vars="$@" 2799 for i in $vars; do 2800 case $i in 2801 [\$]*) 2802 # allow $-var names 2803 PKG_SOURCES="$PKG_SOURCES $i" 2804 PKG_OBJECTS="$PKG_OBJECTS $i" 2805 ;; 2806 *) 2807 # check for existence - allows for generic/win/unix VPATH 2808 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/src/$i" \ 2809 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ 2810 ; then 2811 AC_MSG_ERROR([could not find source file '$i']) 2812 fi 2813 PKG_SOURCES="$PKG_SOURCES $i" 2814 # this assumes it is in a VPATH dir 2815 i=`basename $i` 2816 # handle user calling this before or after TEA_SETUP_COMPILER 2817 if test x"${OBJEXT}" != x ; then 2818 j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" 2819 else 2820 j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" 2821 fi 2822 PKG_OBJECTS="$PKG_OBJECTS $j" 2823 ;; 2824 esac 2825 done 2826 AC_SUBST(PKG_SOURCES) 2827 AC_SUBST(PKG_OBJECTS) 2828 ]) 2829 2830 #------------------------------------------------------------------------ 2831 # TEA_ADD_STUB_SOURCES -- 2832 # 2833 # Specify one or more source files. Users should check for 2834 # the right platform before adding to their list. 2835 # It is not important to specify the directory, as long as it is 2836 # in the generic, win or unix subdirectory of $(srcdir). 2837 # 2838 # Arguments: 2839 # one or more file names 2840 # 2841 # Results: 2842 # 2843 # Defines and substs the following vars: 2844 # PKG_STUB_SOURCES 2845 # PKG_STUB_OBJECTS 2846 #------------------------------------------------------------------------ 2847 AC_DEFUN([TEA_ADD_STUB_SOURCES], [ 2848 vars="$@" 2849 for i in $vars; do 2850 # check for existence - allows for generic/win/unix VPATH 2851 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ 2852 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ 2853 ; then 2854 AC_MSG_ERROR([could not find stub source file '$i']) 2855 fi 2856 PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" 2857 # this assumes it is in a VPATH dir 2858 i=`basename $i` 2859 # handle user calling this before or after TEA_SETUP_COMPILER 2860 if test x"${OBJEXT}" != x ; then 2861 j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" 2862 else 2863 j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" 2864 fi 2865 PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" 2866 done 2867 AC_SUBST(PKG_STUB_SOURCES) 2868 AC_SUBST(PKG_STUB_OBJECTS) 2869 ]) 2870 2871 #------------------------------------------------------------------------ 2872 # TEA_ADD_TCL_SOURCES -- 2873 # 2874 # Specify one or more Tcl source files. These should be platform 2875 # independent runtime files. 2876 # 2877 # Arguments: 2878 # one or more file names 2879 # 2880 # Results: 2881 # 2882 # Defines and substs the following vars: 2883 # PKG_TCL_SOURCES 2884 #------------------------------------------------------------------------ 2885 AC_DEFUN([TEA_ADD_TCL_SOURCES], [ 2886 vars="$@" 2887 for i in $vars; do 2888 # check for existence, be strict because it is installed 2889 if test ! -f "${srcdir}/$i" ; then 2890 AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i']) 2891 fi 2892 PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" 2893 done 2894 AC_SUBST(PKG_TCL_SOURCES) 2895 ]) 2896 2897 #------------------------------------------------------------------------ 2898 # TEA_ADD_HEADERS -- 2899 # 2900 # Specify one or more source headers. Users should check for 2901 # the right platform before adding to their list. 2902 # 2903 # Arguments: 2904 # one or more file names 2905 # 2906 # Results: 2907 # 2908 # Defines and substs the following vars: 2909 # PKG_HEADERS 2910 #------------------------------------------------------------------------ 2911 AC_DEFUN([TEA_ADD_HEADERS], [ 2912 vars="$@" 2913 for i in $vars; do 2914 # check for existence, be strict because it is installed 2915 if test ! -f "${srcdir}/$i" ; then 2916 AC_MSG_ERROR([could not find header file '${srcdir}/$i']) 2917 fi 2918 PKG_HEADERS="$PKG_HEADERS $i" 2919 done 2920 AC_SUBST(PKG_HEADERS) 2921 ]) 2922 2923 #------------------------------------------------------------------------ 2924 # TEA_ADD_INCLUDES -- 2925 # 2926 # Specify one or more include dirs. Users should check for 2927 # the right platform before adding to their list. 2928 # 2929 # Arguments: 2930 # one or more file names 2931 # 2932 # Results: 2933 # 2934 # Defines and substs the following vars: 2935 # PKG_INCLUDES 2936 #------------------------------------------------------------------------ 2937 AC_DEFUN([TEA_ADD_INCLUDES], [ 2938 vars="$@" 2939 for i in $vars; do 2940 PKG_INCLUDES="$PKG_INCLUDES $i" 2941 done 2942 AC_SUBST(PKG_INCLUDES) 2943 ]) 2944 2945 #------------------------------------------------------------------------ 2946 # TEA_ADD_LIBS -- 2947 # 2948 # Specify one or more libraries. Users should check for 2949 # the right platform before adding to their list. For Windows, 2950 # libraries provided in "foo.lib" format will be converted to 2951 # "-lfoo" when using GCC (mingw). 2952 # 2953 # Arguments: 2954 # one or more file names 2955 # 2956 # Results: 2957 # 2958 # Defines and substs the following vars: 2959 # PKG_LIBS 2960 #------------------------------------------------------------------------ 2961 AC_DEFUN([TEA_ADD_LIBS], [ 2962 vars="$@" 2963 for i in $vars; do 2964 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then 2965 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib 2966 i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'` 2967 fi 2968 PKG_LIBS="$PKG_LIBS $i" 2969 done 2970 AC_SUBST(PKG_LIBS) 2971 ]) 2972 2973 #------------------------------------------------------------------------ 2974 # TEA_ADD_CFLAGS -- 2975 # 2976 # Specify one or more CFLAGS. Users should check for 2977 # the right platform before adding to their list. 2978 # 2979 # Arguments: 2980 # one or more file names 2981 # 2982 # Results: 2983 # 2984 # Defines and substs the following vars: 2985 # PKG_CFLAGS 2986 #------------------------------------------------------------------------ 2987 AC_DEFUN([TEA_ADD_CFLAGS], [ 2988 PKG_CFLAGS="$PKG_CFLAGS $@" 2989 AC_SUBST(PKG_CFLAGS) 2990 ]) 2991 2992 #------------------------------------------------------------------------ 2993 # TEA_PREFIX -- 2994 # 2995 # Handle the --prefix=... option by defaulting to what Tcl gave 2996 # 2997 # Arguments: 2998 # none 2999 # 3000 # Results: 3001 # 3002 # If --prefix or --exec-prefix was not specified, $prefix and 3003 # $exec_prefix will be set to the values given to Tcl when it was 3004 # configured. 3005 #------------------------------------------------------------------------ 3006 AC_DEFUN([TEA_PREFIX], [ 3007 if test "${prefix}" = "NONE"; then 3008 prefix_default=yes 3009 if test x"${TCL_PREFIX}" != x; then 3010 AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}]) 3011 prefix=${TCL_PREFIX} 3012 else 3013 AC_MSG_NOTICE([--prefix defaulting to /usr/local]) 3014 prefix=/usr/local 3015 fi 3016 fi 3017 if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \ 3018 -o x"${exec_prefix_default}" = x"yes" ; then 3019 if test x"${TCL_EXEC_PREFIX}" != x; then 3020 AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}]) 3021 exec_prefix=${TCL_EXEC_PREFIX} 3022 else 3023 AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}]) 3024 exec_prefix=$prefix 3025 fi 3026 fi 3027 ]) 3028 3029 #------------------------------------------------------------------------ 3030 # TEA_SETUP_COMPILER_CC -- 3031 # 3032 # Do compiler checks the way we want. This is just a replacement 3033 # for AC_PROG_CC in TEA configure.in files to make them cleaner. 3034 # 3035 # Arguments: 3036 # none 3037 # 3038 # Results: 3039 # 3040 # Sets up CC var and other standard bits we need to make executables. 3041 #------------------------------------------------------------------------ 3042 AC_DEFUN([TEA_SETUP_COMPILER_CC], [ 3043 # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) 3044 # in this macro, they need to go into TEA_SETUP_COMPILER instead. 3045 3046 # If the user did not set CFLAGS, set it now to keep 3047 # the AC_PROG_CC macro from adding "-g -O2". 3048 if test "${CFLAGS+set}" != "set" ; then 3049 CFLAGS="" 3050 fi 3051 3052 AC_PROG_CC 3053 AC_PROG_CXX 3054 AC_PROG_CPP 3055 3056 AC_PROG_INSTALL 3057 3058 #-------------------------------------------------------------------- 3059 # Checks to see if the make program sets the $MAKE variable. 3060 #-------------------------------------------------------------------- 3061 3062 AC_PROG_MAKE_SET 3063 3064 #-------------------------------------------------------------------- 3065 # Find ranlib 3066 #-------------------------------------------------------------------- 3067 3068 AC_PROG_RANLIB 3069 3070 #-------------------------------------------------------------------- 3071 # Determines the correct binary file extension (.o, .obj, .exe etc.) 3072 #-------------------------------------------------------------------- 3073 3074 AC_OBJEXT 3075 AC_EXEEXT 3076 ]) 3077 3078 #------------------------------------------------------------------------ 3079 # TEA_SETUP_COMPILER -- 3080 # 3081 # Do compiler checks that use the compiler. This must go after 3082 # TEA_SETUP_COMPILER_CC, which does the actual compiler check. 3083 # 3084 # Arguments: 3085 # none 3086 # 3087 # Results: 3088 # 3089 # Sets up CC var and other standard bits we need to make executables. 3090 #------------------------------------------------------------------------ 3091 AC_DEFUN([TEA_SETUP_COMPILER], [ 3092 # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. 3093 AC_REQUIRE([TEA_SETUP_COMPILER_CC]) 3094 3095 #------------------------------------------------------------------------ 3096 # If we're using GCC, see if the compiler understands -pipe. If so, use it. 3097 # It makes compiling go faster. (This is only a performance feature.) 3098 #------------------------------------------------------------------------ 3099 3100 if test -z "$no_pipe" -a -n "$GCC"; then 3101 AC_MSG_CHECKING([if the compiler understands -pipe]) 3102 OLDCC="$CC" 3103 CC="$CC -pipe" 3104 AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC" 3105 AC_MSG_RESULT([no])) 3106 fi 3107 3108 #-------------------------------------------------------------------- 3109 # Common compiler flag setup 3110 #-------------------------------------------------------------------- 3111 3112 AC_C_BIGENDIAN 3113 if test "${TEA_PLATFORM}" = "unix" ; then 3114 TEA_TCL_LINK_LIBS 3115 TEA_MISSING_POSIX_HEADERS 3116 # Let the user call this, because if it triggers, they will 3117 # need a compat/strtod.c that is correct. Users can also 3118 # use Tcl_GetDouble(FromObj) instead. 3119 #TEA_BUGGY_STRTOD 3120 fi 3121 ]) 3122 3123 #------------------------------------------------------------------------ 3124 # TEA_MAKE_LIB -- 1765 3125 # 1766 3126 # Generate a line that can be used to build a shared/unshared library … … 1775 3135 # 1776 3136 # Defines the following vars: 1777 # MAKE_LIB Makefile rule for building a library1778 # MAKE_SHARED_LIB Makefile rule for building a shared library1779 # MAKE_UNSHARED_LIB Makefile rule for building a static1780 # library1781 # ------------------------------------------------------------------------1782 1783 AC_DEFUN(SC_MAKE_LIB, [ 1784 case "`uname -s`" in 1785 *win32* | *WIN32* | *CYGWIN_NT*) 1786 if test "${CC-cc}" = "cl"; then 1787 MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$]@_OBJECTS) " 1788 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$]@_OBJECTS)"1789 fi1790 ;;1791 *) 1792 MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$]@_OBJECTS)"1793 MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$]@_OBJECTS) \${SHLIB_LDFLAGS}\${SHLIB_LD_LIBS}"1794 ;;1795 esac3137 # CFLAGS - Done late here to note disturb other AC macros 3138 # MAKE_LIB - Command to execute to build the Tcl library; 3139 # differs depending on whether or not Tcl is being 3140 # compiled as a shared library. 3141 # MAKE_SHARED_LIB Makefile rule for building a shared library 3142 # MAKE_STATIC_LIB Makefile rule for building a static library 3143 # MAKE_STUB_LIB Makefile rule for building a stub library 3144 #------------------------------------------------------------------------ 3145 3146 AC_DEFUN([TEA_MAKE_LIB], [ 3147 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then 3148 MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)" 3149 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)" 3150 MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)" 3151 else 3152 MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)" 3153 MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" 3154 MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)" 3155 fi 1796 3156 1797 3157 if test "${SHARED_BUILD}" = "1" ; then 1798 MAKE_LIB= ${MAKE_SHARED_LIB}3158 MAKE_LIB="${MAKE_SHARED_LIB} " 1799 3159 else 1800 MAKE_LIB=${MAKE_STATIC_LIB} 3160 MAKE_LIB="${MAKE_STATIC_LIB} " 3161 fi 3162 3163 #-------------------------------------------------------------------- 3164 # Shared libraries and static libraries have different names. 3165 # Use the double eval to make sure any variables in the suffix is 3166 # substituted. (@@@ Might not be necessary anymore) 3167 #-------------------------------------------------------------------- 3168 3169 if test "${TEA_PLATFORM}" = "windows" ; then 3170 if test "${SHARED_BUILD}" = "1" ; then 3171 # We force the unresolved linking of symbols that are really in 3172 # the private libraries of Tcl and Tk. 3173 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" 3174 if test x"${TK_BIN_DIR}" != x ; then 3175 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" 3176 fi 3177 eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" 3178 else 3179 eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" 3180 fi 3181 # Some packages build their own stubs libraries 3182 eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" 3183 if test "$GCC" = "yes"; then 3184 PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} 3185 fi 3186 # These aren't needed on Windows (either MSVC or gcc) 3187 RANLIB="mt -manifest ${PKG_LIB_FILE}.manifest -outputresource:${PKG_LIB_FILE}\;2 ; test -f" 3188 RANLIB_STUB=: 3189 else 3190 RANLIB_STUB="${RANLIB}" 3191 if test "${SHARED_BUILD}" = "1" ; then 3192 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" 3193 if test x"${TK_BIN_DIR}" != x ; then 3194 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" 3195 fi 3196 eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" 3197 RANLIB=: 3198 else 3199 eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" 3200 fi 3201 # Some packages build their own stubs libraries 3202 eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" 3203 fi 3204 3205 # These are escaped so that only CFLAGS is picked up at configure time. 3206 # The other values will be substituted at make time. 3207 CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" 3208 if test "${SHARED_BUILD}" = "1" ; then 3209 CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" 1801 3210 fi 1802 3211 … … 1804 3213 AC_SUBST(MAKE_SHARED_LIB) 1805 3214 AC_SUBST(MAKE_STATIC_LIB) 1806 ]) 1807 1808 #------------------------------------------------------------------------ 1809 # SC_LIB_SPEC -- 3215 AC_SUBST(MAKE_STUB_LIB) 3216 AC_SUBST(RANLIB_STUB) 3217 AC_SUBST(RANLIB) 3218 ]) 3219 3220 #------------------------------------------------------------------------ 3221 # TEA_LIB_SPEC -- 1810 3222 # 1811 3223 # Compute the name of an existing object library located in libdir … … 1815 3227 # basename The base name of the library without version 1816 3228 # numbers, extensions, or "lib" prefixes. 1817 # 1818 # Requires: 3229 # extra_dir Extra directory in which to search for the 3230 # library. This location is used first, then 3231 # $prefix/$exec-prefix, then some defaults. 3232 # 3233 # Requires: 3234 # TEA_INIT and TEA_PREFIX must be called first. 1819 3235 # 1820 3236 # Results: … … 1825 3241 #------------------------------------------------------------------------ 1826 3242 1827 AC_DEFUN(SC_LIB_SPEC, [ 1828 AC_MSG_CHECKING(for $1 library) 1829 eval "sc_lib_name_dir=${libdir}" 3243 AC_DEFUN([TEA_LIB_SPEC], [ 3244 AC_MSG_CHECKING([for $1 library]) 3245 3246 # Look in exec-prefix for the library (defined by TEA_PREFIX). 3247 3248 tea_lib_name_dir="${exec_prefix}/lib" 3249 3250 # Or in a user-specified location. 3251 3252 if test x"$2" != x ; then 3253 tea_extra_lib_dir=$2 3254 else 3255 tea_extra_lib_dir=NONE 3256 fi 3257 1830 3258 for i in \ 1831 `ls -dr ${sc_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ 1832 `ls -dr ${sc_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ 3259 `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ 3260 `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ 3261 `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ 3262 `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ 1833 3263 `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ 1834 3264 `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ … … 1836 3266 `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do 1837 3267 if test -f "$i" ; then 1838 1839 sc_lib_name_dir=`dirname $i` 3268 tea_lib_name_dir=`dirname $i` 1840 3269 $1_LIB_NAME=`basename $i` 3270 $1_LIB_PATH_NAME=$i 1841 3271 break 1842 3272 fi 1843 3273 done 1844 3274 1845 case "`uname -s`" in 1846 *win32* | *WIN32* | *CYGWIN_NT*) 1847 $1_LIB_SPEC=${$1_LIB_NAME} 1848 ;; 1849 *) 1850 # Strip off the leading "lib" and trailing ".a" or ".so" 1851 1852 sc_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//'` 1853 $1_LIB_SPEC="-L${sc_lib_name_dir} -l${sc_lib_name_lib}" 1854 ;; 1855 esac 1856 if test "x$1_LIB_NAME" = x ; then 1857 AC_MSG_ERROR(not found) 3275 if test "${TEA_PLATFORM}" = "windows"; then 3276 $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\" 1858 3277 else 1859 AC_MSG_RESULT(${$1_LIB_SPEC}) 1860 fi 1861 ]) 1862 1863 #------------------------------------------------------------------------ 1864 # SC_PRIVATE_TCL_INCLUDE -- 3278 # Strip off the leading "lib" and trailing ".a" or ".so" 3279 3280 tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'` 3281 $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}" 3282 fi 3283 3284 if test "x${$1_LIB_NAME}" = x ; then 3285 AC_MSG_ERROR([not found]) 3286 else 3287 AC_MSG_RESULT([${$1_LIB_SPEC}]) 3288 fi 3289 ]) 3290 3291 #------------------------------------------------------------------------ 3292 # TEA_PRIVATE_TCL_HEADERS -- 1865 3293 # 1866 3294 # Locate the private Tcl include files … … 1869 3297 # 1870 3298 # Requires: 1871 # TCL_SRC_DIR Assumes that SC_LOAD_TCLCONFIG has3299 # TCL_SRC_DIR Assumes that TEA_LOAD_TCLCONFIG has 1872 3300 # already been called. 1873 3301 # … … 1886 3314 #------------------------------------------------------------------------ 1887 3315 1888 AC_DEFUN(SC_PRIVATE_TCL_HEADERS, [ 1889 AC_MSG_CHECKING(for Tcl private include files) 1890 1891 case "`uname -s`" in 1892 *win32* | *WIN32* | *CYGWIN_NT*) 1893 TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/..`\" 1894 TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/../generic`\" 1895 TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/../unix`\" 1896 TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/../win`\" 1897 TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/../bitmaps`\" 1898 TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/../tools`\" 1899 TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/../compat`\" 1900 TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} 1901 ;; 1902 *) 1903 TCL_TOP_DIR_NATIVE=${TCL_SRC_DIR} 1904 TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic' 1905 TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix' 1906 TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win' 1907 TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps' 1908 TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools' 1909 TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat' 1910 TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} 1911 ;; 1912 esac 3316 AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [ 3317 AC_MSG_CHECKING([for Tcl private include files]) 3318 3319 TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` 3320 TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" 3321 TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" 3322 TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" 3323 TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" 3324 TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\" 3325 TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\" 3326 TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\" 3327 3328 if test "${TEA_PLATFORM}" = "windows"; then 3329 TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} 3330 else 3331 TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} 3332 fi 3333 # We want to ensure these are substituted so as not to require 3334 # any *_NATIVE vars be defined in the Makefile 3335 TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" 3336 if test "`uname -s`" = "Darwin"; then 3337 # If Tcl was built as a framework, attempt to use 3338 # the framework's Headers and PrivateHeaders directories 3339 case ${TCL_DEFS} in 3340 *TCL_FRAMEWORK*) 3341 if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then 3342 TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else 3343 TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi 3344 ;; 3345 esac 3346 fi 1913 3347 1914 3348 AC_SUBST(TCL_TOP_DIR_NATIVE) … … 1920 3354 AC_SUBST(TCL_PLATFORM_DIR_NATIVE) 1921 3355 1922 TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"1923 3356 AC_SUBST(TCL_INCLUDES) 1924 AC_MSG_RESULT( Using srcdir found in tclConfig.sh)1925 ]) 1926 1927 #------------------------------------------------------------------------ 1928 # SC_PUBLIC_TCL_HEADERS --3357 AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}]) 3358 ]) 3359 3360 #------------------------------------------------------------------------ 3361 # TEA_PUBLIC_TCL_HEADERS -- 1929 3362 # 1930 3363 # Locate the installed public Tcl header files … … 1945 3378 #------------------------------------------------------------------------ 1946 3379 1947 AC_DEFUN(SC_PUBLIC_TCL_HEADERS, [ 1948 AC_MSG_CHECKING(for Tcl public headers) 1949 1950 AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files.], with_tclinclude=${withval}) 1951 1952 if test x"${with_tclinclude}" != x ; then 1953 if test -f "${with_tclinclude}/tcl.h" ; then 1954 ac_cv_c_tclh=${with_tclinclude} 1955 else 1956 AC_MSG_ERROR([${with_tclinclude} directory does not contain Tcl public header file tcl.h]) 1957 fi 1958 else 1959 AC_CACHE_VAL(ac_cv_c_tclh, [ 1960 # Use the value from --with-tclinclude, if it was given 1961 1962 if test x"${with_tclinclude}" != x ; then 3380 AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [ 3381 AC_MSG_CHECKING([for Tcl public headers]) 3382 3383 AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval}) 3384 3385 AC_CACHE_VAL(ac_cv_c_tclh, [ 3386 # Use the value from --with-tclinclude, if it was given 3387 3388 if test x"${with_tclinclude}" != x ; then 3389 if test -f "${with_tclinclude}/tcl.h" ; then 1963 3390 ac_cv_c_tclh=${with_tclinclude} 1964 3391 else 1965 # Check in the includedir, if --prefix was specified 1966 1967 eval "temp_includedir=${includedir}" 3392 AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h]) 3393 fi 3394 else 3395 if test "`uname -s`" = "Darwin"; then 3396 # If Tcl was built as a framework, attempt to use 3397 # the framework's Headers directory 3398 case ${TCL_DEFS} in 3399 *TCL_FRAMEWORK*) 3400 list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" 3401 ;; 3402 esac 3403 fi 3404 3405 # Look in the source dir only if Tcl is not installed, 3406 # and in that situation, look there before installed locations. 3407 if test -f "${TCL_BIN_DIR}/Makefile" ; then 3408 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" 3409 fi 3410 3411 # Check order: pkg --prefix location, Tcl's --prefix location, 3412 # relative to directory of tclConfig.sh. 3413 3414 eval "temp_includedir=${includedir}" 3415 list="$list \ 3416 `ls -d ${temp_includedir} 2>/dev/null` \ 3417 `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ 3418 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" 3419 if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then 3420 list="$list /usr/local/include /usr/include" 3421 if test x"${TCL_INCLUDE_SPEC}" != x ; then 3422 d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'` 3423 list="$list `ls -d ${d} 2>/dev/null`" 3424 fi 3425 fi 3426 for i in $list ; do 3427 if test -f "$i/tcl.h" ; then 3428 ac_cv_c_tclh=$i 3429 break 3430 fi 3431 done 3432 fi 3433 ]) 3434 3435 # Print a message based on how we determined the include path 3436 3437 if test x"${ac_cv_c_tclh}" = x ; then 3438 AC_MSG_ERROR([tcl.h not found. Please specify its location with --with-tclinclude]) 3439 else 3440 AC_MSG_RESULT([${ac_cv_c_tclh}]) 3441 fi 3442 3443 # Convert to a native path and substitute into the output files. 3444 3445 INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` 3446 3447 TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" 3448 3449 AC_SUBST(TCL_INCLUDES) 3450 ]) 3451 3452 #------------------------------------------------------------------------ 3453 # TEA_PRIVATE_TK_HEADERS -- 3454 # 3455 # Locate the private Tk include files 3456 # 3457 # Arguments: 3458 # 3459 # Requires: 3460 # TK_SRC_DIR Assumes that TEA_LOAD_TKCONFIG has 3461 # already been called. 3462 # 3463 # Results: 3464 # 3465 # Substs the following vars: 3466 # TK_INCLUDES 3467 #------------------------------------------------------------------------ 3468 3469 AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [ 3470 AC_MSG_CHECKING([for Tk private include files]) 3471 3472 TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` 3473 TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" 3474 TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" 3475 TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" 3476 TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" 3477 TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" 3478 if test "${TEA_PLATFORM}" = "windows"; then 3479 TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE} 3480 else 3481 TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE} 3482 fi 3483 # We want to ensure these are substituted so as not to require 3484 # any *_NATIVE vars be defined in the Makefile 3485 TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" 3486 if test "${TEA_WINDOWINGSYSTEM}" = "win32" \ 3487 -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then 3488 TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}" 3489 fi 3490 if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then 3491 TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx" 3492 fi 3493 if test "`uname -s`" = "Darwin"; then 3494 # If Tk was built as a framework, attempt to use 3495 # the framework's Headers and PrivateHeaders directories 3496 case ${TK_DEFS} in 3497 *TK_FRAMEWORK*) 3498 if test -d "${TK_BIN_DIR}/Headers" -a -d "${TK_BIN_DIR}/PrivateHeaders"; then 3499 TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"; fi 3500 ;; 3501 esac 3502 fi 3503 3504 AC_SUBST(TK_TOP_DIR_NATIVE) 3505 AC_SUBST(TK_UNIX_DIR_NATIVE) 3506 AC_SUBST(TK_WIN_DIR_NATIVE) 3507 AC_SUBST(TK_GENERIC_DIR_NATIVE) 3508 AC_SUBST(TK_XLIB_DIR_NATIVE) 3509 AC_SUBST(TK_PLATFORM_DIR_NATIVE) 3510 3511 AC_SUBST(TK_INCLUDES) 3512 AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}]) 3513 ]) 3514 3515 #------------------------------------------------------------------------ 3516 # TEA_PUBLIC_TK_HEADERS -- 3517 # 3518 # Locate the installed public Tk header files 3519 # 3520 # Arguments: 3521 # None. 3522 # 3523 # Requires: 3524 # CYGPATH must be set 3525 # 3526 # Results: 3527 # 3528 # Adds a --with-tkinclude switch to configure. 3529 # Result is cached. 3530 # 3531 # Substs the following vars: 3532 # TK_INCLUDES 3533 #------------------------------------------------------------------------ 3534 3535 AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [ 3536 AC_MSG_CHECKING([for Tk public headers]) 3537 3538 AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval}) 3539 3540 AC_CACHE_VAL(ac_cv_c_tkh, [ 3541 # Use the value from --with-tkinclude, if it was given 3542 3543 if test x"${with_tkinclude}" != x ; then 3544 if test -f "${with_tkinclude}/tk.h" ; then 3545 ac_cv_c_tkh=${with_tkinclude} 3546 else 3547 AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h]) 3548 fi 3549 else 3550 if test "`uname -s`" = "Darwin"; then 3551 # If Tk was built as a framework, attempt to use 3552 # the framework's Headers directory. 3553 case ${TK_DEFS} in 3554 *TK_FRAMEWORK*) 3555 list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`" 3556 ;; 3557 esac 3558 fi 3559 3560 # Look in the source dir only if Tk is not installed, 3561 # and in that situation, look there before installed locations. 3562 if test -f "${TK_BIN_DIR}/Makefile" ; then 3563 list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`" 3564 fi 3565 3566 # Check order: pkg --prefix location, Tk's --prefix location, 3567 # relative to directory of tkConfig.sh, Tcl's --prefix location, 3568 # relative to directory of tclConfig.sh. 3569 3570 eval "temp_includedir=${includedir}" 3571 list="$list \ 3572 `ls -d ${temp_includedir} 2>/dev/null` \ 3573 `ls -d ${TK_PREFIX}/include 2>/dev/null` \ 3574 `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \ 3575 `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ 3576 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" 3577 if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then 3578 list="$list /usr/local/include /usr/include" 3579 fi 3580 for i in $list ; do 3581 if test -f "$i/tk.h" ; then 3582 ac_cv_c_tkh=$i 3583 break 3584 fi 3585 done 3586 fi 3587 ]) 3588 3589 # Print a message based on how we determined the include path 3590 3591 if test x"${ac_cv_c_tkh}" = x ; then 3592 AC_MSG_ERROR([tk.h not found. Please specify its location with --with-tkinclude]) 3593 else 3594 AC_MSG_RESULT([${ac_cv_c_tkh}]) 3595 fi 3596 3597 # Convert to a native path and substitute into the output files. 3598 3599 INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` 3600 3601 TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" 3602 3603 AC_SUBST(TK_INCLUDES) 3604 3605 if test "${TEA_WINDOWINGSYSTEM}" = "win32" \ 3606 -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then 3607 # On Windows and Aqua, we need the X compat headers 3608 AC_MSG_CHECKING([for X11 header files]) 3609 if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then 3610 INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`" 3611 TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" 3612 AC_SUBST(TK_XINCLUDES) 3613 fi 3614 AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}]) 3615 fi 3616 ]) 3617 3618 #------------------------------------------------------------------------ 3619 # TEA_PROG_TCLSH 3620 # Determine the fully qualified path name of the tclsh executable 3621 # in the Tcl build directory or the tclsh installed in a bin 3622 # directory. This macro will correctly determine the name 3623 # of the tclsh executable even if tclsh has not yet been 3624 # built in the build directory. The tclsh found is always 3625 # associated with a tclConfig.sh file. This tclsh should be used 3626 # only for running extension test cases. It should never be 3627 # or generation of files (like pkgIndex.tcl) at build time. 3628 # 3629 # Arguments 3630 # none 3631 # 3632 # Results 3633 # Subst's the following values: 3634 # TCLSH_PROG 3635 #------------------------------------------------------------------------ 3636 3637 AC_DEFUN([TEA_PROG_TCLSH], [ 3638 AC_MSG_CHECKING([for tclsh]) 3639 if test -f "${TCL_BIN_DIR}/Makefile" ; then 3640 # tclConfig.sh is in Tcl build directory 3641 if test "${TEA_PLATFORM}" = "windows"; then 3642 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" 3643 else 3644 TCLSH_PROG="${TCL_BIN_DIR}/tclsh" 3645 fi 3646 else 3647 # tclConfig.sh is in install location 3648 if test "${TEA_PLATFORM}" = "windows"; then 3649 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" 3650 else 3651 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" 3652 fi 3653 list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \ 3654 `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \ 3655 `ls -d ${TCL_PREFIX}/bin 2>/dev/null`" 3656 for i in $list ; do 3657 if test -f "$i/${TCLSH_PROG}" ; then 3658 REAL_TCL_BIN_DIR="`cd "$i"; pwd`" 3659 break 3660 fi 3661 done 3662 TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}" 3663 fi 3664 AC_MSG_RESULT([${TCLSH_PROG}]) 3665 AC_SUBST(TCLSH_PROG) 3666 ]) 3667 3668 #------------------------------------------------------------------------ 3669 # TEA_PROG_WISH 3670 # Determine the fully qualified path name of the wish executable 3671 # in the Tk build directory or the wish installed in a bin 3672 # directory. This macro will correctly determine the name 3673 # of the wish executable even if wish has not yet been 3674 # built in the build directory. The wish found is always 3675 # associated with a tkConfig.sh file. This wish should be used 3676 # only for running extension test cases. It should never be 3677 # or generation of files (like pkgIndex.tcl) at build time. 3678 # 3679 # Arguments 3680 # none 3681 # 3682 # Results 3683 # Subst's the following values: 3684 # WISH_PROG 3685 #------------------------------------------------------------------------ 3686 3687 AC_DEFUN([TEA_PROG_WISH], [ 3688 AC_MSG_CHECKING([for wish]) 3689 if test -f "${TK_BIN_DIR}/Makefile" ; then 3690 # tkConfig.sh is in Tk build directory 3691 if test "${TEA_PLATFORM}" = "windows"; then 3692 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" 3693 else 3694 WISH_PROG="${TK_BIN_DIR}/wish" 3695 fi 3696 else 3697 # tkConfig.sh is in install location 3698 if test "${TEA_PLATFORM}" = "windows"; then 3699 WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" 3700 else 3701 WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}" 3702 fi 3703 list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \ 3704 `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \ 3705 `ls -d ${TK_PREFIX}/bin 2>/dev/null`" 3706 for i in $list ; do 3707 if test -f "$i/${WISH_PROG}" ; then 3708 REAL_TK_BIN_DIR="`cd "$i"; pwd`" 3709 break 3710 fi 3711 done 3712 WISH_PROG="${REAL_TK_BIN_DIR}/${WISH_PROG}" 3713 fi 3714 AC_MSG_RESULT([${WISH_PROG}]) 3715 AC_SUBST(WISH_PROG) 3716 ]) 3717 3718 #------------------------------------------------------------------------ 3719 # TEA_PATH_CONFIG -- 3720 # 3721 # Locate the ${1}Config.sh file and perform a sanity check on 3722 # the ${1} compile flags. These are used by packages like 3723 # [incr Tk] that load *Config.sh files from more than Tcl and Tk. 3724 # 3725 # Arguments: 3726 # none 3727 # 3728 # Results: 3729 # 3730 # Adds the following arguments to configure: 3731 # --with-$1=... 3732 # 3733 # Defines the following vars: 3734 # $1_BIN_DIR Full path to the directory containing 3735 # the $1Config.sh file 3736 #------------------------------------------------------------------------ 3737 3738 AC_DEFUN([TEA_PATH_CONFIG], [ 3739 # 3740 # Ok, lets find the $1 configuration 3741 # First, look for one uninstalled. 3742 # the alternative search directory is invoked by --with-$1 3743 # 3744 3745 if test x"${no_$1}" = x ; then 3746 # we reset no_$1 in case something fails here 3747 no_$1=true 3748 AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], with_$1config=${withval}) 3749 AC_MSG_CHECKING([for $1 configuration]) 3750 AC_CACHE_VAL(ac_cv_c_$1config,[ 3751 3752 # First check to see if --with-$1 was specified. 3753 if test x"${with_$1config}" != x ; then 3754 case ${with_$1config} in 3755 */$1Config.sh ) 3756 if test -f ${with_$1config}; then 3757 AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself]) 3758 with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'` 3759 fi;; 3760 esac 3761 if test -f "${with_$1config}/$1Config.sh" ; then 3762 ac_cv_c_$1config=`(cd ${with_$1config}; pwd)` 3763 else 3764 AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh]) 3765 fi 3766 fi 3767 3768 # then check for a private $1 installation 3769 if test x"${ac_cv_c_$1config}" = x ; then 1968 3770 for i in \ 1969 `ls -d ${temp_includedir} 2>/dev/null` \ 1970 /usr/local/include /usr/include ; do 1971 if test -f "$i/tcl.h" ; then 1972 ac_cv_c_tclh=$i 3771 ../$1 \ 3772 `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ 3773 `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ 3774 `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \ 3775 `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ 3776 ../../$1 \ 3777 `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ 3778 `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ 3779 `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ 3780 `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ 3781 ../../../$1 \ 3782 `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ 3783 `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ 3784 `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ 3785 `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ 3786 ${srcdir}/../$1 \ 3787 `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ 3788 `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ 3789 `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \ 3790 `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ 3791 ; do 3792 if test -f "$i/$1Config.sh" ; then 3793 ac_cv_c_$1config=`(cd $i; pwd)` 3794 break 3795 fi 3796 if test -f "$i/unix/$1Config.sh" ; then 3797 ac_cv_c_$1config=`(cd $i/unix; pwd)` 1973 3798 break 1974 3799 fi 1975 3800 done 1976 3801 fi 3802 3803 # check in a few common install locations 3804 if test x"${ac_cv_c_$1config}" = x ; then 3805 for i in `ls -d ${libdir} 2>/dev/null` \ 3806 `ls -d ${exec_prefix}/lib 2>/dev/null` \ 3807 `ls -d ${prefix}/lib 2>/dev/null` \ 3808 `ls -d /usr/local/lib 2>/dev/null` \ 3809 `ls -d /usr/contrib/lib 2>/dev/null` \ 3810 `ls -d /usr/lib 2>/dev/null` \ 3811 ; do 3812 if test -f "$i/$1Config.sh" ; then 3813 ac_cv_c_$1config=`(cd $i; pwd)` 3814 break 3815 fi 3816 done 3817 fi 1977 3818 ]) 1978 fi 1979 1980 # Print a message based on how we determined the include path 1981 1982 if test x"${ac_cv_c_tclh}" = x ; then 1983 AC_MSG_ERROR(tcl.h not found. Please specify its location with --with-tclinclude) 3819 3820 if test x"${ac_cv_c_$1config}" = x ; then 3821 $1_BIN_DIR="# no $1 configs found" 3822 AC_MSG_WARN([Cannot find $1 configuration definitions]) 3823 exit 0 3824 else 3825 no_$1= 3826 $1_BIN_DIR=${ac_cv_c_$1config} 3827 AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh]) 3828 fi 3829 fi 3830 ]) 3831 3832 #------------------------------------------------------------------------ 3833 # TEA_LOAD_CONFIG -- 3834 # 3835 # Load the $1Config.sh file 3836 # 3837 # Arguments: 3838 # 3839 # Requires the following vars to be set: 3840 # $1_BIN_DIR 3841 # 3842 # Results: 3843 # 3844 # Subst the following vars: 3845 # $1_SRC_DIR 3846 # $1_LIB_FILE 3847 # $1_LIB_SPEC 3848 # 3849 #------------------------------------------------------------------------ 3850 3851 AC_DEFUN([TEA_LOAD_CONFIG], [ 3852 AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh]) 3853 3854 if test -f "${$1_BIN_DIR}/$1Config.sh" ; then 3855 AC_MSG_RESULT([loading]) 3856 . ${$1_BIN_DIR}/$1Config.sh 1984 3857 else 1985 AC_MSG_RESULT(${ac_cv_c_tclh}) 1986 fi 1987 1988 # Convert to a native path and substitute into the output files. 1989 1990 INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` 1991 1992 TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" 1993 1994 AC_SUBST(TCL_INCLUDES) 1995 ]) 3858 AC_MSG_RESULT([file not found]) 3859 fi 3860 3861 # 3862 # If the $1_BIN_DIR is the build directory (not the install directory), 3863 # then set the common variable name to the value of the build variables. 3864 # For example, the variable $1_LIB_SPEC will be set to the value 3865 # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC 3866 # instead of $1_BUILD_LIB_SPEC since it will work with both an 3867 # installed and uninstalled version of Tcl. 3868 # 3869 3870 if test -f ${$1_BIN_DIR}/Makefile ; then 3871 AC_MSG_WARN([Found Makefile - using build library specs for $1]) 3872 $1_LIB_SPEC=${$1_BUILD_LIB_SPEC} 3873 $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC} 3874 $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH} 3875 fi 3876 3877 AC_SUBST($1_VERSION) 3878 AC_SUBST($1_BIN_DIR) 3879 AC_SUBST($1_SRC_DIR) 3880 3881 AC_SUBST($1_LIB_FILE) 3882 AC_SUBST($1_LIB_SPEC) 3883 3884 AC_SUBST($1_STUB_LIB_FILE) 3885 AC_SUBST($1_STUB_LIB_SPEC) 3886 AC_SUBST($1_STUB_LIB_PATH) 3887 ]) 3888 3889 #------------------------------------------------------------------------ 3890 # TEA_PATH_CELIB -- 3891 # 3892 # Locate Keuchel's celib emulation layer for targeting Win/CE 3893 # 3894 # Arguments: 3895 # none 3896 # 3897 # Results: 3898 # 3899 # Adds the following arguments to configure: 3900 # --with-celib=... 3901 # 3902 # Defines the following vars: 3903 # CELIB_DIR Full path to the directory containing 3904 # the include and platform lib files 3905 #------------------------------------------------------------------------ 3906 3907 AC_DEFUN([TEA_PATH_CELIB], [ 3908 # First, look for one uninstalled. 3909 # the alternative search directory is invoked by --with-celib 3910 3911 if test x"${no_celib}" = x ; then 3912 # we reset no_celib in case something fails here 3913 no_celib=true 3914 AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR], with_celibconfig=${withval}) 3915 AC_MSG_CHECKING([for Windows/CE celib directory]) 3916 AC_CACHE_VAL(ac_cv_c_celibconfig,[ 3917 # First check to see if --with-celibconfig was specified. 3918 if test x"${with_celibconfig}" != x ; then 3919 if test -d "${with_celibconfig}/inc" ; then 3920 ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` 3921 else 3922 AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory]) 3923 fi 3924 fi 3925 3926 # then check for a celib library 3927 if test x"${ac_cv_c_celibconfig}" = x ; then 3928 for i in \ 3929 ../celib-palm-3.0 \ 3930 ../celib \ 3931 ../../celib-palm-3.0 \ 3932 ../../celib \ 3933 `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \ 3934 ${srcdir}/../celib-palm-3.0 \ 3935 ${srcdir}/../celib \ 3936 `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \ 3937 ; do 3938 if test -d "$i/inc" ; then 3939 ac_cv_c_celibconfig=`(cd $i; pwd)` 3940 break 3941 fi 3942 done 3943 fi 3944 ]) 3945 if test x"${ac_cv_c_celibconfig}" = x ; then 3946 AC_MSG_ERROR([Cannot find celib support library directory]) 3947 else 3948 no_celib= 3949 CELIB_DIR=${ac_cv_c_celibconfig} 3950 CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` 3951 AC_MSG_RESULT([found $CELIB_DIR]) 3952 fi 3953 fi 3954 ]) 3955 3956 3957 # Local Variables: 3958 # mode: autoconf 3959 # End:
Note: See TracChangeset
for help on using the changeset viewer.