[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
HPUX 11.00 with aCC vs. autoconf 2.57 [#8108]
From: |
Keith Bostic |
Subject: |
HPUX 11.00 with aCC vs. autoconf 2.57 [#8108] |
Date: |
Sun, 18 May 2003 13:28:31 -0400 (EDT) |
We're seeing a problem when using the AC_REPLACE_FUNCS macro on
HPUX 11.00 with aCC:
snowshoe.sleepycat.com:Berkeley DB {2} aCC -V
aCC: HP ANSI C++ B3910B A.03.13
snowshoe.sleepycat.com:Berkeley DB {3} uname -a
HP-UX snowshoe B.11.00 A 9000/770 2013231560 two-user license
The problem is autoconf is inserting the lines:
#ifdef __cplusplus
#include <stdlib.h>
#endif
in its test program for the AC_REPLACE_FUNCS macro, and,
with aCC on that results in the following error:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
configure:5399: checking for getopt
configure:5449: aCC -o conftest -O -g -D_REENTRANT conftest.c >&5
Error 497: "configure", line 5437 # There can be only one function 'getopt'
with "C" linkage; previous declaration was at ["/usr/include/stdlib.h", line
207].
char getopt ();
^^^^^^
Error 168: "configure", line 5453 # Illegal types associated with operator
'!=': 'char (*)()' and 'int (int,char *const *,const char *)'.
return f != getopt;
^^^^^^^^^^^
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
There's magic in autoconf trying to detect compiler programs
compiling both C and C++, and I suspect that is what's putting
the include in the test program, but I'm pretty clueless about
autoconf.
I've appended the config.log output for the error.
Has anyone run across this before?
Thanks,
--keith
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic address@hidden
Sleepycat Software Inc. keithbosticim (ymsgid)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com
configure:5452: $? = 2
configure: failed program was:
| #line 5404 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME "Berkeley DB"
| #define PACKAGE_TARNAME "db-4.2.22"
| #define PACKAGE_VERSION "4.2.22"
| #define PACKAGE_STRING "Berkeley DB 4.2.22"
| #define PACKAGE_BUGREPORT "address@hidden"
| #define DIAGNOSTIC 1
| #define DEBUG_ROP 1
| #define DEBUG_WOP 1
| #define UMRW 1
| #define CONFIG_TEST 1
| #define DEBUG 1
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| /* end confdefs.h. */
| /* System header to define __stub macros and hopefully few prototypes,
| which can conflict with char getopt (); below.
| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
| <limits.h> exists even on freestanding compilers. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char getopt ();
| /* The GNU C library defines this for functions which it implements
| to always fail with ENOSYS. Some functions are actually named
| something starting with __ and the normal name is an alias. */
| #if defined (__stub_getopt) || defined (__stub___getopt)
| choke me
| #else
| char (*f) () = getopt;
| #endif
| #ifdef __cplusplus
| }
| #endif
|
| int
| main ()
| {
| return f != getopt;
| ;
| return 0;
| }
configure:5469: result: no
- HPUX 11.00 with aCC vs. autoconf 2.57 [#8108],
Keith Bostic <=