OSDN Git Service

d2188de98f2ea516b31c5770eca1875822057338
[pf3gnuchains/sourceware.git] / tcl / win / tcl.m4
1 #------------------------------------------------------------------------
2 # SC_PATH_TCLCONFIG --
3 #
4 #       Locate the tclConfig.sh file and perform a sanity check on
5 #       the Tcl compile flags
6 #       Currently a no-op for Windows
7 #
8 # Arguments:
9 #       PATCH_LEVEL     The patch level for Tcl if any.
10 #
11 # Results:
12 #
13 #       Adds the following arguments to configure:
14 #               --with-tcl=...
15 #
16 #       Sets the following vars:
17 #               TCL_BIN_DIR     Full path to the tclConfig.sh file
18 #------------------------------------------------------------------------
19
20 AC_DEFUN(SC_PATH_TCLCONFIG, [
21     AC_MSG_CHECKING([the location of tclConfig.sh])
22
23 # CYGNUS LOCAL
24     if test -d ../../tcl8.1/win;  then
25         TCL_BIN_DIR_DEFAULT=../../tcl8.1/win
26     else
27         TCL_BIN_DIR_DEFAULT=../../tcl/win
28     fi
29 # END CYGNUS LOCAL
30     
31     AC_ARG_WITH(tcl, [  --with-tcl=DIR          use Tcl 8.3 binaries from DIR],
32             TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`)
33     if test ! -d $TCL_BIN_DIR; then
34         AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
35     fi
36     if test ! -f $TCL_BIN_DIR/tclConfig.sh; then
37         AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR:  perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
38     fi
39     AC_MSG_RESULT($TCL_BIN_DIR/tclConfig.sh)
40 ])
41
42 #------------------------------------------------------------------------
43 # SC_PATH_TKCONFIG --
44 #
45 #       Locate the tkConfig.sh file
46 #       Currently a no-op for Windows
47 #
48 # Arguments:
49 #       none
50 #
51 # Results:
52 #
53 #       Adds the following arguments to configure:
54 #               --with-tk=...
55 #
56 #       Sets the following vars:
57 #               TK_BIN_DIR      Full path to the tkConfig.sh file
58 #------------------------------------------------------------------------
59
60 AC_DEFUN(SC_PATH_TKCONFIG, [
61     AC_MSG_CHECKING([the location of tkConfig.sh])
62
63     if test -d ../../tk8.3$1/win;  then
64         TK_BIN_DIR_DEFAULT=../../tk8.3$1/win
65     else
66         TK_BIN_DIR_DEFAULT=../../tk8.3/win
67     fi
68     
69     AC_ARG_WITH(tk, [  --with-tk=DIR          use Tk 8.3 binaries from DIR],
70             TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`)
71     if test ! -d $TK_BIN_DIR; then
72         AC_MSG_ERROR(Tk directory $TK_BIN_DIR does not exist)
73     fi
74     if test ! -f $TK_BIN_DIR/tkConfig.sh; then
75         AC_MSG_ERROR(There is no tkConfig.sh in $TK_BIN_DIR:  perhaps you did not specify the Tk *build* directory (not the toplevel Tk directory) or you forgot to configure Tk?)
76     fi
77
78     AC_MSG_RESULT([$TK_BIN_DIR/tkConfig.sh])
79 ])
80
81 #------------------------------------------------------------------------
82 # SC_LOAD_TCLCONFIG --
83 #
84 #       Load the tclConfig.sh file
85 #       Currently a no-op for Windows
86 #
87 # Arguments:
88 #       
89 #       Requires the following vars to be set:
90 #               TCL_BIN_DIR
91 #
92 # Results:
93 #
94 #       Subst the following vars:
95 #               TCL_BIN_DIR
96 #               TCL_SRC_DIR
97 #               TCL_LIB_FILE
98 #
99 #------------------------------------------------------------------------
100
101 AC_DEFUN(SC_LOAD_TCLCONFIG, [
102     AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
103
104     if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
105         AC_MSG_RESULT([loading])
106         . $TCL_BIN_DIR/tclConfig.sh
107     else
108         AC_MSG_RESULT([file not found])
109     fi
110
111     # The eval is required to do the TCL_DBGX substitution in the
112     # TCL_LIB_FILE variable.
113
114     eval TCL_LIB_FILE=${TCL_LIB_FILE}
115     eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
116
117     AC_SUBST(TCL_BIN_DIR)
118     AC_SUBST(TCL_SRC_DIR)
119     AC_SUBST(TCL_LIB_FILE)
120 ])
121
122 #------------------------------------------------------------------------
123 # SC_LOAD_TKCONFIG --
124 #
125 #       Load the tkConfig.sh file
126 #       Currently a no-op for Windows
127 #
128 # Arguments:
129 #       
130 #       Requires the following vars to be set:
131 #               TK_BIN_DIR
132 #
133 # Results:
134 #
135 #       Sets the following vars that should be in tkConfig.sh:
136 #               TK_BIN_DIR
137 #------------------------------------------------------------------------
138
139 AC_DEFUN(SC_LOAD_TKCONFIG, [
140     AC_MSG_CHECKING([for existence of $TCLCONFIG])
141
142     if test -f "$TK_BIN_DIR/tkConfig.sh" ; then
143         AC_MSG_CHECKING([loading $TK_BIN_DIR/tkConfig.sh])
144         . $TK_BIN_DIR/tkConfig.sh
145     else
146         AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh])
147     fi
148
149
150     AC_SUBST(TK_BIN_DIR)
151     AC_SUBST(TK_SRC_DIR)
152     AC_SUBST(TK_LIB_FILE)
153 ])
154
155 #------------------------------------------------------------------------
156 # SC_ENABLE_SHARED --
157 #
158 #       Allows the building of shared libraries
159 #
160 # Arguments:
161 #       none
162 #       
163 # Results:
164 #
165 #       Adds the following arguments to configure:
166 #               --enable-shared=yes|no
167 #
168 #       Defines the following vars:
169 #               STATIC_BUILD    Used for building import/export libraries
170 #                               on Windows.
171 #
172 #       Sets the following vars:
173 #               SHARED_BUILD    Value of 1 or 0
174 #------------------------------------------------------------------------
175
176 AC_DEFUN(SC_ENABLE_SHARED, [
177     AC_MSG_CHECKING([how to build libraries])
178     AC_ARG_ENABLE(shared,
179         [  --enable-shared         build and link with shared libraries [--enable-shared]],
180     [tcl_ok=$enableval], [tcl_ok=yes])
181
182     if test "${enable_shared+set}" = set; then
183         enableval="$enable_shared"
184         tcl_ok=$enableval
185     else
186         tcl_ok=yes
187     fi
188
189     if test "$tcl_ok" = "yes" ; then
190         AC_MSG_RESULT([shared])
191         SHARED_BUILD=1
192     else
193         AC_MSG_RESULT([static])
194         SHARED_BUILD=0
195         AC_DEFINE(STATIC_BUILD)
196     fi
197 ])
198
199 #------------------------------------------------------------------------
200 # SC_ENABLE_THREADS --
201 #
202 #       Specify if thread support should be enabled
203 #
204 # Arguments:
205 #       none
206 #       
207 # Results:
208 #
209 #       Adds the following arguments to configure:
210 #               --enable-threads=yes|no
211 #
212 #       Defines the following vars:
213 #               TCL_THREADS
214 #------------------------------------------------------------------------
215
216 AC_DEFUN(SC_ENABLE_THREADS, [
217     AC_MSG_CHECKING(for building with threads)
218     AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],
219         [tcl_ok=$enableval], [tcl_ok=no])
220
221     if test "$tcl_ok" = "yes"; then
222         AC_MSG_RESULT(yes)
223         TCL_THREADS=1
224         AC_DEFINE(TCL_THREADS)
225     else
226         TCL_THREADS=0
227         AC_MSG_RESULT([no (default)])
228     fi
229 ])
230
231 #------------------------------------------------------------------------
232 # SC_ENABLE_SYMBOLS --
233 #
234 #       Specify if debugging symbols should be used
235 #
236 # Arguments:
237 #       none
238 #       
239 #       Requires the following vars to be set in the Makefile:
240 #               CFLAGS_DEBUG
241 #               CFLAGS_OPTIMIZE
242 #               LDFLAGS_DEBUG
243 #               LDFLAGS_OPTIMIZE
244 #       
245 # Results:
246 #
247 #       Adds the following arguments to configure:
248 #               --enable-symbols
249 #
250 #       Defines the following vars:
251 #               CFLAGS_DEFAULT  Set to $(CFLAGS_DEBUG) if true
252 #                               Set to $(CFLAGS_OPTIMIZE) if false
253 #               LDFLAGS_DEFAULT Set to $(LDFLAGS_DEBUG) if true
254 #                               Set to $(LDFLAGS_OPTIMIZE) if false
255 #               DBGX            Debug library extension
256 #
257 #------------------------------------------------------------------------
258
259 AC_DEFUN(SC_ENABLE_SYMBOLS, [
260     AC_MSG_CHECKING([for build with symbols])
261     AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])
262
263     if test "$tcl_ok" = "yes"; then
264         CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
265         LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
266         DBGX=d
267         AC_MSG_RESULT([yes])
268     else
269         CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
270         LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
271         DBGX=""
272         AC_MSG_RESULT([no])
273     fi
274 ])
275
276
277 #--------------------------------------------------------------------
278 # SC_CONFIG_CFLAGS
279 #
280 #       Try to determine the proper flags to pass to the compiler
281 #       for building shared libraries and other such nonsense.
282 #
283 #       NOTE: The backslashes in quotes below are substituted twice
284 #       due to the fact that they are in a macro and then inlined
285 #       in the final configure script.
286 #
287 # Arguments:
288 #       none
289 #
290 # Results:
291 #
292 #       Can set the following vars:
293 #               EXTRA_CFLAGS
294 #               CFLAGS_DEBUG
295 #               CFLAGS_OPTIMIZE
296 #               CFLAGS_WARNING
297 #               LDFLAGS_DEBUG
298 #               LDFLAGS_OPTIMIZE
299 #               LDFLAGS_CONSOLE
300 #               LDFLAGS_WINDOW
301 #               CC_OBJNAME
302 #               CC_EXENAME
303 #               CYGPATH
304 #               STLIB_LD
305 #               SHLIB_LD
306 #               SHLIB_LD_LIBS
307 #               LIBS
308 #               AR
309 #               RC
310 #               RES
311 #
312 #               MAKE_LIB
313 #               MAKE_EXE
314 #               MAKE_DLL
315 #
316 #               LIBSUFFIX
317 #               LIBPREFIX
318 #               VENDORPREFIX
319 #               LIBRARIES
320 #               EXESUFFIX
321 #               DLLSUFFIX
322 #
323 #--------------------------------------------------------------------
324
325 AC_DEFUN(SC_CONFIG_CFLAGS, [
326     TCL_LIB_VERSIONS_OK=nodots
327
328     AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
329
330     # Check for a bug in gcc's windres that causes the
331     # compile to fail when a Windows native path is
332     # passed into windres. The mingw toolchain requires
333     # Windows native paths while Cygwin should work
334     # with both. Avoid the bug by passing a POSIX
335     # path when using the Cygwin toolchain.
336
337     if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then
338         conftest=/tmp/conftest.rc
339         echo "STRINGTABLE BEGIN" > $conftest
340         echo "101 \"name\"" >> $conftest
341         echo "END" >> $conftest
342
343         AC_MSG_CHECKING([for Windows native path bug in windres])
344         cyg_conftest=`$CYGPATH $conftest`
345         if AC_TRY_COMMAND($RC -o conftest.res.o $cyg_conftest) ; then
346             AC_MSG_RESULT([no])
347         else
348             AC_MSG_RESULT([yes])
349             CYGPATH=echo
350         fi
351         conftest=
352         cyg_conftest=
353     fi
354
355     if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
356         DEPARG='"$<"'
357     else
358         DEPARG='"$(shell $(CYGPATH) $<)"'
359     fi
360
361     # CYGNUS LOCAL
362     VENDORPREFIX="rh"
363     # END CYGNUS LOCAL
364
365     # set various compiler flags depending on whether we are using gcc or cl
366
367     AC_MSG_CHECKING([compiler flags])
368     if test "${GCC}" = "yes" ; then
369
370         # CYGNUS LOCAL
371         if test "$ac_cv_cygwin" = "yes" ; then
372             VENDORPREFIX="cyg"
373         fi
374         # END CYGNUS LOCAL
375
376         SHLIB_LD=""
377         SHLIB_LD_LIBS=""
378         LIBS=""
379         LIBS_GUI="-lgdi32 -lcomdlg32"
380         STLIB_LD="${AR} cr"
381         RC_OUT=-o
382         RC_TYPE=
383         RC_INCLUDE=--include
384         RES=res.o
385         MAKE_LIB="\${STLIB_LD} \[$]@"
386         POST_MAKE_LIB="\${RANLIB} \[$]@"
387         MAKE_EXE="\${CC} -o \[$]@"
388         LIBPREFIX="lib${VENDORPREFIX}"
389
390         if test "${SHARED_BUILD}" = "0" ; then
391             # static
392             AC_MSG_RESULT([using static flags])
393             runtime=
394             MAKE_DLL="echo "
395             LIBSUFFIX="s\${DBGX}.a"
396             LIBRARIES="\${STATIC_LIBRARIES}"
397             EXESUFFIX="s\${DBGX}.exe"
398             DLLSUFFIX=""
399         else
400             # dynamic
401             AC_MSG_RESULT([using shared flags])
402
403             # ad-hoc check to see if CC supports -shared.
404             if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
405                 AC_MSG_ERROR([${CC} does not support the -shared option.
406                 You will need to upgrade to a newer version of the toolchain.])
407             fi
408
409             runtime=
410             # Link with gcc since ld does not link to default libs like
411             # -luser32 and -lmsvcrt. We also need to add CFLAGS so important
412             # flags like -mno-cygwin get passed in to CC.
413             SHLIB_LD='${CC} -shared ${CFLAGS}'
414             # Add SHLIB_LD_LIBS to the Make rule, not here.
415             MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags} \
416                 -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)"
417
418             LIBSUFFIX="\${DBGX}.a"
419             DLLSUFFIX="\${DBGX}.dll"
420             EXESUFFIX="\${DBGX}.exe"
421             LIBRARIES="\${SHARED_LIBRARIES}"
422         fi
423
424         CFLAGS_DEBUG=-g
425         CFLAGS_OPTIMIZE=-O
426         CFLAGS_WARNING="-Wall -Wconversion"
427         LDFLAGS_DEBUG=
428         LDFLAGS_OPTIMIZE=
429
430         # Specify the CC output file names based on the target name
431         CC_OBJNAME="-o \[$]@"
432         CC_EXENAME="-o \[$]@"
433
434         # Specify linker flags depending on the type of app being 
435         # built -- Console vs. Window.
436         #
437         # We need to pass -e _WinMain@16 so that ld will use
438         # WinMain() instead of main() as the entry point. We can't
439         # use autoconf to check for this case since it would need
440         # to run an executable and that does not work when
441         # cross compiling. Remove this -e workaround once we
442         # require a gcc that does not have this bug.
443         LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}"
444         LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}"
445     else
446         SHLIB_LD="link -dll -nologo"
447         SHLIB_LD_LIBS="user32.lib advapi32.lib"
448         LIBS="user32.lib advapi32.lib"
449         LIBS_GUI="gdi32.lib comdlg32.lib"
450         STLIB_LD="lib -nologo"
451         RC="rc"
452         RC_OUT=-fo
453         RC_TYPE=-r
454         RC_INCLUDE=-i
455         RES=res
456         MAKE_LIB="\${STLIB_LD} -out:\[$]@"
457         POST_MAKE_LIB=
458         MAKE_EXE="\${CC} -Fe\[$]@"
459         LIBPREFIX=${VENDORPREFIX}
460
461         if test "${SHARED_BUILD}" = "0" ; then
462             # static
463             AC_MSG_RESULT([using static flags])
464             runtime=-MT
465             MAKE_DLL="echo "
466             LIBSUFFIX="s\${DBGX}.lib"
467             LIBRARIES="\${STATIC_LIBRARIES}"
468             EXESUFFIX="s\${DBGX}.exe"
469             DLLSUFFIX=""
470         else
471             # dynamic
472             AC_MSG_RESULT([using shared flags])
473             runtime=-MD
474             # Add SHLIB_LD_LIBS to the Make rule, not here.
475             MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@"
476             LIBSUFFIX="\${DBGX}.lib"
477             DLLSUFFIX="\${DBGX}.dll"
478             EXESUFFIX="\${DBGX}.exe"
479             LIBRARIES="\${SHARED_LIBRARIES}"
480         fi
481
482         EXTRA_CFLAGS="-YX"
483         CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
484 #       CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}"
485         CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}"
486         CFLAGS_WARNING="-W3"
487         LDFLAGS_DEBUG="-debug:full -debugtype:cv"
488         LDFLAGS_OPTIMIZE="-release"
489
490         # Specify the CC output file names based on the target name
491         CC_OBJNAME="-Fo\[$]@"
492         CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\[$]@')\""
493
494         # Specify linker flags depending on the type of app being 
495         # built -- Console vs. Window.
496         LDFLAGS_CONSOLE="-link -subsystem:console"
497         LDFLAGS_WINDOW="-link -subsystem:windows"
498     fi
499
500     # Define the same variables as used in tclConfig.sh so that macros
501     # that depend on these variables work for both Tcl and extensions.
502     TCL_LIB_SUFFIX=$LIBSUFFIX
503     TCL_VENDOR_PREFIX=$VENDORPREFIX
504 ])
505
506 #------------------------------------------------------------------------
507 # SC_WITH_TCL --
508 #
509 #       Location of the Tcl build directory.
510 #
511 # Arguments:
512 #       none
513 #
514 # Results:
515 #
516 #       Adds the following arguments to configure:
517 #               --with-tcl=...
518 #
519 #       Defines the following vars:
520 #               TCL_BIN_DIR     Full path to the tcl build dir.
521 #------------------------------------------------------------------------
522
523 AC_DEFUN(SC_WITH_TCL, [
524     if test -d ../../tcl8.3$1/win;  then
525         TCL_BIN_DEFAULT=../../tcl8.3$1/win
526     else
527         TCL_BIN_DEFAULT=../../tcl8.3/win
528     fi
529     
530     AC_ARG_WITH(tcl, [  --with-tcl=DIR          use Tcl 8.3 binaries from DIR],
531             TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`)
532     if test ! -d $TCL_BIN_DIR; then
533         AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
534     fi
535     if test ! -f $TCL_BIN_DIR/Makefile; then
536         AC_MSG_ERROR(There is no Makefile in $TCL_BIN_DIR:  perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
537     else
538         echo "building against Tcl binaries in: $TCL_BIN_DIR"
539     fi
540     AC_SUBST(TCL_BIN_DIR)
541 ])
542
543 #--------------------------------------------------------------------
544 # SC_TIME_HANLDER
545 #
546 #       Checks how the system deals with time.h, what time structures
547 #       are used on the system, and what fields the structures have.
548 #
549 # Arguments:
550 #       none
551 #       
552 # Results:
553 #
554 #       Defines some of the following vars:
555 #               USE_DELTA_FOR_TZ
556 #               HAVE_TM_GMTOFF
557 #               HAVE_TM_TZADJ
558 #               HAVE_TIMEZONE_VAR
559 #
560 #--------------------------------------------------------------------
561
562 AC_DEFUN(SC_TIME_HANDLER, [
563     AC_CHECK_HEADERS(sys/time.h)
564     AC_HEADER_TIME
565     AC_STRUCT_TIMEZONE
566
567     AC_MSG_CHECKING([tm_tzadj in struct tm])
568     AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
569             [AC_DEFINE(HAVE_TM_TZADJ)
570             AC_MSG_RESULT(yes)],
571             AC_MSG_RESULT(no))
572
573     AC_MSG_CHECKING([tm_gmtoff in struct tm])
574     AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
575             [AC_DEFINE(HAVE_TM_GMTOFF)
576             AC_MSG_RESULT(yes)],
577             AC_MSG_RESULT(no))
578
579     #
580     # Its important to include time.h in this check, as some systems
581     # (like convex) have timezone functions, etc.
582     #
583     have_timezone=no
584     AC_MSG_CHECKING([long timezone variable])
585     AC_TRY_COMPILE([#include <time.h>],
586             [extern long timezone;
587             timezone += 1;
588             exit (0);],
589             [have_timezone=yes
590             AC_DEFINE(HAVE_TIMEZONE_VAR)
591             AC_MSG_RESULT(yes)],
592             AC_MSG_RESULT(no))
593
594     #
595     # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
596     #
597     if test "$have_timezone" = no; then
598     AC_MSG_CHECKING([time_t timezone variable])
599     AC_TRY_COMPILE([#include <time.h>],
600             [extern time_t timezone;
601             timezone += 1;
602             exit (0);],
603             [AC_DEFINE(HAVE_TIMEZONE_VAR)
604             AC_MSG_RESULT(yes)],
605             AC_MSG_RESULT(no))
606     fi
607
608     #
609     # On some systems (eg Solaris 2.5.1), timezone is not declared in
610     # time.h unless you jump through hoops.  Instead of that, we just
611     # declare it ourselves when necessary.
612     #
613     if test "$have_timezone" = yes; then
614         AC_MSG_CHECKING(for timezone declaration)
615         changequote(<<,>>)
616         tzrx='^[        ]*extern.*timezone'
617         changequote([,])
618         AC_EGREP_HEADER($tzrx, time.h, [
619         AC_DEFINE(HAVE_TIMEZONE_DECL)
620         AC_MSG_RESULT(found)], AC_MSG_RESULT(missing))
621     fi
622
623     #
624     # AIX does not have a timezone field in struct tm. When the AIX bsd
625     # library is used, the timezone global and the gettimeofday methods are
626     # to be avoided for timezone deduction instead, we deduce the timezone
627     # by comparing the localtime result on a known GMT value.
628     #
629
630     if test "`uname -s`" = "AIX" ; then
631         AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes)
632         if test $libbsd = yes; then
633             AC_DEFINE(USE_DELTA_FOR_TZ)
634         fi
635     fi
636 ])
637