[PATCH] Several libc functions detection

Mads Martin Joergensen mmj at panther.mmj.dk
Fri Feb 14 02:08:46 EST 2003


Hey together,

I was a little disturbed by the following snippet from the configure
output:

[...]
checking for sigaction... yes
checking for strftime... no
checking for strcasestr... yes
checking for snprintf... no
checking for vsnprintf... no
checking for catopen... yes
[...]

Since I for sure have these 3 functions on my system.

I looked into it, and found out it depends on where the tests are
performed. When done before AC_LANG(C++) they all succeed, and they
are not libstdc++ functions, so please apply the following patch:

--- configure.in.old	2003-02-14 07:52:54.000000000 +0100
+++ configure.in	2003-02-14 08:00:03.000000000 +0100
@@ -18,6 +18,9 @@
 dnl Determine if maintainer portions of the Makefiles should be included.
 AM_MAINTAINER_MODE
 
+AC_CHECK_FUNCS(getpid setlocale sigaction strftime strcasestr snprintf)
+AC_CHECK_FUNCS(vsnprintf catopen catgets catclose)
+
 AC_LANG(C++)
 
 AC_CHECK_PROGS(regex_cmd, sed)
@@ -32,7 +35,6 @@
 dnl Check for existance of basename(), setlocale() and strftime()
 AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename,
 			  AC_DEFINE(HAVE_BASENAME) LIBS="$LIBS -lgen"))
-AC_CHECK_FUNCS(getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose)
 AC_CHECK_LIB(nsl, t_open, LIBS="$LIBS -lnsl")
 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
 

If you wonder why it might work on your systems the reason most probably
is I use gcc-3.3-pre here.

-- 
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.



More information about the openbox mailing list