diff options
author | rathnor <rathnor> | 2003-06-15 12:28:37 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-06-15 12:28:37 (GMT) |
commit | b681e308a281559e4489cf5ad3d2a31f1494683a (patch) | |
tree | 7473bb7b6ff97538b428714af34eeae6d909f54d | |
parent | fbcd0c3191de8c2d50210c57f377857ccfd914c2 (diff) | |
download | fluxbox_lack-b681e308a281559e4489cf5ad3d2a31f1494683a.zip fluxbox_lack-b681e308a281559e4489cf5ad3d2a31f1494683a.tar.bz2 |
workaround for gcc 3.3. bug - alternate strftime test
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.in | 25 |
2 files changed, 27 insertions, 1 deletions
@@ -1,6 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.4: | 2 | Changes for 0.9.4: |
3 | *03/06/15: | 3 | *03/06/15: |
4 | * Apply workaround for strftime test - fails with gcc 3.3 due to | ||
5 | compiler bug? - thanks Joshua Kwan (Simon) | ||
6 | configure.in | ||
4 | * Fix group cycling, also adding new "NextGroup/PrevGroup" keys (Simon) | 7 | * Fix group cycling, also adding new "NextGroup/PrevGroup" keys (Simon) |
5 | Screen.hh/cc Keys.hh/cc fluxbox.cc | 8 | Screen.hh/cc Keys.hh/cc fluxbox.cc |
6 | *03/06/13: | 9 | *03/06/13: |
diff --git a/configure.in b/configure.in index a521abd..df9e325 100644 --- a/configure.in +++ b/configure.in | |||
@@ -31,7 +31,30 @@ AC_HEADER_TIME | |||
31 | 31 | ||
32 | dnl Check for existance of basename(), setlocale() and strftime() | 32 | dnl Check for existance of basename(), setlocale() and strftime() |
33 | AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename, LIBS="$LIBS -lgen")) | 33 | AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename, LIBS="$LIBS -lgen")) |
34 | AC_CHECK_FUNCS(getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose) | 34 | AC_CHECK_FUNCS(getpid setlocale sigaction strcasestr snprintf vsnprintf catopen catgets catclose) |
35 | dnl The autoconf test for strftime is broken now (due to gcc 3.3 bug?): | ||
36 | dnl Gcc 3.3 testprog = ``extern "C" char strftime;'', build with g++ test.cc | ||
37 | dnl breaks with: | ||
38 | dnl test.cc:1: error: nonnull argument with out-of-range operand number | ||
39 | dnl (arg 1, operand 3) | ||
40 | |||
41 | |||
42 | AC_MSG_CHECKING(for strftime) | ||
43 | |||
44 | AC_COMPILE_IFELSE( | ||
45 | [AC_LANG_PROGRAM([#include <time.h>], | ||
46 | [[ | ||
47 | char * s; | ||
48 | time_t t = time(NULL); | ||
49 | size_t x = strftime(s, 5, "%a", localtime(&t)); | ||
50 | ]] | ||
51 | )], | ||
52 | [ | ||
53 | AC_DEFINE(HAVE_STRFTIME, 1, [Define to 1 if you have the 'strftime' function.]) | ||
54 | AC_MSG_RESULT(yes) | ||
55 | ], | ||
56 | [AC_MSG_RESULT(no)]) | ||
57 | |||
35 | AC_CHECK_LIB(nsl, t_open, LIBS="$LIBS -lnsl") | 58 | AC_CHECK_LIB(nsl, t_open, LIBS="$LIBS -lnsl") |
36 | AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") | 59 | AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") |
37 | 60 | ||