--- ./configure.orig 2012-11-11 09:42:22.000000000 -0500 +++ ./configure 2012-11-11 09:46:01.000000000 -0500 @@ -38,8 +38,7 @@ return 0; } EOF -CXX=unknown; -for i in "CC" "g++" "cc" "$CC"; do +for i in "$CXX" "c++"; do if $i -c $tmp_file.C 2>/dev/null; then CXX="$i"; break; @@ -205,12 +205,19 @@ #include #include using namespace std; -void func() { map x; } +int main(void) { + map x; + return 0; +} EOF -if $CXX -c $tmp_file.C 2>/dev/null; then +if $CXX $tmp_file.C 2>/dev/null; then LIBSTDCXX_INCLUDES=""; LIBSTDCXX_LIBS=""; $echo 'works; no need to make "./libstd"'; +elif $CXX $tmp_file.C -lstdc++ 2>/dev/null; then + LIBSTDCXX_INCLUDES=""; + LIBSTDCXX_LIBS="-lstdc++"; + $echo 'works with libstdc++; no need to make "./libstd"'; else LIBSTDCXX_INCLUDES='-Ilibstd/include'; LIBSTDCXX_LIBS='libstd/libstd.a';