I've attached a config.log that shows more problems with exit().
The problem is that the Visual C++ compiler thinks exit is declared
to be exported from the library it is compiling, and not to be
imported from another system library.  This causes only a warning
while compiling objects (exit status 0), but fails when we try to
link an executable later in the configure script...

I don't use exit() in my configure tests, and none of the macros
I use use exit (I check), and autoconf only uses exit to check for
a declaration of exit.  Can I please get an option to turn off
this bs test (AC_NEED_NO_STINKING_EXIT comes to mind)?  I really
don't need the exit declaration - it's presence has only caused
problems for us at coin3d.org and our users...

  Lars J
-- 
Innovation is one percent inspiration and ninetynine percent perspiration,
and in my case; twice that...  -- Norville Barnes, `The Hudsucker Proxy'
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure 2.49c, executed with
 > ./configure 

## ---------- ##
## Platform.  ##
## ---------- ##

hostname = MRROVIK
uname -m = i686
uname -r = 1.1.6(0.30/3/2)
uname -s = CYGWIN_NT-4.0
uname -v = 2000-11-21 21:00

/usr/bin/uname -p = unknown
/bin/uname -X     = 

/bin/arch              = 
/usr/bin/arch -k       = 
/usr/convex/getsysinfo = 
hostinfo               = 
/bin/machine           = 
/usr/bin/oslevel       = 
/bin/universe          = 

PATH = 
/usr/local/bin:/usr/bin:/bin:/cygdrive/c/ntapps/oracle/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/ntapps/TGS/OIV2.5.2/Doc:/cygdrive/d/ntapps/ULTRAE~1:/cygdrive/d/ntapps/polytrans:/cygdrive/d/ntapps/polytrans/vcplugin:/cygdrive/d/ntapps/tmake/bin:/cygdrive/d/ntapps/sim/soqt
 coin 
sdk/dll:/cygdrive/d/ntapps/qt/lib:/cygdrive/d/ntapps/doxygen/bin:/cygdrive/d/ntapps/emacs-20.6/bin:/cygdrive/d/ntapps/Rational/common:/cygdrive/c/ntapps/TGS/OIV2.6/Program:/cygdrive/c/ntapps/TGS/OIV2.6/Doc:/cygdrive/d/soqt/bin:/cygdrive/d/ntapps/doxygen/bin:/cygdrive/d/ntapps/ematrix8/lib/winnt:/cygdrive/d/workspace_er/genlibs/sim3/bin:/cygdrive/d/workspace_er/release/plugins:/cygdrive/d/qt/bin:/cygdrive/d/ntapps/qt/bin:/cygdrive/d/ntapps/Microsoft
 Visual Studio/Common/Tools/WinNT:/cygdrive/d/ntapps/Microsoft Visual 
Studio/Common/MSDev98/Bin:/cygdrive/d/ntapps/Microsoft Visual 
Studio/Common/Tools:/cygdrive/d/ntapps/Microsoft Visual Studio/VC98/bin

## ------------ ##
## Core tests.  ##
## ------------ ##

configure:1246: checking build system type
configure:1264: result: i686-pc-cygwin
configure:1271: checking host system type
configure:1285: result: i686-pc-cygwin
configure:1292: checking target system type
configure:1306: result: i686-pc-cygwin
configure:1331: checking for a BSD compatible install
configure:1380: result: /usr/bin/install -c
configure:1391: checking whether build environment is sane
configure:1434: result: yes
configure:1471: checking for mawk
configure:1496: result: no
configure:1471: checking for gawk
configure:1493: result: gawk
configure:1503: checking whether make sets ${MAKE}
configure:1523: result: yes
configure:1638: checking whether to enable maintainer-specific portions of Makefiles
configure:1647: result: no
configure:1746: checking for ranlib
configure:1769: result: true
configure:1783: checking how to run the C preprocessor
configure:1807: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.c >/dev/null 
2>conftest.err
configure:1810: $? = 0
configure:1829: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.c >/dev/null 
2>conftest.err
configure:1832: $? = 2
configure(1826) : fatal error C1083: Cannot open include file: 'ac_nonexistent.h': No 
such file or directory
configure: failed program was:
#line 1825 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
configure:1945: result: /cygdrive/d/coin/coin/cfg/m4/msvccc -E
configure:1990: checking for gcc
configure:2012: result: /cygdrive/d/coin/coin/cfg/m4/msvccc
configure:2234: checking whether the C compiler works
configure:2249: /cygdrive/d/coin/coin/cfg/m4/msvccc -o conftest    conftest.c  >&5
configure:2252: $? = 0
configure:2254: test -s conftest
configure:2257: $? = 0
configure:2262: ./conftest
configure:2265: $? = 0
configure:2280: result: yes
configure:2293: checking whether we are cross compiling
configure:2295: result: no
configure:2298: checking whether we are using the GNU C compiler
configure:2319: /cygdrive/d/coin/coin/cfg/m4/msvccc -c   conftest.c >&5
configure(2310) : error C2065: 'choke' : undeclared identifier
configure(2310) : error C2146: syntax error : missing ';' before identifier 'me'
configure(2313) : error C2065: 'me' : undeclared identifier
configure:2322: $? = 2
configure: failed program was:
#line 2304 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
configure:2335: result: no
configure:2338: checking for object suffix
configure:2356: /cygdrive/d/coin/coin/cfg/m4/msvccc -c   conftest.c >&5
configure:2359: $? = 0
configure:2378: result: obj
configure:2382: checking for executable suffix
configure:2401: /cygdrive/d/coin/coin/cfg/m4/msvccc    conftest.c  >&5
configure:2404: $? = 0
configure:2425: /cygdrive/d/coin/coin/cfg/m4/msvccc -o conftest    conftest.c  >&5
configure:2428: $? = 0
configure:2430: test -s conftest
configure:2433: $? = 0
configure:2460: result: .exe
configure:2467: checking whether /cygdrive/d/coin/coin/cfg/m4/msvccc accepts -g
configure:2485: /cygdrive/d/coin/coin/cfg/m4/msvccc -c -g  conftest.c >&5
configure:2488: $? = 0
configure:2499: result: yes
configure:2526: /cygdrive/d/coin/coin/cfg/m4/msvccc -c -g  conftest.c >&5
conftest.c(2) : error C2061: syntax error : identifier 'me'
conftest.c(2) : error C2059: syntax error : ';'
configure:2529: $? = 2
configure: failed program was:
#ifndef __cplusplus
  choke me
#endif
configure:2605: checking dependency style of /cygdrive/d/coin/coin/cfg/m4/msvccc
configure:2649: result: none
configure:2690: checking for non-GNU ld
configure:2720: result: /bin/ld
configure:2729: checking if the linker (/bin/ld) is GNU ld
GNU ld version 2.10.91 (with BFD 2.10.91)
configure:2741: result: yes
configure:2744: checking for BSD-compatible nm
configure:2778: result: /usr/bin/nm -B
configure:2781: checking whether ln -s works
configure:2800: result: yes
ltconfig:581: checking whether we are using GNU C
ltconfig:589: /cygdrive/d/coin/coin/cfg/m4/msvccc -E conftest.c
ltconfig:603: checking for object suffix
ltconfig:604: /cygdrive/d/coin/coin/cfg/m4/msvccc -c -g  conftest.c 1>&5
ltconfig:829: checking if /cygdrive/d/coin/coin/cfg/m4/msvccc supports -c -o file.o
ltconfig:830: /cygdrive/d/coin/coin/cfg/m4/msvccc -c -g -o out/conftest2.o  conftest.c 
1>&5
ltconfig:862: checking if /cygdrive/d/coin/coin/cfg/m4/msvccc supports -c -o file.lo
ltconfig:863: /cygdrive/d/coin/coin/cfg/m4/msvccc -c -g -c -o conftest.lo  conftest.c 
1>&5
ltconfig:958: checking if /cygdrive/d/coin/coin/cfg/m4/msvccc static flag  works
ltconfig:959: /cygdrive/d/coin/coin/cfg/m4/msvccc -o conftest -g    conftest.c  1>&5
GNU ld version 2.10.91 (with BFD 2.10.91)
ltconfig:1653: checking if global_symbol_pipe works
ltconfig:1654: /cygdrive/d/coin/coin/cfg/m4/msvccc -c -g  conftest.c 1>&5
ltconfig:1657: eval "/usr/bin/nm -B conftest.obj | sed -n -e 's/^.*[    
]\([ABCDGISTW]\)[       ][      ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' > 
conftest.nm"
cannot find nm_test_var in conftest.nm
ltconfig:1653: checking if global_symbol_pipe works
ltconfig:1654: /cygdrive/d/coin/coin/cfg/m4/msvccc -c -g  conftest.c 1>&5
ltconfig:1657: eval "/usr/bin/nm -B conftest.obj | sed -n -e 's/^.*[    
]\([ABCDGISTW]\)[       ][      ]*\(_\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' > 
conftest.nm"
ltconfig:1709: /cygdrive/d/coin/coin/cfg/m4/msvccc -o conftest -g   conftest.c 
conftstm.obj 1>&5
configure:3107: checking whether the C++ compiler works
configure:3122: /cygdrive/d/coin/coin/cfg/m4/msvccc -o conftest.exe /MDd   conftest.cc 
 >&5
configure:3125: $? = 0
configure:3127: test -s conftest.exe
configure:3130: $? = 0
configure:3135: ./conftest.exe
configure:3138: $? = 0
configure:3153: result: yes
configure:3166: checking whether we are cross compiling
configure:3168: result: no
configure:3171: checking whether we are using the GNU C++ compiler
configure:3192: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure(3186) : error C2065: 'choke' : undeclared identifier
configure(3186) : error C2146: syntax error : missing ';' before identifier 'me'
configure(3186) : error C2065: 'me' : undeclared identifier
configure:3195: $? = 2
configure: failed program was:
#line 3177 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
configure:3208: result: no
configure:3214: checking whether /cygdrive/d/coin/coin/cfg/m4/msvccc accepts -g
configure:3232: /cygdrive/d/coin/coin/cfg/m4/msvccc -c -g  conftest.cc >&5
configure:3235: $? = 0
configure:3246: result: yes
configure:3285: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure(3274) : error C2653: 'std' : is not a class or namespace name
configure(3274) : warning C4273: 'exit' : inconsistent dll linkage.  dllexport assumed.
configure(3274) : error C2653: 'std' : is not a class or namespace name
configure(3274) : error C2873: 'exit' : symbol cannot be used in a using-declaration
configure:3288: $? = 2
configure: failed program was:
#line 3272 "configure"
#include "confdefs.h"
#include <stdlib.h>
extern "C" void std::exit (int) throw (); using std::exit;
int
main ()
{
exit (42);
  ;
  return 0;
}
configure:3285: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure(3274) : error C2653: 'std' : is not a class or namespace name
configure(3274) : warning C4273: 'exit' : inconsistent dll linkage.  dllexport assumed.
configure(3274) : error C2653: 'std' : is not a class or namespace name
configure(3274) : error C2873: 'exit' : symbol cannot be used in a using-declaration
configure:3288: $? = 2
configure: failed program was:
#line 3272 "configure"
#include "confdefs.h"
#include <stdlib.h>
extern "C" void std::exit (int); using std::exit;
int
main ()
{
exit (42);
  ;
  return 0;
}
configure:3285: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure(3274) : warning C4273: 'exit' : inconsistent dll linkage.  dllexport assumed.
configure:3288: $? = 0
configure:3311: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure:3314: $? = 0
configure:3328: checking how to run the C++ preprocessor
configure:3348: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.cc >/dev/null 
2>conftest.err
configure:3351: $? = 0
configure:3370: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.cc >/dev/null 
2>conftest.err
configure:3373: $? = 2
configure(3367) : fatal error C1083: Cannot open include file: 'ac_nonexistent.h': No 
such file or directory
configure: failed program was:
#line 3366 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
configure:3486: result: /cygdrive/d/coin/coin/cfg/m4/msvccc -E
configure:3496: checking dependency style of /cygdrive/d/coin/coin/cfg/m4/msvccc
configure:3540: result: none
configure:3544: checking whether the C++ compiler handles inlined loops
configure:3570: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure:3573: $? = 0
configure:3585: result: yes
configure:3598: checking for function name variable
configure:3619: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure(3612) : error C2065: '__func__' : undeclared identifier
configure:3622: $? = 2
configure: failed program was:
#line 3607 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
(void)printf("%s\n",__func__)
  ;
  return 0;
}
configure:3647: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure(3640) : error C2065: '__PRETTY_FUNCTION__' : undeclared identifier
configure:3650: $? = 2
configure: failed program was:
#line 3635 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
(void)printf("%s\n",__PRETTY_FUNCTION__)
  ;
  return 0;
}
configure:3675: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure(3668) : error C2065: '__FUNCTION__' : undeclared identifier
configure:3678: $? = 2
configure: failed program was:
#line 3663 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
(void)printf("%s\n",__FUNCTION__)
  ;
  return 0;
}
configure:3690: result: none
configure:3721: checking for unistd.h
configure:3731: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.cc >/dev/null 
2>conftest.err
configure:3734: $? = 2
configure(3728) : fatal error C1083: Cannot open include file: 'unistd.h': No such 
file or directory
configure: failed program was:
#line 3727 "configure"
#include "confdefs.h"
#include <unistd.h>
configure:3754: result: no
configure:3721: checking for sys/types.h
configure:3731: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.cc >/dev/null 
2>conftest.err
configure:3734: $? = 0
configure:3754: result: yes
configure:3721: checking for sys/param.h
configure:3731: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.cc >/dev/null 
2>conftest.err
configure:3734: $? = 2
configure(3728) : fatal error C1083: Cannot open include file: 'sys/param.h': No such 
file or directory
configure: failed program was:
#line 3727 "configure"
#include "confdefs.h"
#include <sys/param.h>
configure:3754: result: no
configure:3721: checking for io.h
configure:3731: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.cc >/dev/null 
2>conftest.err
configure:3734: $? = 0
configure:3754: result: yes
configure:3721: checking for windows.h
configure:3731: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.cc >/dev/null 
2>conftest.err
configure:3734: $? = 0
configure:3754: result: yes
configure:3721: checking for winsock2.h
configure:3731: /cygdrive/d/coin/coin/cfg/m4/msvccc -E  conftest.cc >/dev/null 
2>conftest.err
configure:3734: $? = 0
configure:3754: result: yes
configure:3777: checking netinet/in.h
configure:3800: /cygdrive/d/coin/coin/cfg/m4/msvccc -c /MDd  conftest.cc >&5
configure(3789) : fatal error C1083: Cannot open include file: 'netinet/in.h': No such 
file or directory
configure:3803: $? = 2
configure: failed program was:
#line 3784 "configure"
#include "confdefs.h"

    #if HAVE_SYS_TYPES_H
    #include <sys/types.h>
    #endif /* HAVE_SYS_TYPES_H */
    #include <netinet/in.h>
int
main ()
{

  ;
  return 0;
}
configure:3814: result: false
configure:3828: checking network byteorder conversion
configure:3869: /cygdrive/d/coin/coin/cfg/m4/msvccc -o conftest.exe /MDd   conftest.cc 
  >&5
D:\ntapps\Microsoft Visual Studio\VC98\include\stdlib.h(261) : error C2375: 'exit' : 
redefinition; different linkage
        confdefs.h(9) : see declaration of 'exit'
configure:3872: $? = 2
configure: failed program was:
#line 3838 "configure"
#include "confdefs.h"

#if HAVE_WINSOCK2_H
#include <winsock2.h> /* MSWindows htonl() etc */
#endif /* HAVE_WINSOCK2_H */
#if HAVE_SYS_PARAM_H
#include <sys/param.h> /* FreeBSD htonl() etc */
#endif /* HAVE_SYS_PARAM_H */
#if HAVE_SYS_TYPES_H
/* According to Coin user Ralf Corsepius, at least SunOS4 needs
   to include sys/types.h before netinet/in.h. There have also
   been a problem report for FreeBSD which seems to indicate
   the same dependency on that platform aswell. */
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#if HAVE_NETINET_IN_H
#include <netinet/in.h> /* Linux htonl() etc */
#endif /* HAVE_NETINET_IN_H */

int
main ()
{

(void)htonl(0x42); (void)htons(0x42); (void)ntohl(0x42); (void)ntohs(0x42);

  ;
  return 0;
}
configure:3869: /cygdrive/d/coin/coin/cfg/m4/msvccc -o conftest.exe /MDd   conftest.cc 
-lwsock32  >&5
D:\ntapps\Microsoft Visual Studio\VC98\include\stdlib.h(261) : error C2375: 'exit' : 
redefinition; different linkage
        confdefs.h(9) : see declaration of 'exit'
configure:3872: $? = 2
configure: failed program was:
#line 3838 "configure"
#include "confdefs.h"

#if HAVE_WINSOCK2_H
#include <winsock2.h> /* MSWindows htonl() etc */
#endif /* HAVE_WINSOCK2_H */
#if HAVE_SYS_PARAM_H
#include <sys/param.h> /* FreeBSD htonl() etc */
#endif /* HAVE_SYS_PARAM_H */
#if HAVE_SYS_TYPES_H
/* According to Coin user Ralf Corsepius, at least SunOS4 needs
   to include sys/types.h before netinet/in.h. There have also
   been a problem report for FreeBSD which seems to indicate
   the same dependency on that platform aswell. */
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#if HAVE_NETINET_IN_H
#include <netinet/in.h> /* Linux htonl() etc */
#endif /* HAVE_NETINET_IN_H */

int
main ()
{

(void)htonl(0x42); (void)htons(0x42); (void)ntohl(0x42); (void)ntohs(0x42);

  ;
  return 0;
}
configure:3890: result: UNRESOLVED
configure:3902: error: could not find network conversion functions
configure: exit 1

Reply via email to