autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

strings.h & string.h


From: Akim Demaille
Subject: strings.h & string.h
Date: 19 Oct 2000 15:25:24 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

Hi,

Werner raised this issue.  I don't feel competent to judge whether it
should be addressed by Autoconf or not.  I'd really like to have
opinions on this issue.  Maybe we need something like we have for
TIME_WITH_SYS_TIME?


--- Begin Message --- Subject: Re: Error building groff-1.61.1 on IBM AIX 4.1.5 Date: Wed, 09 Aug 2000 20:23:58 +0200 (CEST)
> I'm not too sure about the answer to your questions.  I can't find
> anything in the man pages either way.  I've gone ahead and attached
> a copy of the string.h and strings.h file to this note, just in case
> you can see something that makes sense.  This might help you to see
> what needs to be done.

I found the solution.  It is an autoconf bug (even in the latest CVS
version).  AIX conforms to the latest Unix 98 standard in defining
strncasecmp() and some other BSD functions in strings.h only.  This
means that the test below fails since it won't include strings.h if
string.h is available (and this is what I've missed).

Probably an additional test must be written which tests whether
string.h and strings.h can be included simultaneously.

A quick'n'dirty solution for you is to remove
`-DNEED_DECLARATION_STRNCASECMP' from the long DEFINES line in the
main makefile after configuration.

The optimal solution of course would be to get rid of strings.h
altogether...


    Werner


======================================================================


> >> configure:1865: checking whether strncasecmp must be declared
> >> configure:1902: /afs/btv.ibm.com/data/n37v/software/gnu-aix415/bin/g++ -c 
> >> -O
> 3 -mtune=power2  conftest.C 1>&5
> >> configure: In function `int main()':
> >> configure:1899: `strncasecmp' undeclared (first use this function)
> >> configure:1899: (Each undeclared identifier is reported only once
> >> configure:1899: for each function it appears in.)
> >> configure: failed program was:
> >> #line 1878 "configure"
> >> #include "confdefs.h"
> >> 
> >> #include <stdio.h>
> >> #ifdef HAVE_STRING_H
> >> #include <string.h>
> >> #else
> >> #ifdef HAVE_STRINGS_H
> >> #include <strings.h>
> >> #endif
> >> #endif
> >> #ifdef HAVE_STDLIB_H
> >> #include <stdlib.h>
> >> #endif
> >> #ifdef HAVE_UNISTD_H
> >> #include <unistd.h>
> >> #endif
> >> #ifdef HAVE_MATH_H
> >> #include <math.h>
> >> #endif
> >> int main() {
> >> char *(*pfn) = (char *(*)) strncasecmp
> >> ; return 0; }
> >
> 
> 




--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]