1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00

Permit textproc/html2text to be built with clang.

Patch submitted upstream

Submitted by:	keramida
This commit is contained in:
Eitan Adler 2013-01-26 19:12:05 +00:00
parent 383334ede1
commit b9590734ca
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=311044

View File

@ -10,3 +10,25 @@
if $i -c $tmp_file.C 2>/dev/null; then
CXX="$i";
break;
@@ -205,12 +205,19 @@
#include <new>
#include <vector>
using namespace std;
-void func() { map<string, string> x; }
+int main(void) {
+ map<string, string> 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';