termux-packages/packages/html2text/html2text-1.3.2a_configure....

148 lines
3.9 KiB
Diff

diff -uNr html2text-1.3.2a/configure html2text-1.3.2a.mod/configure
--- html2text-1.3.2a/configure 2004-01-12 17:47:18.000000000 +0200
+++ html2text-1.3.2a.mod/configure 2020-01-19 19:43:44.205959803 +0200
@@ -31,24 +31,6 @@
#
$echo 'Checking C++ compiler... \c';
-cat <<EOF >$tmp_file.C;
-#include <iostream>
-int main(int, char **) {
- std::cout << "hello" << std::endl;
- return 0;
-}
-EOF
-CXX=unknown;
-for i in "CC" "g++" "cc" "$CC"; do
- if $i -c $tmp_file.C 2>/dev/null; then
- CXX="$i";
- break;
- fi;
-done;
-if test "$CXX" = unknown; then
- $echo "Error: Could not find a working C++ compiler.";
- exit 1;
-fi;
$echo "use \"$CXX\"";
#
@@ -57,7 +39,7 @@
$echo 'Checking <sys/poll.h>... \c';
SYS_POLL_MISSING=unknown;
-cat <<EOF >$tmp_file.C;
+cat <<EOF >$tmp_file.cc;
#ifdef SYS_POLL_MISSING /* { */
struct pollfd { int fd; short events; short revents; };
extern "C" int poll(struct pollfd *ufds, unsigned int nfds, int timeout);
@@ -76,7 +58,7 @@
}
EOF
for i in "" -DSYS_POLL_MISSING; do
- if $CXX $tmp_file.C $i -o $tmp_file 2>/dev/null; then
+ if $CXX $tmp_file.cc $i -o $tmp_file 2>/dev/null; then
SYS_POLL_MISSING="$i";
break;
fi;
@@ -97,7 +79,7 @@
$echo 'Checking for socket libraries... \c';
SOCKET_LIBRARIES=unknown;
-cat >$tmp_file.C <<EOF;
+cat >$tmp_file.cc <<EOF;
extern "C" int socket();
extern "C" void gethostbyname();
int main() {
@@ -107,7 +89,7 @@
}
EOF
for i in "" "-lbsocket" "-lbsocket -lnsl" "-lsocket" "-lsocket -lnsl"; do
- if $CXX $tmp_file.C $i -o $tmp_file 2>/dev/null; then
+ if $CXX $tmp_file.cc $i -o $tmp_file 2>/dev/null; then
SOCKET_LIBRARIES="$i";
break;
fi;
@@ -128,7 +110,7 @@
$echo 'Checking "bool"... \c';
BOOL_DEFINITION=unknown;
-cat <<EOF >$tmp_file.C;
+cat <<EOF >$tmp_file.cc;
#ifdef BOOL_DEFINITION
BOOL_DEFINITION
#endif
@@ -144,7 +126,7 @@
'-DBOOL_DEFINITION="typedef unsigned char bool;const bool false=0,true=1;"' \
'-DBOOL_DEFINITION="enum bool{false,true};"'; \
do
- if eval "$CXX $tmp_file.C $i -o $tmp_file 2>/dev/null"; then
+ if eval "$CXX $tmp_file.cc $i -o $tmp_file 2>/dev/null"; then
BOOL_DEFINITION="$i";
break;
fi;
@@ -165,7 +147,7 @@
$echo 'Checking "explicit"... \c';
EXPLICIT=unknown;
-cat <<EOF >$tmp_file.C;
+cat <<EOF >$tmp_file.cc;
struct C {
explicit C(int) {}
};
@@ -175,7 +157,7 @@
'' \
'-Dexplicit='; \
do
- if eval "$CXX $tmp_file.C $i -o $tmp_file 2>/dev/null"; then
+ if eval "$CXX $tmp_file.cc $i -o $tmp_file 2>/dev/null"; then
EXPLICIT="$i";
break;
fi;
@@ -195,7 +177,7 @@
#
$echo 'Checking Standard C++ library... \c';
-cat <<EOF >$tmp_file.C;
+cat <<EOF >$tmp_file.cc;
#include <string>
#include <list>
#include <memory>
@@ -207,7 +189,7 @@
using namespace std;
void func() { map<string, string> x; }
EOF
-if $CXX -c $tmp_file.C 2>/dev/null; then
+if $CXX -c $tmp_file.cc 2>/dev/null; then
LIBSTDCXX_INCLUDES="";
LIBSTDCXX_LIBS="";
$echo 'works; no need to make "./libstd"';
@@ -223,7 +205,7 @@
#
AUTO_PTR_BROKEN="";
$echo 'Checking "auto_ptr"... \c';
-cat <<EOF >$tmp_file.C;
+cat <<EOF >$tmp_file.cc;
#include <memory>
#include <string>
#include <list>
@@ -243,7 +225,7 @@
return 0;
}
EOF
-if eval "$CXX -c $LIBSTDCXX_INCLUDES $EXPLICIT $BOOL_DEFINITION $tmp_file.C" 2>/dev/null; then
+if eval "$CXX -c $LIBSTDCXX_INCLUDES $EXPLICIT $BOOL_DEFINITION $tmp_file.cc" 2>/dev/null; then
$echo 'defined in <memory>, good';
else
$echo 'not defined or not working, use "./libstd/include/auto_ptr.h"';
@@ -255,8 +237,8 @@
#
MAKEDEPEND_INCLUDES="";
$echo 'Checking "makedepend" includes... \c';
-echo "#include <iostream>" >$tmp_file.C;
-MAKEDEPEND_INCLUDES=`$CXX -E $tmp_file.C 2>/dev/null |
+echo "#include <iostream>" >$tmp_file.cc;
+MAKEDEPEND_INCLUDES=`$CXX -E $tmp_file.cc 2>/dev/null |
sed -n \
-e 's/^#line .*"\(\/.*\)\/.*".*/-I\1/p' \
-e 's/^# [1-9][0-9]* "\(\/.*\)\/.*".*/-I\1/p' |