/bin/echo $ac_n "checking that C++ compiler can compile simple program""... $ac_c" 1>&6
fi
if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 760 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
#endif
int main() { return 0; }
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
/bin/echo "$ac_t""yes" 1>&6
else
/bin/echo "$ac_t""no" 1>&6
{ /bin/echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; }
fi
fi
rm -fr conftest*
if test "$cross_compiling" = no; then
/bin/echo $ac_n "checking that C++ static constructors and destructors are called""... $ac_c" 1>&6
fi
if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 783 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
#endif
extern "C" {
void _exit(int);
}
int i;
struct A {
char dummy;
A() { i = 1; }
~A() { if (i == 1) _exit(0); }
};
A a;
int main() { return 1; }
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
/bin/echo "$ac_t""yes" 1>&6
else
/bin/echo "$ac_t""no" 1>&6
{ /bin/echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; }
fi
fi
rm -fr conftest*
/bin/echo $ac_n "checking that header files support C++""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
#line 813 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() { return 0; }
int t() {
fopen(0, 0);
; return 0; }
EOF
if eval $ac_link; then
rm -rf conftest*
/bin/echo "$ac_t""yes" 1>&6
else
rm -rf conftest*
/bin/echo "$ac_t""no" 1>&6
{ /bin/echo "configure: error: header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)" 1>&2; exit 1; }
fi
rm -f conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.