Article View: gnu.utils.bug
Article #674Autoconf and duplicated function tests
From: Francois Pinard
Date: Wed, 19 Aug 1992 17:55
Date: Wed, 19 Aug 1992 17:55
31 lines
1556 bytes
1556 bytes
Hi, people. In one application, my configure.in contains: AC_HAVE_FUNCS(strstr) AC_REPLACE_FUNCS(strstr) I wonder if the double check generated in configure by autoconf could be avoided. Once AC_HAVE_FUNCS knows for some function, the test does not need to be done again for AC_REPLACE_FUNCS. Here is the logic behind this particular usage. The AC_REPLACE_FUNCS is for providing a replacement strstr if the standard library does not contain it, it just plays with the Makefile variable LIBOBJS. The AC_HAVE_FUNCS determination is transmitted, via DEFS, to the module calling strstr, which uses it the following way: #ifdef USG #include <string.h> #else #include <strings.h> #endif #ifndef HAVE_STRSTR const char *strstr (); #endif If the system already offers strstr, <string.h> or <strings.h> will declare it, and my own definition will fatally conflict. -- Franc,ois Pinard ``Vivement GNU!'' pinard@iro.umontreal.ca (514) 588-4656 ...!uunet!iros1!pinard Consider joining the League for Programming Freedom. Email for details!
Technical Details
Message-ID:
<9208191755.AA05200@icule.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!icule.UUCP!pinardShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!icule.UUCP!pinard From: pinard@icule.UUCP (Francois Pinard) Subject: Autoconf and duplicated function tests Message-ID: <9208191755.AA05200@icule.UUCP> Sender: gnulists@ai.mit.edu Reply-To: pinard@iro.umontreal.ca Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 19 Aug 1992 17:55:44 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 32