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 /configure.in | |
parent | fbcd0c3191de8c2d50210c57f377857ccfd914c2 (diff) | |
download | fluxbox-b681e308a281559e4489cf5ad3d2a31f1494683a.zip fluxbox-b681e308a281559e4489cf5ad3d2a31f1494683a.tar.bz2 |
workaround for gcc 3.3. bug - alternate strftime test
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 25 |
1 files changed, 24 insertions, 1 deletions
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 | ||