aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-06-15 12:28:37 (GMT)
committerrathnor <rathnor>2003-06-15 12:28:37 (GMT)
commitb681e308a281559e4489cf5ad3d2a31f1494683a (patch)
tree7473bb7b6ff97538b428714af34eeae6d909f54d /configure.in
parentfbcd0c3191de8c2d50210c57f377857ccfd914c2 (diff)
downloadfluxbox_pavel-b681e308a281559e4489cf5ad3d2a31f1494683a.zip
fluxbox_pavel-b681e308a281559e4489cf5ad3d2a31f1494683a.tar.bz2
workaround for gcc 3.3. bug - alternate strftime test
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in25
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
32dnl Check for existance of basename(), setlocale() and strftime() 32dnl Check for existance of basename(), setlocale() and strftime()
33AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename, LIBS="$LIBS -lgen")) 33AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename, LIBS="$LIBS -lgen"))
34AC_CHECK_FUNCS(getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose) 34AC_CHECK_FUNCS(getpid setlocale sigaction strcasestr snprintf vsnprintf catopen catgets catclose)
35dnl The autoconf test for strftime is broken now (due to gcc 3.3 bug?):
36dnl Gcc 3.3 testprog = ``extern "C" char strftime;'', build with g++ test.cc
37dnl breaks with:
38dnl test.cc:1: error: nonnull argument with out-of-range operand number
39dnl (arg 1, operand 3)
40
41
42AC_MSG_CHECKING(for strftime)
43
44AC_COMPILE_IFELSE(
45[AC_LANG_PROGRAM([#include <time.h>],
46[[
47char * s;
48time_t t = time(NULL);
49size_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
35AC_CHECK_LIB(nsl, t_open, LIBS="$LIBS -lnsl") 58AC_CHECK_LIB(nsl, t_open, LIBS="$LIBS -lnsl")
36AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") 59AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
37 60