haiku: non-x86 spins use a normal libstdc++ filename. Handle the differences.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 09 Aug 2017 18:41:59 -0400
changeset 11205ab9d4689a439
parent 11204 539c60c59e35
child 11206 946452867513
haiku: non-x86 spins use a normal libstdc++ filename. Handle the differences.

Fixes Bugzilla #3730.
configure
configure.in
     1.1 --- a/configure	Wed Aug 09 18:30:48 2017 -0400
     1.2 +++ b/configure	Wed Aug 09 18:41:59 2017 -0400
     1.3 @@ -24031,7 +24031,32 @@
     1.4          fi
     1.5          # The Haiku platform requires special setup.
     1.6          SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
     1.7 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding -lstdc++.r4"
     1.8 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
     1.9 +        # Haiku's x86 spins use libstdc++.r4.so (for binary compat?), but
    1.10 +        #  other spins, like x86-64, use a more standard "libstdc++.so.*"
    1.11 +        as_ac_File=`$as_echo "ac_cv_file_"/boot/system/lib/libstdc++.r4.so"" | $as_tr_sh`
    1.12 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/boot/system/lib/libstdc++.r4.so\"" >&5
    1.13 +$as_echo_n "checking for \"/boot/system/lib/libstdc++.r4.so\"... " >&6; }
    1.14 +if eval \${$as_ac_File+:} false; then :
    1.15 +  $as_echo_n "(cached) " >&6
    1.16 +else
    1.17 +  test "$cross_compiling" = yes &&
    1.18 +  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
    1.19 +if test -r ""/boot/system/lib/libstdc++.r4.so""; then
    1.20 +  eval "$as_ac_File=yes"
    1.21 +else
    1.22 +  eval "$as_ac_File=no"
    1.23 +fi
    1.24 +fi
    1.25 +eval ac_res=\$$as_ac_File
    1.26 +	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
    1.27 +$as_echo "$ac_res" >&6; }
    1.28 +if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
    1.29 +  EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++.r4"
    1.30 +else
    1.31 +  EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++"
    1.32 +fi
    1.33 +
    1.34          ;;
    1.35      arm*-apple-darwin*|*-ios-*)
    1.36          ARCH=ios
     2.1 --- a/configure.in	Wed Aug 09 18:30:48 2017 -0400
     2.2 +++ b/configure.in	Wed Aug 09 18:41:59 2017 -0400
     2.3 @@ -3534,7 +3534,10 @@
     2.4          fi
     2.5          # The Haiku platform requires special setup.
     2.6          SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
     2.7 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding -lstdc++.r4"
     2.8 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
     2.9 +        # Haiku's x86 spins use libstdc++.r4.so (for binary compat?), but
    2.10 +        #  other spins, like x86-64, use a more standard "libstdc++.so.*"
    2.11 +        AC_CHECK_FILE("/boot/system/lib/libstdc++.r4.so", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++.r4", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++")
    2.12          ;;
    2.13      arm*-apple-darwin*|*-ios-*)
    2.14          ARCH=ios